#include <KokkosParsedObjectBase.h>
Definition at line 19 of file KokkosParsedObjectBase.h.
◆ ParsedObjectBase()
| Moose::Kokkos::ParsedObjectBase::ParsedObjectBase |
( |
const MooseObject * |
object | ) |
|
◆ addConstant()
| void Moose::Kokkos::ParsedObjectBase::addConstant |
( |
const std::string & |
name, |
|
|
const Real |
constant |
|
) |
| |
|
protected |
Add a constant.
- Parameters
-
| name | The variable name |
| constant | The constant value |
Referenced by initParsed().
◆ addField()
| void Moose::Kokkos::ParsedObjectBase::addField |
( |
const std::string & |
name, |
|
|
const VariableValue & |
field |
|
) |
| |
|
protected |
Add a field variable.
- Parameters
-
| name | The variable name |
| field | The coupled field variable |
Referenced by initParsed().
◆ addFunction()
| void Moose::Kokkos::ParsedObjectBase::addFunction |
( |
const std::string & |
name, |
|
|
const Function & |
function |
|
) |
| |
|
protected |
Add a function.
- Parameters
-
| name | The variable name |
| function | The function |
Referenced by initParsed().
◆ addProperty()
| void Moose::Kokkos::ParsedObjectBase::addProperty |
( |
const std::string & |
name, |
|
|
const MaterialProperty< Real > & |
property |
|
) |
| |
|
protected |
Add a material property.
- Parameters
-
| name | The variable name |
| property | The material property |
Referenced by initParsed().
◆ addScalar()
| void Moose::Kokkos::ParsedObjectBase::addScalar |
( |
const std::string & |
name, |
|
|
const Real & |
scalar |
|
) |
| |
|
protected |
Add a scalar variable.
- Parameters
-
| name | The variable name |
| scalar | The pointer to the scalar variable |
Referenced by initParsed().
◆ checkDuplicateSymbols()
template<typename T >
| void Moose::Kokkos::ParsedObjectBase::checkDuplicateSymbols |
( |
const std::vector< T > & |
symbols, |
|
|
const std::string & |
param |
|
) |
| |
|
protected |
Check if duplicate symbols were added.
- Parameters
-
| symbols | The list of symbols |
| param | The parameter name containing symbols |
Definition at line 124 of file KokkosParsedObjectBase.h.
126 for (
const auto & symbol : symbols)
void paramError(const std::string ¶m, Args... args) const
Emits an error prefixed with the file and line number of the given param (from the input file) along ...
const MooseObject * _parsed_object
Parsed object.
std::unordered_set< std::string > _all_symbols
All symbols added to the parsed function.
◆ finalize()
| void Moose::Kokkos::ParsedObjectBase::finalize |
( |
| ) |
|
|
private |
◆ initParsed()
template<typename T >
| void Moose::Kokkos::ParsedObjectBase::initParsed |
( |
T * |
obj, |
|
|
const std::vector< VariableName > & |
variable_names |
|
) |
| |
|
protected |
Initialize symbols from parsed parameters.
variable_names must be supplied by the caller because Coupleable::coupledNames() is protected.
Definition at line 137 of file KokkosParsedObjectBase.h.
139 const auto & constant_names = obj->template getParam<std::vector<std::string>>(
"constant_names");
140 const auto & postprocessor_names =
141 obj->template getParam<std::vector<PostprocessorName>>(
"postprocessor_names");
142 const auto & property_names =
143 obj->template getParam<std::vector<MaterialPropertyName>>(
"material_property_names");
144 const auto & function_names = obj->template getParam<std::vector<FunctionName>>(
"function_names");
145 const auto & constant_expressions =
146 obj->template getParam<std::vector<Real>>(
"constant_expressions");
148 for (
const auto i :
make_range(constant_names.size()))
149 addConstant(constant_names[i], constant_expressions[i]);
151 for (
const auto & pp : postprocessor_names)
152 addScalar(pp, obj->getPostprocessorValueByName(pp));
154 for (
const auto i :
make_range(variable_names.size()))
155 addField(variable_names[i], obj->kokkosCoupledValue(
"coupled_variables", i));
157 for (
const auto & prop : property_names)
158 addProperty(prop, obj->template getKokkosMaterialPropertyByName<Real>(prop));
160 for (
const auto & func : function_names)
161 addFunction(func, obj->getKokkosFunctionByName(func));
void addField(const std::string &name, const VariableValue &field)
Add a field variable.
void addProperty(const std::string &name, const MaterialProperty< Real > &property)
Add a material property.
void addConstant(const std::string &name, const Real constant)
Add a constant.
void addScalar(const std::string &name, const Real &scalar)
Add a scalar variable.
void addFunction(const std::string &name, const Function &function)
Add a function.
IntRange< T > make_range(T beg, T end)
void finalize()
Finalize parsed function.
◆ validParams()
◆ _all_symbols
| std::unordered_set<std::string> Moose::Kokkos::ParsedObjectBase::_all_symbols |
|
private |
◆ _builder
| std::shared_ptr<RPNBuilder> Moose::Kokkos::ParsedObjectBase::_builder |
|
protected |
◆ _constants
| std::unordered_map<std::string, Real> Moose::Kokkos::ParsedObjectBase::_constants |
|
protected |
◆ _evaluator
◆ _expression
| const std::string& Moose::Kokkos::ParsedObjectBase::_expression |
|
protected |
◆ _fields
| std::unordered_map<std::string, VariableValue> Moose::Kokkos::ParsedObjectBase::_fields |
|
protected |
◆ _functions
| std::unordered_map<std::string, Function> Moose::Kokkos::ParsedObjectBase::_functions |
|
protected |
◆ _parsed_object
| const MooseObject* Moose::Kokkos::ParsedObjectBase::_parsed_object |
|
private |
◆ _properties
| std::unordered_map<std::string, MaterialProperty<Real> > Moose::Kokkos::ParsedObjectBase::_properties |
|
protected |
◆ _scalars
| std::unordered_map<std::string, std::reference_wrapper<const Real> > Moose::Kokkos::ParsedObjectBase::_scalars |
|
protected |
The documentation for this class was generated from the following file: