Interface for objects that need to use UserObjects. More...
#include <UserObjectInterface.h>
Public Member Functions | |
| UserObjectInterface (const MooseObject *moose_object) | |
| UserObjectInterface (const UserObjectInterface &object, const Moose::Kokkos::FunctorCopy &key) | |
| Special constructor used for Kokkos functor copy during parallel dispatch. More... | |
| UserObjectName | getUserObjectName (const std::string ¶m_name) const |
| template<class T > | |
| const T & | getUserObject (const std::string ¶m_name, bool is_dependency=true) const |
Get an user object with a given parameter param_name. More... | |
| template<class T > | |
| const T & | getUserObjectByName (const UserObjectName &object_name, bool is_dependency=true) const |
Get an user object with the name object_name. More... | |
| const UserObjectBase & | getUserObjectBase (const std::string ¶m_name, bool is_dependency=true) const |
Get an user object with a given parameter param_name. More... | |
| const UserObjectBase & | getUserObjectBaseByName (const UserObjectName &object_name, bool is_dependency=true) const |
Get an user object with the name object_name. More... | |
| bool | hasUserObject (const std::string ¶m_name) const |
| template<class T > | |
| bool | hasUserObject (const std::string ¶m_name) const |
| bool | hasUserObjectByName (const UserObjectName &object_name) const |
| template<class T > | |
| bool | hasUserObjectByName (const UserObjectName &object_name) const |
Static Public Member Functions | |
| static InputParameters | validParams () |
Protected Member Functions | |
| virtual void | addUserObjectDependencyHelper (const UserObjectBase &) const |
| Helper for deriving classes to override to add dependencies when a UserObject is requested. More... | |
Private Member Functions | |
| const UserObjectBase & | getUserObjectFromFEProblem (const UserObjectName &object_name, const THREAD_ID tid=0) const |
Go directly to the FEProblem for the requested object_name for thread ID tid. More... | |
| template<class T > | |
| const T & | castUserObject (const UserObjectBase &uo_base, const std::string ¶m_name="") const |
Internal helper that casts the UserObject uo_base to the requested type. More... | |
| void | mooseObjectError (const std::string ¶m_name, std::stringstream &oss) const |
| emit an error for the given parameter More... | |
| const std::string & | userObjectType (const UserObjectBase &uo) const |
| Gets a UserObject's type; avoids including UserObject.h in the UserObjectInterface. More... | |
| const std::string & | userObjectName (const UserObjectBase &uo) const |
| Gets a UserObject's name; avoids including UserObject.h in the UserObjectInterface. More... | |
Private Attributes | |
| const MooseObject & | _uoi_moose_object |
| Moose object using the interface. More... | |
| const FEProblemBase & | _uoi_feproblem |
| Reference to the FEProblemBase instance. More... | |
| const THREAD_ID | _uoi_tid |
| Thread ID. More... | |
Interface for objects that need to use UserObjects.
Definition at line 24 of file UserObjectInterface.h.
| UserObjectInterface::UserObjectInterface | ( | const MooseObject * | moose_object | ) |
Definition at line 24 of file UserObjectInterface.C.
| UserObjectInterface::UserObjectInterface | ( | const UserObjectInterface & | object, |
| const Moose::Kokkos::FunctorCopy & | key | ||
| ) |
Special constructor used for Kokkos functor copy during parallel dispatch.
Definition at line 35 of file UserObjectInterface.C.
|
inlineprotectedvirtual |
Helper for deriving classes to override to add dependencies when a UserObject is requested.
Reimplemented in UserObjectBase, AuxKernelBase, and InitialConditionBase.
Definition at line 111 of file UserObjectInterface.h.
Referenced by getUserObjectBaseByName().
|
private |
Internal helper that casts the UserObject uo_base to the requested type.
Exits with a useful error if the casting failed. If the parameter param_name is provided and is valid, a paramError() will be used instead.
Definition at line 151 of file UserObjectInterface.h.
| const T & UserObjectInterface::getUserObject | ( | const std::string & | param_name, |
| bool | is_dependency = true |
||
| ) | const |
Get an user object with a given parameter param_name.
| param_name | The name of the parameter key of the user object to retrieve |
| is_dependency | Whether the user object we are retrieving should be viewed as a dependency, e.g. whether the retrieved user object should be sorted and executed before this object (if we are a user object) |
param_name Definition at line 172 of file UserObjectInterface.h.
| const UserObjectBase & UserObjectInterface::getUserObjectBase | ( | const std::string & | param_name, |
| bool | is_dependency = true |
||
| ) | const |
Get an user object with a given parameter param_name.
| param_name | The name of the parameter key of the user object to retrieve |
| is_dependency | Whether the user object we are retrieving should be viewed as a dependency, e.g. whether the retrieved user object should be sorted and executed before this object (if we are a user object) |
param_name Definition at line 115 of file UserObjectInterface.C.
Referenced by getUserObject().
| const UserObjectBase & UserObjectInterface::getUserObjectBaseByName | ( | const UserObjectName & | object_name, |
| bool | is_dependency = true |
||
| ) | const |
Get an user object with the name object_name.
| object_name | The name of the user object to retrieve |
| is_dependency | Whether the user object we are retrieving should be viewed as a dependency, e.g. whether the retrieved user object should be sorted and executed before this object (if we are a user object) |
object_name Definition at line 127 of file UserObjectInterface.C.
Referenced by AuxKernelBase::addPostprocessorDependencyHelper(), AuxKernelBase::addVectorPostprocessorDependencyHelper(), FunctorAux::FunctorAux(), UserObjectBase::getDependObjects(), getUserObjectBase(), and getUserObjectByName().
| const T & UserObjectInterface::getUserObjectByName | ( | const UserObjectName & | object_name, |
| bool | is_dependency = true |
||
| ) | const |
Get an user object with the name object_name.
| object_name | The name of the user object to retrieve |
| is_dependency | Whether the user object we are retrieving should be viewed as a dependency, e.g. whether the retrieved user object should be sorted and executed before this object (if we are a user object) |
object_name Definition at line 179 of file UserObjectInterface.h.
|
private |
Go directly to the FEProblem for the requested object_name for thread ID tid.
Definition at line 96 of file UserObjectInterface.C.
Referenced by getUserObjectBaseByName(), and hasUserObjectByName().
| UserObjectName UserObjectInterface::getUserObjectName | ( | const std::string & | param_name | ) | const |
param_name Definition at line 45 of file UserObjectInterface.C.
Referenced by getUserObjectBase(), and hasUserObject().
| bool UserObjectInterface::hasUserObject | ( | const std::string & | param_name | ) | const |
param_name. Definition at line 78 of file UserObjectInterface.C.
| bool UserObjectInterface::hasUserObject | ( | const std::string & | param_name | ) | const |
Definition at line 187 of file UserObjectInterface.h.
| bool UserObjectInterface::hasUserObjectByName | ( | const UserObjectName & | object_name | ) | const |
Definition at line 84 of file UserObjectInterface.C.
Referenced by FunctorAux::FunctorAux(), getUserObjectBase(), getUserObjectBaseByName(), hasUserObject(), and hasUserObjectByName().
| bool UserObjectInterface::hasUserObjectByName | ( | const UserObjectName & | object_name | ) | const |
Definition at line 194 of file UserObjectInterface.h.
|
private |
emit an error for the given parameter
Definition at line 155 of file UserObjectInterface.C.
Referenced by castUserObject().
|
private |
Gets a UserObject's name; avoids including UserObject.h in the UserObjectInterface.
Definition at line 149 of file UserObjectInterface.C.
Referenced by castUserObject().
|
private |
Gets a UserObject's type; avoids including UserObject.h in the UserObjectInterface.
Definition at line 143 of file UserObjectInterface.C.
Referenced by castUserObject().
|
static |
Definition at line 19 of file UserObjectInterface.C.
Referenced by FVInterfaceKernel::validParams().
|
private |
Reference to the FEProblemBase instance.
Definition at line 143 of file UserObjectInterface.h.
Referenced by getUserObjectFromFEProblem(), and hasUserObjectByName().
|
private |
Moose object using the interface.
Definition at line 140 of file UserObjectInterface.h.
Referenced by getUserObjectBase(), getUserObjectBaseByName(), getUserObjectName(), and mooseObjectError().
|
private |
Thread ID.
Definition at line 146 of file UserObjectInterface.h.
Referenced by getUserObjectBaseByName().
1.8.14