Alsvinn
0.5.3
The fast FVM simulator with UQ support
|
The PythonInitialData class sets the initial data through a python string. More...
#include <alsfvm/init/PythonInitialData.hpp>
Public Member Functions | |
PythonInitialData (const std::string &programString, const Parameters ¶meters) | |
PythonInitialData constructs the object. More... | |
virtual void | setInitialData (volume::Volume &conservedVolume, volume::Volume &primitiveVolume, equation::CellComputer &cellComputer, grid::Grid &grid) override |
setInitialData sets the initial data More... | |
virtual void | setParameters (const Parameters ¶meters) override |
Sets the given parameters. More... | |
virtual boost::property_tree::ptree | getDescription () const override |
![]() | |
virtual | ~InitialData () |
The PythonInitialData class sets the initial data through a python string.
alsfvm::init::PythonInitialData::PythonInitialData | ( | const std::string & | programString, |
const Parameters & | parameters | ||
) |
PythonInitialData constructs the object.
programString | the string containing the full python program. |
parameters | a list of parameters to give to the python code this could eg be the adiabatic constant (gamma), some uq parameters, etc |
The programString should be in the following format:
We also accept scripts on the form of a function. This should have form
The momentum (m) and energy will be computed automatically.
|
overridevirtual |
Should provide a description of the initial data (eg the python script used for the initial data). Does not need to be machine parseable in any way, this is for "human readable reproducability" and extra debugging information.
Implements alsfvm::init::InitialData.
|
overridevirtual |
setInitialData sets the initial data
conservedVolume | conserved volume to fill |
cellComputer | an instance of the cell computer for the equation |
primitiveVolume | an instance of the primtive volume for the equation |
grid | underlying grid. |
Implements alsfvm::init::InitialData.
|
overridevirtual |
Sets the given parameters.
Implements alsfvm::init::InitialData.