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)
 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...
 
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 registerRelationshipManagers (const std::string &names, const std::string &use_as_rm_types="")
 Declares the types of RelationshipManagers that the owning object will either construct (in the case of Actions) or requires (in the case of every other MooseObject). 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::pair< std::string, Moose::RelationshipManagerType > > & 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::pair< std::string, Moose::RelationshipManagerType > > _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 53 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< AddADKernelAction >(), validParams< AddADMaterialAction >(), validParams< AddSideSetsFromBoundingBox >(), 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< ChangeOverTimePostprocessor >(), validParams< ComboMarker >(), validParams< CompositeFunction >(), validParams< ConcentricCircleMesh >(), validParams< ConcentricCircleMeshGenerator >(), validParams< ConservativeAdvection >(), validParams< ConstantAux >(), validParams< ConstantDT >(), validParams< ConstantIC >(), validParams< ConvectiveFluxBC >(), validParams< CoupledForce >(), validParams< CoupledTimeDerivative >(), validParams< CSVReader >(), validParams< CSVTimeSequenceStepper >(), validParams< DerivativeFunctionMaterialBase >(), validParams< DerivativeParsedMaterial >(), validParams< DerivativeParsedMaterialHelper >(), validParams< DerivativeSumMaterial >(), validParams< DGConvection >(), validParams< Diffusion >(), validParams< DiffusionFluxAux >(), validParams< DiffusionFluxBC >(), validParams< DirichletBC >(), validParams< DistributedGeneratedMesh >(), validParams< DumpObjectsProblem >(), validParams< EigenDirichletBC >(), 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< GMVOutput >(), validParams< HistogramVectorPostprocessor >(), validParams< ImageFunction >(), validParams< ImageMesh >(), validParams< ImageMeshGenerator >(), validParams< ImageSubdomain >(), validParams< ImageSubdomainGenerator >(), validParams< IterationAdaptiveDT >(), validParams< LagrangeVecDirichletBC >(), validParams< LagrangeVecFunctionDirichletBC >(), 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< MaterialRankFourTensorAux >(), validParams< MaterialRankTwoTensorAux >(), validParams< MaterialRealAux >(), validParams< MaterialStdVectorAux >(), validParams< MaterialStdVectorRealGradientAux >(), validParams< MemoryUsage >(), 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< PerflogDumper >(), 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< SolutionUserObject >(), validParams< SpiralAnnularMesh >(), validParams< SpiralAnnularMeshGenerator >(), validParams< StatisticsVectorPostprocessor >(), 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< Transform >(), validParams< TransformGenerator >(), validParams< UniformMarker >(), validParams< ValueRangeMarker >(), validParams< ValueThresholdMarker >(), validParams< VariableGradientComponent >(), validParams< VectorBodyForce >(), validParams< VectorConstantIC >(), validParams< VectorDiffusion >(), validParams< VectorMagnitudeAux >(), validParams< VectorMemoryUsage >(), validParams< VectorNeumannBC >(), validParams< VectorOfPostprocessors >(), validParams< VectorPostprocessorComparison >(), validParams< VectorPostprocessorVisualizationAux >(), 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 1224 of file InputParameters.h.

Referenced by validParams< MooseApp >().

1227 {
1228  addParam<T>(name, doc_string);
1229  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1230 }
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:377
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 1234 of file InputParameters.h.

1238 {
1239  addParam<T>(name, value, doc_string);
1240  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1241 }
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:377
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< NodalNormalBC >(), validParams< ParsedMaterialBase >(), validParams< QuotientAux >(), validParams< QuotientScalarAux >(), validParams< SphericalAverage >(), 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 1170 of file InputParameters.h.

1174 {
1175  addParam<T>(name, value, doc_string);
1176  _params[name]._custom_type = custom_type;
1177 }
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 1181 of file InputParameters.h.

1184 {
1185  addParam<T>(name, doc_string);
1186  _params[name]._custom_type = custom_type;
1187 }
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 1282 of file InputParameters.h.

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

1286 {
1287  _show_deprecated_message = false;
1288  addParam<T>(name, value, doc_string);
1289 
1290  _params[name]._deprecation_message = deprecation_message;
1291  _show_deprecated_message = true;
1292 }
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 1296 of file InputParameters.h.

1299 {
1300  _show_deprecated_message = false;
1301  addParam<T>(name, doc_string);
1302 
1303  _params[name]._deprecation_message = deprecation_message;
1304  _show_deprecated_message = true;
1305 }
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 892 of file InputParameters.C.

895 {
896  mooseError("You must supply a MooseEnum object and the deprecation string when using "
897  "addDeprecatedParam, even if the parameter is not required!");
898 }
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 902 of file InputParameters.C.

