Reverse Polish Notation (RPN) evaluator. More...
#include <KokkosFunctionParser.h>
Classes | |
| struct | Instruction |
| RPN instruction. More... | |
Public Member Functions | |
| RPNEvaluator ()=default | |
| Default constructor. More... | |
| RPNEvaluator (const RPNEvaluator &evaluator) | |
| Copy constructor for parallel dispatch. More... | |
| void | init (const RPNBuilder &builder) |
| Initialize RPN evaluator from an RPN builder. More... | |
| KOKKOS_FUNCTION Real | eval (const Real t, const Real3 p, const unsigned int qp=0, Datum *datum=nullptr) const |
| Evaluate RPN at point (t,x,y,z) More... | |
Private Types | |
| enum | VariableType { VariableType::SCALAR, VariableType::FIELD, VariableType::MATERIAL, VariableType::FUNCTION } |
| Types of variables. More... | |
| using | Opcode = RPNBuilder::Opcode |
Private Attributes | |
| Array< Instruction > | _rpn |
| RPN sequence. More... | |
| Array< Real > | _numbers |
| Numbers used in the function. More... | |
| Array< Real > | _scalars |
| Scalar variables used in the function. More... | |
| Array< VariableValue > | _fields |
| Field variables used in the function. More... | |
| Array< MaterialProperty< Real > > | _properties |
| Material properties used in the function. More... | |
| Array< Function > | _functions |
| Functions used in the function. More... | |
| Array<::Kokkos::pair< VariableType, unsigned int > > | _variables |
| Types of variables and indices. More... | |
| std::vector< const void * > | _pointers |
| Pointers to the associated quantities of variables. More... | |
| unsigned int | _num_scalars = 0 |
| Number of scalar variables. More... | |
| unsigned int | _num_fields = 0 |
| Number of field variables. More... | |
| unsigned int | _num_properties = 0 |
| Number of material properties. More... | |
| unsigned int | _num_functions = 0 |
| Number of functions. More... | |
Static Private Attributes | |
| static constexpr unsigned int | _stack_size = 10 |
| Fixed stack size. More... | |
| static constexpr double | _epsilon = 1.0e-12 |
| Epsilon for equality comparison. More... | |
Reverse Polish Notation (RPN) evaluator.
Definition at line 341 of file KokkosFunctionParser.h.
|
private |
Definition at line 343 of file KokkosFunctionParser.h.
|
strongprivate |
Types of variables.
| Enumerator | |
|---|---|
| SCALAR | |
| FIELD | |
| MATERIAL | |
| FUNCTION | |
Definition at line 388 of file KokkosFunctionParser.h.
|
default |
Default constructor.
| Moose::Kokkos::RPNEvaluator::RPNEvaluator | ( | const RPNEvaluator & | evaluator | ) |
Copy constructor for parallel dispatch.
|
inline |
Evaluate RPN at point (t,x,y,z)
| t | The time |
| p | The location in space (x,y,z) |
| qp | The local quadrature point index |
| datum | The Datum object of the current thread |
Definition at line 485 of file KokkosFunctionParser.h.
Referenced by KokkosParsedMaterial::computeQpProperties(), KokkosParsedAux::computeValue(), and KokkosParsedFunction::value().
| void Moose::Kokkos::RPNEvaluator::init | ( | const RPNBuilder & | builder | ) |
Initialize RPN evaluator from an RPN builder.
| builder | The RPN builder |
|
staticprivate |
Epsilon for equality comparison.
Definition at line 453 of file KokkosFunctionParser.h.
Referenced by eval().
|
private |
Field variables used in the function.
Definition at line 411 of file KokkosFunctionParser.h.
Referenced by eval().
Functions used in the function.
Definition at line 419 of file KokkosFunctionParser.h.
Referenced by eval().
|
private |
Number of field variables.
Definition at line 436 of file KokkosFunctionParser.h.
|
private |
Number of functions.
Definition at line 444 of file KokkosFunctionParser.h.
|
private |
Number of material properties.
Definition at line 440 of file KokkosFunctionParser.h.
|
private |
Number of scalar variables.
Definition at line 432 of file KokkosFunctionParser.h.
Numbers used in the function.
Definition at line 403 of file KokkosFunctionParser.h.
Referenced by eval().
|
private |
Pointers to the associated quantities of variables.
Definition at line 427 of file KokkosFunctionParser.h.
|
private |
Material properties used in the function.
Definition at line 415 of file KokkosFunctionParser.h.
Referenced by eval().
|
private |
Scalar variables used in the function.
Definition at line 407 of file KokkosFunctionParser.h.
Referenced by eval().
|
staticprivate |
|
private |
Types of variables and indices.
Definition at line 423 of file KokkosFunctionParser.h.
Referenced by eval().
1.8.14