Nektar++
|
#include <LibUtilities/Interpreter/Interpreter.h>
#include <LibUtilities/BasicConst/NektarUnivTypeDefs.hpp>
#include <LibUtilities/Python/NekPyConfig.hpp>
#include <LibUtilities/BasicUtils/ErrorUtil.hpp>
#include <boost/python/raw_function.hpp>
Go to the source code of this file.
Functions | |
py::object | Interpreter_AddConstants (py::tuple args, py::dict kwargs) |
Wrapper for Interpreter::AddConstants. More... | |
py::object | Interpreter_SetParameters (py::tuple args, py::dict kwargs) |
Wrapper for Interpreter::SetParameters. More... | |
NekDouble | Interpreter_GetParameter (std::shared_ptr< Interpreter > interpreter, std::string paramName) |
Wrapper for Interpreter::GetParameter. More... | |
NekDouble | Interpreter_GetConstant (std::shared_ptr< Interpreter > interpreter, std::string constantName) |
Wrapper for Interpreter::GetConstant. More... | |
NekDouble | Interpreter_Evaluate (std::shared_ptr< Interpreter > interpreter, const int id) |
Wrapper for Interpreter::Evaluate (only constant or parameter). More... | |
NekDouble | Interpreter_Evaluate2 (std::shared_ptr< Interpreter > interpreter, const int id, const NekDouble x, const NekDouble y, const NekDouble z, const NekDouble t) |
Wrapper for Interpreter::Evaluate (only constant parameters). More... | |
Array< OneD, NekDouble > | Interpreter_Evaluate3 (std::shared_ptr< Interpreter > interpreter, const int id, 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 Interpreter::Evaluate (vectorised version of the evaluation method that will allow the same function to be evaluated many times). More... | |
Array< OneD, NekDouble > | Interpreter_Evaluate4 (std::shared_ptr< Interpreter > interpreter, const int expression_id, const std::vector< Array< OneD, const NekDouble > > &points) |
Wrapper for Interpreter::Evaluate (zero or more arrays). More... | |
void | export_Interpreter () |
void export_Interpreter | ( | ) |
Definition at line 226 of file Python/Interpreter/Interpreter.cpp.
References Interpreter_AddConstants(), Interpreter_Evaluate(), Interpreter_Evaluate2(), Interpreter_Evaluate3(), Interpreter_Evaluate4(), Interpreter_GetConstant(), Interpreter_GetParameter(), and Interpreter_SetParameters().
Referenced by BOOST_PYTHON_MODULE().
py::object Interpreter_AddConstants | ( | py::tuple | args, |
py::dict | kwargs | ||
) |
Wrapper for Interpreter::AddConstants.
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/Interpreter/Interpreter.cpp.
References Nektar::LibUtilities::Interpreter::AddConstants().
Referenced by export_Interpreter().
NekDouble Interpreter_Evaluate | ( | std::shared_ptr< Interpreter > | interpreter, |
const int | id | ||
) |
Wrapper for Interpreter::Evaluate (only constant or parameter).
interpreter | Interpreter object |
id | id of the expression |
Definition at line 156 of file Python/Interpreter/Interpreter.cpp.
Referenced by export_Interpreter().
NekDouble Interpreter_Evaluate2 | ( | std::shared_ptr< Interpreter > | interpreter, |
const int | id, | ||
const NekDouble | x, | ||
const NekDouble | y, | ||
const NekDouble | z, | ||
const NekDouble | t | ||
) |
Wrapper for Interpreter::Evaluate (only constant parameters).
interpreter | Interpreter object |
id | id of the expression |
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 174 of file Python/Interpreter/Interpreter.cpp.
References Nektar::UnitTests::z().
Referenced by export_Interpreter().
Array< OneD, NekDouble > Interpreter_Evaluate3 | ( | std::shared_ptr< Interpreter > | interpreter, |
const int | id, | ||
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 Interpreter::Evaluate (vectorised version of the evaluation method that will allow the same function to be evaluated many times).
interpreter | Interpreter object |
id | id of the expression |
x | x-coordinates within the expression |
y | y-coordinates within the expression |
z | z-coordinates within the expression |
t | values of time within the expression |
Definition at line 196 of file Python/Interpreter/Interpreter.cpp.
References Nektar::UnitTests::z().
Referenced by export_Interpreter().
Array< OneD, NekDouble > Interpreter_Evaluate4 | ( | std::shared_ptr< Interpreter > | interpreter, |
const int | expression_id, | ||
const std::vector< Array< OneD, const NekDouble > > & | points | ||
) |
Wrapper for Interpreter::Evaluate (zero or more arrays).
expression_id | id of the expression |
points | vector containing arrays of values required for the expression. |
Definition at line 217 of file Python/Interpreter/Interpreter.cpp.
Referenced by export_Interpreter().
NekDouble Interpreter_GetConstant | ( | std::shared_ptr< Interpreter > | interpreter, |
std::string | constantName | ||
) |
Wrapper for Interpreter::GetConstant.
interpreter | Interpreter object |
constantName | Name of constant |
Definition at line 141 of file Python/Interpreter/Interpreter.cpp.
Referenced by export_Interpreter().
NekDouble Interpreter_GetParameter | ( | std::shared_ptr< Interpreter > | interpreter, |
std::string | paramName | ||
) |
Wrapper for Interpreter::GetParameter.
interpreter | Interpreter object |
paramName | Name of parameter |
Definition at line 126 of file Python/Interpreter/Interpreter.cpp.
Referenced by export_Interpreter().
py::object Interpreter_SetParameters | ( | py::tuple | args, |
py::dict | kwargs | ||
) |
Wrapper for Interpreter::SetParameters.
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 94 of file Python/Interpreter/Interpreter.cpp.
References Nektar::LibUtilities::Interpreter::SetParameters().
Referenced by export_Interpreter().