905 {
906  mooseError("You must supply a MultiMooseEnum object and the deprecation string when using "
907  "addDeprecatedParam, even if the parameter is not required!");
908 }
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 1092 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< ChangeOverTimePostprocessor >(), validParams< Checkpoint >(), validParams< CoefTimeDerivative >(), validParams< CommonOutputAction >(), validParams< ComparisonPostprocessor >(), validParams< CompositeFunction >(), validParams< ConcentricCircleMesh >(), validParams< ConcentricCircleMeshGenerator >(), validParams< ConservativeAdvection >(), 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< 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< Executioner >(), validParams< ExtraNodesetGenerator >(), validParams< FEProblemBase >(), validParams< FieldSplitPreconditioner >(), validParams< FileOutput >(), validParams< FileRangeBuilder >(), validParams< FindValueOnLine >(), validParams< FiniteDifferencePreconditioner >(), 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< GMVOutput >(), validParams< Gnuplot >(), validParams< ImageSampler >(), validParams< Indicator >(), validParams< IntegratedBCBase >(), 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< MooseADObjectAction >(), 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< PerflogDumper >(), validParams< PerformanceData >(), validParams< PetscExternalPartitioner >(), validParams< PetscOutput >(), validParams< PhysicsBasedPreconditioner >(), 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< 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< SphericalAverage >(), validParams< SpiralAnnularMesh >(), validParams< SpiralAnnularMeshGenerator >(), validParams< SplineFunction >(), validParams< Split >(), validParams< StitchedMesh >(), validParams< StitchedMeshGenerator >(), validParams< SubdomainBoundingBox >(), validParams< SubdomainBoundingBoxGenerator >(), 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< VolumeHistogram >(), validParams< VTKOutput >(), and validParams< WorkBalance >().

1093 {
1094  checkParamName(name);
1095  checkConsistentType<T>(name);
1096 
1097  T & l_value = InputParameters::set<T>(name);
1098  _params[name]._doc_string = doc_string;
1099 
1100  // Set the parameter now
1101  setParamHelper(name, l_value, value);
1102 
1103  /* Indicate the default value, as set via addParam, is being used. The parameter is removed from
1104  the list whenever
1105  it changes, see set_attributes */
1106  _params[name]._set_by_add_param = true;
1107 }
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 1111 of file InputParameters.h.

1112 {
1113  checkParamName(name);
1114  checkConsistentType<T>(name);
1115 
1116  InputParameters::insert<T>(name);
1117  _params[name]._doc_string = doc_string;
1118 }
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 849 of file InputParameters.C.

851 {
852  mooseError("You must supply a MooseEnum object when using addParam, even if the parameter is not "
853  "required!");
854 }
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 858 of file InputParameters.C.

860 {
861  mooseError("You must supply a MultiMooseEnum object when using addParam, even if the parameter "
862  "is not required!");
863 }
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 591 of file InputParameters.C.

Referenced by AdvancedOutput::addValidParams(), ShapeUserObject< SideUserObject >::validParams(), validParams< Checkpoint >(), validParams< CopyNodalVarsAction >(), validParams< DerivativeSumMaterial >(), validParams< DistributedGeneratedMesh >(), validParams< EigenExecutionerBase >(), validParams< Executioner >(), 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< Postprocessor >(), validParams< RandomInterface >(), validParams< SetupMeshAction >(), validParams< TaggingInterface >(), validParams< Tecplot >(), validParams< Transient >(), validParams< TransientInterface >(), and validParams< VTKOutput >().

593 {
594  std::vector<std::string> elements;
595  MooseUtils::tokenize(space_delim_names, elements, 1, " \t\n\v\f\r"); // tokenize on whitespace
596 
597  // Since we don't require types (templates) for this method, we need
598  // to get a raw list of parameter names to compare against.
599  std::set<std::string> param_names;
600  for (const auto & it : *this)
601  param_names.insert(it.first);
602 
603  for (const auto & param_name : elements)
604  if (_params.count(param_name) > 0)
605  _params[param_name]._group = group_name;
606  else
607  mooseError("Unable to find a parameter with name: ",
608  param_name,
609  " when adding to group ",
610  group_name,
611  '.');
612 }
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:377
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 1202 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 >().

1203 {
1204  checkParamName(name);
1205  checkConsistentType<T>(name);
1206 
1207  InputParameters::set<T>(name) = value;
1208  _params[name]._is_private = true;
1209  _params[name]._set_by_add_param = true;
1210 }
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 1191 of file InputParameters.h.

