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
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Every object that can be built by the factory should be derived from this class.
Interface for objects that need to use UserObjects.
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.
virtual void addUserObjectDependencyHelper(const UserObjectBase &) const
Helper for deriving classes to override to add dependencies when a UserObject is requested.
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 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.
static InputParameters validParams()
bool hasUserObject(const std::string ¶m_name) const
const FEProblemBase & _uoi_feproblem
Reference to the FEProblemBase instance.
const T & getUserObjectByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
const UserObjectBase & getUserObjectBase(const std::string ¶m_name, bool is_dependency=true) const
Get an user object with a given parameter param_name.
const THREAD_ID _uoi_tid
Thread ID.
const std::string & userObjectType(const UserObjectBase &uo) const
Gets a UserObject's type; avoids including UserObject.h in the UserObjectInterface.
bool hasUserObjectByName(const UserObjectName &object_name) const
const UserObjectBase & getUserObjectBaseByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
void mooseObjectError(const std::string ¶m_name, std::stringstream &oss) const
emit an error for the given parameter
const MooseObject & _uoi_moose_object
Moose object using the interface.
const T & getUserObject(const std::string ¶m_name, bool is_dependency=true) const
Get an user object with a given parameter param_name.