Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from MarcusWalther/master
Textupdate for C++ Runtime documentation
- Loading branch information
Showing
6 changed files
with
63 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,7 @@ | ||
SimulationRuntime/cpp/CMakeFiles | ||
SimulationRuntime/cpp/Doc | ||
SimulationRuntime/cpp/Makefile | ||
SimulationRuntime/cpp/CMakeCache.txt | ||
SimulationRuntime/cpp/cmake_install.cmake | ||
SimulationRuntime/cpp/CppRuntimeDoc.config | ||
SimulationRuntime/cpp/Images/OMLogo.svg |
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,9 @@ | ||
/*! | ||
\page CodingStyle | ||
There are some rules that should be considered if a contribution to the runtime is made. | ||
|
||
- use 2 spaces instead of tabs | ||
- all function-names should start with a lower letter and multiple words should be combined in camel case (e.g. getName) | ||
- member variables start with an underscore, multiple words are combined in camel case as well (e.g. _isActive) | ||
- use the Doxygen JavaDoc/C - notation to document your code (this notation starts with a slash followed by 2 stars) | ||
*/ |
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,26 @@ | ||
/*! | ||
\page Eventhandling | ||
This page describes the basic workflow of event handling, which is performed by the solver in the c++ simulation runtime. There are two | ||
important classes that are part of the workflow. | ||
- Solver (e.g. CVode): Will estimate the step width and call the evaluation of state derivatives and zero crossing conditions | ||
- Model: Implements the evaluation of state derivatives and zero crossings | ||
|
||
\image html EventHandling.jpg "The image should visualize the basic principle of event handling. The numbers next to the circles indicate the order of execution." | ||
|
||
Consider a model with a variable x and a condition x > 0. The behavior of x is shown in the figure above. At an arbitrary point of the simulation, | ||
the solver will evaluate the state derivatives and zero crossing conditions, shown as blue circles. As long as the condition x > 0 will stay the same, no event handling | ||
is performed (steps 1 - 4). At step 5 the condition has changed from true to false, so the detailed event-point must be found. The solver will now start to evaluate all | ||
equations that are required to analyze the condition x > 0 for various points in time. These calculation are displayed as orange circles. Note that it's not necessary to | ||
calculate the state derivatives at these evaluation points, because the solver can approximate the states out of the already known values. Now the solver will hopefully find the | ||
point in time that triggered the event (green circle). | ||
|
||
For the implementation, the following functions are important: | ||
- Blue Circle: | ||
- evaluateODE | ||
- evluateZeroFunc | ||
- Orange Circle: | ||
- setStates | ||
- evaluateZeroFunc | ||
- Green Circle: | ||
- evaluateConditions | ||
*/ |
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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,13 +1,8 @@ | ||
/** | ||
\mainpage Overview | ||
|
||
This is the documentation of the C++ Simulation-Runtime, which is delivered as part of OpenModelica. Besides the source code documentation, there are some further informations given in this documentation. | ||
This is the documentation of the C++ Simulation-Runtime, which is delivered as part of OpenModelica. Besides the source code documentation, there are some further informations given in this documentation. Please take a look into the related pages, to get some information about the flags and the coding style. | ||
|
||
There are some open things TODO! | ||
\todo The linaer solver is set to "kinsol", but lapack is used instead | ||
|
||
<ul> | ||
<li> <a href="_flags.html">Available flags</a></li> | ||
<li> Using the logger </li> | ||
</ul> | ||
*/ |