Skip to content
Snippets Groups Projects
Commit 943fa63c authored by Tomáš Oberhuber's avatar Tomáš Oberhuber Committed by Jakub Klinkovský
Browse files

Adding figure to the ODE tutorial.

parent a6e9a1f7
No related branches found
No related tags found
1 merge request!125ODE solvers
......@@ -36,12 +36,12 @@ ELSE()
ADD_CUSTOM_TARGET( RunODESolversExamples ALL DEPENDS ${HOST_OUTPUTS} )
ENDIF()
ADD_CUSTOM_COMMAND(
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/StaticODESolver-SineExample.py
ADD_CUSTOM_COMMAND(
COMMAND python3 ${CMAKE_CURRENT_SOURCE_DIR}/StaticODESolver-SineExample.py
${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/StaticODESolver-SineExample.out
${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/StaticODESolver-SineExample.pdf
OUTPUT StaticODESolver-SineExample.pdf
${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/StaticODESolver-SineExample.png
OUTPUT StaticODESolver-SineExample.png
DEPENDS ${TNL_DOCUMENTATION_OUTPUT_SNIPPETS_PATH}/StaticODESolver-SineExample.out
VERBATIM )
ADD_CUSTOM_TARGET( ProcessODESolversExamplesResults ALL DEPENDS StaticODESolver-SineExample.pdf )
\ No newline at end of file
ADD_CUSTOM_TARGET( ProcessODESolversExamplesResults ALL DEPENDS StaticODESolver-SineExample.png )
\ No newline at end of file
......@@ -45,6 +45,10 @@ The lambda function is supposed to compute just the value of `fu`. It is `t * si
\include StaticODESolver-SineExample.out
And the graph of the solution looks as follows:
\image{inline} html StaticODESolver-SineExample.png "Solution of the scalar ODE problem"
In the next example, we demonstrate use of the static ODE solver to solve a system of ODEs, namely the [Lorenz system](https://en.wikipedia.org/wiki/Lorenz_system) which reads as:
\f[ \frac{dx}{dt} = \sigma( x - y),\ \rm{ on }\ (0,T) \f]
......@@ -102,11 +106,11 @@ The second example is a parametric analysis of the Lorenz model
\f[ \vec u(0) = (x(0),y(0),z(0)) = \vec u_{ini} \f]
which we solve for different values of the model parameters
\f[ \sigma_i = \sigma_{min} + i \Delta \sigma, \f]
\f[ \rho_j = \rho_{min} + j \Delta \rho, \f]
\f[ \beta_k = \beta_{min} + k \Delta \beta, \f]
where we set \f$ \Delta \sigma = \Delta \rho = \Delta \beta = l / (p-1) \f$ and where \f$ i,j,k = 0, 1, \ldots, p - 1 \f$. The code of the solver looks as follows:
\includelineno Solvers/ODE/StaticODESolver-LorenzParallelExample.h
......
......@@ -43,6 +43,7 @@ PROJECT_NUMBER="version $_branch:$(git rev-parse --short HEAD)"
# Generate documentation
PROJECT_NUMBER="$PROJECT_NUMBER" doxygen
cp output_snippets/*png html
# Install
if [[ "$INSTALL" == "yes" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment