Skip to content

Commit

Permalink
- added newton solver as non-linear system solver
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@14997 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Willi Braun committed Jan 30, 2013
1 parent b3f99d0 commit 7fa439d
Show file tree
Hide file tree
Showing 6 changed files with 615 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SimulationRuntime/c/simulation/simulation_runtime.cpp
Expand Up @@ -250,12 +250,15 @@ int getNonlinearSolverMethod(int argc, char**argv)
return NS_HYBRID;
else if(*method == string("kinsol"))
return NS_KINSOL;
else if(*method == string("newton"))
return NS_NEWTON;

WARNING1(LOG_STDOUT, "unrecognized option -nls %s", method->c_str());
WARNING(LOG_STDOUT, "current options are:");
INDENT(LOG_STDOUT);
WARNING2(LOG_STDOUT, "%-18s [%s]", "hybrid", "default method");
WARNING2(LOG_STDOUT, "%-18s [%s]", "kinsol", "sundials/kinsol");
WARNING2(LOG_STDOUT, "%-18s [%s]", "newton", "newton Raphson");
THROW("see last warning");
return NS_NONE;
}
Expand Down
2 changes: 2 additions & 0 deletions SimulationRuntime/c/simulation/solver/CMakeLists.txt
Expand Up @@ -10,6 +10,7 @@ SET(solver_sources dassl.c
model_help.c
nonlinearSystem.c
nonlinearSolverHybrd.c
nonlinearSolverNewton.c
kinsolSolver.c
solver_main.c
stateset.c)
Expand All @@ -19,6 +20,7 @@ SET(solver_headers dassl.h
events.h
model_help.h
nonlinearSolverHybrd.h
nonlinearSolverNewton.h
kinsolSolver.h
nonlinearSystem.h
solver_main.h
Expand Down

0 comments on commit 7fa439d

Please sign in to comment.