www.mooseframework.org
Classes | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
InputParameters Class Reference

The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system. More...

#include <InputParameters.h>

Inheritance diagram for InputParameters:
[legend]

Classes

struct  Metadata
 

Public Member Functions

 InputParameters (const InputParameters &rhs)
 
 InputParameters (const Parameters &rhs)
 
virtual ~InputParameters ()=default
 
virtual void clear () override
 
void addClassDescription (const std::string &doc_string)
 This method adds a description of the class that will be displayed in the input file syntax dump. More...
 
std::string getClassDescription () const
 Returns the class description. More...
 
virtual void set_attributes (const std::string &name, bool inserted_only) override
 Override from libMesh to set user-defined attributes on our parameter. More...
 
template<typename T >
T & set (const std::string &name, bool quiet_mode=false)
 Returns a writable reference to the named parameters. More...
 
template<typename T , typename UP_T >
void rangeCheck (const std::string &full_name, const std::string &short_name, InputParameters::Parameter< T > *param, std::ostream &oss=Moose::out)
 Runs a range on the supplied parameter if it exists and throws an error if that check fails. More...
 
template<typename T , typename UP_T >
void rangeCheck (const std::string &full_name, const std::string &short_name, InputParameters::Parameter< std::vector< T >> *param, std::ostream &oss=Moose::out)
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
template<typename T >
void addRequiredParam (const std::string &name, const std::string &doc_string)
 This method adds a parameter and documentation string to the InputParameters object that will be extracted from the input file. More...
 
template<typename T >
void addRequiredParam (const std::string &name, const T &moose_enum, const std::string &doc_string)
 This version of addRequiredParam is here for a consistent use with MooseEnums. More...
 
template<typename T , typename S >
void addParam (const std::string &name, const S &value, const std::string &doc_string)
 These methods add an option parameter and a documentation string to the InputParameters object. More...
 
template<typename T >
void addParam (const std::string &name, const std::string &doc_string)
 
template<typename T >
void addRequiredRangeCheckedParam (const std::string &name, const std::string &parsed_function, const std::string &doc_string)
 These methods add an range checked parameters. More...
 
