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 UserObject & | getUserObjectBase (const std::string ¶m_name, bool is_dependency=true) const |
Get an user object with a given parameter param_name . More... | |
const UserObject & | 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 UserObject &) const |
Helper for deriving classes to override to add dependencies when a UserObject is requested. More... | |
Private Member Functions | |
const UserObject & | getUserObjectFromFEProblem (const UserObjectName &object_name) const |
Go directly to the FEProblem for the requested UserObject . More... | |
template<class T > | |
const T & | castUserObject (const UserObject &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 UserObject &uo) const |
Gets a UserObject's type; avoids including UserObject.h in the UserObjectInterface. More... | |
const std::string & | userObjectName (const UserObject &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 AuxKernelTempl< ComputeValueType >, AuxKernelTempl< RT >, AuxKernelTempl< RealVectorValue >, AuxKernelTempl< Real >, UserObject, 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 149 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 170 of file UserObjectInterface.h.
const UserObject & 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 96 of file UserObjectInterface.C.
Referenced by getUserObject().
const UserObject & 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 108 of file UserObjectInterface.C.
Referenced by UserObject::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 177 of file UserObjectInterface.h.
|
private |
Go directly to the FEProblem for the requested UserObject
.
Definition at line 90 of file UserObjectInterface.C.
Referenced by 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 185 of file UserObjectInterface.h.
bool UserObjectInterface::hasUserObjectByName | ( | const UserObjectName & | object_name | ) | const |
Definition at line 84 of file UserObjectInterface.C.
Referenced by getUserObjectBase(), getUserObjectBaseByName(), hasUserObject(), and hasUserObjectByName().
bool UserObjectInterface::hasUserObjectByName | ( | const UserObjectName & | object_name | ) | const |
Definition at line 192 of file UserObjectInterface.h.
|
private |
emit an error for the given parameter
Definition at line 136 of file UserObjectInterface.C.
Referenced by castUserObject().
|
private |
Gets a UserObject's name; avoids including UserObject.h in the UserObjectInterface.
Definition at line 130 of file UserObjectInterface.C.
Referenced by castUserObject().
|
private |
Gets a UserObject's type; avoids including UserObject.h in the UserObjectInterface.
Definition at line 124 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 141 of file UserObjectInterface.h.
Referenced by getUserObjectBaseByName(), getUserObjectFromFEProblem(), and hasUserObjectByName().
|
private |
Moose object using the interface.
Definition at line 138 of file UserObjectInterface.h.
Referenced by getUserObjectBase(), getUserObjectBaseByName(), getUserObjectName(), and mooseObjectError().
|
private |
Thread ID.
Definition at line 144 of file UserObjectInterface.h.
Referenced by getUserObjectBaseByName().