1192 {
1193  checkParamName(name);
1194  checkConsistentType<T>(name);
1195 
1196  InputParameters::insert<T>(name);
1197  _params[name]._is_private = true;
1198 }
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 876 of file InputParameters.C.

877 {
878  mooseError("You must supply a MooseEnum object when using addPrivateParam, even if the parameter "
879  "is not required!");
880 }
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 884 of file InputParameters.C.

885 {
886  mooseError("You must supply a MultiMooseEnum object when using addPrivateParam, even if the "
887  "parameter is not required!");
888 }
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 1150 of file InputParameters.h.

1153 {
1154  addParam<T>(name, doc_string);
1155  _params[name]._range_function = parsed_function;
1156 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ 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 1214 of file InputParameters.h.

1217 {
1218  addRequiredParam<T>(name, doc_string);
1219  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1220 }
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:377
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< 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< ValueRangeMarker >(), validParams< ValueThresholdMarker >(), validParams< VariableGradientComponent >(), validParams< VariableInnerProduct >(), validParams< VariableTimeIntegrationAux >(), and validParams< VectorMagnitudeAux >().

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 1160 of file InputParameters.h.

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

1163 {
1164  addRequiredParam<T>(name, doc_string);
1165  _params[name]._custom_type = custom_type;
1166 }
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 1070 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< ChangeOverTimePostprocessor >(), validParams< ComboMarker >(), validParams< ComparisonPostprocessor >(), validParams< ConcentricCircleMesh >(), validParams< ConcentricCircleMeshGenerator >(), 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< DebugResidualAux >(), validParams< DGConvection >(), validParams< DGDiffusion >(), validParams< DGFunctionDiffusionDirichletBC >(), validParams< DGKernel >(), 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< HistogramVectorPostprocessor >(), validParams< ImageSubdomainGenerator >(), validParams< IndicatorMarker >(), validParams< InitialConditionBase >(), validParams< InterfaceKernel >(), 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< MeshExtruder >(), validParams< MeshExtruderGenerator >(), validParams< MeshSideSet >(), validParams< MeshSideSetGenerator >(), validParams< MooseADObjectAction >(), 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< RealFunctionControl >(), 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< SpatialUserObjectAux >(), validParams< SphericalAverage >(), validParams< SplineFunction >(), validParams< StatisticsVectorPostprocessor >(), validParams< StitchedMesh >(), validParams< StitchedMeshGenerator >(), validParams< SubdomainBoundingBox >(), validParams< SubdomainBoundingBoxGenerator >(), validParams< SubdomainIDGenerator >(), validParams< TestSetupPostprocessorDataActionFunction >(), validParams< TiledMesh >(), validParams< TimeExtremeValue >(), validParams< TimeSequenceStepper >(), validParams< Transform >(), validParams< TransformGenerator >(), validParams< UniformMarker >(), validParams< UserForcingFunctionNodalKernel >(), validParams< ValueRangeMarker >(), validParams< VariableResidual >(), validParams< VectorConstantIC >(), validParams< VectorOfPostprocessors >(), validParams< VectorPostprocessorComparison >(), validParams< VectorPostprocessorFunction >(), validParams< VectorPostprocessorVisualizationAux >(), and validParams< VolumeHistogram >().

1071 {
1072  checkParamName(name);
1073  checkConsistentType<T>(name);
1074 
1075  InputParameters::insert<T>(name);
1076  _params[name]._required = true;
1077  _params[name]._doc_string = doc_string;
1078 }
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 1082 of file InputParameters.h.

1085 {
1086  mooseError("You cannot call addRequiredParam and supply a default value for this type, please "
1087  "use addParam instead");
1088 }
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 813 of file InputParameters.C.

816 {
817  InputParameters::set<MooseEnum>(name) = moose_enum; // valid parameter is set by set_attributes
818  _params[name]._required = true;
819  _params[name]._doc_string = doc_string;
820 }
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 824 of file InputParameters.C.

827 {
828  InputParameters::set<MultiMooseEnum>(name) =
829  moose_enum; // valid parameter is set by set_attributes
830  _params[name]._required = true;
831  _params[name]._doc_string = doc_string;
832 }
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 1129 of file InputParameters.h.

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

1132 {
1133  addRequiredParam<T>(name, doc_string);
1134  _params[name]._range_function = parsed_function;
1135 }
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 820 of file InputParameters.h.

820 { _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 722 of file InputParameters.C.

Referenced by applyParameters(), and applySpecificParameters().

723 {
724  // Disable the display of deprecated message when applying common parameters, this avoids a dump
725  // of messages
726  _show_deprecated_message = false;
727 
728  // If the local parameters has a coupled variable, populate it with the value from the common
729  // parameters, if the common parameters has the coupled variable too
730  if (hasCoupledValue(var_name))
731  {
732  if (common.hasDefaultCoupledValue(var_name))
733  {
734  // prepare a vector of default coupled values
735  std::vector<Real> defaults(common.numberDefaultCoupledValues(var_name));
736  for (unsigned int j = 0; j < common.numberDefaultCoupledValues(var_name); ++j)
737  defaults[j] = common.defaultCoupledValue(var_name, j);
738  addCoupledVar(var_name, defaults, common.getDocString(var_name));
739  }
740  else if (common.hasCoupledValue(var_name))
741  addCoupledVar(var_name, common.getDocString(var_name));
742  }
743 
744  // Enable deprecated message printing
746 }
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 749 of file InputParameters.C.

Referenced by applyParameters(), and applySpecificParameters().

750 {
751  // Disable the display of deprecated message when applying common parameters, this avoids a dump
752  // of messages
753  _show_deprecated_message = false;
754 
755  // Extract the properties from the local parameter for the current common parameter name
756  const bool local_exist = _values.find(common_name) != _values.end();
757  const bool local_set = _params.count(common_name) > 0 && !_params[common_name]._set_by_add_param;
758  const bool local_priv = isPrivate(common_name);
759  const bool local_valid = isParamValid(common_name);
760 
761  // Extract the properties from the common parameter
762  const bool common_exist = common._values.find(common_name) != common._values.end();
763  const bool common_priv = common.isPrivate(common_name);
764  const bool common_valid = common.isParamValid(common_name);
765 
766  /* In order to apply common parameter 4 statements must be satisfied
767  * (1) A local parameter must exist with the same name as common parameter
768  * (2) Common parameter must valid and exist
769  * (3) Local parameter must be invalid OR not have been set from its default
770  * (4) Both cannot be private
771  */
772  if (local_exist && common_exist && common_valid && (!local_valid || !local_set) &&
773  (!common_priv || !local_priv))
774  {
775  delete _values[common_name];
776  _values[common_name] = common._values.find(common_name)->second->clone();
777  set_attributes(common_name, false);
778  }
779 
780  // Enable deprecated message printing
782 }
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 655 of file InputParameters.C.

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

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

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

Referenced by inputLocation(), and paramFullpath().

799  {
800  if (_params.count(param) == 0)
801  mooseError("param '", param, "' not present in InputParams");
802  return _params[param];
803  }
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 804 of file InputParameters.h.

805  {
806  if (_params.count(param) == 0)
807  mooseError("param '", param, "' not present in InputParams");
808  return _params.at(param);
809  }
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 718 of file InputParameters.h.

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

718 { 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 719 of file InputParameters.h.

719 { 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 711 of file InputParameters.h.

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

711 { 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 1245 of file InputParameters.h.

1246 {
1247  // Do we have a paremeter with the same name but a different type?
1248  InputParameters::const_iterator it = _values.find(name);
1249  if (it != _values.end() && dynamic_cast<const Parameter<T> *>(it->second) == NULL)
1250  mooseError("Attempting to set parameter \"",
1251  name,
1252  "\" with type (",
1253  demangle(typeid(T).name()),
1254  ")\nbut the parameter already exists as type (",
1255  it->second->type(),
1256  ")");
1257 }
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 1035 of file InputParameters.C.

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

1036 {
1037  const static pcrecpp::RE valid("[\\w:/]+");
1038  if (!valid.FullMatch(name))
1039  mooseError("Invalid parameter name: '", name, "'");
1040 }
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 410 of file InputParameters.C.

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

411 {
412  std::string parampath = blockFullpath() != "" ? blockFullpath() : parsing_syntax;
413  std::ostringstream oss;
414  // Required parameters
415  for (const auto & it : *this)
416  {
417  if (!isParamValid(it.first) && isParamRequired(it.first))
418  {
419  oss << blockLocation() << ": missing required parameter '" << parampath + "/" + it.first
420  << "'\n";
421  oss << "\tDoc String: \"" + getDocString(it.first) + "\"" << std::endl;
422  }
423  }
424 
425  // Range checked parameters
426  for (const auto & it : *this)
427  {
428  std::string long_name(parampath + "/" + it.first);
429 
430  dynamicCastRangeCheck(Real, Real, long_name, it.first, it.second, oss);
431  dynamicCastRangeCheck(int, long, long_name, it.first, it.second, oss);
432  dynamicCastRangeCheck(long, long, long_name, it.first, it.second, oss);
433  dynamicCastRangeCheck(unsigned int, long, long_name, it.first, it.second, oss);
434  }
435 
436  // Controllable parameters
437  for (const auto & param_name : getControllableParameters())
438  {
439  if (isPrivate(param_name))
440  oss << inputLocation(param_name) << ": private parameter '" << paramFullpath(param_name)
441  << "' marked controllable";
442 
443  checkMooseType(NonlinearVariableName, param_name);
444  checkMooseType(AuxVariableName, param_name);
445  checkMooseType(VariableName, param_name);
446  checkMooseType(BoundaryName, param_name);
447  checkMooseType(SubdomainName, param_name);
448  checkMooseType(PostprocessorName, param_name);
449  checkMooseType(VectorPostprocessorName, param_name);
450  checkMooseType(UserObjectName, param_name);
451  checkMooseType(MaterialPropertyName, param_name);
452  }
453 
454  if (!oss.str().empty())
455  mooseError(oss.str());
456 }
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.

◆ 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 368 of file InputParameters.C.

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

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

◆ collapseSyntaxNesting() [2/2]

bool InputParameters::collapseSyntaxNesting ( ) const

Definition at line 374 of file InputParameters.C.

375 {
376  return _collapse_nesting;
377 }
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 511 of file InputParameters.h.

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

512  {
513  return _coupled_vars.begin();
514  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ coupledVarsEnd()

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

Definition at line 515 of file InputParameters.h.

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

516  {
517  return _coupled_vars.end();
518  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ declareControllable()

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

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 >().

298 {
299  std::vector<std::string> names;
300  MooseUtils::tokenize<std::string>(input_names, names, 1, " ");
301  for (auto & name : names)
302  {
303  auto map_iter = _params.find(name);
304  if (map_iter != _params.end()) // error is handled by checkParams method
305  map_iter->second._controllable = true;
306  else
307  mooseError("The input parameter '",
308  name,
309  "' does not exist, thus cannot be marked as controllable.");
310  }
311 }
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() [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 480 of file InputParameters.C.

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

481 {
482  auto value_it = _params.find(coupling_name);
483 
484  if (value_it == _params.end() || !value_it->second._have_coupled_default)
485  mooseError("Attempted to retrieve default value for coupled variable '",
486  coupling_name,
487  "' when none was provided. \n\nThere are three reasons why this may have "
488  "occurred:\n 1. The other version of params.addCoupledVar() should be used in order "
489  "to provide a default value. \n 2. This should have been a required coupled "
490  "variable added with params.addRequiredCoupledVar() \n 3. The call to get the "
491  "coupled value should have been properly guarded with isCoupled()\n");
492 
493  return value_it->second._coupled_default[i];
494 }
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 472 of file InputParameters.C.

473 {
474  _params[coupling_name]._coupled_default.resize(i + 1);
475  _params[coupling_name]._coupled_default[i] = value;
476  _params[coupling_name]._have_coupled_default = true;
477 }
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 508 of file InputParameters.C.

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

◆ getBuildableRelationshipManagerTypes()

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

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

Definition at line 362 of file InputParameters.C.

Referenced by MooseADObjectAction::addRelationshipManagers(), and MooseObjectAction::addRelationshipManagers().

363 {
364  return _buildable_rm_types;
365 }
std::vector< std::pair< std::string, Moose::RelationshipManagerType > > _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 356 of file InputParameters.C.

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

357 {
358  return _buildable_types;
359 }
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 1056 of file InputParameters.h.

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

1058 {
1059  T param = this->get<T>(name);
1060 
1061  // Note: You will receive a compile error on this line if you attempt to pass a non-pointer
1062  // template type to this method
1063  if (param == NULL)
1064  mooseError("Parameter ", name, " is NULL.\n", error_string);
1065  return this->get<T>(name);
1066 }
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.

◆ getControllableParameters()

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

Return list of controllable parameters.

Definition at line 686 of file InputParameters.h.

Referenced by checkParams().

687  {
688  std::set<std::string> controllable;
689  for (auto it = _params.begin(); it != _params.end(); ++it)
690  if (it->second._controllable)
691  controllable.insert(it->first);
692  return controllable;
693  }
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 523 of file InputParameters.h.

523 { 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 630 of file InputParameters.C.

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

631 {
632  // Check that a default exists, error if it does not
633  auto it = _params.find(name);
634  if (!suppress_error && (it == _params.end() || !it->second._have_default_postprocessor_val))
635  mooseError("A default PostprcessorValue does not exist for the given name: ", name);
636 
637  return it->second._default_postprocessor_val;
638 }
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 804 of file InputParameters.C.

805 {
806  if (_params.count(name) == 0)
807  mooseError("No parameter exists with the name ", name);
808  return _params[name]._doc_string;
809 }
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 621 of file InputParameters.C.

622 {
623  auto it = _params.find(param_name);
624  if (it != _params.end())
625  return it->second._group;
626  return std::string();
627 }
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 530 of file InputParameters.C.

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

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

◆ 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 1391 of file InputParameters.h.

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

1392 {
1393  if (!pars.isParamValid(name))
1394  mooseError("The parameter \"", name, "\" is being retrieved before being set.\n");
1395 
1396  return pars.get<T>(name);
1397 }
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 1414 of file InputParameters.h.

1417 {
1418  return pars.get<std::vector<T>>(name);
1419 }

◆ getParamHelper() [3/6]

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

Definition at line 1003 of file InputParameters.C.

1006 {
1007  return pars.get<MooseEnum>(name);
1008 }
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 1012 of file InputParameters.C.

1015 {
1016  return pars.get<MultiMooseEnum>(name);
1017 }
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 615 of file InputParameters.C.

616 {
617  return _params[name]._cli_flag_names;
618 }
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 557 of file InputParameters.C.

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

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

◆ 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 459 of file InputParameters.C.

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

460 {
461  return _coupled_vars.find(coupling_name) != _coupled_vars.end();
462 }
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 465 of file InputParameters.C.

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

466 {
467  return _params.count(coupling_name) > 0 && _params.at(coupling_name)._have_coupled_default &&
468  _coupled_vars.count(coupling_name) > 0;
469 }
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 649 of file InputParameters.C.

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

650 {
651  return _params.count(name) > 0 && _params.at(name)._have_default_postprocessor_val;
652 }
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 727 of file InputParameters.h.

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

728  {
729  return at(param)._input_location;
730  };
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 731 of file InputParameters.h.

731 { 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 314 of file InputParameters.C.

315 {
316  return _params.count(name) > 0 && _params[name]._controllable;
317 }
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 793 of file InputParameters.C.

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

794 {
795  if (!isParamValid(name))
796  // if the parameter is invalid, it is for sure not set by the user
797  return false;
798  else
799  // If the parameters is not located in the list, then it was set by the user
800  return _params.count(name) > 0 && !_params.at(name)._set_by_add_param;
801 }
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(), applyParameter(), areAllRequiredParamsValid(), BoundsAux::BoundsAux(), checkParams(), AppFactory::createShared(), FileRangeBuilder::FileRangeBuilder(), GapValueAux::GapValueAux(), ExtraNodesetGenerator::generate(), MooseApp::getCheckpointDirectories(), getParamHelper(), InterfaceKernel::InterfaceKernel(), isParamSetByUser(), MooseObject::isParamValid(), Action::isParamValid(), MooseApp::isParamValid(), isValid(), LayeredBase::LayeredBase(), 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(), ImageSampler::vtkThreshold(), and MeshBaseImageSampler::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 1272 of file InputParameters.h.

1273 {
1274  if (!this->have_parameter<T>(name))
1275  mooseError("Unable to require nonexistent parameter: ", name);
1276 
1277  _params[name]._required = true;
1278 }
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 380 of file InputParameters.C.

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

381 {
382  _moose_object_syntax_visibility = visibility;
383 }
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 386 of file InputParameters.C.

387 {
389 }
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 497 of file InputParameters.C.

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

498 {
499  auto value_it = _params.find(coupling_name);
500  if (value_it == _params.end())
501  mooseError("Attempted to retrieve default value for coupled variable '",
502  coupling_name,
503  "' when none was provided.");
504  return value_it->second._coupled_default.size();
505 }
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::string > _buildable_types
The parameter is used to restrict types that can be built.
std::map< std::string, Metadata > _params
The actual parameter data.
std::vector< std::pair< std::string, Moose::RelationshipManagerType > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.

◆ 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::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.
std::vector< std::pair< std::string, Moose::RelationshipManagerType > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.

◆ 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 739 of file InputParameters.h.

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

740  {
741  return at(param)._param_fullpath;
742  };
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 743 of file InputParameters.h.

743 { 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 786 of file InputParameters.C.

787 {
788  mooseDeprecated("paramSetByUser() is deprecated. Use isParamSetByUser() instead.");
789  return isParamSetByUser(name);
790 }
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 1014 of file InputParameters.h.

Referenced by Parser::setScalarValueTypeParameter().

1018 {
1019  mooseAssert(param, "Parameter is NULL");
1020 
1021  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1022  return;
1023 
1024  // Parse the expression
1026  if (fp.Parse(_params[short_name]._range_function, short_name) != -1) // -1 for success
1027  {
1028  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1029  return;
1030  }
1031 
1032  // ensure range-checked input file parameter comparison functions
1033  // do absolute floating point comparisons instead of using a default epsilon.
1034  auto tmp_eps = fp.epsilon();
1035  fp.setEpsilon(0);
1036  // We require a non-const value for the implicit upscaling of the parameter type
1037  std::vector<UP_T> value(1, param->set());
1038  UP_T result = fp.Eval(&value[0]);
1039  fp.setEpsilon(tmp_eps);
1040 
1041  if (fp.EvalError())
1042  {
1043  oss << "Error evaluating expression: " << _params[short_name]._range_function
1044  << "\nPerhaps you used the wrong variable name?\n";
1045  return;
1046  }
1047 
1048  if (!result)
1049  oss << "Range check failed for parameter " << full_name
1050  << "\n\tExpression: " << _params[short_name]._range_function << "\n\tValue: " << value[0]
1051  << '\n';
1052 }
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 901 of file InputParameters.h.

905 {
906  mooseAssert(param, "Parameter is NULL");
907 
908  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
909  return;
910 
923  std::vector<std::string> vars;
924  if (fp.ParseAndDeduceVariables(_params[short_name]._range_function, vars) != -1) // -1 for success
925  {
926  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
927  return;
928  }
929 
930  // Fparser parameter buffer
931  std::vector<UP_T> parbuf(vars.size());
932 
933  // parameter vector
934  const std::vector<T> & value = param->set();
935 
936  // iterate over all vector values (maybe ;)
937  bool need_to_iterate = false;
938  unsigned int i = 0;
939  do
940  {
941  // set parameters
942  for (unsigned int j = 0; j < vars.size(); j++)
943  {
944  if (vars[j] == short_name)
945  {
946  if (value.size() == 0)
947  {
948  oss << "Range checking empty vector: " << _params[short_name]._range_function << '\n';
949  return;
950  }
951 
952  parbuf[j] = value[i];
953  need_to_iterate = true;
954  }
955  else if (vars[j] == short_name + "_size")
956  parbuf[j] = value.size();
957  else
958  {
959  if (vars[j].substr(0, short_name.size() + 1) != short_name + "_")
960  {
961  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
962  return;
963  }
964  std::istringstream iss(vars[j]);
965  iss.seekg(short_name.size() + 1);
966 
967  size_t index;
968  if (iss >> index && iss.eof())
969  {
970  if (index >= value.size())
971  {
972  oss << "Error parsing expression: " << _params[short_name]._range_function
973  << "\nOut of range variable " << vars[j] << '\n';
974  return;
975  }
976  parbuf[j] = value[index];
977  }
978  else
979  {
980  oss << "Error parsing expression: " << _params[short_name]._range_function
981  << "\nInvalid variable " << vars[j] << '\n';
982  return;
983  }
984  }
985  }
986 
987  // ensure range-checked input file parameter comparison functions
988  // do absolute floating point comparisons instead of using a default epsilon.
989  auto tmp_eps = fp.epsilon();
990  fp.setEpsilon(0);
991  UP_T result = fp.Eval(&parbuf[0]);
992  fp.setEpsilon(tmp_eps);
993 
994  // test function using the parameters determined above
995  if (fp.EvalError())
996  {
997  oss << "Error evaluating expression: " << _params[short_name]._range_function << '\n';
998  return;
999  }
1000 
1001  if (!result)
1002  {
1003  oss << "Range check failed for parameter " << full_name
1004  << "\n\tExpression: " << _params[short_name]._range_function << "\n";
1005  if (need_to_iterate)
1006  oss << "\t Component: " << i << '\n';
1007  }
1008 
1009  } while (need_to_iterate && ++i < value.size());
1010 }
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 750 of file InputParameters.h.

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

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

◆ registerBase()

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

◆ 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 327 of file InputParameters.C.

328 {
329  _buildable_types.clear();
330  MooseUtils::tokenize(names, _buildable_types, 1, " \t\n\v\f\r"); // tokenize on whitespace
331 }
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:377
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.

◆ registerRelationshipManagers()

void InputParameters::registerRelationshipManagers ( const std::string &  names,
const std::string &  use_as_rm_types = "" 
)

Declares the types of RelationshipManagers that the owning object will either construct (in the case of Actions) or requires (in the case of every other MooseObject).

With normal MooseObject-derived types built by MooseObjectAction, MOOSE will attempt to use the InputParameters available to it to construct the required RelationshipManager automatically. Actions may run custom logic to create RelationshipManagers. The names and rm_type lists must have the same number of entries.

Parameters
namesA space delimited list of RelationshipMangers that may be built by this object.

Definition at line 334 of file InputParameters.C.

336 {
337  _buildable_rm_types.clear();
338 
339  std::vector<std::string> buildable_rm_types;
340  MooseUtils::tokenize(names, buildable_rm_types, 1, " \t\n\v\f\r"); // tokenize on whitespace
341 
342  std::vector<std::string> use_as_rm_type_strings;
343  MooseUtils::tokenize(use_as_rm_types, use_as_rm_type_strings, 1, " \t\n\v\f\r");
344 
345  for (std::size_t i = 0; i < buildable_rm_types.size(); ++i)
346  {
348  if (i < use_as_rm_type_strings.size())
349  use_as_type = Moose::stringToEnum<Moose::RelationshipManagerType>(use_as_rm_type_strings[i]);
350 
351  _buildable_rm_types.emplace_back(std::make_pair(buildable_rm_types[i], use_as_type));
352  }
353 }
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:377
RelationshipManagerType
Main types of Relationship Managers.
Definition: MooseTypes.h:569
std::vector< std::pair< std::string, Moose::RelationshipManagerType > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.

◆ 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 1026 of file InputParameters.C.

1027 {
1028  auto it = _params.find(name);
1029  if (it == _params.end())
1030  return std::set<std::string>();
1031  return it->second._reserved_values;
1032 }
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 883 of file InputParameters.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), CreateExecutionerAction::act(), PartitionerAction::act(), AddICAction::act(), AddMeshModifierAction::act(), CreateProblemAction::act(), SetupDebugAction::act(), SetupMeshAction::act(), CreateDisplacedProblemAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), SetupResidualDebugAction::act(), MaterialDerivativeTestAction::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(), 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< AlgebraicRelationshipManager >(), validParams< Control >(), 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< GeometricRelationshipManager >(), 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< PerflogDumper >(), 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().

884 {
885  checkParamName(name);
886  checkConsistentType<T>(name);
887 
888  if (!this->have_parameter<T>(name))
889  _values[name] = new Parameter<T>;
890 
891  set_attributes(name, false);
892 
893  if (quiet_mode)
894  _params[name]._set_by_add_param = true;
895 
896  return cast_ptr<Parameter<T> *>(_values[name])->set();
897 }
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 641 of file InputParameters.C.

643 {
644  _params[name]._default_postprocessor_val = value;
645  _params[name]._have_default_postprocessor_val = true;
646 }
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 1122 of file InputParameters.h.

Referenced by addParam().

1123 {
1124  l_value = r_value;
1125 }

◆ setParamHelper() [2/13]

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

Definition at line 923 of file InputParameters.C.

926 {
927  // Store the default value
928  _params[name]._default_postprocessor_val = r_value;
929  _params[name]._have_default_postprocessor_val = true;
930 
931  // Assign the default value so that it appears in the dump
932  std::ostringstream oss;
933  oss << r_value;
934  l_value = oss.str();
935 }
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 939 of file InputParameters.C.

942 {
943  // Store the default value
944  _params[name]._default_postprocessor_val = r_value;
945  _params[name]._have_default_postprocessor_val = true;
946 
947  // Assign the default value so that it appears in the dump
948  std::ostringstream oss;
949  oss << r_value;
950  l_value = oss.str();
951 }
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 955 of file InputParameters.C.

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

◆ setParamHelper() [5/13]

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

Definition at line 967 of file InputParameters.C.

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

◆ setParamHelper() [6/13]

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

Definition at line 979 of file InputParameters.C.

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

◆ setParamHelper() [7/13]

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

Definition at line 991 of file InputParameters.C.

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

◆ 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 1020 of file InputParameters.C.

Referenced by validParams< OutputInterface >().

1021 {
1022  _params[name]._reserved_values = reserved;
1023 }
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 1261 of file InputParameters.h.

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

1262 {
1263  if (!this->have_parameter<T>(name))
1264  mooseError("Unable to suppress nonexistent parameter: ", name);
1265 
1266  _params[name]._required = false;
1267  _params[name]._is_private = true;
1268 }
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 520 of file InputParameters.C.

521 {
522  if (_coupled_vars.find(name) != _coupled_vars.end())
523  return "std::vector<VariableName>";
524  else if (_params.count(name) > 0 && !_params[name]._custom_type.empty())
525  return _params[name]._custom_type;
526  return _values[name]->type();
527 }
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 877 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 873 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 838 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 835 of file InputParameters.h.

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

◆ _buildable_rm_types

std::vector<std::pair<std::string, Moose::RelationshipManagerType> > 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 859 of file InputParameters.h.

Referenced by getBuildableRelationshipManagerTypes(), operator+=(), operator=(), and registerRelationshipManagers().

◆ _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 853 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 849 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 863 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 866 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 870 of file InputParameters.h.

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


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