67 const T &
getUserObject(
const std::string & param_name,
bool is_dependency =
true)
const;
79 bool is_dependency =
true)
const;
90 bool is_dependency =
true)
const;
101 bool is_dependency =
true)
const;
137 const std::string & param_name )
const 139 const T * uo =
dynamic_cast<const T *
>(&uo_base);
143 std::stringstream oss;
144 oss <<
"The provided UserObject \"" <<
userObjectName(uo_base) <<
"\" of type " 146 <<
" is not derived from the required type.\n\nThe UserObject must derive from " 147 << MooseUtils::prettyCppType<T>() <<
".";
162 return castUserObject<T>(
getUserObjectBase(param_name, is_dependency), param_name);
168 const bool is_dependency)
const UserObjectName getUserObjectName(const std::string ¶m_name) const
const MooseObject & _uoi_moose_object
Moose object using the interface.
const T & getUserObjectByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
static InputParameters validParams()
const T & castUserObject(const UserObject &uo_base, const std::string ¶m_name="") const
Internal helper that casts the UserObject uo_base to the reqested type.
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 THREAD_ID _uoi_tid
Thread ID.
Interface for objects that need to use UserObjects.
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 T & getUserObject(const std::string ¶m_name, bool is_dependency=true) const
Get an user object with a given parameter param_name.
const UserObject & getUserObjectBase(const std::string ¶m_name, bool is_dependency=true) const
Get an user object with a given parameter param_name.
const std::string & userObjectType(const UserObject &uo) const
Gets a UserObject's type; avoids including UserObject.h in the UserObjectInterface.
void mooseError(Args &&... args) const
Emits an error prefixed with object name and type.
const InputParameters & parameters() const
Get the parameters of the object.
const UserObject & getUserObjectBase(const std::string &name, const THREAD_ID tid=0) const
Get the user object by its name.
const UserObject & getUserObjectBaseByName(const UserObjectName &object_name, bool is_dependency=true) const
Get an user object with the name object_name.
virtual void addUserObjectDependencyHelper(const UserObject &) const
Helper for deriving classes to override to add dependencies when a UserObject is requested.
bool hasUserObjectByName(const UserObjectName &object_name) const
bool hasUserObject(const std::string ¶m_name) const
Base class for user-specific data.
const std::string & userObjectName(const UserObject &uo) const
Gets a UserObject's name; avoids including UserObject.h in the UserObjectInterface.
UserObjectInterface(const MooseObject *moose_object)