![]() |
KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
This function allows to call a function method of type f(x, y, z, t) implemented in python style. More...
#include <function_parser_utility.h>
Public Member Functions | |
Life Cycle | |
| BasicGenericFunctionUtility (const std::string &rFunctionBody) | |
| Default constructor. More... | |
| BasicGenericFunctionUtility (BasicGenericFunctionUtility const &rOther) | |
| Copy constructor. More... | |
| virtual | ~BasicGenericFunctionUtility () |
| Destructor. More... | |
Operations | |
| Pointer | Clone () |
| This method clones the current function instance. More... | |
| virtual bool | UseLocalSystem () |
| This method returns if it depends on space. More... | |
| bool | DependsOnSpace () |
| This method returns if it depends on space. More... | |
| std::string | FunctionBody () |
| This method returns the function body. More... | |
| virtual double | RotateAndCallFunction (const double x, const double y, const double z, const double t, const double X=0.0, const double Y=0.0, const double Z=0.0) |
| This method rotates and calls the evaluation function. More... | |
| double | CallFunction (const double x, const double y, const double z, const double t, const double X=0.0, const double Y=0.0, const double Z=0.0) |
| This calls the evaluation function. More... | |
Protected Member Functions | |
Protected Operations | |
| void | InitializeParser () |
| This method initializes the parser classes. More... | |
Protected Attributes | |
Member Variables | |
| array_1d< double, 7 > | mValues = ZeroVector(7) |
| std::vector< te_expr * > | mpTinyExpr = std::vector<te_expr*>(1, nullptr) |
| The variables values considered on the function. More... | |
| std::string | mFunctionBody |
| The function parser. More... | |
| bool | mDependsOnSpace = true |
| The function body. More... | |
Type definitions | |
| typedef std::size_t | IndexType |
| The index type definition. More... | |
| KRATOS_CLASS_POINTER_DEFINITION (BasicGenericFunctionUtility) | |
| Counted pointer of BasicGenericFunctionUtility. More... | |
This function allows to call a function method of type f(x, y, z, t) implemented in python style.
The functions can be constructed by providing a python-defined method of the type
The object is then insantiated as aux_function = BasicGenericFunctionUtility(aux_object_cpp_callback(self.function_string))
Optionally one can specify a rotation matrix and an origin so that the function can be defined in a rotated system of coordinates
| typedef std::size_t Kratos::BasicGenericFunctionUtility::IndexType |
The index type definition.
| Kratos::BasicGenericFunctionUtility::BasicGenericFunctionUtility | ( | const std::string & | rFunctionBody | ) |
Default constructor.
| rFunctionBody | The string defining the function |
| Kratos::BasicGenericFunctionUtility::BasicGenericFunctionUtility | ( | BasicGenericFunctionUtility const & | rOther | ) |
Copy constructor.
|
virtual |
Destructor.
| double Kratos::BasicGenericFunctionUtility::CallFunction | ( | const double | x, |
| const double | y, | ||
| const double | z, | ||
| const double | t, | ||
| const double | X = 0.0, |
||
| const double | Y = 0.0, |
||
| const double | Z = 0.0 |
||
| ) |
This calls the evaluation function.
| x | The x coordinate |
| y | The y coordinate |
| z | The z coordinate |
| t | The time variable |
| X | The initial x coordinate |
| Y | The initial y coordinate |
| Z | The initial z coordinate |
|
inline |
This method clones the current function instance.
|
inline |
This method returns if it depends on space.
| std::string Kratos::BasicGenericFunctionUtility::FunctionBody | ( | ) |
This method returns the function body.
|
protected |
This method initializes the parser classes.
| Kratos::BasicGenericFunctionUtility::KRATOS_CLASS_POINTER_DEFINITION | ( | BasicGenericFunctionUtility | ) |
Counted pointer of BasicGenericFunctionUtility.
|
virtual |
This method rotates and calls the evaluation function.
| x | The x coordinate |
| y | The y coordinate |
| z | The z coordinate |
| t | The time variable |
| X | The initial x coordinate |
| Y | The initial y coordinate |
| Z | The initial z coordinate |
Reimplemented in Kratos::GenericFunctionUtility.
|
inlinevirtual |
This method returns if it depends on space.
Reimplemented in Kratos::GenericFunctionUtility.
|
protected |
The function body.
|
protected |
The function parser.
|
protected |
The variables values considered on the function.
|
protected |