template<typename T >
void addRangeCheckedParam (const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
 
template<typename T >
void addRangeCheckedParam (const std::string &name, const std::string &parsed_function, const std::string &doc_string)
 
template<typename T >
void addRequiredCustomTypeParam (const std::string &name, const std::string &custom_type, const std::string &doc_string)
 These methods add an option parameter and with a customer type to the InputParameters object. More...
 
template<typename T >
void addCustomTypeParam (const std::string &name, const T &value, const std::string &custom_type, const std::string &doc_string)
 
template<typename T >
void addCustomTypeParam (const std::string &name, const std::string &custom_type, const std::string &doc_string)
 
template<typename T >
void addPrivateParam (const std::string &name, const T &value)
 These method add a parameter to the InputParameters object which can be retrieved like any other parameter. More...
 
template<typename T >
void addPrivateParam (const std::string &name)
 
template<typename T >
void addRequiredCommandLineParam (const std::string &name, const std::string &syntax, const std::string &doc_string)
 Add parameters for retrieval from the command line. More...
 
template<typename T >
void addCommandLineParam (const std::string &name, const std::string &syntax, const std::string &doc_string)
 
template<typename T >
void addCommandLineParam (const std::string &name, const std::string &syntax, const T &value, const std::string &doc_string)
 
template<typename T >
void addDeprecatedParam (const std::string &name, const T &value, const std::string &doc_string, const std::string &deprecation_message)
 
template<typename T >
void addDeprecatedParam (const std::string &name, const std::string &doc_string, const std::string &deprecation_message)
 
template<typename T >
void checkConsistentType (const std::string &name) const
 This method checks to make sure that we aren't adding a parameter with the same name but a different type. More...
 
std::vector< std::string > getSyntax (const std::string &name)
 Get the syntax for a command-line parameter. More...
 
const std::string & getDescription (const std::string &name)
 Get the documentation string for a parameter. More...
 
void addParamNamesToGroup (const std::string &space_delim_names, const std::string group_name)
 This method takes a space delimited list of parameter names and adds them to the specified group name. More...
 
std::string getGroupName (const std::string &param_name) const
 This method retrieves the group name for the passed parameter name if one exists. More...
 
template<typename T >
void suppressParameter (const std::string &name)
 This method suppresses an inherited parameter so that it isn't required or valid in the derived class. More...
 
template<typename T >
void makeParamRequired (const std::string &name)
 Changes the parameter to be required. More...
 
void addCoupledVar (const std::string &name, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
void addCoupledVar (const std::string &name, const Real value, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
void addCoupledVar (const std::string &name, const std::vector< Real > &value, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
std::string getMooseType (const std::string &name) const
 Utility functions for retrieving one of the MooseTypes variables into the common "string" base class. More...
 
std::vector< std::string > getVecMooseType (const std::string &name) const
 
void addRequiredCoupledVar (const std::string &name, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
std::string getDocString (const std::string &name) const
 Returns the documentation string for the specified parameter name. More...
 
void setDocString (const std::string &name, const std::string &doc)
 Set the doc string of a parameter. More...
 
bool isParamRequired (const std::string &name) const
 Returns a boolean indicating whether the specified parameter is required or not. More...
 
bool isParamValid (const std::string &name) const
 This method returns parameters that have been initialized in one fashion or another, i.e. More...
 
bool isParamSetByAddParam (const std::string &name) const
 Returns whether or not the parameter was set due to addParam. More...
 
bool isParamDeprecated (const std::string &name) const
 Returns True if the parameters is deprecated. More...
 
bool areAllRequiredParamsValid () const
 This method returns true if all of the parameters in this object are valid (i.e. More...
 
std::string type (const std::string &name)
 Prints the type of the requested parameter by name. More...
 
bool isPrivate (const std::string &name) const
 Returns a Boolean indicating whether the specified parameter is private or not. More...
 
void declareControllable (const std::string &name, std::set< ExecFlagType > execute_flags={})
 Declare the given parameters as controllable. More...
 
void markControlled (const std::string &name)
 Marker a parameter that has been changed by the Control system (this is for output purposes) More...
 
bool isControllable (const std::string &name)
 Returns a Boolean indicating whether the specified parameter is controllable. More...
 
const std::set< ExecFlagType > & getControllableExecuteOnTypes (const std::string &name)
 Return the allowed execute flags for a controllable parameter. More...
 
void registerBase (const std::string &value)
 This method must be called from every base "Moose System" to create linkage with the Action System. More...
 
void registerBuildableTypes (const std::string &names)
 This method is here to indicate which Moose types a particular Action may build. More...
 
void addRelationshipManager (const std::string &name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback input_parameter_callback=nullptr)
 Tells MOOSE about a RelationshipManager that this object needs. More...
 
void clearRelationshipManagers ()
 Clears all currently registered RelationshipManagers. More...
 
const std::vector< std::string > & getBuildableTypes () const
 Returns the list of buildable types as a std::vector<std::string> More...
 
const std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > & getBuildableRelationshipManagerTypes () const
 Returns the list of buildable (or required) RelationshipManager object types for this object. More...
 
void checkParams (const std::string &parsing_syntax)
 This function checks parameters stored in the object to make sure they are in the correct state as the user expects: Required parameters are verified as valid meaning that they were either initialized when they were created, or were read from an input file or some other valid source. More...
 
std::set< std::string >::const_iterator coupledVarsBegin () const
 Methods returning iterators to the coupled variables names stored in this InputParameters object. More...
 
std::set< std::string >::const_iterator coupledVarsEnd () const
 
const std::set< std::string > & getCoupledVariableParamNames () const
 Return the coupled variable parameter names. More...
 
bool hasCoupledValue (const std::string &coupling_name) const
 Return whether or not the coupled variable exists. More...
 
bool hasDefaultCoupledValue (const std::string &coupling_name) const
 Return whether or not the requested parameter has a default coupled value. More...
 
Real defaultCoupledValue (const std::string &coupling_name, unsigned int i=0) const
 Get the default value for an optionally coupled variable. More...
 
unsigned int numberDefaultCoupledValues (const std::string &coupling_name) const
 Get the number of defaulted coupled value entries. More...
 
void defaultCoupledValue (const std::string &coupling_name, Real value, unsigned int i=0)
 Set the default value for an optionally coupled variable (called by the Parser). More...
 
std::map< std::string, std::pair< std::string, std::string > > getAutoBuildVectors () const
 Returns the auto build vectors for all parameters. More...
 
const PostprocessorValuegetDefaultPostprocessorValue (const std::string &name, bool suppress_error=false) const
 Get the default value for a postprocessor added with addPostprocessor. More...
 
void setDefaultPostprocessorValue (const std::string &name, const PostprocessorValue &value)
 Set the default value for a postprocessor added with addPostprocessor. More...
 
bool hasDefaultPostprocessorValue (const std::string &name) const
 Returns true if a default PostprocessorValue is defined. More...
 
void applyParameters (const InputParameters &common, std::vector< std::string > exclude=std::vector< std::string >())
 Method for applying common parameters. More...
 
void applySpecificParameters (const InputParameters &common, const std::vector< std::string > &include)
 Method for applying common parameters. More...
 
void applyParameter (const InputParameters &common, const std::string &common_name)
 Apply values from a single parameter in common, to a single parameter stored in this object. More...
 
void applyCoupledVar (const InputParameters &common, const std::string &var_name)
 Apply properties of a single coupled variable in common, to a single coupled variable stored in this object. More...
 
bool paramSetByUser (const std::string &name) const
 Deprecated method. More...
 
bool isParamSetByUser (const std::string &name) const
 Method returns true if the parameter was by the user. More...
 
std::set< std::string > getControllableParameters () const
 Return list of controllable parameters. More...
 
void setReservedValues (const std::string &name, const std::set< std::string > &reserved)
 Provide a set of reserved values for a parameter. More...
 
std::set< std::string > reservedValues (const std::string &name) const
 Get a set of reserved parameter values. More...
 
std::string & blockLocation ()
 Get/set a string representing the location (i.e. More...
 
std::string & rawParamVal (const std::string &param)
 Get/set a string representing the raw, unmodified token text for the given param. More...
 
template<>
void addRequiredParam (const std::string &name, const MooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addRequiredParam (const std::string &name, const MultiMooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addDeprecatedParam (const std::string &name, const std::string &doc_string, const std::string &deprecation_message)
 
template<>
void addDeprecatedParam (const std::string &name, const std::string &doc_string, const std::string &deprecation_message)
 
template<>
const MooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MooseEnum *)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MultiMooseEnum *)
 
template<>
void addRequiredParam (const std::string &name, const MooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addRequiredParam (const std::string &name, const MultiMooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
const MooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MooseEnum *)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MultiMooseEnum *)
 
void addCoupledVarWithAutoBuild (const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
 These methods add a coupled variable name pair. More...
 
void addRequiredCoupledVarWithAutoBuild (const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
 
void collapseSyntaxNesting (bool collapse)
 Mutators for controlling whether or not the outermost level of syntax will be collapsed when printed. More...
 
bool collapseSyntaxNesting () const
 
void mooseObjectSyntaxVisibility (bool visibility)
 Mutators for controlling whether or not the outermost level of syntax will be collapsed when printed. More...
 
bool mooseObjectSyntaxVisibility () const
 
InputParametersoperator= (const InputParameters &rhs)
 
InputParametersoperator+= (const InputParameters &rhs)
 
std::string & blockFullpath ()
 Get/set a string representing the full HIT parameter path from the input file (e.g. More...
 
const std::string & blockFullpath () const
 
const std::string & inputLocation (const std::string &param) const
 Get/set a string representing the location in the input text the parameter originated from (i.e. More...
 
std::string & inputLocation (const std::string &param)
 
const std::string & paramFullpath (const std::string &param) const
 Get/set a string representing the full HIT parameter path from the input file (e.g. More...
 
std::string & paramFullpath (const std::string &param)
 

Static Public Member Functions

template<typename T >
static const T & getParamHelper (const std::string &name, const InputParameters &pars, const T *the_type)
 
template<typename T >
static const std::vector< T > & getParamHelper (const std::string &name, const InputParameters &pars, const std::vector< T > *the_type)
 

Private Member Functions

 InputParameters ()
 
Metadataat (const std::string &param)
 
const Metadataat (const std::string &param) const
 
void allowCopy (bool status)
 Toggle the availability of the copy constructor. More...
 
void checkParamName (const std::string &name) const
 Make sure the parameter name doesn't have any invalid characters. More...
 
template<typename T , typename S >
void setParamHelper (const std::string &name, T &l_value, const S &r_value)
 This method is called when adding a Parameter with a default value, can be specialized for non-matching types. More...
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const int &r_value)
 

Private Attributes

std::string _block_location
 original location of input block (i.e. filename,linenum) - used for nice error messages. More...
 
std::string _block_fullpath
 full HIT path of the block from the input file - used for nice error messages. More...
 
std::map< std::string, Metadata_params
 The actual parameter data. More...
 
std::set< std::string > _coupled_vars
 The coupled variables set. More...
 
std::string _class_description
 The class description for the owning object. More...
 
std::vector< std::string > _buildable_types
 The parameter is used to restrict types that can be built. More...
 
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
 The RelationshipManagers that this object may either build or require. More...
 
bool _collapse_nesting
 This parameter collapses one level of nesting in the syntax blocks. More...
 
bool _moose_object_syntax_visibility
 This parameter hides derived MOOSE object types from appearing in syntax dumps. More...
 
bool _show_deprecated_message
 Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping messages. More...
 
bool _allow_copy
 A flag for toggling the error message in the copy constructor. More...
 

Friends

class InputParameterWarehouse
 
InputParameters emptyInputParameters ()
 

Detailed Description

The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.

Definition at line 54 of file InputParameters.h.

Constructor & Destructor Documentation

◆ InputParameters() [1/3]

InputParameters::InputParameters ( const InputParameters rhs)

Definition at line 39 of file InputParameters.C.

40  : Parameters(), _show_deprecated_message(true), _allow_copy(true)
41 
42 {
43  *this = rhs;
44 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...

◆ InputParameters() [2/3]

InputParameters::InputParameters ( const Parameters &  rhs)

Definition at line 46 of file InputParameters.C.

48 {
49  _params.clear();
50  Parameters::operator=(rhs);
51  _collapse_nesting = false;
53 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ ~InputParameters()

virtual InputParameters::~InputParameters ( )
virtualdefault

◆ InputParameters() [3/3]

InputParameters::InputParameters ( )
private

Definition at line 30 of file InputParameters.C.

31  : Parameters(),
32  _collapse_nesting(false),
35  _allow_copy(true)
36 {
37 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.

Member Function Documentation

◆ addClassDescription()

void InputParameters::addClassDescription ( const std::string &  doc_string)

This method adds a description of the class that will be displayed in the input file syntax dump.

Definition at line 70 of file InputParameters.C.

Referenced by MaterialDerivativeTestKernelBase< Real >::validParams(), validParams< ActuallyExplicitEuler >(), validParams< AddSideSetsFromBoundingBox >(), validParams< AnalyticalIndicator >(), validParams< AnisotropicDiffusion >(), validParams< AnnularMesh >(), validParams< AnnularMeshGenerator >(), validParams< AreaPostprocessor >(), validParams< Axisymmetric2D3DSolutionFunction >(), validParams< AxisymmetricCenterlineAverageValue >(), validParams< BlockDeleter >(), validParams< BlockDeletionGenerator >(), validParams< BodyForce >(), validParams< BoundingBoxIC >(), validParams< BoundingBoxNodeSet >(), validParams< BoundingBoxNodeSetGenerator >(), validParams< BoxMarker >(), validParams< BreakBoundaryOnSubdomain >(), validParams< BreakBoundaryOnSubdomainGenerator >(), validParams< BreakMeshByBlock >(), validParams< BreakMeshByBlockBase >(), validParams< BreakMeshByBlockGenerator >(), validParams< BreakMeshByBlockGeneratorBase >(), validParams< CartesianMeshGenerator >(), validParams< ChangeOverTimePostprocessor >(), validParams< Checkpoint >(), validParams< ComboMarker >(), validParams< CompositeFunction >(), validParams< ConcentricCircleMesh >(), validParams< ConcentricCircleMeshGenerator >(), validParams< ConditionalFunctionEnableControl >(), validParams< ConservativeAdvection >(), validParams< Console >(), validParams< ConstantAux >(), validParams< ConstantDT >(), validParams< ConstantIC >(), validParams< ControlOutput >(), validParams< ConvectiveFluxBC >(), validParams< CoupledForce >(), validParams< CoupledTimeDerivative >(), validParams< CSV >(), validParams< CSVReader >(), validParams< CSVTimeSequenceStepper >(), validParams< CylindricalAverage >(), validParams< DerivativeFunctionMaterialBase >(), validParams< DerivativeParsedMaterial >(), validParams< DerivativeParsedMaterialHelper >(), validParams< DerivativeSumMaterial >(), validParams< DGConvection >(), validParams< Diffusion >(), validParams< DiffusionFluxAux >(), validParams< DiffusionFluxBC >(), validParams< DirichletBC >(), validParams< DisplayGhostingAction >(), validParams< DistributedGeneratedMesh >(), validParams< DOFMapOutput >(), validParams< DumpObjectsProblem >(), validParams< EigenDirichletBC >(), validParams< EigenExecutionerBase >(), validParams< Eigenvalue >(), validParams< ElementalVariableValue >(), validParams< ElementAverageSecondTimeDerivative >(), validParams< ElementH1ErrorFunctionAux >(), validParams< ElementL2ErrorFunctionAux >(), validParams< ElementLengthAux >(), validParams< ElementLpNormAux >(), validParams< ElementQualityAux >(), validParams< ElementQualityChecker >(), validParams< ElementsAlongLine >(), validParams< ElementsAlongPlane >(), validParams< ElementValueSampler >(), validParams< EqualValueEmbeddedConstraint >(), validParams< ErrorFractionMarker >(), validParams< ErrorToleranceMarker >(), validParams< ExodusTimeSequenceStepper >(), validParams< ExternalProblem >(), validParams< FileMesh >(), validParams< FindValueOnLine >(), validParams< FunctionAux >(), validParams< FunctionDirichletBC >(), validParams< FunctionDT >(), validParams< FunctionIC >(), validParams< FunctionMaterialBase >(), validParams< FunctionNeumannBC >(), validParams< FunctionPresetBC >(), validParams< GeneratedMesh >(), validParams< GeneratedMeshGenerator >(), validParams< GeometryBase >(), validParams< GeometrySphere >(), validParams< GhostingAux >(), validParams< GhostingUserObject >(), validParams< GMVOutput >(), validParams< Gnuplot >(), validParams< GradientJumpIndicator >(), validParams< HistogramVectorPostprocessor >(), validParams< ImageFunction >(), validParams< ImageMesh >(), validParams< ImageMeshGenerator >(), validParams< ImageSubdomain >(), validParams< ImageSubdomainGenerator >(), validParams< InterfaceAverageVariableValuePostprocessor >(), validParams< InterfaceIntegralPostprocessor >(), validParams< InterfaceIntegralVariableValuePostprocessor >(), validParams< InterfacePostprocessor >(), validParams< InterfaceQpValueUserObject >(), validParams< InterfaceUserObject >(), validParams< InterfaceValueUserObject >(), validParams< InterfaceValueUserObjectAux >(), validParams< InversePowerMethod >(), validParams< IterationAdaptiveDT >(), validParams< LagrangeVecDirichletBC >(), validParams< LagrangeVecFunctionDirichletBC >(), validParams< LaplacianJumpIndicator >(), validParams< LeastSquaresFit >(), validParams< LeastSquaresFitHistory >(), validParams< LinearCombinationFunction >(), validParams< LinearNodalConstraint >(), validParams< LogConstantDT >(), validParams< LowerDBlockFromSideset >(), validParams< LowerDBlockFromSidesetGenerator >(), validParams< MassEigenKernel >(), validParams< MassLumpedTimeDerivative >(), validParams< MatchedValueBC >(), validParams< MatDiffusion >(), validParams< MaterialDerivativeRankFourTestKernel >(), validParams< MaterialDerivativeRankTwoTestKernel >(), validParams< MaterialDerivativeTestKernel >(), validParams< MaterialPropertyDebugOutput >(), validParams< MaterialRankFourTensorAux >(), validParams< MaterialRankTwoTensorAux >(), validParams< MaterialRealAux >(), validParams< MaterialStdVectorAux >(), validParams< MaterialStdVectorRealGradientAux >(), validParams< MemoryUsage >(), validParams< MeshCollectionGenerator >(), validParams< MeshExtruder >(), validParams< MeshExtruderGenerator >(), validParams< MeshSideSet >(), validParams< MeshSideSetGenerator >(), validParams< MultiAppCopyTransfer >(), validParams< MultiAppInterpolationTransfer >(), validParams< MultiAppVectorPostprocessorTransfer >(), validParams< NearestNodeDistanceAux >(), validParams< NearestNodeValueAux >(), validParams< NeumannBC >(), validParams< NewmarkBeta >(), validParams< NodalValueSampler >(), validParams< NodalVariableValue >(), validParams< NullKernel >(), validParams< NumDOFs >(), validParams< NumElems >(), validParams< NumNodes >(), validParams< NumNonlinearIterations >(), validParams< NumVars >(), validParams< ParsedAux >(), validParams< ParsedMaterial >(), validParams< ParsedMaterialHelper >(), validParams< ParsedODEKernel >(), validParams< PatternedMesh >(), validParams< PatternedMeshGenerator >(), validParams< PenaltyDirichletBC >(), validParams< PenetrationAux >(), validParams< PerfGraphData >(), validParams< PerfGraphOutput >(), validParams< PerformanceData >(), validParams< PetscExternalPartitioner >(), validParams< PiecewiseBilinear >(), validParams< PiecewiseConstant >(), validParams< PiecewiseLinear >(), validParams< PiecewiseLinearInterpolationMaterial >(), validParams< PiecewiseMulticonstant >(), validParams< PiecewiseMultilinear >(), validParams< PostprocessorComparison >(), validParams< PresetBC >(), validParams< ProcessorIDAux >(), validParams< QuotientAux >(), validParams< RandomICBase >(), validParams< Reaction >(), validParams< RealFunctionControl >(), validParams< RelativeDifferencePostprocessor >(), validParams< RenameBlock >(), validParams< RenameBlockGenerator >(), validParams< RenameBoundaryGenerator >(), validParams< RinglebMesh >(), validParams< RinglebMeshGenerator >(), validParams< Sampler >(), validParams< ScalarTagMatrixAux >(), validParams< ScalarTagVectorAux >(), validParams< SetupDebugAction >(), validParams< SideAverageValue >(), validParams< SideFluxIntegral >(), validParams< SideSetsAroundSubdomain >(), validParams< SideSetsAroundSubdomainGenerator >(), validParams< SideSetsFromBoundingBoxGenerator >(), validParams< SideSetsFromNormals >(), validParams< SideSetsFromNormalsGenerator >(), validParams< SideSetsFromPoints >(), validParams< SideSetsFromPointsGenerator >(), validParams< SinDirichletBC >(), validParams< SinNeumannBC >(), validParams< SmoothMesh >(), validParams< SmoothMeshGenerator >(), validParams< SolutionAux >(), validParams< SolutionHistory >(), validParams< SolutionUserObject >(), validParams< SpiralAnnularMesh >(), validParams< SpiralAnnularMeshGenerator >(), validParams< StackGenerator >(), validParams< StatisticsVectorPostprocessor >(), validParams< Steady >(), validParams< StitchedMesh >(), validParams< SubdomainBoundingBox >(), validParams< SubdomainBoundingBoxGenerator >(), validParams< TagMatrixAux >(), validParams< TagVectorAux >(), validParams< Tecplot >(), validParams< TiledMesh >(), validParams< TiledMeshGenerator >(), validParams< TimeDerivative >(), validParams< TimeExtremeValue >(), validParams< TimePeriod >(), validParams< TimeSequenceStepper >(), validParams< TimestepSize >(), validParams< TopResidualDebugOutput >(), validParams< Transform >(), validParams< TransformGenerator >(), validParams< Transient >(), validParams< UniformMarker >(), validParams< ValueJumpIndicator >(), validParams< ValueRangeMarker >(), validParams< ValueThresholdMarker >(), validParams< VariableGradientComponent >(), validParams< VectorBodyForce >(), validParams< VectorConstantIC >(), validParams< VectorDiffusion >(), validParams< VectorFunctionAux >(), validParams< VectorMagnitudeAux >(), validParams< VectorMemoryUsage >(), validParams< VectorNeumannBC >(), validParams< VectorOfPostprocessors >(), validParams< VectorPostprocessorComparison >(), validParams< VectorPostprocessorVisualizationAux >(), validParams< VectorVariableComponentAux >(), validParams< VTKOutput >(), validParams< WeakGradientBC >(), validParams< WorkBalance >(), and validParams< XDA >().

71 {
72  _class_description = doc_string;
73 }
std::string _class_description
The class description for the owning object.

◆ addCommandLineParam() [1/2]

template<typename T >
void InputParameters::addCommandLineParam ( const std::string &  name,
const std::string &  syntax,
const std::string &  doc_string 
)

Definition at line 1249 of file InputParameters.h.

Referenced by validParams< MooseApp >().

1252 {
1253  addParam<T>(name, doc_string);
1254  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1255 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:429
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCommandLineParam() [2/2]

template<typename T >
void InputParameters::addCommandLineParam ( const std::string &  name,
const std::string &  syntax,
const T &  value,
const std::string &  doc_string 
)

Definition at line 1259 of file InputParameters.h.

1263 {
1264  addParam<T>(name, value, doc_string);
1265  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1266 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:429
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCoupledVar() [1/3]

void InputParameters::addCoupledVar ( const std::string &  name,
const std::string &  doc_string 
)

This method adds a coupled variable name pair.

The parser will look for variable name pair in the input file and can return a reference to the storage location for the coupled variable if found

Definition at line 183 of file InputParameters.C.

Referenced by applyCoupledVar(), MatDiffusionBase< Real >::validParams(), validParams< DerivativeSumMaterial >(), validParams< ElementVectorL2Error >(), validParams< FindValueOnLine >(), validParams< InterfaceIntegralVariableValuePostprocessor >(), validParams< InterfaceQpValueUserObject >(), validParams< NodalNormalBC >(), validParams< ParsedMaterialBase >(), validParams< QuotientAux >(), validParams< QuotientScalarAux >(), validParams< SpatialAverageBase >(), validParams< VectorMagnitudeAux >(), and validParams< VolumeHistogram >().

184 {
185  addParam<std::vector<VariableName>>(name, doc_string);
186  _coupled_vars.insert(name);
187 }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ addCoupledVar() [2/3]

void InputParameters::addCoupledVar ( const std::string &  name,
const Real  value,
const std::string &  doc_string 
)

This method adds a coupled variable name pair.

The parser will look for variable name pair in the input file and can return a reference to the storage location for the coupled variable if found

Also - you can provide a default value for this variable in the case that an actual variable is not provided.

Definition at line 162 of file InputParameters.C.

163 {
164  addParam<std::vector<VariableName>>(name, doc_string);
165  _coupled_vars.insert(name);
166  _params[name]._coupled_default.assign(1, value);
167  _params[name]._have_coupled_default = true;
168 }
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCoupledVar() [3/3]

void InputParameters::addCoupledVar ( const std::string &  name,
const std::vector< Real > &  value,
const std::string &  doc_string 
)

This method adds a coupled variable name pair.

The parser will look for variable name pair in the input file and can return a reference to the storage location for the coupled variable if found

Also - you can provide a vector of values for this variable in the case that an actual variable is not provided.

Definition at line 171 of file InputParameters.C.

174 {
175  // std::vector<VariableName>(1, Moose::stringify(value)),
176  addParam<std::vector<VariableName>>(name, doc_string);
177  _coupled_vars.insert(name);
178  _params[name]._coupled_default = value;
179  _params[name]._have_coupled_default = true;
180 }
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCoupledVarWithAutoBuild()

void InputParameters::addCoupledVarWithAutoBuild ( const std::string &  name,
const std::string &  base_name,
const std::string &  num_name,
const std::string &  doc_string 
)

These methods add a coupled variable name pair.

The parser will look for variable name pair in the input file and can return a reference to the storage location for the coupled variable if found.

This version of the method will build a vector if the given the base_name and num_name parameters exist in the input file: e.g. [./foo] ... some_base = base_ some_num = 5 [../]

The coupling parameter will be passed this vector: "base_0 base_1 base_2 base_3 base_4"

Definition at line 190 of file InputParameters.C.

Referenced by addRequiredCoupledVarWithAutoBuild().

194 {
195  addParam<std::vector<VariableName>>(name, doc_string);
196  _coupled_vars.insert(name);
197  _params[name]._autobuild_vecs = std::make_pair(base_name, num_name);
198 
199  // Additionally there are two more parameters that need to be added:
200  addParam<std::string>(base_name, doc_string + " (base_name)");
201  addParam<unsigned int>(num_name, doc_string + " (num_name)");
202 }
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCustomTypeParam() [1/2]

template<typename T >
void InputParameters::addCustomTypeParam ( const std::string &  name,
const T &  value,
const std::string &  custom_type,
const std::string &  doc_string 
)

Definition at line 1195 of file InputParameters.h.

1199 {
1200  addParam<T>(name, value, doc_string);
1201  _params[name]._custom_type = custom_type;
1202 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCustomTypeParam() [2/2]

template<typename T >
void InputParameters::addCustomTypeParam ( const std::string &  name,
const std::string &  custom_type,
const std::string &  doc_string 
)

Definition at line 1206 of file InputParameters.h.

1209 {
1210  addParam<T>(name, doc_string);
1211  _params[name]._custom_type = custom_type;
1212 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addDeprecatedParam() [1/6]

template<typename T >
void InputParameters::addDeprecatedParam ( const std::string &  name,
const T &  value,
const std::string &  doc_string,
const std::string &  deprecation_message 
)
Parameters
nameThe name of the parameter
valueThe default value of this parameter if it requires one
doc_stringDocumentation. This will be shown for –help
deprecation_messageThe message that will will print about why this param was deprecated. It might mention the "new way".

Definition at line 1307 of file InputParameters.h.

Referenced by validParams< AdaptivityAction >(), validParams< CommonOutputAction >(), validParams< Console >(), validParams< DerivativeFunctionMaterialBase >(), validParams< DerivativeParsedMaterialHelper >(), validParams< Executioner >(), validParams< GenericFunctionMaterial >(), validParams< IterationAdaptiveDT >(), validParams< OversampleOutput >(), validParams< PetscOutput >(), and validParams< Transient >().

1311 {
1312  _show_deprecated_message = false;
1313  addParam<T>(name, value, doc_string);
1314 
1315  _params[name]._deprecation_message = deprecation_message;
1316  _show_deprecated_message = true;
1317 }
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addDeprecatedParam() [2/6]

template<typename T >
void InputParameters::addDeprecatedParam ( const std::string &  name,
const std::string &  doc_string,
const std::string &  deprecation_message 
)

Definition at line 1321 of file InputParameters.h.

1324 {
1325  _show_deprecated_message = false;
1326  addParam<T>(name, doc_string);
1327 
1328  _params[name]._deprecation_message = deprecation_message;
1329  _show_deprecated_message = true;
1330 }
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addDeprecatedParam() [3/6]

template<>
void InputParameters::addDeprecatedParam ( const std::string &  ,
const std::string &  ,
const std::string &   
)

Definition at line 891 of file InputParameters.C.

894 {
895  mooseError("You must supply a MooseEnum object and the deprecation string when using "
896  "addDeprecatedParam, even if the parameter is not required!");
897 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ addDeprecatedParam() [4/6]

template<>
void InputParameters::addDeprecatedParam ( const std::string &  ,
const std::string &  ,
const std::string &   
)

Definition at line 901 of file InputParameters.C.

904 {
905  mooseError("You must supply a MultiMooseEnum object and the deprecation string when using "
906  "addDeprecatedParam, even if the parameter is not required!");
907 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ addDeprecatedParam() [5/6]

template<>
void InputParameters::addDeprecatedParam ( const std::string &  name,
const std::string &  doc_string,
const std::string &  deprecation_message 
)

◆ addDeprecatedParam() [6/6]

template<>
void InputParameters::addDeprecatedParam ( const std::string &  name,
const std::string &  doc_string,
const std::string &  deprecation_message 
)

◆ addParam() [1/6]

template<typename T , typename S >
void InputParameters::addParam ( const std::string &  name,
const S &  value,
const std::string &  doc_string 
)

These methods add an option parameter and a documentation string to the InputParameters object.

The first version of this function takes a default value which is used if the parameter is not found in the input file. The second method will leave the parameter uninitialized but can be checked with "isParamValid" before use.

Definition at line 1117 of file InputParameters.h.

Referenced by AdvancedOutput::addValidParams(), Moose::PetscSupport::getPetscValidParams(), Moose::SlepcSupport::getSlepcEigenProblemValidParams(), nearestPointBaseValidParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), MatDiffusionBase< Real >::validParams(), ShapeUserObject< SideUserObject >::validParams(), validParams< AB2PredictorCorrector >(), validParams< Action >(), validParams< ActuallyExplicitEuler >(), validParams< AdamsPredictor >(), validParams< AdaptivityAction >(), validParams< AddAuxVariableAction >(), validParams< AddElementalFieldAction >(), validParams< AddExtraNodeset >(), validParams< AddFieldSplitAction >(), validParams< AddNodalNormalsAction >(), validParams< AddPeriodicBCAction >(), validParams< AddSideSetsBase >(), validParams< AddSideSetsFromBoundingBox >(), validParams< AddVariableAction >(), validParams< AnnularMesh >(), validParams< AnnularMeshGenerator >(), validParams< AssignElementSubdomainID >(), validParams< AStableDirk4 >(), validParams< Axisymmetric2D3DSolutionFunction >(), validParams< BicubicSplineFunction >(), validParams< BlockRestrictable >(), validParams< BodyForce >(), validParams< BoundaryRestrictable >(), validParams< BoundingBoxIC >(), validParams< BoundingBoxNodeSet >(), validParams< BoundingBoxNodeSetGenerator >(), validParams< BoundingValueElementDamper >(), validParams< BoundingValueNodalDamper >(), validParams< BoundsAux >(), validParams< BreakBoundaryOnSubdomain >(), validParams< BreakBoundaryOnSubdomainGenerator >(), validParams< BreakMeshByBlockBase >(), validParams< BreakMeshByBlockGeneratorBase >(), validParams< CartesianMeshGenerator >(), validParams< ChangeOverTimePostprocessor >(), validParams< Checkpoint >(), validParams< CoefTimeDerivative >(), validParams< CommonOutputAction >(), validParams< ComparisonPostprocessor >(), validParams< CompositeFunction >(), validParams< ConcentricCircleMesh >(), validParams< ConcentricCircleMeshGenerator >(), validParams< ConditionalEnableControl >(), validParams< ConservativeAdvection >(), validParams< Console >(), validParams< ConstantAux >(), validParams< ConstantFunction >(), validParams< ControlOutput >(), validParams< CopyNodalVarsAction >(), validParams< CoupledForce >(), validParams< CoupledTiedValueConstraint >(), validParams< CreateDisplacedProblemAction >(), validParams< CreateProblemAction >(), validParams< CSV >(), validParams< CSVReader >(), validParams< CSVTimeSequenceStepper >(), validParams< Damper >(), validParams< DeprecatedBlockAction >(), validParams< DerivativeParsedMaterialHelper >(), validParams< DerivativeSumMaterial >(), validParams< DGDiffusion >(), validParams< DGFunctionDiffusionDirichletBC >(), validParams< DisplayGhostingAction >(), validParams< DistributedGeneratedMesh >(), validParams< DOFMapOutput >(), validParams< DT2 >(), validParams< DynamicObjectRegistrationAction >(), validParams< EigenExecutionerBase >(), validParams< EigenKernel >(), validParams< ElemElemConstraint >(), validParams< ElementDeleterBase >(), validParams< ElementDeletionGeneratorBase >(), validParams< ElementExtremeValue >(), validParams< ElementGenerator >(), validParams< ElementQualityChecker >(), validParams< ElementSubdomainIDGenerator >(), validParams< ElementVariablesDifferenceMax >(), validParams< ElementVectorL2Error >(), validParams< EqualValueBoundaryConstraint >(), validParams< EqualValueEmbeddedConstraint >(), validParams< ErrorFractionMarker >(), validParams< ErrorToleranceMarker >(), validParams< ExtraNodesetGenerator >(), validParams< FEProblemBase >(), validParams< FEProblemSolve >(), validParams< FieldSplitPreconditioner >(), validParams< FileOutput >(), validParams< FileRangeBuilder >(), validParams< FindValueOnLine >(), validParams< FiniteDifferencePreconditioner >(), validParams< FullSolveMultiApp >(), validParams< FunctionDT >(), validParams< FunctionMaterialBase >(), validParams< FunctionParserUtils >(), validParams< FunctionSideIntegral >(), validParams< FunctionValuePostprocessor >(), validParams< GapValueAux >(), validParams< GeneralUserObject >(), validParams< GeneratedMesh >(), validParams< GeneratedMeshGenerator >(), validParams< GenericConstantMaterial >(), validParams< GenericFunctionMaterial >(), validParams< GeometryBase >(), validParams< GeometrySphere >(), validParams< GhostingAux >(), validParams< GhostingUserObject >(), validParams< GMVOutput >(), validParams< Gnuplot >(), validParams< ImageSampler >(), validParams< Indicator >(), validParams< IntegratedBCBase >(), validParams< InterfaceIntegralVariableValuePostprocessor >(), validParams< InterfaceValueUserObject >(), validParams< InternalSideIndicator >(), validParams< InversePowerMethod >(), validParams< IterationAdaptiveDT >(), validParams< LagrangeVecFunctionDirichletBC >(), validParams< LayeredBase >(), validParams< LeastSquaresFit >(), validParams< LeastSquaresFitHistory >(), validParams< LibmeshPartitioner >(), validParams< LinearCombinationPostprocessor >(), validParams< LinearNodalConstraint >(), validParams< LowerDBlockFromSideset >(), validParams< LowerDBlockFromSidesetGenerator >(), validParams< Material >(), validParams< MaterialAuxBase<> >(), validParams< MaterialDerivativeTestAction >(), validParams< MaterialRealDenseMatrixAux >(), validParams< MaterialRealTensorValueAux >(), validParams< MaterialRealVectorValueAux >(), validParams< MaterialStdVectorAux >(), validParams< MaterialStdVectorAuxBase<> >(), validParams< MaterialStdVectorRealGradientAux >(), validParams< MaxIncrement >(), validParams< MemoryUsage >(), validParams< MeshBaseImageSampler >(), validParams< MeshExtruder >(), validParams< MeshExtruderGenerator >(), validParams< MeshModifier >(), validParams< MeshSideSet >(), validParams< MeshSideSetGenerator >(), validParams< MooseMesh >(), validParams< MooseObject >(), validParams< MooseObjectAction >(), validParams< MooseParsedFunctionBase >(), validParams< MooseParsedGradFunction >(), validParams< MooseParsedVectorFunction >(), validParams< MoosePreconditioner >(), validParams< MortarConstraint >(), validParams< MultiApp >(), validParams< MultiAppInterpolationTransfer >(), validParams< MultiAppMeshFunctionTransfer >(), validParams< MultiAppNearestNodeTransfer >(), validParams< MultiAppPostprocessorInterpolationTransfer >(), validParams< MultiAppPostprocessorTransfer >(), validParams< MultiAppProjectionTransfer >(), validParams< MultiAppTransfer >(), validParams< MultiAppUserObjectTransfer >(), validParams< NeumannBC >(), validParams< NodalBCBase >(), validParams< NodalConstraint >(), validParams< NodalExtremeValue >(), validParams< NodalNormalsPreprocessor >(), validParams< NodalPatchRecovery >(), validParams< NodalScalarKernel >(), validParams< NodalUserObject >(), validParams< NodalVariableValue >(), validParams< NodeFaceConstraint >(), validParams< NonlinearEigen >(), validParams< NormalizationAux >(), validParams< NullKernel >(), validParams< NumDOFs >(), validParams< NumElems >(), validParams< NumNonlinearIterations >(), validParams< NumVars >(), validParams< Output >(), validParams< OutputInterface >(), validParams< OversampleOutput >(), validParams< ParsedMaterialBase >(), validParams< PatternedMesh >(), validParams< PatternedMeshGenerator >(), validParams< PenaltyDirichletBC >(), validParams< PenetrationAux >(), validParams< PerfGraphOutput >(), validParams< PerformanceData >(), validParams< PetscExternalPartitioner >(), validParams< PetscOutput >(), validParams< PhysicsBasedPreconditioner >(), validParams< PicardSolve >(), validParams< Piecewise >(), validParams< PiecewiseBase >(), validParams< PiecewiseBilinear >(), validParams< PiecewiseConstant >(), validParams< PiecewiseLinearInterpolationMaterial >(), validParams< PiecewiseMulticonstant >(), validParams< PiecewiseMultiInterpolation >(), validParams< PostprocessorDT >(), validParams< PostprocessorNeumannBC >(), validParams< Predictor >(), validParams< RandomIC >(), validParams< RandomICBase >(), validParams< RandomInterface >(), validParams< Receiver >(), validParams< RelationshipManager >(), validParams< RenameBlock >(), validParams< RenameBlockGenerator >(), validParams< RenameBoundaryGenerator >(), validParams< Residual >(), validParams< RinglebMesh >(), validParams< RinglebMeshGenerator >(), validParams< ScalarInitialCondition >(), validParams< ScalarTagMatrixAux >(), validParams< ScalarTagVectorAux >(), validParams< ScalarVariable >(), validParams< ScalePostprocessor >(), validParams< SetAdaptivityOptionsAction >(), validParams< SetupDebugAction >(), validParams< SetupInterface >(), validParams< SetupMeshAction >(), validParams< SetupQuadratureAction >(), validParams< SetupResidualDebugAction >(), validParams< SideSetsAroundSubdomain >(), validParams< SideSetsAroundSubdomainGenerator >(), validParams< SideSetsFromBoundingBoxGenerator >(), validParams< SideSetsGeneratorBase >(), validParams< SingleMatrixPreconditioner >(), validParams< SinNeumannBC >(), validParams< SmoothMesh >(), validParams< SmoothMeshGenerator >(), validParams< SolutionAux >(), validParams< SolutionFunction >(), validParams< SolutionTimeAdaptiveDT >(), validParams< SolutionUserObject >(), validParams< SpatialAverageBase >(), validParams< SpiralAnnularMesh >(), validParams< SpiralAnnularMeshGenerator >(), validParams< SplineFunction >(), validParams< Split >(), validParams< StackGenerator >(), validParams< Steady >(), validParams< StitchedMesh >(), validParams< StitchedMeshGenerator >(), validParams< SubdomainBoundingBox >(), validParams< SubdomainBoundingBoxGenerator >(), validParams< SubProblem >(), validParams< TaggingInterface >(), validParams< TagMatrixAux >(), validParams< TagVectorAux >(), validParams< Tecplot >(), validParams< TiedValueConstraint >(), validParams< TiledMesh >(), validParams< TiledMeshGenerator >(), validParams< TimeDerivative >(), validParams< TimeExtremeValue >(), validParams< TimePeriod >(), validParams< TimeStepper >(), validParams< TopResidualDebugOutput >(), validParams< TotalVariableValue >(), validParams< Transfer >(), validParams< Transient >(), validParams< TransientInterface >(), validParams< TransientMultiApp >(), validParams< VacuumBC >(), validParams< ValueRangeMarker >(), validParams< ValueThresholdMarker >(), validParams< VariableGradientComponent >(), validParams< VariableTimeIntegrationAux >(), validParams< VectorBodyForce >(), validParams< VectorConstantIC >(), validParams< VectorMemoryUsage >(), validParams< VectorNeumannBC >(), validParams< VectorPostprocessor >(), validParams< VectorPostprocessorVisualizationAux >(), validParams< VectorVariableComponentAux >(), validParams< VolumeHistogram >(), validParams< VTKOutput >(), and validParams< WorkBalance >().

1118 {
1119  checkParamName(name);
1120  checkConsistentType<T>(name);
1121 
1122  T & l_value = InputParameters::set<T>(name);
1123  _params[name]._doc_string = doc_string;
1124 
1125  // Set the parameter now
1126  setParamHelper(name, l_value, value);
1127 
1128  /* Indicate the default value, as set via addParam, is being used. The parameter is removed from
1129  the list whenever
1130  it changes, see set_attributes */
1131  _params[name]._set_by_add_param = true;
1132 }
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.
void setParamHelper(const std::string &name, T &l_value, const S &r_value)
This method is called when adding a Parameter with a default value, can be specialized for non-matchi...

◆ addParam() [2/6]

template<typename T >
void InputParameters::addParam ( const std::string &  name,
const std::string &  doc_string 
)

Definition at line 1136 of file InputParameters.h.

1137 {
1138  checkParamName(name);
1139  checkConsistentType<T>(name);
1140 
1141  InputParameters::insert<T>(name);
1142  _params[name]._doc_string = doc_string;
1143 }
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addParam() [3/6]

template<>
void InputParameters::addParam ( const std::string &  ,
const std::string &   
)

Definition at line 848 of file InputParameters.C.

850 {
851  mooseError("You must supply a MooseEnum object when using addParam, even if the parameter is not "
852  "required!");
853 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ addParam() [4/6]

template<>
void InputParameters::addParam ( const std::string &  ,
const std::string &   
)

Definition at line 857 of file InputParameters.C.

859 {
860  mooseError("You must supply a MultiMooseEnum object when using addParam, even if the parameter "
861  "is not required!");
862 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ addParam() [5/6]

template<>
void InputParameters::addParam ( const std::string &  ,
const std::string &   
)

◆ addParam() [6/6]

template<>
void InputParameters::addParam ( const std::string &  ,
const std::string &   
)

◆ addParamNamesToGroup()

void InputParameters::addParamNamesToGroup ( const std::string &  space_delim_names,
const std::string  group_name 
)

This method takes a space delimited list of parameter names and adds them to the specified group name.

This information is used in the GUI to group parameters into logical sections.

Definition at line 590 of file InputParameters.C.

Referenced by AdvancedOutput::addValidParams(), ShapeUserObject< SideUserObject >::validParams(), validParams< CartesianMeshGenerator >(), validParams< Checkpoint >(), validParams< Console >(), validParams< CopyNodalVarsAction >(), validParams< DerivativeSumMaterial >(), validParams< DistributedGeneratedMesh >(), validParams< EigenExecutionerBase >(), validParams< FileOutput >(), validParams< FunctionParserUtils >(), validParams< GeneratedMesh >(), validParams< GeneratedMeshGenerator >(), validParams< GMVOutput >(), validParams< ImageSampler >(), validParams< LeastSquaresFitHistory >(), validParams< MaterialStdVectorAux >(), validParams< MeshBaseImageSampler >(), validParams< MooseMesh >(), validParams< MooseObject >(), validParams< NodalPatchRecovery >(), validParams< OutputInterface >(), validParams< OversampleOutput >(), validParams< PetscOutput >(), validParams< PicardSolve >(), validParams< Postprocessor >(), validParams< RandomInterface >(), validParams< SetupMeshAction >(), validParams< SubProblem >(), validParams< TaggingInterface >(), validParams< Tecplot >(), validParams< Transient >(), validParams< TransientInterface >(), and validParams< VTKOutput >().

592 {
593  std::vector<std::string> elements;
594  MooseUtils::tokenize(space_delim_names, elements, 1, " \t\n\v\f\r"); // tokenize on whitespace
595 
596  // Since we don't require types (templates) for this method, we need
597  // to get a raw list of parameter names to compare against.
598  std::set<std::string> param_names;
599  for (const auto & it : *this)
600  param_names.insert(it.first);
601 
602  for (const auto & param_name : elements)
603  if (_params.count(param_name) > 0)
604  _params[param_name]._group = group_name;
605  else
606  mooseError("Unable to find a parameter with name: ",
607  param_name,
608  " when adding to group ",
609  group_name,
610  '.');
611 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:429
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addPrivateParam() [1/6]

template<typename T >
void InputParameters::addPrivateParam ( const std::string &  name,
const T &  value 
)

These method add a parameter to the InputParameters object which can be retrieved like any other parameter.

This parameter however is not printed in the Input file syntax dump or web page dump so does not take a documentation string. The first version of this function takes an optional default value.

Definition at line 1227 of file InputParameters.h.

Referenced by AddControlAction::act(), FEProblemBase::addOutput(), ActionFactory::create(), ActionFactory::getValidParams(), Factory::getValidParams(), validParams< Action >(), validParams< BlockRestrictable >(), validParams< BoundaryRestrictable >(), validParams< BoundaryRestrictableRequired >(), validParams< CreateProblemDefaultAction >(), validParams< DisplacedProblem >(), validParams< EigenExecutionerBase >(), validParams< Eigenvalue >(), validParams< ExecutionerAttributeReporter >(), validParams< GlobalParamsAction >(), validParams< InternalSideIndicator >(), validParams< MaterialPropertyInterface >(), validParams< MeshModifier >(), validParams< MooseApp >(), validParams< MooseObject >(), validParams< MoosePartitioner >(), validParams< MoosePreconditioner >(), validParams< NodalNormalsPreprocessor >(), validParams< RelationshipManager >(), validParams< SubProblem >(), and validParams< XDA >().

1228 {
1229  checkParamName(name);
1230  checkConsistentType<T>(name);
1231 
1232  InputParameters::set<T>(name) = value;
1233  _params[name]._is_private = true;
1234  _params[name]._set_by_add_param = true;
1235 }
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addPrivateParam() [2/6]

template<typename T >
void InputParameters::addPrivateParam ( const std::string &  name)

Definition at line 1216 of file InputParameters.h.

1217 {
1218  checkParamName(name);
1219  checkConsistentType<T>(name);
1220 
1221  InputParameters::insert<T>(name);
1222  _params[name]._is_private = true;
1223 }
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addPrivateParam() [3/6]

template<>
void InputParameters::addPrivateParam ( const std::string &  )

Definition at line 875 of file InputParameters.C.

876 {
877  mooseError("You must supply a MooseEnum object when using addPrivateParam, even if the parameter "
878  "is not required!");
879 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ addPrivateParam() [4/6]

template<>
void InputParameters::addPrivateParam ( const std::string &  )

Definition at line 883 of file InputParameters.C.

884 {
885  mooseError("You must supply a MultiMooseEnum object when using addPrivateParam, even if the "
886  "parameter is not required!");
887 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ addPrivateParam() [5/6]

template<>
void InputParameters::addPrivateParam ( const std::string &  )

◆ addPrivateParam() [6/6]

template<>
void InputParameters::addPrivateParam ( const std::string &  )

◆ addRangeCheckedParam() [1/2]

template<typename T >
void InputParameters::addRangeCheckedParam ( const std::string &  name,
const T &  value,
const std::string &  parsed_function,
const std::string &  doc_string 
)

◆ addRangeCheckedParam() [2/2]

template<typename T >
void InputParameters::addRangeCheckedParam ( const std::string &  name,
const std::string &  parsed_function,
const std::string &  doc_string 
)

Definition at line 1175 of file InputParameters.h.

1178 {
1179  addParam<T>(name, doc_string);
1180  _params[name]._range_function = parsed_function;
1181 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRelationshipManager()

void InputParameters::addRelationshipManager ( const std::string &  name,
Moose::RelationshipManagerType  rm_type,
Moose::RelationshipManagerInputParameterCallback  input_parameter_callback = nullptr 
)

Tells MOOSE about a RelationshipManager that this object needs.

RelationshipManagers handle element "ghosting", "non-local DOF access" and "sparsity pattern" relationships.

Basically: if this object needs non-local (ie non-current-element) data access then you probably need a relationship manager

Parameters
nameThe name of the RelationshipManager type
rm_typeThe type (GEOMETRIC/ALGEBRAIC) of the RelationshipManger. Note: You can use boolean logic to to "or" RelationshipManagerTypes together to make a RelationshipManager that is multi-typed.
input_parameter_callbackThis is a function pointer that will get called to fill in the RelationShipManager's InputParameters. See MooseTypes.h for the signature of this function.

Definition at line 344 of file InputParameters.C.

Referenced by validParams< GMVOutput >(), validParams< InternalSideUserObject >(), validParams< MultiAppProjectionTransfer >(), and validParams< Tecplot >().

348 {
349  _buildable_rm_types.emplace_back(name, rm_type, input_parameter_callback);
350 }
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.

◆ addRequiredCommandLineParam()

template<typename T >
void InputParameters::addRequiredCommandLineParam ( const std::string &  name,
const std::string &  syntax,
const std::string &  doc_string 
)

Add parameters for retrieval from the command line.

NOTE: This ONLY works for App objects! This is not valid for normal MOOSE objects!

Parameters
nameThe name of the parameter
syntaxSpace separated list of command-line switch syntax that can set this option
doc_stringDocumentation. This will be shown for –help

Definition at line 1239 of file InputParameters.h.

1242 {
1243  addRequiredParam<T>(name, doc_string);
1244  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1245 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:429
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredCoupledVar()

void InputParameters::addRequiredCoupledVar ( const std::string &  name,
const std::string &  doc_string 
)

This method adds a coupled variable name pair.

The parser will look for variable name pair in the input file and can return a reference to the storage location for the coupled variable. If the coupled variable is not supplied in the input file, and error is thrown.

Version 2: An auto built vector will be built from the base_name and num_name param. See addCoupledVar for an example

Definition at line 216 of file InputParameters.C.

Referenced by MaterialDerivativeTestKernelBase< Real >::validParams(), CompositeTensorBase< T, U >::validParams(), validParams< BoundsAux >(), validParams< CoupledForce >(), validParams< CoupledODETimeDerivative >(), validParams< CoupledTimeDerivative >(), validParams< DerivativeSumMaterial >(), validParams< DiffusionFluxAux >(), validParams< ElementIntegralVariablePostprocessor >(), validParams< ElementIntegralVariableUserObject >(), validParams< ElementL2Difference >(), validParams< ElementLpNormAux >(), validParams< ElementVariablePostprocessor >(), validParams< ElementVariablesDifferenceMax >(), validParams< ElementVariableVectorPostprocessor >(), validParams< ElementVectorL2Error >(), validParams< InterfaceIntegralVariableValuePostprocessor >(), validParams< InterfaceQpValueUserObject >(), validParams< MatchedValueBC >(), validParams< NearestNodeValueAux >(), validParams< NodalEqualValueConstraint >(), validParams< NodalVariablePostprocessor >(), validParams< NodalVariableVectorPostprocessor >(), validParams< NodeElemConstraint >(), validParams< NodeFaceConstraint >(), validParams< NormalizationAux >(), validParams< OneDEqualValueConstraintBC >(), validParams< PiecewiseLinearInterpolationMaterial >(), validParams< PointSamplerBase >(), validParams< ScalarTagMatrixAux >(), validParams< ScalarTagVectorAux >(), validParams< SideIntegralVariablePostprocessor >(), validParams< SideIntegralVariableUserObject >(), validParams< SideValueSampler >(), validParams< TagMatrixAux >(), validParams< TagVectorAux >(), validParams< VariableGradientComponent >(), validParams< VariableInnerProduct >(), validParams< VariableTimeIntegrationAux >(), validParams< VectorMagnitudeAux >(), and validParams< VectorVariableComponentAux >().

217 {
218  addRequiredParam<std::vector<VariableName>>(name, doc_string);
219  _coupled_vars.insert(name);
220 }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ addRequiredCoupledVarWithAutoBuild()

void InputParameters::addRequiredCoupledVarWithAutoBuild ( const std::string &  name,
const std::string &  base_name,
const std::string &  num_name,
const std::string &  doc_string 
)

Definition at line 205 of file InputParameters.C.

209 {
210  addRequiredParam<std::vector<VariableName>>(name, doc_string);
211 
212  addCoupledVarWithAutoBuild(name, base_name, num_name, doc_string);
213 }
void addCoupledVarWithAutoBuild(const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
These methods add a coupled variable name pair.

◆ addRequiredCustomTypeParam()

template<typename T >
void InputParameters::addRequiredCustomTypeParam ( const std::string &  name,
const std::string &  custom_type,
const std::string &  doc_string 
)

These methods add an option parameter and with a customer type to the InputParameters object.

The custom type will be output in YAML dumps and can be used within the GUI application.

Definition at line 1185 of file InputParameters.h.

Referenced by validParams< MooseParsedFunction >(), and validParams< Terminator >().

1188 {
1189  addRequiredParam<T>(name, doc_string);
1190  _params[name]._custom_type = custom_type;
1191 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [1/6]

template<typename T >
void InputParameters::addRequiredParam ( const std::string &  name,
const std::string &  doc_string 
)

This method adds a parameter and documentation string to the InputParameters object that will be extracted from the input file.

If the parameter is missing in the input file, and error will be thrown

Definition at line 1095 of file InputParameters.h.

Referenced by DerivativeKernelInterface< T >::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), CompositeTensorBase< T, U >::validParams(), validParams< AB2PredictorCorrector >(), validParams< AddExtraNodeset >(), validParams< AddMortarInterfaceAction >(), validParams< AddSideSetsFromBoundingBox >(), validParams< AllSideSetsByNormalsGenerator >(), validParams< AnalyticalIndicator >(), validParams< AnisotropicDiffusion >(), validParams< AnnularMesh >(), validParams< AnnularMeshGenerator >(), validParams< AssignElementSubdomainID >(), validParams< AssignSubdomainID >(), validParams< AuxNodalScalarKernel >(), validParams< AuxScalarKernel >(), validParams< Axisymmetric2D3DSolutionFunction >(), validParams< BicubicSplineFunction >(), validParams< BlockDeleter >(), validParams< BlockDeletionGenerator >(), validParams< BoundaryCondition >(), validParams< BoundaryRestrictableRequired >(), validParams< BoundingBoxIC >(), validParams< BoundingBoxNodeSet >(), validParams< BoundingBoxNodeSetGenerator >(), validParams< BoxMarker >(), validParams< BreakBoundaryOnSubdomainGenerator >(), validParams< BreakMeshByBlockGenerator >(), validParams< CartesianMeshGenerator >(), validParams< ChangeOverTimePostprocessor >(), validParams< ComboMarker >(), validParams< ComparisonPostprocessor >(), validParams< ConcentricCircleMesh >(), validParams< ConcentricCircleMeshGenerator >(), validParams< ConditionalFunctionEnableControl >(), validParams< ConservativeAdvection >(), validParams< ConstantDamper >(), validParams< ConstantDT >(), validParams< ConstantIC >(), validParams< ConstantPointSource >(), validParams< ConstantRate >(), validParams< ConstantScalarAux >(), validParams< ConstantVectorPostprocessor >(), validParams< Constraint >(), validParams< CSVReader >(), validParams< CSVTimeSequenceStepper >(), validParams< CumulativeValuePostprocessor >(), validParams< CylindricalAverage >(), validParams< DebugResidualAux >(), validParams< DGConvection >(), validParams< DGDiffusion >(), validParams< DGFunctionDiffusionDirichletBC >(), validParams< DGKernelBase >(), validParams< DifferencePostprocessor >(), validParams< DiffusionFluxAux >(), validParams< DiracKernel >(), validParams< DirichletBC >(), validParams< DistributedGeneratedMesh >(), validParams< Distribution >(), validParams< DT2 >(), validParams< DumpObjectsProblem >(), validParams< EigenExecutionerBase >(), validParams< ElementalVariableValue >(), validParams< ElementDamper >(), validParams< ElementDeletionGeneratorBase >(), validParams< ElementGenerator >(), validParams< ElementH1SemiError >(), validParams< ElementIndicator >(), validParams< ElementIntegralMaterialProperty >(), validParams< ElementL2Error >(), validParams< ElementL2ErrorFunctionAux >(), validParams< ElementLengthAux >(), validParams< ElementQualityAux >(), validParams< ElementQualityChecker >(), validParams< ElementsAlongLine >(), validParams< ElementsAlongPlane >(), validParams< ElementSubdomainIDGenerator >(), validParams< ElementVectorL2Error >(), validParams< ElementW1pError >(), validParams< EqualGradientConstraint >(), validParams< EqualValueBoundaryConstraint >(), validParams< EqualValueEmbeddedConstraint >(), validParams< ExodusTimeSequenceStepper >(), validParams< ExtraNodesetGenerator >(), validParams< FieldSplitPreconditioner >(), validParams< FileMesh >(), validParams< FileMeshGenerator >(), validParams< FunctionAux >(), validParams< FunctionDiracSource >(), validParams< FunctionDirichletBC >(), validParams< FunctionIC >(), validParams< FunctionNeumannBC >(), validParams< FunctionPenaltyDirichletBC >(), validParams< FunctionPresetBC >(), validParams< FunctionScalarAux >(), validParams< FunctionScalarIC >(), validParams< FunctionValuePostprocessor >(), validParams< GapValueAux >(), validParams< GeneratedMesh >(), validParams< GeneratedMeshGenerator >(), validParams< GenericConstantRankTwoTensor >(), validParams< GhostingAux >(), validParams< HistogramVectorPostprocessor >(), validParams< ImageSubdomainGenerator >(), validParams< IndicatorMarker >(), validParams< InitialConditionBase >(), validParams< InterfaceKernel >(), validParams< InterfaceValueUserObjectAux >(), validParams< InternalSideIndicator >(), validParams< IntersectionPointsAlongLine >(), validParams< IterationAdaptiveDT >(), validParams< KernelBase >(), validParams< LagrangeVecDirichletBC >(), validParams< LayeredBase >(), validParams< LayeredSideFluxAverage >(), validParams< LeastSquaresFit >(), validParams< LeastSquaresFitHistory >(), validParams< LibmeshPartitioner >(), validParams< LinearCombinationFunction >(), validParams< LinearCombinationPostprocessor >(), validParams< LinearNodalConstraint >(), validParams< LineFunctionSampler >(), validParams< LineMaterialSamplerBase< Real > >(), validParams< LineValueSampler >(), validParams< LowerDBlockFromSideset >(), validParams< LowerDBlockFromSidesetGenerator >(), validParams< MaterialAuxBase<> >(), validParams< MaterialDerivativeRankFourTestKernel >(), validParams< MaterialDerivativeRankTwoTestKernel >(), validParams< MaterialDerivativeTestAction >(), validParams< MaterialRankFourTensorAux >(), validParams< MaterialRankTwoTensorAux >(), validParams< MaterialVectorPostprocessor >(), validParams< MeshCollectionGenerator >(), validParams< MeshExtruder >(), validParams< MeshExtruderGenerator >(), validParams< MeshSideSet >(), validParams< MeshSideSetGenerator >(), validParams< MooseObjectAction >(), validParams< MortarConstraint >(), validParams< MultiAppCopyTransfer >(), validParams< MultiAppDTKInterpolationTransfer >(), validParams< MultiAppDTKUserObjectTransfer >(), validParams< MultiAppInterpolationTransfer >(), validParams< MultiAppMeshFunctionTransfer >(), validParams< MultiAppNearestNodeTransfer >(), validParams< MultiAppPostprocessorInterpolationTransfer >(), validParams< MultiAppPostprocessorToAuxScalarTransfer >(), validParams< MultiAppPostprocessorTransfer >(), validParams< MultiAppProjectionTransfer >(), validParams< MultiAppScalarToAuxScalarTransfer >(), validParams< MultiAppTransfer >(), validParams< MultiAppUserObjectTransfer >(), validParams< MultiAppVariableValueSamplePostprocessorTransfer >(), validParams< MultiAppVariableValueSampleTransfer >(), validParams< MultiAppVectorPostprocessorTransfer >(), validParams< NearestNodeDistanceAux >(), validParams< NearestNodeValueAux >(), validParams< NodalDamper >(), validParams< NodalKernel >(), validParams< NodalL2Error >(), validParams< NodalNormalsCorner >(), validParams< NodalNormalsPreprocessor >(), validParams< NodalVariableValue >(), validParams< NodeElemConstraint >(), validParams< NodeFaceConstraint >(), validParams< OneDEqualValueConstraintBC >(), validParams< OrientedBoxInterface >(), validParams< ParsedAddSideset >(), validParams< ParsedGenerateSideset >(), validParams< ParsedMaterialBase >(), validParams< ParsedSubdomainMeshGenerator >(), validParams< ParsedSubdomainMeshModifier >(), validParams< PatternedMesh >(), validParams< PatternedMeshGenerator >(), validParams< PenaltyDirichletBC >(), validParams< PenetrationAux >(), validParams< PercentChangePostprocessor >(), validParams< PerfGraphData >(), validParams< PerformanceData >(), validParams< PhysicsBasedPreconditioner >(), validParams< PiecewiseLinearInterpolationMaterial >(), validParams< PointValue >(), validParams< PointValueSampler >(), validParams< PostprocessorComparison >(), validParams< PostprocessorDirichletBC >(), validParams< PostprocessorDT >(), validParams< Predictor >(), validParams< PresetBC >(), validParams< ProxyRelationshipManager >(), validParams< RealFunctionControl >(), validParams< RelationshipManager >(), validParams< RelativeDifferencePostprocessor >(), validParams< RenameBlockGenerator >(), validParams< RenameBoundaryGenerator >(), validParams< RinglebMesh >(), validParams< RinglebMeshGenerator >(), validParams< SamplerBase >(), validParams< ScalarComponentIC >(), validParams< ScalarKernel >(), validParams< ScalarL2Error >(), validParams< ScalarVariable >(), validParams< ScalePostprocessor >(), validParams< SideFluxIntegral >(), validParams< SideSetsAroundSubdomain >(), validParams< SideSetsAroundSubdomainGenerator >(), validParams< SideSetsBetweenSubdomains >(), validParams< SideSetsBetweenSubdomainsGenerator >(), validParams< SideSetsFromBoundingBoxGenerator >(), validParams< SideSetsFromNormals >(), validParams< SideSetsFromNormalsGenerator >(), validParams< SideSetsFromPoints >(), validParams< SideSetsFromPointsGenerator >(), validParams< SmoothMeshGenerator >(), validParams< SolutionAux >(), validParams< SolutionFunction >(), validParams< SolutionTimeAdaptiveDT >(), validParams< SolutionUserObject >(), validParams< SpatialAverageBase >(), validParams< SpatialUserObjectAux >(), validParams< SplineFunction >(), validParams< StackGenerator >(), validParams< StatisticsVectorPostprocessor >(), validParams< StitchedMesh >(), validParams< StitchedMeshGenerator >(), validParams< SubdomainBoundingBox >(), validParams< SubdomainBoundingBoxGenerator >(), validParams< SubdomainIDGenerator >(), validParams< TestSetupPostprocessorDataActionFunction >(), validParams< TiledMesh >(), validParams< TiledMeshGenerator >(), validParams< TimeExtremeValue >(), validParams< TimeSequenceStepper >(), validParams< Transform >(), validParams< TransformGenerator >(), validParams< UniformMarker >(), validParams< UserForcingFunctionNodalKernel >(), validParams< ValueRangeMarker >(), validParams< VariableResidual >(), validParams< VectorConstantIC >(), validParams< VectorFunctionAux >(), validParams< VectorOfPostprocessors >(), validParams< VectorPostprocessorComparison >(), validParams< VectorPostprocessorFunction >(), validParams< VectorPostprocessorVisualizationAux >(), and validParams< VolumeHistogram >().

1096 {
1097  checkParamName(name);
1098  checkConsistentType<T>(name);
1099 
1100  InputParameters::insert<T>(name);
1101  _params[name]._required = true;
1102  _params[name]._doc_string = doc_string;
1103 }
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [2/6]

template<typename T >
void InputParameters::addRequiredParam ( const std::string &  name,
const T &  moose_enum,
const std::string &  doc_string 
)

This version of addRequiredParam is here for a consistent use with MooseEnums.

Use of this function for any other type will throw an error.

Definition at line 1107 of file InputParameters.h.

1110 {
1111  mooseError("You cannot call addRequiredParam and supply a default value for this type, please "
1112  "use addParam instead");
1113 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ addRequiredParam() [3/6]

template<>
void InputParameters::addRequiredParam ( const std::string &  name,
const MooseEnum moose_enum,
const std::string &  doc_string 
)

Definition at line 812 of file InputParameters.C.

815 {
816  InputParameters::set<MooseEnum>(name) = moose_enum; // valid parameter is set by set_attributes
817  _params[name]._required = true;
818  _params[name]._doc_string = doc_string;
819 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [4/6]

template<>
void InputParameters::addRequiredParam ( const std::string &  name,
const MultiMooseEnum moose_enum,
const std::string &  doc_string 
)

Definition at line 823 of file InputParameters.C.

826 {
827  InputParameters::set<MultiMooseEnum>(name) =
828  moose_enum; // valid parameter is set by set_attributes
829  _params[name]._required = true;
830  _params[name]._doc_string = doc_string;
831 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [5/6]

template<>
void InputParameters::addRequiredParam ( const std::string &  name,
const MooseEnum moose_enum,
const std::string &  doc_string 
)

◆ addRequiredParam() [6/6]

template<>
void InputParameters::addRequiredParam ( const std::string &  name,
const MultiMooseEnum moose_enum,
const std::string &  doc_string 
)

◆ addRequiredRangeCheckedParam()

template<typename T >
void InputParameters::addRequiredRangeCheckedParam ( const std::string &  name,
const std::string &  parsed_function,
const std::string &  doc_string 
)

These methods add an range checked parameters.

A lower and upper bound can be supplied and the supplied parameter will be checked to fall within that range.

Definition at line 1154 of file InputParameters.h.

Referenced by validParams< AnnularMesh >(), validParams< AnnularMeshGenerator >(), validParams< LogConstantDT >(), validParams< MaxIncrement >(), validParams< SpiralAnnularMesh >(), validParams< SpiralAnnularMeshGenerator >(), and validParams< VectorPostprocessorFunction >().

1157 {
1158  addRequiredParam<T>(name, doc_string);
1159  _params[name]._range_function = parsed_function;
1160 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ allowCopy()

void InputParameters::allowCopy ( bool  status)
inlineprivate

Toggle the availability of the copy constructor.

When MooseObject is created via the Factory this flag is set to false, so when a MooseObject is created if the constructor is not a const reference an error is produced. This method allows the InputParameterWarehouse to disable copying.

Definition at line 842 of file InputParameters.h.

842 { _allow_copy = status; }
bool _allow_copy
A flag for toggling the error message in the copy constructor.

◆ applyCoupledVar()

void InputParameters::applyCoupledVar ( const InputParameters common,
const std::string &  var_name 
)

Apply properties of a single coupled variable in common, to a single coupled variable stored in this object.

Parameters
commonThe set of InputParameters from which to extract the coupled variable's properties
var_nameThe name of the coupled variable whose properties are to be applied

In order to apply the properties, both the local parameters and the common parameters must have a coupled variable with name var_name

Definition at line 721 of file InputParameters.C.

Referenced by applyParameters(), and applySpecificParameters().

722 {
723  // Disable the display of deprecated message when applying common parameters, this avoids a dump
724  // of messages
725  _show_deprecated_message = false;
726 
727  // If the local parameters has a coupled variable, populate it with the value from the common
728  // parameters, if the common parameters has the coupled variable too
729  if (hasCoupledValue(var_name))
730  {
731  if (common.hasDefaultCoupledValue(var_name))
732  {
733  // prepare a vector of default coupled values
734  std::vector<Real> defaults(common.numberDefaultCoupledValues(var_name));
735  for (unsigned int j = 0; j < common.numberDefaultCoupledValues(var_name); ++j)
736  defaults[j] = common.defaultCoupledValue(var_name, j);
737  addCoupledVar(var_name, defaults, common.getDocString(var_name));
738  }
739  else if (common.hasCoupledValue(var_name))
740  addCoupledVar(var_name, common.getDocString(var_name));
741  }
742 
743  // Enable deprecated message printing
745 }
bool hasCoupledValue(const std::string &coupling_name) const
Return whether or not the coupled variable exists.
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::string getDocString(const std::string &name) const
Returns the documentation string for the specified parameter name.
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.

◆ applyParameter()

void InputParameters::applyParameter ( const InputParameters common,
const std::string &  common_name 
)

Apply values from a single parameter in common, to a single parameter stored in this object.

Parameters
commonThe set of InputParameters from which to extract parameters from
common_nameThe name within common from which to get the parameter values

In order to apply common parameter 4 statements must be satisfied (1) A local parameter must exist with the same name as common parameter (2) Common parameter must valid (3) Local parameter must be invalid OR not have been set from its default (4) Both cannot be private

Definition at line 748 of file InputParameters.C.

Referenced by applyParameters(), and applySpecificParameters().

749 {
750  // Disable the display of deprecated message when applying common parameters, this avoids a dump
751  // of messages
752  _show_deprecated_message = false;
753 
754  // Extract the properties from the local parameter for the current common parameter name
755  const bool local_exist = _values.find(common_name) != _values.end();
756  const bool local_set = _params.count(common_name) > 0 && !_params[common_name]._set_by_add_param;
757  const bool local_priv = isPrivate(common_name);
758  const bool local_valid = isParamValid(common_name);
759 
760  // Extract the properties from the common parameter
761  const bool common_exist = common._values.find(common_name) != common._values.end();
762  const bool common_priv = common.isPrivate(common_name);
763  const bool common_valid = common.isParamValid(common_name);
764 
765  /* In order to apply common parameter 4 statements must be satisfied
766  * (1) A local parameter must exist with the same name as common parameter
767  * (2) Common parameter must valid and exist
768  * (3) Local parameter must be invalid OR not have been set from its default
769  * (4) Both cannot be private
770  */
771  if (local_exist && common_exist && common_valid && (!local_valid || !local_set) &&
772  (!common_priv || !local_priv))
773  {
774  delete _values[common_name];
775  _values[common_name] = common._values.find(common_name)->second->clone();
776  set_attributes(common_name, false);
777  }
778 
779  // Enable deprecated message printing
781 }
bool isPrivate(const std::string &name) const
Returns a Boolean indicating whether the specified parameter is private or not.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::map< std::string, Metadata > _params
The actual parameter data.
virtual void set_attributes(const std::string &name, bool inserted_only) override
Override from libMesh to set user-defined attributes on our parameter.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ applyParameters()

void InputParameters::applyParameters ( const InputParameters common,
std::vector< std::string >  exclude = std::vector<std::string>() 
)

Method for applying common parameters.

Parameters
commonThe set of parameters to apply to the parameters stored in this object
excludeA vector of parameters to exclude

In order to apply common parameter 4 statements must be satisfied (1) A local parameter must exist with the same name as common parameter (2) Common parameter must valid (3) Local parameter must be invalid OR not have been set from its default (4) Both cannot be private

Output objects have a set of common parameters that are passed down to each of the output objects created. This method is used for applying those common parameters.

See also
CommonOutputAction AddOutputAction

Definition at line 654 of file InputParameters.C.

Referenced by SetupMeshAction::act(), and FEProblemBase::addOutput().

656 {
657  // Loop through the common parameters
658  for (const auto & it : common)
659  {
660  // Common parameter name
661  const std::string & common_name = it.first;
662 
663  // Continue to next parameter, if the current is in list of excluded parameters
664  if (std::find(exclude.begin(), exclude.end(), common_name) != exclude.end())
665  continue;
666 
667  applyParameter(common, common_name);
668  }
669 
670  // Loop through the coupled variables
671  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
672  it != common.coupledVarsEnd();
673  ++it)
674  {
675  // Variable name
676  const std::string var_name = *it;
677 
678  // Continue to next variable, if the current is in list of excluded parameters
679  if (std::find(exclude.begin(), exclude.end(), var_name) != exclude.end())
680  continue;
681 
682  applyCoupledVar(common, var_name);
683  }
684 }
void applyParameter(const InputParameters &common, const std::string &common_name)
Apply values from a single parameter in common, to a single parameter stored in this object...
void applyCoupledVar(const InputParameters &common, const std::string &var_name)
Apply properties of a single coupled variable in common, to a single coupled variable stored in this ...

◆ applySpecificParameters()

void InputParameters::applySpecificParameters ( const InputParameters common,
const std::vector< std::string > &  include 
)

Method for applying common parameters.

Parameters
commonThe set of parameters to apply to the parameters stored in this object
includeA vector of parameters to apply

In order to apply common parameter 4 statements must be satisfied (1) A local parameter must exist with the same name as common parameter (2) Common parameter must valid (3) Local parameter must be invalid OR not have been set from its default (4) Both cannot be private

Output objects have a set of common parameters that are passed down to each of the output objects created. This method is used for applying those common parameters.

See also
CommonOutputAction AddOutputAction

Definition at line 687 of file InputParameters.C.

689 {
690  // Loop through the common parameters
691  for (const auto & it : common)
692  {
693 
694  // Common parameter name
695  const std::string & common_name = it.first;
696 
697  // Continue to next parameter, if the current is not in list of included parameters
698  if (std::find(include.begin(), include.end(), common_name) == include.end())
699  continue;
700 
701  applyParameter(common, common_name);
702  }
703 
704  // Loop through the coupled variables
705  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
706  it != common.coupledVarsEnd();
707  ++it)
708  {
709  // Variable name
710  const std::string var_name = *it;
711 
712  // Continue to next variable, if the current is not in list of included parameters
713  if (std::find(include.begin(), include.end(), var_name) == include.end())
714  continue;
715 
716  applyCoupledVar(common, var_name);
717  }
718 }
void applyParameter(const InputParameters &common, const std::string &common_name)
Apply values from a single parameter in common, to a single parameter stored in this object...
void applyCoupledVar(const InputParameters &common, const std::string &var_name)
Apply properties of a single coupled variable in common, to a single coupled variable stored in this ...

◆ areAllRequiredParamsValid()

bool InputParameters::areAllRequiredParamsValid ( ) const

This method returns true if all of the parameters in this object are valid (i.e.

isParamValid(name) == true - for all parameters)

Definition at line 282 of file InputParameters.C.

Referenced by ActionWarehouse::buildBuildableActions().

283 {
284  for (const auto & it : *this)
285  if (isParamRequired(it.first) && !isParamValid(it.first))
286  return false;
287  return true;
288 }
bool isParamRequired(const std::string &name) const
Returns a boolean indicating whether the specified parameter is required or not.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ at() [1/2]

Metadata& InputParameters::at ( const std::string &  param)
inlineprivate

Definition at line 820 of file InputParameters.h.

Referenced by inputLocation(), and paramFullpath().

821  {
822  if (_params.count(param) == 0)
823  mooseError("param '", param, "' not present in InputParams");
824  return _params[param];
825  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ at() [2/2]

const Metadata& InputParameters::at ( const std::string &  param) const
inlineprivate

Definition at line 826 of file InputParameters.h.

827  {
828  if (_params.count(param) == 0)
829  mooseError("param '", param, "' not present in InputParams");
830  return _params.at(param);
831  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ blockFullpath() [1/2]

std::string& InputParameters::blockFullpath ( )
inline

Get/set a string representing the full HIT parameter path from the input file (e.g.

"Mesh/foo") for the block containing parameters for this object.

Definition at line 737 of file InputParameters.h.

Referenced by AddICAction::act(), checkParams(), and MooseObjectAction::MooseObjectAction().

737 { return _block_fullpath; }
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.

◆ blockFullpath() [2/2]

const std::string& InputParameters::blockFullpath ( ) const
inline

Definition at line 738 of file InputParameters.h.

738 { return _block_fullpath; }
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.

◆ blockLocation()

std::string& InputParameters::blockLocation ( )
inline

Get/set a string representing the location (i.e.

filename,linenum) in the input text for the block containing parameters for this object.

Definition at line 730 of file InputParameters.h.

Referenced by checkParams(), and Parser::walkRaw().

730 { return _block_location; };
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.

◆ checkConsistentType()

template<typename T >
void InputParameters::checkConsistentType ( const std::string &  name) const

This method checks to make sure that we aren't adding a parameter with the same name but a different type.

It throws a MooseError if an inconsistent type is detected. While this state is supported by libMesh it brings nothing but blood and tears for those who try ;)

Parameters
namethe name of the parameter

Definition at line 1270 of file InputParameters.h.

1271 {
1272  // Do we have a paremeter with the same name but a different type?
1273  InputParameters::const_iterator it = _values.find(name);
1274  if (it != _values.end() && dynamic_cast<const Parameter<T> *>(it->second) == NULL)
1275  mooseError("Attempting to set parameter \"",
1276  name,
1277  "\" with type (",
1278  demangle(typeid(T).name()),
1279  ")\nbut the parameter already exists as type (",
1280  it->second->type(),
1281  ")");
1282 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ checkParamName()

void InputParameters::checkParamName ( const std::string &  name) const
private

Make sure the parameter name doesn't have any invalid characters.

Definition at line 1034 of file InputParameters.C.

Referenced by addParam(), addPrivateParam(), addRequiredParam(), and set().

1035 {
1036  const static pcrecpp::RE valid("[\\w:/]+");
1037  if (!valid.FullMatch(name))
1038  mooseError("Invalid parameter name: '", name, "'");
1039 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ checkParams()

void InputParameters::checkParams ( const std::string &  parsing_syntax)

This function checks parameters stored in the object to make sure they are in the correct state as the user expects: Required parameters are verified as valid meaning that they were either initialized when they were created, or were read from an input file or some other valid source.

Definition at line 409 of file InputParameters.C.

Referenced by FEProblemBase::addInitialCondition(), ActionFactory::create(), Factory::create(), and AppFactory::createShared().

410 {
411  std::string parampath = blockFullpath() != "" ? blockFullpath() : parsing_syntax;
412  std::ostringstream oss;
413  // Required parameters
414  for (const auto & it : *this)
415  {
416  if (!isParamValid(it.first) && isParamRequired(it.first))
417  {
418  oss << blockLocation() << ": missing required parameter '" << parampath + "/" + it.first
419  << "'\n";
420  oss << "\tDoc String: \"" + getDocString(it.first) + "\"" << std::endl;
421  }
422  }
423 
424  // Range checked parameters
425  for (const auto & it : *this)
426  {
427  std::string long_name(parampath + "/" + it.first);
428 
429  dynamicCastRangeCheck(Real, Real, long_name, it.first, it.second, oss);
430  dynamicCastRangeCheck(int, long, long_name, it.first, it.second, oss);
431  dynamicCastRangeCheck(long, long, long_name, it.first, it.second, oss);
432  dynamicCastRangeCheck(unsigned int, long, long_name, it.first, it.second, oss);
433  }
434 
435  // Controllable parameters
436  for (const auto & param_name : getControllableParameters())
437  {
438  if (isPrivate(param_name))
439  oss << inputLocation(param_name) << ": private parameter '" << paramFullpath(param_name)
440  << "' marked controllable";
441 
442  checkMooseType(NonlinearVariableName, param_name);
443  checkMooseType(AuxVariableName, param_name);
444  checkMooseType(VariableName, param_name);
445  checkMooseType(BoundaryName, param_name);
446  checkMooseType(SubdomainName, param_name);
447  checkMooseType(PostprocessorName, param_name);
448  checkMooseType(VectorPostprocessorName, param_name);
449  checkMooseType(UserObjectName, param_name);
450  checkMooseType(MaterialPropertyName, param_name);
451  }
452 
453  if (!oss.str().empty())
454  mooseError(oss.str());
455 }
std::set< std::string > getControllableParameters() const
Return list of controllable parameters.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool isPrivate(const std::string &name) const
Returns a Boolean indicating whether the specified parameter is private or not.
std::string getDocString(const std::string &name) const
Returns the documentation string for the specified parameter name.
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
std::string & blockFullpath()
Get/set a string representing the full HIT parameter path from the input file (e.g.
bool isParamRequired(const std::string &name) const
Returns a boolean indicating whether the specified parameter is required or not.
std::string & blockLocation()
Get/set a string representing the location (i.e.
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ clear()

void InputParameters::clear ( )
overridevirtual

Definition at line 56 of file InputParameters.C.

57 {
58  Parameters::clear();
59  _params.clear();
60  _coupled_vars.clear();
61  _collapse_nesting = false;
64  _allow_copy = true;
65  _block_fullpath = "";
66  _block_location = "";
67 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
std::set< std::string > _coupled_vars
The coupled variables set.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ clearRelationshipManagers()

void InputParameters::clearRelationshipManagers ( )
inline

Clears all currently registered RelationshipManagers.

Definition at line 475 of file InputParameters.h.

475 { _buildable_rm_types.clear(); }
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.

◆ collapseSyntaxNesting() [1/2]

void InputParameters::collapseSyntaxNesting ( bool  collapse)

Mutators for controlling whether or not the outermost level of syntax will be collapsed when printed.

Definition at line 367 of file InputParameters.C.

Referenced by Parser::buildFullTree(), and Parser::buildJsonSyntaxTree().

368 {
369  _collapse_nesting = collapse;
370 }
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.

◆ collapseSyntaxNesting() [2/2]

bool InputParameters::collapseSyntaxNesting ( ) const

Definition at line 373 of file InputParameters.C.

374 {
375  return _collapse_nesting;
376 }
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.

◆ coupledVarsBegin()

std::set<std::string>::const_iterator InputParameters::coupledVarsBegin ( ) const
inline

Methods returning iterators to the coupled variables names stored in this InputParameters object.

Definition at line 530 of file InputParameters.h.

Referenced by Coupleable::Coupleable(), FunctionMaterialBase::FunctionMaterialBase(), LazyCoupleable::LazyCoupleable(), and ScalarCoupleable::ScalarCoupleable().

531  {
532  return _coupled_vars.begin();
533  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ coupledVarsEnd()

std::set<std::string>::const_iterator InputParameters::coupledVarsEnd ( ) const
inline

Definition at line 534 of file InputParameters.h.

Referenced by Coupleable::Coupleable(), FunctionMaterialBase::FunctionMaterialBase(), LazyCoupleable::LazyCoupleable(), and ScalarCoupleable::ScalarCoupleable().

535  {
536  return _coupled_vars.end();
537  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ declareControllable()

void InputParameters::declareControllable ( const std::string &  name,
std::set< ExecFlagType execute_flags = {} 
)

Declare the given parameters as controllable.

Definition at line 297 of file InputParameters.C.

Referenced by validParams< BodyForce >(), validParams< ConstantAux >(), validParams< ConstantFunction >(), validParams< ConstantPointSource >(), validParams< ConstantRate >(), validParams< ConstantScalarAux >(), validParams< Damper >(), validParams< DirichletBC >(), validParams< FunctionValuePostprocessor >(), validParams< GenericConstantMaterial >(), validParams< IterationAdaptiveDT >(), validParams< LagrangeVecDirichletBC >(), validParams< NeumannBC >(), validParams< PenaltyDirichletBC >(), validParams< PresetBC >(), and validParams< VectorBodyForce >().

299 {
300  std::vector<std::string> names;
301  MooseUtils::tokenize<std::string>(input_names, names, 1, " ");
302  for (auto & name : names)
303  {
304  auto map_iter = _params.find(name);
305  if (map_iter != _params.end()) // error is handled by checkParams method
306  {
307  map_iter->second._controllable = true;
308  map_iter->second._controllable_flags = execute_flags;
309  }
310  else
311  mooseError("The input parameter '",
312  name,
313  "' does not exist, thus cannot be marked as controllable.");
314  }
315 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.
ExecFlagEnum execute_flags
Storage for the registered execute flags.

◆ defaultCoupledValue() [1/2]

Real InputParameters::defaultCoupledValue ( const std::string &  coupling_name,
unsigned int  i = 0 
) const

Get the default value for an optionally coupled variable.

Parameters
coupling_nameThe name of the coupling parameter to get the default value for.
iBy default 0, in general the index of the requested coupled default value.

Definition at line 479 of file InputParameters.C.

Referenced by applyCoupledVar(), ParsedMaterialHelper::functionParse(), Coupleable::getADDefaultValue(), Coupleable::getADDefaultVectorValue(), ScalarCoupleable::getDefaultValue(), Coupleable::getDefaultValue(), and Coupleable::getDefaultVectorValue().

480 {
481  auto value_it = _params.find(coupling_name);
482 
483  if (value_it == _params.end() || !value_it->second._have_coupled_default)
484  mooseError("Attempted to retrieve default value for coupled variable '",
485  coupling_name,
486  "' when none was provided. \n\nThere are three reasons why this may have "
487  "occurred:\n 1. The other version of params.addCoupledVar() should be used in order "
488  "to provide a default value. \n 2. This should have been a required coupled "
489  "variable added with params.addRequiredCoupledVar() \n 3. The call to get the "
490  "coupled value should have been properly guarded with isCoupled()\n");
491 
492  return value_it->second._coupled_default.at(i);
493 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ defaultCoupledValue() [2/2]

void InputParameters::defaultCoupledValue ( const std::string &  coupling_name,
Real  value,
unsigned int  i = 0 
)

Set the default value for an optionally coupled variable (called by the Parser).

Parameters
coupling_nameThe name of the coupling parameter to get the default value for.
valueDefault value to set.
iBy default 0, in general the index of the requested coupled default value.

Definition at line 471 of file InputParameters.C.

472 {
473  _params[coupling_name]._coupled_default.resize(i + 1);
474  _params[coupling_name]._coupled_default[i] = value;
475  _params[coupling_name]._have_coupled_default = true;
476 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getAutoBuildVectors()

std::map< std::string, std::pair< std::string, std::string > > InputParameters::getAutoBuildVectors ( ) const

Returns the auto build vectors for all parameters.

Definition at line 507 of file InputParameters.C.

508 {
509  std::map<std::string, std::pair<std::string, std::string>> abv;
510  for (auto it = _params.begin(); it != _params.end(); ++it)
511  {
512  if (!it->second._autobuild_vecs.first.empty())
513  abv[it->first] = it->second._autobuild_vecs;
514  }
515  return abv;
516 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getBuildableRelationshipManagerTypes()

const std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > & InputParameters::getBuildableRelationshipManagerTypes ( ) const

Returns the list of buildable (or required) RelationshipManager object types for this object.

Definition at line 361 of file InputParameters.C.

Referenced by Action::addRelationshipManagers().

362 {
363  return _buildable_rm_types;
364 }
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.

◆ getBuildableTypes()

const std::vector< std::string > & InputParameters::getBuildableTypes ( ) const

Returns the list of buildable types as a std::vector<std::string>

Definition at line 353 of file InputParameters.C.

Referenced by Parser::buildFullTree(), and Parser::buildJsonSyntaxTree().

354 {
355  return _buildable_types;
356 }
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.

◆ getCheckedPointerParam()

template<typename T >
T InputParameters::getCheckedPointerParam ( const std::string &  name,
const std::string &  error_string = "" 
) const

Verifies that the requested parameter exists and is not NULL and returns it to the caller.

The template parameter must be a pointer or an error will be thrown.

Definition at line 1081 of file InputParameters.h.

Referenced by Coupleable::Coupleable(), MooseObject::getCheckedPointerParam(), Action::getCheckedPointerParam(), MooseVariableInterface< Real >::MooseVariableInterface(), and ScalarCoupleable::ScalarCoupleable().

1083 {
1084  T param = this->get<T>(name);
1085 
1086  // Note: You will receive a compile error on this line if you attempt to pass a non-pointer
1087  // template type to this method
1088  if (param == NULL)
1089  mooseError("Parameter ", name, " is NULL.\n", error_string);
1090  return this->get<T>(name);
1091 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208

◆ getClassDescription()

std::string InputParameters::getClassDescription ( ) const

Returns the class description.

Definition at line 102 of file InputParameters.C.

Referenced by JsonSyntaxTree::addParameters().

103 {
104  return _class_description;
105 }
std::string _class_description
The class description for the owning object.

◆ getControllableExecuteOnTypes()

const std::set< ExecFlagType > & InputParameters::getControllableExecuteOnTypes ( const std::string &  name)

Return the allowed execute flags for a controllable parameter.

Definition at line 324 of file InputParameters.C.

325 {
326  return _params[name]._controllable_flags;
327 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getControllableParameters()

std::set<std::string> InputParameters::getControllableParameters ( ) const
inline

Return list of controllable parameters.

Definition at line 705 of file InputParameters.h.

Referenced by checkParams().

706  {
707  std::set<std::string> controllable;
708  for (auto it = _params.begin(); it != _params.end(); ++it)
709  if (it->second._controllable)
710  controllable.insert(it->first);
711  return controllable;
712  }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getCoupledVariableParamNames()

const std::set<std::string>& InputParameters::getCoupledVariableParamNames ( ) const
inline

Return the coupled variable parameter names.

Definition at line 542 of file InputParameters.h.

542 { return _coupled_vars; }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ getDefaultPostprocessorValue()

const PostprocessorValue & InputParameters::getDefaultPostprocessorValue ( const std::string &  name,
bool  suppress_error = false 
) const

Get the default value for a postprocessor added with addPostprocessor.

Parameters
nameThe name of the postprocessor
suppress_errorIf true, the error check is suppressed
Returns
The default value for the postprocessor

Definition at line 629 of file InputParameters.C.

Referenced by PostprocessorInterface::getDefaultPostprocessorValue(), PostprocessorInterface::getPostprocessorValue(), PostprocessorInterface::getPostprocessorValueOld(), and PostprocessorInterface::getPostprocessorValueOlder().

630 {
631  // Check that a default exists, error if it does not
632  auto it = _params.find(name);
633  if (!suppress_error && (it == _params.end() || !it->second._have_default_postprocessor_val))
634  mooseError("A default PostprcessorValue does not exist for the given name: ", name);
635 
636  return it->second._default_postprocessor_val;
637 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getDescription()

const std::string & InputParameters::getDescription ( const std::string &  name)

Get the documentation string for a parameter.

Definition at line 803 of file InputParameters.C.

804 {
805  if (_params.count(name) == 0)
806  mooseError("No parameter exists with the name ", name);
807  return _params[name]._doc_string;
808 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getDocString()

std::string InputParameters::getDocString ( const std::string &  name) const

Returns the documentation string for the specified parameter name.

Definition at line 223 of file InputParameters.C.

Referenced by applyCoupledVar(), and checkParams().

224 {
225  std::string doc_string;
226  auto it = _params.find(name);
227  if (it != _params.end())
228  for (const auto & ch : it->second._doc_string)
229  {
230  if (ch == '\n')
231  doc_string += " ... ";
232  else
233  doc_string += ch;
234  }
235 
236  return doc_string;
237 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getGroupName()

std::string InputParameters::getGroupName ( const std::string &  param_name) const

This method retrieves the group name for the passed parameter name if one exists.

Otherwise an empty string is returned.

Definition at line 620 of file InputParameters.C.

621 {
622  auto it = _params.find(param_name);
623  if (it != _params.end())
624  return it->second._group;
625  return std::string();
626 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getMooseType()

std::string InputParameters::getMooseType ( const std::string &  name) const

Utility functions for retrieving one of the MooseTypes variables into the common "string" base class.

Scalar and Vector versions are supplied

Definition at line 529 of file InputParameters.C.

Referenced by MooseObjectWarehouseBase< Indicator >::addObject(), BlockRestrictable::initializeBlockRestrictable(), isValid(), and MooseVariableInterface< Real >::MooseVariableInterface().

530 {
531  std::string var;
532 
533  if (have_parameter<VariableName>(name))
534  var = get<VariableName>(name);
535  else if (have_parameter<NonlinearVariableName>(name))
536  var = get<NonlinearVariableName>(name);
537  else if (have_parameter<AuxVariableName>(name))
538  var = get<AuxVariableName>(name);
539  else if (have_parameter<PostprocessorName>(name))
540  var = get<PostprocessorName>(name);
541  else if (have_parameter<VectorPostprocessorName>(name))
542  var = get<VectorPostprocessorName>(name);
543  else if (have_parameter<FunctionName>(name))
544  var = get<FunctionName>(name);
545  else if (have_parameter<UserObjectName>(name))
546  var = get<UserObjectName>(name);
547  else if (have_parameter<MaterialPropertyName>(name))
548  var = get<MaterialPropertyName>(name);
549  else if (have_parameter<std::string>(name))
550  var = get<std::string>(name);
551 
552  return var;
553 }

◆ getParamHelper() [1/6]

template<typename T >
const T & InputParameters::getParamHelper ( const std::string &  name,
const InputParameters pars,
const T *  the_type 
)
static

Definition at line 1416 of file InputParameters.h.

Referenced by MooseObject::getParam(), Action::getParam(), and MooseApp::getParam().

1417 {
1418  if (!pars.isParamValid(name))
1419  mooseError("The parameter \"", name, "\" is being retrieved before being set.\n");
1420 
1421  return pars.get<T>(name);
1422 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ getParamHelper() [2/6]

template<typename T >
const std::vector< T > & InputParameters::getParamHelper ( const std::string &  name,
const InputParameters pars,
const std::vector< T > *  the_type 
)
static

Definition at line 1439 of file InputParameters.h.

1442 {
1443  return pars.get<std::vector<T>>(name);
1444 }

◆ getParamHelper() [3/6]

template<>
const MooseEnum& InputParameters::getParamHelper ( const std::string &  name,
const InputParameters pars,
const MooseEnum  
)

Definition at line 1002 of file InputParameters.C.

1005 {
1006  return pars.get<MooseEnum>(name);
1007 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:32

◆ getParamHelper() [4/6]

template<>
const MultiMooseEnum& InputParameters::getParamHelper ( const std::string &  name,
const InputParameters pars,
const MultiMooseEnum  
)

Definition at line 1011 of file InputParameters.C.

1014 {
1015  return pars.get<MultiMooseEnum>(name);
1016 }
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...

◆ getParamHelper() [5/6]

template<>
const MooseEnum& InputParameters::getParamHelper ( const std::string &  name,
const InputParameters pars,
const MooseEnum  
)

◆ getParamHelper() [6/6]

template<>
const MultiMooseEnum& InputParameters::getParamHelper ( const std::string &  name,
const InputParameters pars,
const MultiMooseEnum  
)

◆ getSyntax()

std::vector< std::string > InputParameters::getSyntax ( const std::string &  name)

Get the syntax for a command-line parameter.

Definition at line 614 of file InputParameters.C.

615 {
616  return _params[name]._cli_flag_names;
617 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getVecMooseType()

std::vector< std::string > InputParameters::getVecMooseType ( const std::string &  name) const

Definition at line 556 of file InputParameters.C.

Referenced by MooseObjectWarehouseBase< Indicator >::addObject(), Coupleable::Coupleable(), isValid(), MooseVariableInterface< Real >::MooseVariableInterface(), and ScalarCoupleable::ScalarCoupleable().

557 {
558  std::vector<std::string> svars;
559 
560  if (have_parameter<std::vector<VariableName>>(name))
561  {
562  std::vector<VariableName> vars = get<std::vector<VariableName>>(name);
563  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
564  }
565  else if (have_parameter<std::vector<NonlinearVariableName>>(name))
566  {
567  std::vector<NonlinearVariableName> vars = get<std::vector<NonlinearVariableName>>(name);
568  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
569  }
570  else if (have_parameter<std::vector<AuxVariableName>>(name))
571  {
572  std::vector<AuxVariableName> vars = get<std::vector<AuxVariableName>>(name);
573  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
574  }
575  else if (have_parameter<std::vector<MaterialPropertyName>>(name))
576  {
577  std::vector<MaterialPropertyName> vars = get<std::vector<MaterialPropertyName>>(name);
578  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
579  }
580  else if (have_parameter<std::vector<std::string>>(name))
581  {
582  std::vector<std::string> vars = get<std::vector<std::string>>(name);
583  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
584  }
585 
586  return svars;
587 }

◆ hasCoupledValue()

bool InputParameters::hasCoupledValue ( const std::string &  coupling_name) const

Return whether or not the coupled variable exists.

Parameters
coupling_nameThe name of the coupled variable to test for
Returns
True if the variable exists in the coupled variables for this InputParameters object

Definition at line 458 of file InputParameters.C.

Referenced by applyCoupledVar(), Coupleable::isCoupled(), and ScalarCoupleable::isCoupledScalar().

459 {
460  return _coupled_vars.find(coupling_name) != _coupled_vars.end();
461 }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ hasDefaultCoupledValue()

bool InputParameters::hasDefaultCoupledValue ( const std::string &  coupling_name) const

Return whether or not the requested parameter has a default coupled value.

Parameters
coupling_nameThe name of the coupling parameter to get the default value for.

Definition at line 464 of file InputParameters.C.

Referenced by applyCoupledVar(), Coupleable::coupledComponents(), and FunctionMaterialBase::FunctionMaterialBase().

465 {
466  return _params.count(coupling_name) > 0 && _params.at(coupling_name)._have_coupled_default &&
467  _coupled_vars.count(coupling_name) > 0;
468 }
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ hasDefaultPostprocessorValue()

bool InputParameters::hasDefaultPostprocessorValue ( const std::string &  name) const

Returns true if a default PostprocessorValue is defined.

Parameters
nameThe name of the postprocessor
Returns
True if a default value exists

Definition at line 648 of file InputParameters.C.

Referenced by PostprocessorInterface::getPostprocessorValue(), PostprocessorInterface::getPostprocessorValueOld(), and PostprocessorInterface::getPostprocessorValueOlder().

649 {
650  return _params.count(name) > 0 && _params.at(name)._have_default_postprocessor_val;
651 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ inputLocation() [1/2]

const std::string& InputParameters::inputLocation ( const std::string &  param) const
inline

Get/set a string representing the location in the input text the parameter originated from (i.e.

filename,linenum) for the given param.

Definition at line 746 of file InputParameters.h.

Referenced by checkParams(), MooseObject::paramError(), Action::paramError(), MooseObject::paramInfo(), Action::paramInfo(), MooseObject::paramWarning(), and Action::paramWarning().

747  {
748  return at(param)._input_location;
749  };
std::string _input_location
original location of parameter (i.e. filename,linenum) - used for nice error messages.
Metadata & at(const std::string &param)

◆ inputLocation() [2/2]

std::string& InputParameters::inputLocation ( const std::string &  param)
inline

Definition at line 750 of file InputParameters.h.

750 { return at(param)._input_location; };
std::string _input_location
original location of parameter (i.e. filename,linenum) - used for nice error messages.
Metadata & at(const std::string &param)

◆ isControllable()

bool InputParameters::isControllable ( const std::string &  name)

Returns a Boolean indicating whether the specified parameter is controllable.

Definition at line 318 of file InputParameters.C.

319 {
320  return _params.count(name) > 0 && _params[name]._controllable;
321 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamDeprecated()

bool InputParameters::isParamDeprecated ( const std::string &  name) const

Returns True if the parameters is deprecated.

Definition at line 276 of file InputParameters.C.

277 {
278  return _params.count(name) > 0 && !_params.at(name)._deprecation_message.empty();
279 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamRequired()

bool InputParameters::isParamRequired ( const std::string &  name) const

Returns a boolean indicating whether the specified parameter is required or not.

Definition at line 251 of file InputParameters.C.

Referenced by areAllRequiredParamsValid(), and checkParams().

252 {
253  return _params.count(name) > 0 && _params.at(name)._required;
254 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamSetByAddParam()

bool InputParameters::isParamSetByAddParam ( const std::string &  name) const

Returns whether or not the parameter was set due to addParam.

If not then it was either set programmatically or was read through the input file.

Definition at line 270 of file InputParameters.C.

Referenced by Transient::init(), MooseApp::MooseApp(), and Transient::Transient().

271 {
272  return _params.count(name) > 0 && _params.at(name)._set_by_add_param;
273 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamSetByUser()

bool InputParameters::isParamSetByUser ( const std::string &  name) const

Method returns true if the parameter was by the user.

Parameters
nameThe parameter name

Definition at line 792 of file InputParameters.C.

Referenced by CreateProblemAction::act(), CreateProblemDefaultAction::act(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), BreakMeshByBlockBase::checkInputParameter(), Console::Console(), Exodus::Exodus(), FEProblemSolve::FEProblemSolve(), Console::initialSetup(), InterfaceKernel::InterfaceKernel(), paramSetByUser(), RandomIC::RandomIC(), Transient::setupTimeIntegrator(), and Transient::Transient().

793 {
794  if (!isParamValid(name))
795  // if the parameter is invalid, it is for sure not set by the user
796  return false;
797  else
798  // If the parameters is not located in the list, then it was set by the user
799  return _params.count(name) > 0 && !_params.at(name)._set_by_add_param;
800 }
std::map< std::string, Metadata > _params
The actual parameter data.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ isParamValid()

bool InputParameters::isParamValid ( const std::string &  name) const

This method returns parameters that have been initialized in one fashion or another, i.e.

The value was supplied as a default argument or read and properly converted from the input file

Definition at line 257 of file InputParameters.C.

Referenced by AddPeriodicBCAction::act(), MaterialOutputAction::act(), FEProblem::addLineSearch(), MooseObjectWarehouseBase< Indicator >::addObject(), JsonSyntaxTree::addParameters(), ADPiecewiseLinearInterpolationMaterial< compute_stage >::ADPiecewiseLinearInterpolationMaterial(), applyParameter(), areAllRequiredParamsValid(), BoundsAux::BoundsAux(), checkParams(), AppFactory::createShared(), FileRangeBuilder::FileRangeBuilder(), GapValueAux::GapValueAux(), ExtraNodesetGenerator::generate(), MooseApp::getCheckpointDirectories(), getParamHelper(), GhostingUserObject::GhostingUserObject(), InterfaceKernel::InterfaceKernel(), isParamSetByUser(), MooseObject::isParamValid(), MooseApp::isParamValid(), Action::isParamValid(), isValid(), LayeredBase::LayeredBase(), LayeredSideIntegral::LayeredSideIntegral(), MaterialPropertyInterface::MaterialPropertyInterface(), AddExtraNodeset::modify(), NodeFaceConstraint::NodeFaceConstraint(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), rangeCheck(), MeshBaseImageSampler::setupImageSampler(), ImageSampler::setupImageSampler(), SetupMeshAction::setupMesh(), Moose::PetscSupport::storePetscOptions(), Moose::SlepcSupport::storeSlepcOptions(), DumpObjectsProblem::stringifyParameters(), validParams< BlockRestrictable >(), validParams< BoundaryRestrictable >(), validParams< BoundaryRestrictableRequired >(), MeshBaseImageSampler::vtkMagnitude(), ImageSampler::vtkMagnitude(), MeshBaseImageSampler::vtkThreshold(), and ImageSampler::vtkThreshold().

258 {
259  if (have_parameter<MooseEnum>(name))
260  return get<MooseEnum>(name).isValid();
261  else if (have_parameter<MultiMooseEnum>(name))
262  return get<MultiMooseEnum>(name).isValid();
263  else if (have_parameter<ExecFlagEnum>(name))
264  return get<ExecFlagEnum>(name).isValid();
265  else
266  return _params.count(name) > 0 && _params.at(name)._valid;
267 }
void isValid(MooseObject *obj)
Definition: TheWarehouse.C:249
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isPrivate()

bool InputParameters::isPrivate ( const std::string &  name) const

Returns a Boolean indicating whether the specified parameter is private or not.

Definition at line 291 of file InputParameters.C.

Referenced by applyParameter(), checkParams(), and DumpObjectsProblem::stringifyParameters().

292 {
293  return _params.count(name) > 0 && _params.at(name)._is_private;
294 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ makeParamRequired()

template<typename T >
void InputParameters::makeParamRequired ( const std::string &  name)

Changes the parameter to be required.

Parameters
nameThe parameter name

Definition at line 1297 of file InputParameters.h.

1298 {
1299  if (!this->have_parameter<T>(name))
1300  mooseError("Unable to require nonexistent parameter: ", name);
1301 
1302  _params[name]._required = true;
1303 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ markControlled()

void InputParameters::markControlled ( const std::string &  name)

Marker a parameter that has been changed by the Control system (this is for output purposes)

◆ mooseObjectSyntaxVisibility() [1/2]

void InputParameters::mooseObjectSyntaxVisibility ( bool  visibility)

Mutators for controlling whether or not the outermost level of syntax will be collapsed when printed.

Definition at line 379 of file InputParameters.C.

Referenced by Parser::buildFullTree(), and Parser::buildJsonSyntaxTree().

380 {
381  _moose_object_syntax_visibility = visibility;
382 }
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.

◆ mooseObjectSyntaxVisibility() [2/2]

bool InputParameters::mooseObjectSyntaxVisibility ( ) const

Definition at line 385 of file InputParameters.C.

386 {
388 }
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.

◆ numberDefaultCoupledValues()

unsigned int InputParameters::numberDefaultCoupledValues ( const std::string &  coupling_name) const

Get the number of defaulted coupled value entries.

Parameters
coupling_nameThe name of the coupling parameter to get the default value for.

Definition at line 496 of file InputParameters.C.

Referenced by applyCoupledVar(), Coupleable::Coupleable(), Coupleable::coupledComponents(), Coupleable::getADDefaultVectorValue(), and Coupleable::getDefaultValue().

497 {
498  auto value_it = _params.find(coupling_name);
499  if (value_it == _params.end())
500  mooseError("Attempted to retrieve default value for coupled variable '",
501  coupling_name,
502  "' when none was provided.");
503  return value_it->second._coupled_default.size();
504 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ operator+=()

InputParameters & InputParameters::operator+= ( const InputParameters rhs)

Definition at line 142 of file InputParameters.C.

143 {
144  Parameters::operator+=(rhs);
145 
146  // TODO: this is not a proper merge - if a particular parameter exists in both this and rhs,
147  // then we should actually smartly merge both metadata structs before storing in this.
148  for (auto it = rhs._params.begin(); it != rhs._params.end(); ++it)
149  _params[it->first] = it->second;
150 
151  _buildable_types.insert(
152  _buildable_types.end(), rhs._buildable_types.begin(), rhs._buildable_types.end());
153  _buildable_rm_types.insert(
154  _buildable_rm_types.end(), rhs._buildable_rm_types.begin(), rhs._buildable_rm_types.end());
155 
156  // Collapse nesting and moose object syntax hiding are not modified with +=
157  _coupled_vars.insert(rhs._coupled_vars.begin(), rhs._coupled_vars.end());
158  return *this;
159 }
std::set< std::string > _coupled_vars
The coupled variables set.
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ operator=()

InputParameters & InputParameters::operator= ( const InputParameters rhs)

Definition at line 108 of file InputParameters.C.

109 {
110  // An error to help minimize the segmentation faults that occure when MooseObjects do not have the
111  // correct constructor
112  if (!rhs._allow_copy)
113  {
114  const std::string & name =
115  rhs.get<std::string>("_object_name"); // If _allow_parameter_copy is set then so is name
116  // (see InputParameterWarehouse::addInputParameters)
117  mooseError("Copying of the InputParameters object for the ",
118  name,
119  " object is not allowed.\n\nThe likely cause for this error ",
120  "is having a constructor that does not use a const reference, all constructors\nfor "
121  "MooseObject based classes should be as follows:\n\n",
122  " MyObject::MyObject(const InputParameters & parameters);");
123  }
124 
125  Parameters::operator=(rhs);
126 
127  _params = rhs._params;
128 
134  _allow_copy = rhs._allow_copy;
137 
138  return *this;
139 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
std::set< std::string > _coupled_vars
The coupled variables set.
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ paramFullpath() [1/2]

const std::string& InputParameters::paramFullpath ( const std::string &  param) const
inline

Get/set a string representing the full HIT parameter path from the input file (e.g.

"Mesh/foo/bar" for param "bar") for the given param.

Definition at line 758 of file InputParameters.h.

Referenced by checkParams(), MooseObject::paramError(), Action::paramError(), MooseObject::paramInfo(), Action::paramInfo(), MooseObject::paramWarning(), and Action::paramWarning().

759  {
760  return at(param)._param_fullpath;
761  };
std::string _param_fullpath
full HIT path of the parameter from the input file - used for nice error messages.
Metadata & at(const std::string &param)

◆ paramFullpath() [2/2]

std::string& InputParameters::paramFullpath ( const std::string &  param)
inline

Definition at line 762 of file InputParameters.h.

762 { return at(param)._param_fullpath; };
std::string _param_fullpath
full HIT path of the parameter from the input file - used for nice error messages.
Metadata & at(const std::string &param)

◆ paramSetByUser()

bool InputParameters::paramSetByUser ( const std::string &  name) const

Deprecated method.

Use isParamSetByUser() instead.

Definition at line 785 of file InputParameters.C.

786 {
787  mooseDeprecated("paramSetByUser() is deprecated. Use isParamSetByUser() instead.");
788  return isParamSetByUser(name);
789 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.

◆ rangeCheck() [1/2]

template<typename T , typename UP_T >
void InputParameters::rangeCheck ( const std::string &  full_name,
const std::string &  short_name,
InputParameters::Parameter< T > *  param,
std::ostream &  oss = Moose::out 
)

Runs a range on the supplied parameter if it exists and throws an error if that check fails.

Returns
Boolean indicating whether range check exists

Definition at line 1039 of file InputParameters.h.

Referenced by Parser::setScalarValueTypeParameter().

1043 {
1044  mooseAssert(param, "Parameter is NULL");
1045 
1046  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1047  return;
1048 
1049  // Parse the expression
1051  if (fp.Parse(_params[short_name]._range_function, short_name) != -1) // -1 for success
1052  {
1053  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1054  return;
1055  }
1056 
1057  // ensure range-checked input file parameter comparison functions
1058  // do absolute floating point comparisons instead of using a default epsilon.
1059  auto tmp_eps = fp.epsilon();
1060  fp.setEpsilon(0);
1061  // We require a non-const value for the implicit upscaling of the parameter type
1062  std::vector<UP_T> value(1, param->set());
1063  UP_T result = fp.Eval(&value[0]);
1064  fp.setEpsilon(tmp_eps);
1065 
1066  if (fp.EvalError())
1067  {
1068  oss << "Error evaluating expression: " << _params[short_name]._range_function
1069  << "\nPerhaps you used the wrong variable name?\n";
1070  return;
1071  }
1072 
1073  if (!result)
1074  oss << "Range check failed for parameter " << full_name
1075  << "\n\tExpression: " << _params[short_name]._range_function << "\n\tValue: " << value[0]
1076  << '\n';
1077 }
std::map< std::string, Metadata > _params
The actual parameter data.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ rangeCheck() [2/2]

template<typename T , typename UP_T >
void InputParameters::rangeCheck ( const std::string &  full_name,
const std::string &  short_name,
InputParameters::Parameter< std::vector< T >> *  param,
std::ostream &  oss = Moose::out 
)

Automatically detect the variables used in the range checking expression. We allow the following variables (where snam is the short_name of the parameter)

snam : tests every component in the vector 'snam > 0' snam_size : the size of the vector 'snam_size = 5' snam_i : where i is a number from 0 to sname_size-1 tests a specific component 'snam_0 > snam_1'

Definition at line 926 of file InputParameters.h.

930 {
931  mooseAssert(param, "Parameter is NULL");
932 
933  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
934  return;
935 
948  std::vector<std::string> vars;
949  if (fp.ParseAndDeduceVariables(_params[short_name]._range_function, vars) != -1) // -1 for success
950  {
951  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
952  return;
953  }
954 
955  // Fparser parameter buffer
956  std::vector<UP_T> parbuf(vars.size());
957 
958  // parameter vector
959  const std::vector<T> & value = param->set();
960 
961  // iterate over all vector values (maybe ;)
962  bool need_to_iterate = false;
963  unsigned int i = 0;
964  do
965  {
966  // set parameters
967  for (unsigned int j = 0; j < vars.size(); j++)
968  {
969  if (vars[j] == short_name)
970  {
971  if (value.size() == 0)
972  {
973  oss << "Range checking empty vector: " << _params[short_name]._range_function << '\n';
974  return;
975  }
976 
977  parbuf[j] = value[i];
978  need_to_iterate = true;
979  }
980  else if (vars[j] == short_name + "_size")
981  parbuf[j] = value.size();
982  else
983  {
984  if (vars[j].substr(0, short_name.size() + 1) != short_name + "_")
985  {
986  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
987  return;
988  }
989  std::istringstream iss(vars[j]);
990  iss.seekg(short_name.size() + 1);
991 
992  size_t index;
993  if (iss >> index && iss.eof())
994  {
995  if (index >= value.size())
996  {
997  oss << "Error parsing expression: " << _params[short_name]._range_function
998  << "\nOut of range variable " << vars[j] << '\n';
999  return;
1000  }
1001  parbuf[j] = value[index];
1002  }
1003  else
1004  {
1005  oss << "Error parsing expression: " << _params[short_name]._range_function
1006  << "\nInvalid variable " << vars[j] << '\n';
1007  return;
1008  }
1009  }
1010  }
1011 
1012  // ensure range-checked input file parameter comparison functions
1013  // do absolute floating point comparisons instead of using a default epsilon.
1014  auto tmp_eps = fp.epsilon();
1015  fp.setEpsilon(0);
1016  UP_T result = fp.Eval(&parbuf[0]);
1017  fp.setEpsilon(tmp_eps);
1018 
1019  // test function using the parameters determined above
1020  if (fp.EvalError())
1021  {
1022  oss << "Error evaluating expression: " << _params[short_name]._range_function << '\n';
1023  return;
1024  }
1025 
1026  if (!result)
1027  {
1028  oss << "Range check failed for parameter " << full_name
1029  << "\n\tExpression: " << _params[short_name]._range_function << "\n";
1030  if (need_to_iterate)
1031  oss << "\t Component: " << i << '\n';
1032  }
1033 
1034  } while (need_to_iterate && ++i < value.size());
1035 }
std::map< std::string, Metadata > _params
The actual parameter data.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ rawParamVal()

std::string& InputParameters::rawParamVal ( const std::string &  param)
inline

Get/set a string representing the raw, unmodified token text for the given param.

This is usually only set/useable for file-path type parameters.

Definition at line 769 of file InputParameters.h.

Referenced by Parser::setFilePathParam(), and Parser::setVectorFilePathParam().

769 { return _params[param]._raw_val; };
std::map< std::string, Metadata > _params
The actual parameter data.

◆ registerBase()

void InputParameters::registerBase ( const std::string &  value)

This method must be called from every base "Moose System" to create linkage with the Action System.

See "Moose.C" for the registerMooseObjectTask() calls.

Definition at line 330 of file InputParameters.C.

Referenced by validParams< Damper >(), validParams< Distribution >(), validParams< EigenKernel >(), validParams< Function >(), validParams< Kernel >(), validParams< LineSearch >(), validParams< MeshGenerator >(), validParams< MeshModifier >(), validParams< MooseMesh >(), validParams< MoosePartitioner >(), validParams< MoosePreconditioner >(), validParams< Predictor >(), validParams< Problem >(), validParams< RelationshipManager >(), validParams< ScalarInitialCondition >(), validParams< Split >(), validParams< TimeIntegrator >(), validParams< TimeStepper >(), validParams< VectorAuxKernel >(), and validParams< VectorKernel >().

331 {
332  InputParameters::set<std::string>("_moose_base") = value;
333  _params["_moose_base"]._is_private = true;
334 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ registerBuildableTypes()

void InputParameters::registerBuildableTypes ( const std::string &  names)

This method is here to indicate which Moose types a particular Action may build.

It takes a space delimited list of registered MooseObjects. TODO: For now we aren't actually checking this list when we build objects. Since individual actions can do whatever they want it's not exactly trivial to check this without changing the user API. This function properly restricts the syntax and YAML dumps.

Definition at line 337 of file InputParameters.C.

338 {
339  _buildable_types.clear();
340  MooseUtils::tokenize(names, _buildable_types, 1, " \t\n\v\f\r"); // tokenize on whitespace
341 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:429
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.

◆ reservedValues()

std::set< std::string > InputParameters::reservedValues ( const std::string &  name) const

Get a set of reserved parameter values.

Returns a set by value since we can return an empty set.

Definition at line 1025 of file InputParameters.C.

1026 {
1027  auto it = _params.find(name);
1028  if (it == _params.end())
1029  return std::set<std::string>();
1030  return it->second._reserved_values;
1031 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ set()

template<typename T >
T & InputParameters::set ( const std::string &  name,
bool  quiet_mode = false 
)

Returns a writable reference to the named parameters.

Note: This is not a virtual function! Use caution when comparing to the parent class implementation

Parameters
nameThe name of the parameter to set
quiet_modeWhen true the parameter is kept with set_by_add_param=true, this is generally not needed.

"quite_mode" returns a writable reference to the named parameter, without setting set_by_add_param to false. Using this method of set will make the parameter to continue to behave if its value where set ONLY by addParam and not by any other method.

This was added for handling parameters in the Output objects that have behavior dependent on whether the user modified the parameters.

Definition at line 908 of file InputParameters.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), CreateExecutionerAction::act(), AddICAction::act(), PartitionerAction::act(), SetAdaptivityOptionsAction::act(), CreateProblemAction::act(), AddMeshModifierAction::act(), AdaptivityAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), SetupTimeStepperAction::act(), SetupPredictorAction::act(), SetupResidualDebugAction::act(), CreateDisplacedProblemAction::act(), MaterialDerivativeTestAction::act(), DisplayGhostingAction::act(), AddPeriodicBCAction::act(), CommonOutputAction::act(), AddNodalNormalsAction::act(), Executioner::addAttributeReporter(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), MooseEigenSystem::addKernel(), AuxiliarySystem::addKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addOutput(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyAlgebraicRelationshipManagers(), CreateDisplacedProblemAction::addProxyGeometricRelationshipManagers(), Action::addRelationshipManagers(), FEProblemBase::addScalarKernel(), AuxiliarySystem::addTimeIntegrator(), NonlinearSystemBase::addTimeIntegrator(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), AStableDirk4::AStableDirk4(), ActionWarehouse::buildBuildableActions(), Parser::buildFullTree(), Parser::buildJsonSyntaxTree(), MooseObjectUnitTest::buildObjects(), OversampleOutput::cloneMesh(), CommonOutputAction::create(), ActionFactory::create(), Factory::create(), MultiApp::createApp(), AppFactory::createAppShared(), AddVariableAction::createInitialConditionAction(), MooseApp::createMinimalApp(), AppFactory::createShared(), FEProblemBase::getFunction(), MaterialOutputAction::getParams(), Moose::SlepcSupport::getSlepcValidParams(), Transient::init(), NearestPointBase< LayeredAverage >::NearestPointBase(), MultiAppProjectionTransfer::projectSolution(), GlobalParamsAction::setDoubleIndexParam(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), GlobalParamsAction::setScalarParam(), MooseApp::setupOptions(), GlobalParamsAction::setVectorParam(), validParams< Console >(), validParams< ControlOutput >(), validParams< ConvectiveFluxBC >(), validParams< CoupledTiedValueConstraint >(), validParams< CSVReader >(), validParams< DiscreteElementUserObject >(), validParams< DistributedGeneratedMesh >(), validParams< DOFMapOutput >(), validParams< EigenDirichletBC >(), validParams< ElementQualityChecker >(), validParams< ElementVariablesDifferenceMax >(), validParams< EqualValueEmbeddedConstraint >(), validParams< ExternalProblem >(), validParams< GapValueAux >(), validParams< GhostingAux >(), validParams< GhostingUserObject >(), validParams< InterfaceTimeKernel >(), validParams< LeastSquaresFitHistory >(), validParams< Marker >(), validParams< Material >(), validParams< MultiAppTransfer >(), validParams< NearestNodeDistanceAux >(), validParams< NearestNodeValueAux >(), validParams< NodalL2Norm >(), validParams< NodalNormalBC >(), validParams< NodalNormalsEvaluator >(), validParams< NodalSum >(), validParams< ODETimeKernel >(), validParams< PenetrationAux >(), validParams< PerfGraphOutput >(), validParams< SamplerBase >(), validParams< ScalarConstantIC >(), validParams< SetupMeshAction >(), validParams< SinDirichletBC >(), validParams< TiedValueConstraint >(), validParams< TimeKernel >(), validParams< TimeNodalKernel >(), validParams< TopResidualDebugOutput >(), validParams< Transfer >(), validParams< TwoMaterialPropertyInterface >(), validParams< UserObject >(), validParams< VariableResidualNormsDebugOutput >(), validParams< VectorOfPostprocessors >(), validParams< VTKOutput >(), and Parser::walkRaw().

909 {
910  checkParamName(name);
911  checkConsistentType<T>(name);
912 
913  if (!this->have_parameter<T>(name))
914  _values[name] = new Parameter<T>;
915 
916  set_attributes(name, false);
917 
918  if (quiet_mode)
919  _params[name]._set_by_add_param = true;
920 
921  return cast_ptr<Parameter<T> *>(_values[name])->set();
922 }
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.
virtual void set_attributes(const std::string &name, bool inserted_only) override
Override from libMesh to set user-defined attributes on our parameter.

◆ set_attributes()

void InputParameters::set_attributes ( const std::string &  name,
bool  inserted_only 
)
overridevirtual

Override from libMesh to set user-defined attributes on our parameter.

"._set_by_add_param" and ".deprecated_params" are not populated until after the default value has already been set in libMesh (first callback to this method). Therefore if a variable is in/not in one of these sets, you can be assured it was put there outside of the "addParam*()" calls.

Definition at line 76 of file InputParameters.C.

Referenced by applyParameter(), and set().

77 {
78  if (!inserted_only)
79  {
86  _params[name]._set_by_add_param = false;
87 
88  // valid_params don't make sense for MooseEnums
89  if (!have_parameter<MooseEnum>(name) && !have_parameter<MultiMooseEnum>(name))
90  _params[name]._valid = true;
91 
93  {
94  if (_params.count(name) && !_params[name]._deprecation_message.empty())
96  "The parameter ", name, " is deprecated.\n", _params[name]._deprecation_message);
97  }
98  }
99 }
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:237
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setDefaultPostprocessorValue()

void InputParameters::setDefaultPostprocessorValue ( const std::string &  name,
const PostprocessorValue value 
)

Set the default value for a postprocessor added with addPostprocessor.

Parameters
nameThe name of the postprocessor value The value of the postprocessor default to set

Definition at line 640 of file InputParameters.C.

642 {
643  _params[name]._default_postprocessor_val = value;
644  _params[name]._have_default_postprocessor_val = true;
645 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setDocString()

void InputParameters::setDocString ( const std::string &  name,
const std::string &  doc 
)

Set the doc string of a parameter.

This method is generally used from within the validParams function to modify the documentation for an existing parameter, such as a parameter that is supplied from an interface class.

Definition at line 240 of file InputParameters.C.

Referenced by Moose::SlepcSupport::getSlepcValidParams(), and validParams< MultiAppTransfer >().

241 {
242  auto it = _params.find(name);
243  if (it == _params.end())
244  mooseError("Unable to set the documentation string (using setDocString) for the \"",
245  name,
246  "\" parameter, the parameter does not exist.");
247  it->second._doc_string = doc;
248 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setParamHelper() [1/13]

template<typename T , typename S >
void InputParameters::setParamHelper ( const std::string &  name,
T &  l_value,
const S &  r_value 
)
private

This method is called when adding a Parameter with a default value, can be specialized for non-matching types.

Definition at line 1147 of file InputParameters.h.

Referenced by addParam().

1148 {
1149  l_value = r_value;
1150 }

◆ setParamHelper() [2/13]

template<>
void InputParameters::setParamHelper ( const std::string &  name,
PostprocessorName &  l_value,
const Real &  r_value 
)
private

Definition at line 922 of file InputParameters.C.

925 {
926  // Store the default value
927  _params[name]._default_postprocessor_val = r_value;
928  _params[name]._have_default_postprocessor_val = true;
929 
930  // Assign the default value so that it appears in the dump
931  std::ostringstream oss;
932  oss << r_value;
933  l_value = oss.str();
934 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setParamHelper() [3/13]

template<>
void InputParameters::setParamHelper ( const std::string &  name,
PostprocessorName &  l_value,
const int &  r_value 
)
private

Definition at line 938 of file InputParameters.C.

941 {
942  // Store the default value
943  _params[name]._default_postprocessor_val = r_value;
944  _params[name]._have_default_postprocessor_val = true;
945 
946  // Assign the default value so that it appears in the dump
947  std::ostringstream oss;
948  oss << r_value;
949  l_value = oss.str();
950 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setParamHelper() [4/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
FunctionName &  l_value,
const Real &  r_value 
)
private

Definition at line 954 of file InputParameters.C.

957 {
958  // Assign the default value so that it appears in the dump
959  std::ostringstream oss;
960  oss << r_value;
961  l_value = oss.str();
962 }

◆ setParamHelper() [5/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
FunctionName &  l_value,
const int &  r_value 
)
private

Definition at line 966 of file InputParameters.C.

969 {
970  // Assign the default value so that it appears in the dump
971  std::ostringstream oss;
972  oss << r_value;
973  l_value = oss.str();
974 }

◆ setParamHelper() [6/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
MaterialPropertyName &  l_value,
const Real &  r_value 
)
private

Definition at line 978 of file InputParameters.C.

981 {
982  // Assign the default value so that it appears in the dump
983  std::ostringstream oss;
984  oss << r_value;
985  l_value = oss.str();
986 }

◆ setParamHelper() [7/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
MaterialPropertyName &  l_value,
const int &  r_value 
)
private

Definition at line 990 of file InputParameters.C.

993 {
994  // Assign the default value so that it appears in the dump
995  std::ostringstream oss;
996  oss << r_value;
997  l_value = oss.str();
998 }

◆ setParamHelper() [8/13]

template<>
void InputParameters::setParamHelper ( const std::string &  name,
PostprocessorName &  l_value,
const Real &  r_value 
)
private

◆ setParamHelper() [9/13]

template<>
void InputParameters::setParamHelper ( const std::string &  name,
PostprocessorName &  l_value,
const int &  r_value 
)
private

◆ setParamHelper() [10/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
FunctionName &  l_value,
const Real &  r_value 
)
private

◆ setParamHelper() [11/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
FunctionName &  l_value,
const int &  r_value 
)
private

◆ setParamHelper() [12/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
MaterialPropertyName &  l_value,
const Real &  r_value 
)
private

◆ setParamHelper() [13/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
MaterialPropertyName &  l_value,
const int &  r_value 
)
private

◆ setReservedValues()

void InputParameters::setReservedValues ( const std::string &  name,
const std::set< std::string > &  reserved 
)

Provide a set of reserved values for a parameter.

These are values that are in addition to the normal set of values the parameter can take.

Definition at line 1019 of file InputParameters.C.

Referenced by validParams< OutputInterface >().

1020 {
1021  _params[name]._reserved_values = reserved;
1022 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ suppressParameter()

template<typename T >
void InputParameters::suppressParameter ( const std::string &  name)

This method suppresses an inherited parameter so that it isn't required or valid in the derived class.

The parameter is added to the private parameter list. Suppressing a parameter can have dire consequences. Use at your own risk!

Definition at line 1286 of file InputParameters.h.

Referenced by validParams< CentroidMultiApp >(), validParams< CSV >(), validParams< DiscreteElementUserObject >(), validParams< GridPartitioner >(), validParams< MaterialPropertyDebugOutput >(), and validParams< VariableResidualNormsDebugOutput >().

1287 {
1288  if (!this->have_parameter<T>(name))
1289  mooseError("Unable to suppress nonexistent parameter: ", name);
1290 
1291  _params[name]._required = false;
1292  _params[name]._is_private = true;
1293 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:208
std::map< std::string, Metadata > _params
The actual parameter data.

◆ type()

std::string InputParameters::type ( const std::string &  name)

Prints the type of the requested parameter by name.

Definition at line 519 of file InputParameters.C.

520 {
521  if (_coupled_vars.find(name) != _coupled_vars.end())
522  return "std::vector<VariableName>";
523  else if (_params.count(name) > 0 && !_params[name]._custom_type.empty())
524  return _params[name]._custom_type;
525  return _values[name]->type();
526 }
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

Friends And Related Function Documentation

◆ emptyInputParameters

InputParameters emptyInputParameters ( )
friend

Definition at line 24 of file InputParameters.C.

25 {
26  InputParameters params;
27  return params;
28 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...

◆ InputParameterWarehouse

friend class InputParameterWarehouse
friend

Definition at line 902 of file InputParameters.h.

Member Data Documentation

◆ _allow_copy

bool InputParameters::_allow_copy
private

A flag for toggling the error message in the copy constructor.

Definition at line 898 of file InputParameters.h.

Referenced by allowCopy(), clear(), and operator=().

◆ _block_fullpath

std::string InputParameters::_block_fullpath
private

full HIT path of the block from the input file - used for nice error messages.

Definition at line 860 of file InputParameters.h.

Referenced by blockFullpath(), clear(), and operator=().

◆ _block_location

std::string InputParameters::_block_location
private

original location of input block (i.e. filename,linenum) - used for nice error messages.

Definition at line 857 of file InputParameters.h.

Referenced by blockLocation(), clear(), and operator=().

◆ _buildable_rm_types

std::vector<std::tuple<std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback> > InputParameters::_buildable_rm_types
private

The RelationshipManagers that this object may either build or require.

The optional second argument may be supplied to "downgrade" the functionality of the corresponding relationship manager (e.g. An AlgebraicRelationshipManager could be only used as a GeometricRelationshipManager for a given simulation).

Definition at line 884 of file InputParameters.h.

Referenced by addRelationshipManager(), clearRelationshipManagers(), getBuildableRelationshipManagerTypes(), operator+=(), and operator=().

◆ _buildable_types

std::vector<std::string> InputParameters::_buildable_types
private

The parameter is used to restrict types that can be built.

Typically this is used for MooseObjectAction derived Actions.

Definition at line 875 of file InputParameters.h.

Referenced by getBuildableTypes(), operator+=(), operator=(), and registerBuildableTypes().

◆ _class_description

std::string InputParameters::_class_description
private

The class description for the owning object.

This string is used in many places including mouse-over events, and external documentation produced from the source code.

Definition at line 871 of file InputParameters.h.

Referenced by addClassDescription(), and getClassDescription().

◆ _collapse_nesting

bool InputParameters::_collapse_nesting
private

This parameter collapses one level of nesting in the syntax blocks.

It is used in conjunction with MooseObjectAction derived Actions.

Definition at line 888 of file InputParameters.h.

Referenced by clear(), collapseSyntaxNesting(), InputParameters(), and operator=().

◆ _coupled_vars

std::set<std::string> InputParameters::_coupled_vars
private

◆ _moose_object_syntax_visibility

bool InputParameters::_moose_object_syntax_visibility
private

This parameter hides derived MOOSE object types from appearing in syntax dumps.

Definition at line 891 of file InputParameters.h.

Referenced by clear(), InputParameters(), mooseObjectSyntaxVisibility(), and operator=().

◆ _params

std::map<std::string, Metadata> InputParameters::_params
private

◆ _show_deprecated_message

bool InputParameters::_show_deprecated_message
private

Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping messages.

Definition at line 895 of file InputParameters.h.

Referenced by addDeprecatedParam(), applyCoupledVar(), applyParameter(), clear(), and set_attributes().


The documentation for this class was generated from the following files: