Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added flag to use only one instance of algebraic loop solver in cpp
runtime Added flag to use only one instance of algebraich loop solver in cpp runtime [cppRuntime] Simplified handling algebraic loops in cpp runtime Use only one solver for linear and one for nonlinear system. If needed a own solver can used for a system removed accidentally added files added new AlglooperSolver class for linear and nonlinear systems adapted linear and nonlinear solvers on new interfaces ILinearAlgloopSolver and INonLinearAlgloopSolver added restart attribute to solve methode of algloopsolver, to restart without initialisation of algloop system Adapted cpp template for new algloop solver interface fix for intialize algloops at first solve call fix for init algloop solvers used by analytic jacobians fix for start algebraic loop solver without initializing Combined initialize and evaluate function from algebraic loops for parallel simulation use multiple instances of algloopsolver fix typo added flag to use only one instance of algloop solver in cpp runtime removed initiequation call for some kind of linear equations added missing code for jacobian algloopsolvers fix call for create kinsol solver in cpp runtime Belonging to [master]: - OpenModelica/OMCompiler#2574
- Loading branch information
1 parent
23656fa
commit 65d1390
Showing
53 changed files
with
792 additions
and
418 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
SimulationRuntime/cpp/Include/Core/Solver/INonLinearAlgLoopSolver.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#pragma once | ||
/** @addtogroup coreSolver | ||
* | ||
* @{ | ||
*/ | ||
class INonLinearAlgLoop; | ||
|
||
|
||
/*****************************************************************************/ | ||
/** | ||
Abstract interface class for numerical methods for the (possibly iterative) | ||
solution of algebraic loops in open modelica. | ||
\date October, 1st, 2008 | ||
\author | ||
*/ | ||
/***************************************************************************** | ||
Copyright (c) 2008, OSMC | ||
*****************************************************************************/ | ||
|
||
class INonLinearAlgLoopSolver | ||
{ | ||
public: | ||
/// Enumeration to denote the status of iteration | ||
enum ITERATIONSTATUS | ||
{ | ||
CONTINUE, | ||
SOLVERERROR, | ||
DONE, | ||
}; | ||
|
||
virtual ~INonLinearAlgLoopSolver() {}; | ||
|
||
/// (Re-) initialize the solver | ||
virtual void initialize() = 0; | ||
|
||
/// Solution of a (non-)linear system of equations | ||
virtual void solve() = 0; | ||
//solve for a single instance call | ||
virtual void solve(shared_ptr<INonLinearAlgLoop> algLoop,bool first_solve = false) = 0; | ||
|
||
|
||
/// Returns the status of iteration | ||
virtual ITERATIONSTATUS getIterationStatus() = 0; | ||
virtual void stepCompleted(double time) = 0; | ||
virtual void restoreOldValues() = 0; | ||
virtual void restoreNewValues() = 0; | ||
}; | ||
/** @} */ // end of coreSolver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.