Nektar++
|
#include <LibUtilities/BasicUtils/Equation.h>
#include <LibUtilities/Interpreter/Interpreter.h>
#include <LibUtilities/Python/NekPyConfig.hpp>
#include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp>
#include <boost/python/raw_function.hpp>
Go to the source code of this file.
Functions | |
py::object | Equation_SetConstants (py::tuple args, py::dict kwargs) |
Wrapper for Equation::SetConstants. More... | |
std::shared_ptr< Equation > | ConstructEquation (std::shared_ptr< Interpreter > evaluator, std::string expr, std::string vlist) |
Construct an equation object from an expression string expr and a list of variables vlist . More... | |
NekDouble | Equation_Evaluate1 (std::shared_ptr< Equation > equation) |
Wrapper for Equation::Evaluate (overloaded for no parameters). More... | |
NekDouble | Equation_Evaluate2 (std::shared_ptr< Equation > equation, const NekDouble x, const NekDouble y=0, const NekDouble z=0, const NekDouble t=0) |
Wrapper for Equation::Evaluate (overloaded for constant parameters). More... | |
Array< OneD, NekDouble > | Equation_Evaluate3 (std::shared_ptr< Equation > equation, const Array< OneD, const NekDouble > &x, const Array< OneD, const NekDouble > &y, const Array< OneD, const NekDouble > &z) |
Wrapper for Equation::Evaluate (overloaded for Array parameters). More... | |
Array< OneD, NekDouble > | Equation_Evaluate4 (std::shared_ptr< Equation > equation, const Array< OneD, const NekDouble > &x, const Array< OneD, const NekDouble > &y, const Array< OneD, const NekDouble > &z, const NekDouble t) |
Wrapper for Equation::Evaluate (overloaded for Array parameters + constant time). More... | |
Array< OneD, NekDouble > | Equation_Evaluate5 (std::shared_ptr< Equation > equation, const Array< OneD, const NekDouble > &x, const Array< OneD, const NekDouble > &y, const Array< OneD, const NekDouble > &z, const Array< OneD, const NekDouble > &t) |
Wrapper for Equation::Evaluate (overloaded for Array parameters + Array time). More... | |
void | export_Equation () |
std::shared_ptr< Equation > ConstructEquation | ( | std::shared_ptr< Interpreter > | evaluator, |
std::string | expr, | ||
std::string | vlist | ||
) |
Construct an equation object from an expression string expr
and a list of variables vlist
.
evaluator | Interpreter object |
expr | String contaning the expression |
vlist | String contining the list of variables in expr . |
Definition at line 94 of file Python/BasicUtils/Equation.cpp.
Referenced by export_Equation().
Wrapper for Equation::Evaluate (overloaded for no parameters).
equation | Equation object |
equation
. Definition at line 107 of file Python/BasicUtils/Equation.cpp.
Referenced by export_Equation().
NekDouble Equation_Evaluate2 | ( | std::shared_ptr< Equation > | equation, |
const NekDouble | x, | ||
const NekDouble | y = 0 , |
||
const NekDouble | z = 0 , |
||
const NekDouble | t = 0 |
||
) |
Wrapper for Equation::Evaluate (overloaded for constant parameters).
equation | Equation object from Python |
x | x-coordinate within the expression |
y | y-coordinate within the expression |
z | z-coordinate within the expression |
t | value of time within the expression |
Definition at line 123 of file Python/BasicUtils/Equation.cpp.
References Nektar::UnitTests::z().
Referenced by export_Equation().
Array< OneD, NekDouble > Equation_Evaluate3 | ( | std::shared_ptr< Equation > | equation, |
const Array< OneD, const NekDouble > & | x, | ||
const Array< OneD, const NekDouble > & | y, | ||
const Array< OneD, const NekDouble > & | z | ||
) |
Wrapper for Equation::Evaluate (overloaded for Array parameters).
equation | Equation object from Python |
x | x-coordinates within the expression |
y | y-coordinates within the expression |
z | z-coordinates within the expression |
Definition at line 140 of file Python/BasicUtils/Equation.cpp.
References Nektar::UnitTests::z().
Referenced by export_Equation().
Array< OneD, NekDouble > Equation_Evaluate4 | ( | std::shared_ptr< Equation > | equation, |
const Array< OneD, const NekDouble > & | x, | ||
const Array< OneD, const NekDouble > & | y, | ||
const Array< OneD, const NekDouble > & | z, | ||
const NekDouble | t | ||
) |
Wrapper for Equation::Evaluate (overloaded for Array parameters + constant time).
equation | Equation object from Python |
x | x-coordinates within the expression |
y | y-coordinates within the expression |
z | z-coordinates within the expression |
t | Value of time |
Definition at line 162 of file Python/BasicUtils/Equation.cpp.
References Nektar::UnitTests::z().
Referenced by export_Equation().
Array< OneD, NekDouble > Equation_Evaluate5 | ( | std::shared_ptr< Equation > | equation, |
const Array< OneD, const NekDouble > & | x, | ||
const Array< OneD, const NekDouble > & | y, | ||
const Array< OneD, const NekDouble > & | z, | ||
const Array< OneD, const NekDouble > & | t | ||
) |
Wrapper for Equation::Evaluate (overloaded for Array parameters + Array time).
equation | Equation object from Python |
x | x-coordinates within the expression |
y | y-coordinates within the expression |
z | z-coordinates within the expression |
t | Time values within the expression. |
Definition at line 185 of file Python/BasicUtils/Equation.cpp.
References Nektar::UnitTests::z().
Referenced by export_Equation().
py::object Equation_SetConstants | ( | py::tuple | args, |
py::dict | kwargs | ||
) |
Wrapper for Equation::SetConstants.
boost.python does not know how (by default) to convert from any Python datatype to a C++ map, so we add a pythonic way to set parameters through keyword arguments.
args | Python function positional arguments. |
kwargs | Python function keyword arguments. |
Definition at line 58 of file Python/BasicUtils/Equation.cpp.
References Nektar::LibUtilities::Equation::SetConstants().
Referenced by export_Equation().
void export_Equation | ( | ) |
Definition at line 196 of file Python/BasicUtils/Equation.cpp.
References ConstructEquation(), Equation_Evaluate1(), Equation_Evaluate2(), Equation_Evaluate3(), Equation_Evaluate4(), Equation_Evaluate5(), and Equation_SetConstants().
Referenced by BOOST_PYTHON_MODULE().