![]() |
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.
|
GenericFunctionUtility. More...
#include <function_parser_utility.h>
Public Member Functions | |
Life Cycle | |
| GenericFunctionUtility (const std::string &rFunctionBody, Parameters LocalSystem=Parameters{}) | |
| Default constructor. More... | |
| GenericFunctionUtility (GenericFunctionUtility const &rOther) | |
| Copy constructor. More... | |
| ~GenericFunctionUtility () override | |
| Destructor. More... | |
Operations | |
| Pointer | Clone () |
| This method clones the current function instance. More... | |
| bool | UseLocalSystem () override |
| This method returns if it depends on space. More... | |
| 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) override |
| This method rotates and calls the evaluation function. More... | |
Public Member Functions inherited from Kratos::BasicGenericFunctionUtility | |
| BasicGenericFunctionUtility (const std::string &rFunctionBody) | |
| Default constructor. More... | |
| BasicGenericFunctionUtility (BasicGenericFunctionUtility const &rOther) | |
| Copy constructor. More... | |
| virtual | ~BasicGenericFunctionUtility () |
| Destructor. More... | |
| Pointer | Clone () |
| This method clones the current function instance. More... | |
| bool | DependsOnSpace () |
| This method returns if it depends on space. More... | |
| std::string | FunctionBody () |
| This method returns the function body. 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... | |
| KRATOS_CLASS_POINTER_DEFINITION (BasicGenericFunctionUtility) | |
| Counted pointer of BasicGenericFunctionUtility. More... | |
Type definitions | |
| typedef std::size_t | IndexType |
| The index type definition. More... | |
| KRATOS_CLASS_POINTER_DEFINITION (GenericFunctionUtility) | |
| Counted pointer of GenericFunctionUtility. More... | |
Additional Inherited Members | |
Public Types inherited from Kratos::BasicGenericFunctionUtility | |
| typedef std::size_t | IndexType |
| The index type definition. More... | |
Protected Member Functions inherited from Kratos::BasicGenericFunctionUtility | |
| void | InitializeParser () |
| This method initializes the parser classes. More... | |
Protected Attributes inherited from Kratos::BasicGenericFunctionUtility | |
| 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... | |
This function allows to call a function method of type f(x, y, z, t) implemented in python style (with rotations).
The functions can be constructed by providing a python-defined method of the type
The object is then insantiated as aux_function = GenericFunctionUtility(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::GenericFunctionUtility::IndexType |
The index type definition.
| Kratos::GenericFunctionUtility::GenericFunctionUtility | ( | const std::string & | rFunctionBody, |
| Parameters | LocalSystem = Parameters{} |
||
| ) |
Default constructor.
| rFunctionBody | The string defining the function |
| LocalSystem | The parameters defining the local system |
| Kratos::GenericFunctionUtility::GenericFunctionUtility | ( | GenericFunctionUtility const & | rOther | ) |
Copy constructor.
|
inlineoverride |
Destructor.
|
inline |
This method clones the current function instance.
| Kratos::GenericFunctionUtility::KRATOS_CLASS_POINTER_DEFINITION | ( | GenericFunctionUtility | ) |
Counted pointer of GenericFunctionUtility.
|
overridevirtual |
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 from Kratos::BasicGenericFunctionUtility.
|
inlineoverridevirtual |
This method returns if it depends on space.
Reimplemented from Kratos::BasicGenericFunctionUtility.