31 #ifdef MOOSE_KOKKOS_ENABLED 70 const T &
getUserObject(
const std::string & param_name,
bool is_dependency =
true)
const;
82 bool is_dependency =
true)
const;
93 bool is_dependency =
true)
const;
104 bool is_dependency =
true)
const;
127 const std::string & param_name =
"")
const;
132 void mooseObjectError(
const std::string & param_name, std::stringstream & oss)
const;
152 const std::string & param_name )
const 154 const T * uo =
dynamic_cast<const T *
>(&uo_base);
158 std::stringstream oss;
159 oss <<
"The provided UserObject \"" <<
userObjectName(uo_base) <<
"\" of type " 161 <<
" is not derived from the required type.\n\nThe UserObject must derive from " 162 << MooseUtils::prettyCppType<T>() <<
".";
174 return castUserObject<T>(
getUserObjectBase(param_name, is_dependency), param_name);
180 const bool is_dependency)
const const std::string & userObjectName(const UserObjectBase &uo) const
Gets a UserObject's name; avoids including UserObject.h in the UserObjectInterface.
UserObjectName getUserObjectName(const std::string ¶m_name) const
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.
const MooseObject & _uoi_moose_object
Moose object using the interface.
virtual void addUserObjectDependencyHelper(const UserObjectBase &) const
Helper for deriving classes to override to add dependencies when a UserObject is requested.
const T & getUserObjectByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
static InputParameters validParams()
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
const FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
Every object that can be built by the factory should be derived from this class.
const UserObjectBase & getUserObjectBaseByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
const THREAD_ID _uoi_tid
Thread ID.
Interface for objects that need to use UserObjects.
const T & getUserObject(const std::string ¶m_name, bool is_dependency=true) const
Get an user object with a given parameter param_name.
void mooseObjectError(const std::string ¶m_name, std::stringstream &oss) const
emit an error for the given parameter
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.
bool hasUserObjectByName(const UserObjectName &object_name) const
bool hasUserObject(const std::string ¶m_name) const
const std::string & userObjectType(const UserObjectBase &uo) const
Gets a UserObject's type; avoids including UserObject.h in the UserObjectInterface.
const UserObjectBase & getUserObjectBase(const std::string ¶m_name, bool is_dependency=true) const
Get an user object with a given parameter param_name.
UserObjectInterface(const MooseObject *moose_object)