MooseObject
The MooseObject
is the top level base class for all non-action MOOSE objects (such as Kernels, Materials, Postprocessors, etc.).
This class holds the main convenience functions, such as
getParam<T>(param)
template as a shortcut toparameters().get<T>(param)
to get an input parameterparam
of typeT
isParamValid(param)
to check if the input parameterparam
has a value that can be obtained withgetParam
getMooseApp()
to get a reference to theMooseApp
this object is associated withtype()
to get the registered class object name of the current objectname()
to get the name the object appears under in the input fileparameters()
to get a reference to theInputParameters
of the current objectparamError
,paramWarning
, andparamInfo
to output status messages regarding specific parameters that are annotated with the input file location of the parameter
Parameter vector pairs
template <typename T1, typename T2>
std::vector<std::pair<T1, T2>> getParam(const std::string & param1,
const std::string & param2) const;
Can be used to fetch two input parameters of type std::vector<T1>
and std::vector<T2>
into a single std::vector<std::pair<T1, T2>>
. This is useful for pairs of vectors that have a one to one correspondence, such as "petsc_options_iname" and "petsc_options_value".