www.mooseframework.org
Classes | Public Member Functions | Static 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 >
void setHelper (const std::string &name)
 This functions is called in set as a 'callback' to avoid code duplication. 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 >
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...
 
template<typename T >
void makeParamNotRequired (const std::string &name)
 Changes the parameter to not be required. More...
 
void addCoupledVar (const std::string &name, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
void addCoupledVar (const std::string &name, const Real value, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
void addCoupledVar (const std::string &name, const std::vector< Real > &value, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
std::string getMooseType (const std::string &name) const
 Utility functions for retrieving one of the MooseTypes variables into the common "string" base class. More...
 
std::vector< std::string > getVecMooseType (const std::string &name) const
 
void addRequiredCoupledVar (const std::string &name, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
std::string getDocString (const std::string &name) const
 Returns the documentation string for the specified parameter name. More...
 
void setDocString (const std::string &name, const std::string &doc)
 Set the doc string of a parameter. More...
 
bool isParamRequired (const std::string &name) const
 Returns a boolean indicating whether the specified parameter is required or not. More...
 
bool isParamValid (const std::string &name) const
 This method returns parameters that have been initialized in one fashion or another, i.e. More...
 
bool isParamSetByAddParam (const std::string &name) const
 Returns whether or not the parameter was set due to addParam. More...
 
bool isParamDeprecated (const std::string &name) const
 Returns True if the parameters is deprecated. More...
 
bool areAllRequiredParamsValid () const
 This method returns true if all of the parameters in this object are valid (i.e. More...
 
std::string type (const std::string &name)
 Prints the type of the requested parameter by name. More...
 
bool isPrivate (const std::string &name) const
 Returns a Boolean indicating whether the specified parameter is private or not. More...
 
void declareControllable (const std::string &name, std::set< ExecFlagType > execute_flags={})
 Declare the given parameters as controllable. More...
 
void markControlled (const std::string &name)
 Marker a parameter that has been changed by the Control system (this is for output purposes) More...
 
bool isControllable (const std::string &name)
 Returns a Boolean indicating whether the specified parameter is controllable. More...
 
const std::set< ExecFlagType > & getControllableExecuteOnTypes (const std::string &name)
 Return the allowed execute flags for a controllable parameter. More...
 
void registerBase (const std::string &value)
 This method must be called from every base "Moose System" to create linkage with the Action System. More...
 
void registerBuildableTypes (const std::string &names)
 This method is here to indicate which Moose types a particular Action may build. More...
 
void addRelationshipManager (const std::string &name, Moose::RelationshipManagerType rm_type, Moose::RelationshipManagerInputParameterCallback input_parameter_callback=nullptr)
 Tells MOOSE about a RelationshipManager that this object needs. More...
 
void clearRelationshipManagers ()
 Clears all currently registered RelationshipManagers. More...
 
const std::vector< std::string > & getBuildableTypes () const
 Returns the list of buildable types as a std::vector<std::string> More...
 
const std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > & getBuildableRelationshipManagerTypes () const
 Returns the list of buildable (or required) RelationshipManager object types for this object. More...
 
void checkParams (const std::string &parsing_syntax)
 This function checks parameters stored in the object to make sure they are in the correct state as the user expects: Required parameters are verified as valid meaning that they were either initialized when they were created, or were read from an input file or some other valid source. More...
 
std::set< std::string >::const_iterator coupledVarsBegin () const
 Methods returning iterators to the coupled variables names stored in this InputParameters object. More...
 
std::set< std::string >::const_iterator coupledVarsEnd () const
 
const std::set< std::string > & getCoupledVariableParamNames () const
 Return the coupled variable parameter names. More...
 
bool hasCoupledValue (const std::string &coupling_name) const
 Return whether or not the coupled variable exists. More...
 
bool hasDefaultCoupledValue (const std::string &coupling_name) const
 Return whether or not the requested parameter has a default coupled value. More...
 
Real defaultCoupledValue (const std::string &coupling_name, unsigned int i=0) const
 Get the default value for an optionally coupled variable. More...
 
unsigned int numberDefaultCoupledValues (const std::string &coupling_name) const
 Get the number of defaulted coupled value entries. More...
 
void defaultCoupledValue (const std::string &coupling_name, Real value, unsigned int i=0)
 Set the default value for an optionally coupled variable (called by the Parser). More...
 
std::map< std::string, std::pair< std::string, std::string > > getAutoBuildVectors () const
 Returns the auto build vectors for all parameters. More...
 
const PostprocessorValuegetDefaultPostprocessorValue (const std::string &name, bool suppress_error=false, unsigned int index=0) const
 Get the default value for a postprocessor added with addPostprocessor. More...
 
void setDefaultPostprocessorValue (const std::string &name, const PostprocessorValue &value, unsigned int index=0)
 Set the default value for a postprocessor added with addPostprocessor. More...
 
bool hasDefaultPostprocessorValue (const std::string &name, unsigned int index=0) 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, bool allow_private=false)
 Method for applying common parameters. More...
 
void applyParameter (const InputParameters &common, const std::string &common_name, bool allow_private=false)
 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<typename T >
void ignoreParameter (const std::string &name)
 Informs this object that values for this parameter set from the input file or from the command line should be ignored. More...
 
bool shouldIgnore (const std::string &name)
 Whether to ignore the value of an input parameter set in the input file or from the command line. More...
 
bool isSinglePostprocessor (const std::string &pp_name) const
 Getter for the _vector_of_postprocessors flag in parameters. 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<>
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<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)
 
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<>
const MooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MooseEnum *)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MultiMooseEnum *)
 
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<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...
 
void reserveDefaultPostprocessorValueStorage (const std::string &name, unsigned int size)
 Reserve space for default postprocessor values. More...
 
void setVectorOfPostprocessors (const std::string &pp_name, bool b)
 Setter for the _vector_of_postprocessors flag in parameters. More...
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &name, PostprocessorName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, FunctionName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, MaterialPropertyName &l_value, const int &r_value)
 

Private Attributes

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

Friends

class InputParameterWarehouse
 
class Parser
 
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 }

◆ 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 }

◆ ~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 }

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.

71 {
72  _class_description = doc_string;
73 }

Referenced by AddElementalFieldAction::validParams(), AddIndicatorAction::validParams(), AddTransferAction::validParams(), ArrayDiffusion::validParams(), ArrayReaction::validParams(), MatDiffusion::validParams(), NumElems::validParams(), ErrorFractionMarker::validParams(), NumRelationshipManagers::validParams(), ErrorToleranceMarker::validParams(), UniformMarker::validParams(), ExternalProblem::validParams(), ConstantDT::validParams(), ValueRangeMarker::validParams(), ValueThresholdMarker::validParams(), AddMarkerAction::validParams(), DerivativeSumMaterial::validParams(), DGConvection::validParams(), TiledMesh::validParams(), BreakMeshByBlockGenerator::validParams(), AddMultiAppAction::validParams(), SetAdaptivityOptionsAction::validParams(), ArrayVariableComponent::validParams(), ArrayPenaltyDirichletBC::validParams(), AnalyticalIndicator::validParams(), GradientJumpIndicator::validParams(), ArrayVacuumBC::validParams(), LaplacianJumpIndicator::validParams(), ValueJumpIndicator::validParams(), ArrayTimeDerivative::validParams(), AverageNodalVariableValue::validParams(), MassEigenKernel::validParams(), MassLumpedTimeDerivative::validParams(), NumNodes::validParams(), Reaction::validParams(), TimeDerivative::validParams(), NumVars::validParams(), PerformanceData::validParams(), VectorTimeDerivative::validParams(), TimestepSize::validParams(), VariableResidual::validParams(), ProcessorIDAux::validParams(), GenericConstant2DArray::validParams(), GenericConstantArray::validParams(), FileMesh::validParams(), SidesetInfoVectorPostprocessor::validParams(), InversePowerMethod::validParams(), CartesianMeshGenerator::validParams(), PenaltyDirichletNodalKernel::validParams(), ADVectorDiffusion< compute_stage >::validParams(), PenetrationAux::validParams(), BoxMarker::validParams(), LogConstantDT::validParams(), ElementQualityChecker::validParams(), LineValueSampler::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), SetupDebugAction::validParams(), TransformGenerator::validParams(), ArrayFunctionIC::validParams(), ADTimeDerivative< compute_stage >::validParams(), ADVectorTimeDerivative< compute_stage >::validParams(), ElementExtremeValue::validParams(), ElementVectorL2Error::validParams(), FunctionElementIntegral::validParams(), NullKernel::validParams(), MaterialDerivativeTestKernel::validParams(), VectorCoupledTimeDerivative::validParams(), ScalePostprocessor::validParams(), TimeExtremeValue::validParams(), ComboMarker::validParams(), FunctionDT::validParams(), GeometrySphere::validParams(), DistributedGeneratedMesh::validParams(), CSVReader::validParams(), GeneratedMesh::validParams(), AnnularMesh::validParams(), ArrayDGDiffusion::validParams(), SpiralAnnularMesh::validParams(), RinglebMesh::validParams(), GhostingAux::validParams(), ReactionNodalKernel::validParams(), EigenDirichletBC::validParams(), ConstantAux::validParams(), AreaPostprocessor::validParams(), CoupledForce::validParams(), ChangeOverTimePostprocessor::validParams(), ElementAverageSecondTimeDerivative::validParams(), ElementAverageTimeDerivative::validParams(), CoupledTimeDerivative::validParams(), Diffusion::validParams(), DiffusionFluxAux::validParams(), ElementL2Difference::validParams(), MaterialDerivativeRankFourTestKernel::validParams(), MatchedValueBC::validParams(), MaterialDerivativeRankTwoTestKernel::validParams(), NodalSum::validParams(), VectorDiffusion::validParams(), VolumePostprocessor::validParams(), DumpObjectsProblem::validParams(), ReferenceResidualProblem::validParams(), ActuallyExplicitEuler::validParams(), NewmarkBeta::validParams(), ExodusTimeSequenceStepper::validParams(), TimeSequenceStepper::validParams(), MultiAppCopyTransfer::validParams(), MultiAppPostprocessorTransfer::validParams(), ElementsAlongPlane::validParams(), OldEqualValueConstraint::validParams(), GeometryBase::validParams(), InterfaceValueUserObject::validParams(), ConditionalFunctionEnableControl::validParams(), ElementsAlongLine::validParams(), ElementValueSampler::validParams(), ImageMesh::validParams(), ConcentricCircleMesh::validParams(), VectorMagnitudeAux::validParams(), AnnularMeshGenerator::validParams(), BlockDeletionGenerator::validParams(), BreakBoundaryOnSubdomainGenerator::validParams(), BreakMeshByBlockGeneratorBase::validParams(), CylindricalAverage::validParams(), ConcentricCircleMeshGenerator::validParams(), LowerDBlockFromSidesetGenerator::validParams(), MeshSideSetGenerator::validParams(), LinearCombinationFunction::validParams(), RenameBlockGenerator::validParams(), RenameBoundaryGenerator::validParams(), RinglebMeshGenerator::validParams(), SideSetsFromNormalsGenerator::validParams(), SideSetsFromPointsGenerator::validParams(), SpiralAnnularMeshGenerator::validParams(), SmoothMeshGenerator::validParams(), TiledMeshGenerator::validParams(), CentroidMultiApp::validParams(), CoupledForceNodalKernel::validParams(), LowerBoundNodalKernel::validParams(), UpperBoundNodalKernel::validParams(), SetupResidualDebugAction::validParams(), CoupledVarNeumannBC::validParams(), MaterialStdVectorAux::validParams(), WorkBalance::validParams(), VTKOutput::validParams(), MaterialStdVectorRealGradientAux::validParams(), XDA::validParams(), DirichletBC::validParams(), MemoryUsage::validParams(), NearestNodeDistanceAux::validParams(), AxisymmetricCenterlineAverageValue::validParams(), ConservativeAdvection::validParams(), FunctionGradientNeumannBC::validParams(), StatisticsVectorPostprocessor::validParams(), FunctionNeumannBC::validParams(), ParsedAux::validParams(), ParsedODEKernel::validParams(), NumNonlinearIterations::validParams(), TagVectorAux::validParams(), Receiver::validParams(), RelativeSolutionDifferenceNorm::validParams(), SideFluxIntegral::validParams(), EqualValueConstraint< compute_stage >::validParams(), ScalarTagMatrixAux::validParams(), FEProblem::validParams(), VectorDirichletBC::validParams(), MultiAppPostprocessorToAuxScalarTransfer::validParams(), ScalarTagVectorAux::validParams(), EqualGradientConstraint< compute_stage >::validParams(), MultiAppScalarToAuxScalarTransfer::validParams(), InterfaceQpValueUserObject::validParams(), ElementLengthAux::validParams(), TagMatrixAux::validParams(), ControlOutput::validParams(), NodalValueSampler::validParams(), MaxIncrement::validParams(), VariableGradientComponent::validParams(), MaterialDerivativeTestAction::validParams(), VectorFunctionAux::validParams(), GeneratedMeshGenerator::validParams(), FunctionAux::validParams(), VectorPostprocessorVisualizationAux::validParams(), ImageSubdomainGenerator::validParams(), VectorVariableComponentAux::validParams(), CompositeFunction::validParams(), ParsedSubdomainMeshGenerator::validParams(), PiecewiseConstant::validParams(), VectorFunctionDirichletBC::validParams(), HardwareIDAux::validParams(), PiecewiseLinear::validParams(), ADFunctionNeumannBC< compute_stage >::validParams(), ADNeumannBC< compute_stage >::validParams(), ArrayConstantIC::validParams(), InterfaceValueUserObjectAux::validParams(), ADPresetBC< compute_stage >::validParams(), FullSolveMultiApp::validParams(), ArrayDirichletBC::validParams(), MaterialRealAux::validParams(), Console::validParams(), ConvectiveFluxBC::validParams(), InterfaceReaction::validParams(), GMVOutput::validParams(), PerfGraphOutput::validParams(), Tecplot::validParams(), DisplayGhostingAction::validParams(), NearestNodeValueAux::validParams(), FunctionValuePostprocessor::validParams(), InterfaceIntegralPostprocessor::validParams(), FunctionMaterialBase::validParams(), PresetBC::validParams(), MultiAppVariableValueSampleTransfer::validParams(), LineMaterialRealSampler::validParams(), FunctionDirichletBC::validParams(), AnisotropicDiffusion::validParams(), DerivativeParsedMaterial::validParams(), MultiAppVectorPostprocessorTransfer::validParams(), MultiAppVariableValueSamplePostprocessorTransfer::validParams(), LeastSquaresFit::validParams(), ImageMeshGenerator::validParams(), VectorMemoryUsage::validParams(), ElementQualityAux::validParams(), CombinerGenerator::validParams(), FancyExtruderGenerator::validParams(), MeshCollectionGenerator::validParams(), MeshExtruderGenerator::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), ADFunctionDirichletBC< compute_stage >::validParams(), StackGenerator::validParams(), MultiAppPostprocessorInterpolationTransfer::validParams(), ADVectorFunctionDirichletBC< compute_stage >::validParams(), DOFMapOutput::validParams(), ElementLpNormAux::validParams(), EqualValueEmbeddedConstraint::validParams(), PetscExternalPartitioner::validParams(), RandomPartitioner::validParams(), FunctionPresetBC::validParams(), InterfaceAverageVariableValuePostprocessor::validParams(), VectorOfPostprocessors::validParams(), MultiAppInterpolationTransfer::validParams(), SideAverageValue::validParams(), VectorBodyForce::validParams(), QuotientAux::validParams(), LeastSquaresFitHistory::validParams(), MultiAppMeshFunctionTransfer::validParams(), LinearNodalConstraint::validParams(), ParsedMaterial::validParams(), SolutionHistory::validParams(), SolutionScalarAux::validParams(), Gnuplot::validParams(), MultiAppUserObjectTransfer::validParams(), CSV::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), VectorPostprocessorFunction::validParams(), MaterialRankFourTensorAux::validParams(), MaterialRankTwoTensorAux::validParams(), PerfGraphData::validParams(), ElementalVariableValue::validParams(), FindValueOnLine::validParams(), SolutionAux::validParams(), VectorNeumannBC::validParams(), MaterialPropertyDebugOutput::validParams(), NumDOFs::validParams(), NeumannBC::validParams(), ParsedGenerateSideset::validParams(), AddOutputAction::validParams(), InterfacePostprocessor::validParams(), ElementH1ErrorFunctionAux::validParams(), CSVTimeSequenceStepper::validParams(), BlockWeightedPartitioner::validParams(), InterfaceIntegralVariableValuePostprocessor::validParams(), VariableResidualNormsDebugOutput::validParams(), ADPiecewiseLinearInterpolationMaterial< compute_stage >::validParams(), DerivativeParsedMaterialHelper::validParams(), MultiAppProjectionTransfer::validParams(), ElementL2ErrorFunctionAux::validParams(), PlaneDeletionGenerator::validParams(), TransientMultiApp::validParams(), SideSetsAroundSubdomainGenerator::validParams(), ADFunctionPresetBC< compute_stage >::validParams(), ElementIntegralArrayVariablePostprocessor::validParams(), MultiAppNearestNodeTransfer::validParams(), TimePeriod::validParams(), NearestPointIntegralVariablePostprocessor::validParams(), PiecewiseMulticonstant::validParams(), StitchedMesh::validParams(), HistogramVectorPostprocessor::validParams(), BodyForce::validParams(), OrientedBoxMarker::validParams(), ADDirichletBC< compute_stage >::validParams(), RealFunctionControl::validParams(), PiecewiseMultilinear::validParams(), ImageFunction::validParams(), Exodus::validParams(), ADBodyForce< compute_stage >::validParams(), NodalVariableValue::validParams(), Nemesis::validParams(), Eigenvalue::validParams(), EigenExecutionerBase::validParams(), PatternedMeshGenerator::validParams(), SubdomainBoundingBoxGenerator::validParams(), CommonOutputAction::validParams(), NearestPointLayeredSideAverage::validParams(), FunctionIC::validParams(), DiffusionFluxBC::validParams(), SinDirichletBC::validParams(), BoundingBoxIC::validParams(), ADPresetNodalBC< compute_stage >::validParams(), GhostingUserObject::validParams(), SinNeumannBC::validParams(), Axisymmetric2D3DSolutionFunction::validParams(), VectorConstantIC::validParams(), IterationAdaptiveDT::validParams(), WeakGradientBC::validParams(), GridPartitioner::validParams(), VectorFunctionIC::validParams(), BoundingBoxNodeSetGenerator::validParams(), MooseParsedFunction::validParams(), ConstantIC::validParams(), PostprocessorComparison::validParams(), PatternedMesh::validParams(), DerivativeFunctionMaterialBase::validParams(), SolutionUserObject::validParams(), RelativeDifferencePostprocessor::validParams(), ParsedMaterialHelper::validParams(), Transient::validParams(), InterfaceUserObject::validParams(), VectorPostprocessorComparison::validParams(), MooseVariableBase::validParams(), Steady::validParams(), ADMatDiffusionBase< compute_stage, Real >::validParams(), PenaltyDirichletBC::validParams(), RandomIC::validParams(), RandomICBase::validParams(), Checkpoint::validParams(), Sampler::validParams(), PiecewiseBilinear::validParams(), TopResidualDebugOutput::validParams(), validParams< AddAllSideSetsByNormals >(), validParams< AddSideSetsFromBoundingBox >(), validParams< BlockDeleter >(), validParams< BoundingBoxNodeSet >(), validParams< BreakBoundaryOnSubdomain >(), validParams< BreakMeshByBlock >(), validParams< BreakMeshByBlockBase >(), validParams< CoarsenedPiecewiseLinear >(), validParams< ElementIntegerAux >(), validParams< ImageSubdomain >(), validParams< LowerDBlockFromSideset >(), validParams< MeshExtruder >(), validParams< MeshSideSet >(), validParams< ParsedAddSideset >(), validParams< ParsedSubdomainMeshModifier >(), validParams< PiecewiseFunctionTabulate >(), validParams< PiecewiseLinearBase >(), validParams< RenameBlock >(), validParams< SideSetsAroundSubdomain >(), validParams< SideSetsFromNormals >(), validParams< SideSetsFromPoints >(), validParams< SmoothMesh >(), validParams< SubdomainBoundingBox >(), and validParams< Transform >().

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

1333 {
1334  addParam<T>(name, doc_string);
1335  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1336 }

Referenced by MooseApp::validParams().

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

1344 {
1345  addParam<T>(name, value, doc_string);
1346  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1347 }

◆ addCoupledVar() [1/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 }

◆ addCoupledVar() [2/3]

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

◆ 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 }

◆ 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.

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 }

Referenced by addRequiredCoupledVarWithAutoBuild().

◆ addCustomTypeParam() [1/2]

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

Definition at line 1287 of file InputParameters.h.

1290 {
1291  addParam<T>(name, doc_string);
1292  _params[name]._custom_type = custom_type;
1293 }

◆ addCustomTypeParam() [2/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 1276 of file InputParameters.h.

1280 {
1281  addParam<T>(name, value, doc_string);
1282  _params[name]._custom_type = custom_type;
1283 }

◆ addDeprecatedParam() [1/6]

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

Definition at line 936 of file InputParameters.C.

939 {
940  mooseError("You must supply a MooseEnum object and the deprecation string when using "
941  "addDeprecatedParam, even if the parameter is not required!");
942 }

◆ addDeprecatedParam() [2/6]

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

Definition at line 946 of file InputParameters.C.

949 {
950  mooseError("You must supply a MultiMooseEnum object and the deprecation string when using "
951  "addDeprecatedParam, even if the parameter is not required!");
952 }

◆ addDeprecatedParam() [3/6]

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

Definition at line 1420 of file InputParameters.h.

1423 {
1424  _show_deprecated_message = false;
1425  addParam<T>(name, doc_string);
1426 
1427  _params[name]._deprecation_message = deprecation_message;
1428  _show_deprecated_message = true;
1429 }

◆ addDeprecatedParam() [4/6]

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

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

1410 {
1411  _show_deprecated_message = false;
1412  addParam<T>(name, value, doc_string);
1413 
1414  _params[name]._deprecation_message = deprecation_message;
1415  _show_deprecated_message = true;
1416 }

Referenced by AdaptivityAction::validParams(), AnnularMesh::validParams(), AnnularMeshGenerator::validParams(), VectorFunctionDirichletBC::validParams(), Console::validParams(), PetscOutput::validParams(), MatDiffusionBase< Real >::validParams(), DerivativeParsedMaterialHelper::validParams(), GenericFunctionMaterial::validParams(), Exodus::validParams(), CommonOutputAction::validParams(), DerivativeFunctionMaterialBase::validParams(), Transient::validParams(), OversampleOutput::validParams(), and Executioner::validParams().

◆ addParam() [1/6]

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

Definition at line 893 of file InputParameters.C.

895 {
896  mooseError("You must supply a MooseEnum object when using addParam, even if the parameter is not "
897  "required!");
898 }

◆ addParam() [2/6]

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

Definition at line 902 of file InputParameters.C.

904 {
905  mooseError("You must supply a MultiMooseEnum object when using addParam, even if the parameter "
906  "is not required!");
907 }

◆ addParam() [3/6]

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

◆ addParam() [4/6]

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

◆ addParam() [5/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 1198 of file InputParameters.h.

1199 {
1200  checkParamName(name);
1201  checkConsistentType<T>(name);
1202 
1203  T & l_value = InputParameters::set<T>(name);
1204  _params[name]._doc_string = doc_string;
1205 
1206  // Set the parameter now
1207  setParamHelper(name, l_value, value);
1208 
1209  /* Indicate the default value, as set via addParam, is being used. The parameter is removed from
1210  the list whenever
1211  it changes, see set_attributes */
1212  _params[name]._set_by_add_param = true;
1213 }

Referenced by AdvancedOutput::addValidParams(), Moose::PetscSupport::getPetscValidParams(), Moose::SlepcSupport::getSlepcEigenProblemValidParams(), nearestPointBaseValidParams(), ArrayDiffusion::validParams(), ArrayReaction::validParams(), NumElems::validParams(), NumRelationshipManagers::validParams(), ErrorFractionMarker::validParams(), ErrorToleranceMarker::validParams(), CreateExecutionerAction::validParams(), ValueRangeMarker::validParams(), ValueThresholdMarker::validParams(), DerivativeSumMaterial::validParams(), DynamicObjectRegistrationAction::validParams(), EqualValueBoundaryConstraint::validParams(), SetAdaptivityOptionsAction::validParams(), TiledMesh::validParams(), CopyNodalVarsAction::validParams(), ArrayVariableComponent::validParams(), ArrayPenaltyDirichletBC::validParams(), ArrayVacuumBC::validParams(), CreateProblemAction::validParams(), AddFieldSplitAction::validParams(), NumVars::validParams(), PerformanceData::validParams(), Residual::validParams(), ArrayTimeDerivative::validParams(), VectorTimeDerivative::validParams(), TimeDerivative::validParams(), ConstantVectorPostprocessor::validParams(), SidesetInfoVectorPostprocessor::validParams(), CartesianMeshGenerator::validParams(), InversePowerMethod::validParams(), NonlinearEigen::validParams(), ExtraNodesetGenerator::validParams(), PatchMeshGenerator::validParams(), PenaltyDirichletNodalKernel::validParams(), GapValueAux::validParams(), AdaptivityAction::validParams(), ElementQualityChecker::validParams(), PenetrationAux::validParams(), MooseObjectAction::validParams(), SetupDebugAction::validParams(), SetupMeshAction::validParams(), FEProblemSolve::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), DirichletBCBase::validParams(), ElementExtremeValue::validParams(), ElementVectorL2Error::validParams(), NodalExtremeValue::validParams(), GhostingAux::validParams(), DeprecatedBlockAction::validParams(), CoefTimeDerivative::validParams(), ScalePostprocessor::validParams(), TimeExtremeValue::validParams(), TotalVariableValue::validParams(), NullKernel::validParams(), SingleMatrixPreconditioner::validParams(), FunctionDT::validParams(), GeometrySphere::validParams(), ConditionalEnableControl::validParams(), AnnularMesh::validParams(), DistributedGeneratedMesh::validParams(), CSVReader::validParams(), GeneratedMesh::validParams(), RinglebMesh::validParams(), SpiralAnnularMesh::validParams(), ArrayDGDiffusion::validParams(), ConstantFunction::validParams(), ReactionNodalKernel::validParams(), CoupledVarNeumannBC::validParams(), ChangeOverTimePostprocessor::validParams(), ConstantAux::validParams(), ScalarVariable::validParams(), FiniteDifferencePreconditioner::validParams(), CoupledForce::validParams(), ReferenceResidualProblem::validParams(), MaterialStdVectorAux::validParams(), ImageMesh::validParams(), PostprocessorDT::validParams(), QuadraturePointMarker::validParams(), MultiAppPostprocessorTransfer::validParams(), GeometryBase::validParams(), InterfaceValueUserObject::validParams(), ConcentricCircleMesh::validParams(), SpatialAverageBase::validParams(), MeshGeneratorMesh::validParams(), AnnularMeshGenerator::validParams(), BreakBoundaryOnSubdomainGenerator::validParams(), BreakMeshByBlockGeneratorBase::validParams(), ConcentricCircleMeshGenerator::validParams(), ElementGenerator::validParams(), ElementSubdomainIDGenerator::validParams(), LowerDBlockFromSidesetGenerator::validParams(), MeshSideSetGenerator::validParams(), RenameBlockGenerator::validParams(), RenameBoundaryGenerator::validParams(), RinglebMeshGenerator::validParams(), SmoothMeshGenerator::validParams(), SpiralAnnularMeshGenerator::validParams(), SetupResidualDebugAction::validParams(), TiledMeshGenerator::validParams(), CoupledForceNodalKernel::validParams(), LowerBoundNodalKernel::validParams(), CreateDisplacedProblemAction::validParams(), SplineFunction::validParams(), UpperBoundNodalKernel::validParams(), SolutionTimeAdaptiveDT::validParams(), PerfGraphOutput::validParams(), PetscOutput::validParams(), Tecplot::validParams(), VTKOutput::validParams(), FunctionGradientNeumannBC::validParams(), FunctionSideIntegral::validParams(), MemoryUsage::validParams(), NumNonlinearIterations::validParams(), Receiver::validParams(), MaterialRealDenseMatrixAux::validParams(), ConservativeAdvection::validParams(), MaterialRealTensorValueAux::validParams(), VectorFunctionDirichletBC::validParams(), ParsedODEKernel::validParams(), MaterialRealVectorValueAux::validParams(), MultiAppConservativeTransfer::validParams(), MaterialStdVectorRealGradientAux::validParams(), ParsedMaterialBase::validParams(), MaterialDerivativeTestAction::validParams(), ParsedAux::validParams(), VolumeHistogram::validParams(), WorkBalance::validParams(), ScalarTagMatrixAux::validParams(), NodalConstraint::validParams(), ScalarTagVectorAux::validParams(), MaxIncrement::validParams(), TagMatrixAux::validParams(), GeneratedMeshGenerator::validParams(), TagVectorAux::validParams(), ParsedSubdomainMeshGenerator::validParams(), VariableGradientComponent::validParams(), VectorPostprocessorVisualizationAux::validParams(), PicardSolve::validParams(), BicubicSplineFunction::validParams(), VectorVariableComponentAux::validParams(), CompositeFunction::validParams(), PiecewiseConstant::validParams(), ADNeumannBC< compute_stage >::validParams(), FullSolveMultiApp::validParams(), Console::validParams(), ControlOutput::validParams(), GMVOutput::validParams(), MaterialStdVectorAuxBase< Real >::validParams(), FunctionValuePostprocessor::validParams(), DisplayGhostingAction::validParams(), CoupledTiedValueConstraint::validParams(), MultiAppPostprocessorInterpolationTransfer::validParams(), EqualValueEmbeddedConstraint::validParams(), FunctionMaterialBase::validParams(), LeastSquaresFit::validParams(), NormalizationAux::validParams(), GreaterThanLessThanPostprocessor::validParams(), TiedValueConstraint::validParams(), VectorMemoryUsage::validParams(), BoundingValueElementDamper::validParams(), BoundingValueNodalDamper::validParams(), CombinerGenerator::validParams(), FancyExtruderGenerator::validParams(), ImageMeshGenerator::validParams(), MeshExtruderGenerator::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), VariableTimeIntegrationAux::validParams(), StackGenerator::validParams(), StitchedMeshGenerator::validParams(), SetupQuadratureAction::validParams(), ADFunctionDirichletBC< compute_stage >::validParams(), ADVectorFunctionDirichletBC< compute_stage >::validParams(), DOFMapOutput::validParams(), PetscExternalPartitioner::validParams(), RandomPartitioner::validParams(), LeastSquaresFitHistory::validParams(), MatDiffusionBase< Real >::validParams(), LinearNodalConstraint::validParams(), EigenProblem::validParams(), NodalScalarKernel::validParams(), VectorBodyForce::validParams(), MultiAppInterpolationTransfer::validParams(), MultiAppMeshFunctionTransfer::validParams(), MultiAppUserObjectTransfer::validParams(), Material::validParams(), TimeStepper::validParams(), ElemElemConstraint::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), SolutionScalarAux::validParams(), OrientedSubdomainBoundingBoxGenerator::validParams(), PiecewiseBase::validParams(), MaterialAuxBase< Real >::validParams(), CSV::validParams(), FileOutput::validParams(), Gnuplot::validParams(), FindValueOnLine::validParams(), NeumannBC::validParams(), NumDOFs::validParams(), PostprocessorNeumannBC::validParams(), VectorNeumannBC::validParams(), PointSamplerBase::validParams(), ElementDeletionGeneratorBase::validParams(), SolutionAux::validParams(), ParsedGenerateSideset::validParams(), BoundsAux::validParams(), ElementIntegralArrayVariablePostprocessor::validParams(), InterfaceIntegralVariableValuePostprocessor::validParams(), CSVTimeSequenceStepper::validParams(), FieldSplitPreconditioner::validParams(), EigenKernel::validParams(), TimePeriod::validParams(), MultiAppProjectionTransfer::validParams(), DerivativeParsedMaterialHelper::validParams(), GenericFunctionMaterial::validParams(), ADPiecewiseLinearInterpolationMaterial< compute_stage >::validParams(), MultiAppNearestNodeTransfer::validParams(), SideSetsAroundSubdomainGenerator::validParams(), TransientMultiApp::validParams(), LinearCombinationPostprocessor::validParams(), NodalNormalsPreprocessor::validParams(), Split::validParams(), ExplicitTimeIntegrator::validParams(), BodyForce::validParams(), ElementVariablesDifferenceMax::validParams(), StitchedMesh::validParams(), AddPeriodicBCAction::validParams(), PiecewiseMulticonstant::validParams(), SolutionFunction::validParams(), FunctionParserUtils::validParams(), LibmeshPartitioner::validParams(), NodalPatchRecovery::validParams(), ADBodyForce< compute_stage >::validParams(), VacuumBC::validParams(), Exodus::validParams(), NodalVariableValue::validParams(), DGDiffusion::validParams(), Eigenvalue::validParams(), SideSetsGeneratorBase::validParams(), MooseParsedVectorFunction::validParams(), AdamsPredictor::validParams(), RelationshipManager::validParams(), SetupInterface::validParams(), ADDGDiffusion< compute_stage >::validParams(), EigenExecutionerBase::validParams(), GhostingUserObject::validParams(), PatternedMeshGenerator::validParams(), CommonOutputAction::validParams(), SubdomainBoundingBoxGenerator::validParams(), BoundingBoxIC::validParams(), AddNodalNormalsAction::validParams(), DT2::validParams(), Damper::validParams(), SinNeumannBC::validParams(), Axisymmetric2D3DSolutionFunction::validParams(), IterationAdaptiveDT::validParams(), VectorConstantIC::validParams(), VectorFunctionIC::validParams(), TableOutput::validParams(), ComparisonPostprocessor::validParams(), ADKernelSUPGTempl< T, compute_stage >::validParams(), PiecewiseMultiInterpolation::validParams(), IntegratedBCBase::validParams(), BoundingBoxNodeSetGenerator::validParams(), Predictor::validParams(), MooseParsedGradFunction::validParams(), NodalBCBase::validParams(), MoosePreconditioner::validParams(), TaggingInterface::validParams(), DGFunctionDiffusionDirichletBC::validParams(), ADDirichletBCBase< compute_stage >::validParams(), ElementIndicator::validParams(), PatternedMesh::validParams(), VectorPostprocessor::validParams(), AB2PredictorCorrector::validParams(), MultiAppTransfer::validParams(), GeneralUserObject::validParams(), TransientInterface::validParams(), SolutionUserObject::validParams(), PhysicsBasedPreconditioner::validParams(), Transient::validParams(), MooseVariableBase::validParams(), ADMatDiffusionBase< compute_stage, Real >::validParams(), Steady::validParams(), FileRangeBuilder::validParams(), PenaltyDirichletBC::validParams(), Indicator::validParams(), InternalSideIndicator::validParams(), RandomInterface::validParams(), NodeFaceConstraint::validParams(), LayeredBase::validParams(), RandomIC::validParams(), NodalUserObject::validParams(), ShapeUserObject< SideUserObject >::validParams(), Action::validParams(), RandomICBase::validParams(), OversampleOutput::validParams(), AuxScalarKernel::validParams(), Transfer::validParams(), ScalarKernel::validParams(), Output::validParams(), MooseParsedFunctionBase::validParams(), UserObject::validParams(), OutputInterface::validParams(), BoundaryRestrictable::validParams(), Checkpoint::validParams(), Sampler::validParams(), MortarConstraintBase::validParams(), Constraint::validParams(), Control::validParams(), InterfaceKernelBase::validParams(), MooseObject::validParams(), ScalarInitialCondition::validParams(), PiecewiseBilinear::validParams(), AStableDirk4::validParams(), DiracKernel::validParams(), MultiApp::validParams(), MeshBaseImageSampler::validParams(), InitialConditionBase::validParams(), ImageSampler::validParams(), MooseApp::validParams(), SubProblem::validParams(), DGKernelBase::validParams(), MaterialBase::validParams(), BoundaryCondition::validParams(), NodalKernel::validParams(), BlockRestrictable::validParams(), AuxKernelTempl< ComputeValueType >::validParams(), TopResidualDebugOutput::validParams(), MooseMesh::validParams(), FEProblemBase::validParams(), validParams< AddExtraNodeset >(), validParams< AddSideSetsBase >(), validParams< AddSideSetsFromBoundingBox >(), validParams< AssignElementSubdomainID >(), validParams< BoundingBoxNodeSet >(), validParams< BreakBoundaryOnSubdomain >(), validParams< BreakMeshByBlockBase >(), validParams< CoarsenedPiecewiseLinear >(), validParams< ElementDeleterBase >(), validParams< ElementIntegerAux >(), validParams< LowerDBlockFromSideset >(), validParams< MeshExtruder >(), validParams< MeshModifier >(), validParams< MeshSideSet >(), validParams< OrientedSubdomainBoundingBox >(), validParams< ParsedAddSideset >(), validParams< ParsedSubdomainMeshModifier >(), validParams< PNGOutput >(), validParams< RenameBlock >(), validParams< SideSetsAroundSubdomain >(), validParams< SmoothMesh >(), and validParams< SubdomainBoundingBox >().

◆ addParam() [6/6]

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

Definition at line 1217 of file InputParameters.h.

1218 {
1219  checkParamName(name);
1220  checkConsistentType<T>(name);
1221 
1222  InputParameters::insert<T>(name);
1223  _params[name]._doc_string = doc_string;
1224 }

◆ addParamNamesToGroup()

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

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

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

Definition at line 590 of file InputParameters.C.

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

Referenced by AdvancedOutput::addValidParams(), CopyNodalVarsAction::validParams(), DerivativeSumMaterial::validParams(), CartesianMeshGenerator::validParams(), SetupMeshAction::validParams(), DistributedGeneratedMesh::validParams(), GeneratedMesh::validParams(), MaterialStdVectorAux::validParams(), GeneratedMeshGenerator::validParams(), PicardSolve::validParams(), Console::validParams(), GMVOutput::validParams(), PetscOutput::validParams(), Tecplot::validParams(), VTKOutput::validParams(), FileOutput::validParams(), LeastSquaresFitHistory::validParams(), Material::validParams(), Postprocessor::validParams(), FunctionParserUtils::validParams(), Exodus::validParams(), NodalPatchRecovery::validParams(), EigenExecutionerBase::validParams(), IntegratedBCBase::validParams(), NodalBCBase::validParams(), TaggingInterface::validParams(), GeneralUserObject::validParams(), VectorPostprocessor::validParams(), Transient::validParams(), TransientInterface::validParams(), MooseVariableBase::validParams(), Indicator::validParams(), RandomInterface::validParams(), ShapeUserObject< SideUserObject >::validParams(), OversampleOutput::validParams(), AuxScalarKernel::validParams(), ScalarKernel::validParams(), Executioner::validParams(), Output::validParams(), Checkpoint::validParams(), UserObject::validParams(), OutputInterface::validParams(), Constraint::validParams(), InterfaceKernelBase::validParams(), MooseObject::validParams(), DiracKernel::validParams(), MultiApp::validParams(), ImageSampler::validParams(), MeshBaseImageSampler::validParams(), InitialConditionBase::validParams(), SubProblem::validParams(), DGKernelBase::validParams(), BoundaryCondition::validParams(), NodalKernel::validParams(), AuxKernelTempl< ComputeValueType >::validParams(), and MooseMesh::validParams().

◆ addPrivateParam() [1/6]

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

Definition at line 920 of file InputParameters.C.

921 {
922  mooseError("You must supply a MooseEnum object when using addPrivateParam, even if the parameter "
923  "is not required!");
924 }

◆ addPrivateParam() [2/6]

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

Definition at line 928 of file InputParameters.C.

929 {
930  mooseError("You must supply a MultiMooseEnum object when using addPrivateParam, even if the "
931  "parameter is not required!");
932 }

◆ addPrivateParam() [3/6]

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

◆ addPrivateParam() [4/6]

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

◆ addPrivateParam() [5/6]

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

Definition at line 1297 of file InputParameters.h.

1298 {
1299  checkParamName(name);
1300  checkConsistentType<T>(name);
1301 
1302  InputParameters::insert<T>(name);
1303  _params[name]._is_private = true;
1304 }

◆ addPrivateParam() [6/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 1308 of file InputParameters.h.

1309 {
1310  checkParamName(name);
1311  checkConsistentType<T>(name);
1312 
1313  InputParameters::set<T>(name) = value;
1314  _params[name]._is_private = true;
1315  _params[name]._set_by_add_param = true;
1316 }

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

◆ addRangeCheckedParam() [1/2]

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

Definition at line 1256 of file InputParameters.h.

1259 {
1260  addParam<T>(name, doc_string);
1261  _params[name]._range_function = parsed_function;
1262 }

◆ addRangeCheckedParam() [2/2]

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

◆ addRelationshipManager()

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

Tells MOOSE about a RelationshipManager that this object needs.

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

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

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

Definition at line 344 of file InputParameters.C.

348 {
349  _buildable_rm_types.emplace_back(name, rm_type, input_parameter_callback);
350 }

Referenced by GMVOutput::validParams(), Tecplot::validParams(), MultiAppProjectionTransfer::validParams(), InterfaceMaterial::validParams(), Exodus::validParams(), InterfaceUserObject::validParams(), InternalSideUserObject::validParams(), MortarConstraintBase::validParams(), InterfaceKernelBase::validParams(), and DGKernelBase::validParams().

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

1323 {
1324  addRequiredParam<T>(name, doc_string);
1325  MooseUtils::tokenize(syntax, _params[name]._cli_flag_names, 1, " \t\n\v\f\r");
1326 }

◆ 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.

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

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

◆ 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 }

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

1269 {
1270  addRequiredParam<T>(name, doc_string);
1271  _params[name]._custom_type = custom_type;
1272 }

Referenced by ParsedAux::validParams(), MooseParsedFunction::validParams(), and Terminator::validParams().

◆ addRequiredParam() [1/6]

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

Definition at line 857 of file InputParameters.C.

860 {
861  InputParameters::set<MooseEnum>(name) = moose_enum; // valid parameter is set by set_attributes
862  _params[name]._required = true;
863  _params[name]._doc_string = doc_string;
864 }

◆ addRequiredParam() [2/6]

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

◆ addRequiredParam() [3/6]

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

Definition at line 868 of file InputParameters.C.

871 {
872  InputParameters::set<MultiMooseEnum>(name) =
873  moose_enum; // valid parameter is set by set_attributes
874  _params[name]._required = true;
875  _params[name]._doc_string = doc_string;
876 }

◆ addRequiredParam() [4/6]

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

◆ addRequiredParam() [5/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 1176 of file InputParameters.h.

1177 {
1178  checkParamName(name);
1179  checkConsistentType<T>(name);
1180 
1181  InputParameters::insert<T>(name);
1182  _params[name]._required = true;
1183  _params[name]._doc_string = doc_string;
1184 }

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

◆ addRequiredParam() [6/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 1188 of file InputParameters.h.

1191 {
1192  mooseError("You cannot call addRequiredParam and supply a default value for this type, please "
1193  "use addParam instead");
1194 }

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

1238 {
1239  addRequiredParam<T>(name, doc_string);
1240  _params[name]._range_function = parsed_function;
1241 }

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

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

896 { _allow_copy = status; }

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

765 {
766  // Disable the display of deprecated message when applying common parameters, this avoids a dump
767  // of messages
768  _show_deprecated_message = false;
769 
770  // If the local parameters has a coupled variable, populate it with the value from the common
771  // parameters, if the common parameters has the coupled variable too
772  if (hasCoupledValue(var_name))
773  {
774  if (common.hasDefaultCoupledValue(var_name))
775  {
776  // prepare a vector of default coupled values
777  std::vector<Real> defaults(common.numberDefaultCoupledValues(var_name));
778  for (unsigned int j = 0; j < common.numberDefaultCoupledValues(var_name); ++j)
779  defaults[j] = common.defaultCoupledValue(var_name, j);
780  addCoupledVar(var_name, defaults, common.getDocString(var_name));
781  }
782  else if (common.hasCoupledValue(var_name))
783  addCoupledVar(var_name, common.getDocString(var_name));
784  }
785 
786  // Enable deprecated message printing
788 }

Referenced by applyParameters(), and applySpecificParameters().

◆ applyParameter()

void InputParameters::applyParameter ( const InputParameters common,
const std::string &  common_name,
bool  allow_private = false 
)

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

794 {
795  // Disable the display of deprecated message when applying common parameters, this avoids a dump
796  // of messages
797  _show_deprecated_message = false;
798 
799  // Extract the properties from the local parameter for the current common parameter name
800  const bool local_exist = _values.find(common_name) != _values.end();
801  const bool local_set = _params.count(common_name) > 0 && !_params[common_name]._set_by_add_param;
802  const bool local_priv = allow_private ? false : isPrivate(common_name);
803  const bool local_valid = isParamValid(common_name);
804 
805  // Extract the properties from the common parameter
806  const bool common_exist = common._values.find(common_name) != common._values.end();
807  const bool common_priv = allow_private ? false : common.isPrivate(common_name);
808  const bool common_valid = common.isParamValid(common_name);
809 
810  /* In order to apply common parameter 4 statements must be satisfied
811  * (1) A local parameter must exist with the same name as common parameter
812  * (2) Common parameter must valid and exist
813  * (3) Local parameter must be invalid OR not have been set from its default
814  * (4) Both cannot be private
815  */
816  if (local_exist && common_exist && common_valid && (!local_valid || !local_set) &&
817  (!common_priv || !local_priv))
818  {
819  delete _values[common_name];
820  _values[common_name] = common._values.find(common_name)->second->clone();
821  set_attributes(common_name, false);
822  }
823 
824  // Enable deprecated message printing
826 }

Referenced by applyParameters(), and applySpecificParameters().

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

698 {
699  // Loop through the common parameters
700  for (const auto & it : common)
701  {
702  // Common parameter name
703  const std::string & common_name = it.first;
704 
705  // Continue to next parameter, if the current is in list of excluded parameters
706  if (std::find(exclude.begin(), exclude.end(), common_name) != exclude.end())
707  continue;
708 
709  applyParameter(common, common_name);
710  }
711 
712  // Loop through the coupled variables
713  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
714  it != common.coupledVarsEnd();
715  ++it)
716  {
717  // Variable name
718  const std::string var_name = *it;
719 
720  // Continue to next variable, if the current is in list of excluded parameters
721  if (std::find(exclude.begin(), exclude.end(), var_name) != exclude.end())
722  continue;
723 
724  applyCoupledVar(common, var_name);
725  }
726 }

Referenced by FEProblemBase::addOutput().

◆ applySpecificParameters()

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

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

732 {
733  // Loop through the common parameters
734  for (const auto & it : common)
735  {
736 
737  // Common parameter name
738  const std::string & common_name = it.first;
739 
740  // Continue to next parameter, if the current is not in list of included parameters
741  if (std::find(include.begin(), include.end(), common_name) == include.end())
742  continue;
743 
744  applyParameter(common, common_name, allow_private);
745  }
746 
747  // Loop through the coupled variables
748  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
749  it != common.coupledVarsEnd();
750  ++it)
751  {
752  // Variable name
753  const std::string var_name = *it;
754 
755  // Continue to next variable, if the current is not in list of included parameters
756  if (std::find(include.begin(), include.end(), var_name) == include.end())
757  continue;
758 
759  applyCoupledVar(common, var_name);
760  }
761 }

Referenced by AddVariableAction::init().

◆ 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.

283 {
284  for (const auto & it : *this)
285  if (isParamRequired(it.first) && !isParamValid(it.first))
286  return false;
287  return true;
288 }

Referenced by ActionWarehouse::buildBuildableActions().

◆ at() [1/2]

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

Definition at line 874 of file InputParameters.h.

875  {
876  if (_params.count(param) == 0)
877  mooseError("param '", param, "' not present in InputParams");
878  return _params[param];
879  }

Referenced by inputLocation(), and paramFullpath().

◆ at() [2/2]

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

Definition at line 880 of file InputParameters.h.

881  {
882  if (_params.count(param) == 0)
883  mooseError("param '", param, "' not present in InputParams");
884  return _params.at(param);
885  }

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

764 { return _block_fullpath; }

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

◆ blockFullpath() [2/2]

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

Definition at line 765 of file InputParameters.h.

765 { return _block_fullpath; }

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

757 { return _block_location; };

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

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

1352 {
1353  // Do we have a paremeter with the same name but a different type?
1354  InputParameters::const_iterator it = _values.find(name);
1355  if (it != _values.end() && dynamic_cast<const Parameter<T> *>(it->second) == NULL)
1356  mooseError("Attempting to set parameter \"",
1357  name,
1358  "\" with type (",
1359  demangle(typeid(T).name()),
1360  ")\nbut the parameter already exists as type (",
1361  it->second->type(),
1362  ")");
1363 }

◆ checkParamName()

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

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

Definition at line 1094 of file InputParameters.C.

1095 {
1096  const static pcrecpp::RE valid("[\\w:/]+");
1097  if (!valid.FullMatch(name))
1098  mooseError("Invalid parameter name: '", name, "'");
1099 }

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

◆ checkParams()

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

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

Definition at line 409 of file InputParameters.C.

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

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

◆ 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 }

◆ clearRelationshipManagers()

void InputParameters::clearRelationshipManagers ( )
inline

Clears all currently registered RelationshipManagers.

Definition at line 491 of file InputParameters.h.

491 { _buildable_rm_types.clear(); }

◆ collapseSyntaxNesting() [1/2]

bool InputParameters::collapseSyntaxNesting ( ) const

Definition at line 373 of file InputParameters.C.

374 {
375  return _collapse_nesting;
376 }

◆ collapseSyntaxNesting() [2/2]

void InputParameters::collapseSyntaxNesting ( bool  collapse)

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

Definition at line 367 of file InputParameters.C.

368 {
369  _collapse_nesting = collapse;
370 }

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

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

547  {
548  return _coupled_vars.begin();
549  }

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

◆ coupledVarsEnd()

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

◆ declareControllable()

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

Declare the given parameters as controllable.

Definition at line 297 of file InputParameters.C.

299 {
300  std::vector<std::string> names;
301  MooseUtils::tokenize<std::string>(input_names, names, 1, " ");
302  for (auto & name : names)
303  {
304  auto map_iter = _params.find(name);
305  if (map_iter != _params.end()) // error is handled by checkParams method
306  {
307  map_iter->second._controllable = true;
308  map_iter->second._controllable_flags = execute_flags;
309  }
310  else
311  mooseError("The input parameter '",
312  name,
313  "' does not exist, thus cannot be marked as controllable.");
314  }
315 }

Referenced by GenericConstant2DArray::validParams(), GenericConstantArray::validParams(), PenaltyDirichletNodalKernel::validParams(), ConstantFunction::validParams(), ConstantScalarAux::validParams(), ConstantAux::validParams(), ConstantPointSource::validParams(), DirichletBC::validParams(), ADNeumannBC< compute_stage >::validParams(), VectorDirichletBC::validParams(), ArrayDirichletBC::validParams(), FunctionValuePostprocessor::validParams(), VectorBodyForce::validParams(), ConstantRate::validParams(), NeumannBC::validParams(), GenericConstantMaterial::validParams(), ADDirichletBC< compute_stage >::validParams(), BodyForce::validParams(), ADBodyForce< compute_stage >::validParams(), Damper::validParams(), IterationAdaptiveDT::validParams(), PenaltyDirichletBC::validParams(), AuxScalarKernel::validParams(), ScalarKernel::validParams(), Output::validParams(), UserObject::validParams(), Constraint::validParams(), InterfaceKernelBase::validParams(), MultiApp::validParams(), DiracKernel::validParams(), DGKernelBase::validParams(), BoundaryCondition::validParams(), NodalKernel::validParams(), and AuxKernelTempl< ComputeValueType >::validParams().

◆ defaultCoupledValue() [1/2]

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

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

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

Definition at line 471 of file InputParameters.C.

472 {
473  _params[coupling_name]._coupled_default.resize(i + 1);
474  _params[coupling_name]._coupled_default[i] = value;
475  _params[coupling_name]._have_coupled_default = true;
476 }

◆ defaultCoupledValue() [2/2]

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

Get the default value for an optionally coupled variable.

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

Definition at line 479 of file InputParameters.C.

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

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

◆ getAutoBuildVectors()

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

Returns the auto build vectors for all parameters.

Definition at line 507 of file InputParameters.C.

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

◆ getBuildableRelationshipManagerTypes()

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

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

Definition at line 361 of file InputParameters.C.

362 {
363  return _buildable_rm_types;
364 }

Referenced by Action::addRelationshipManagers().

◆ getBuildableTypes()

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

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

Definition at line 353 of file InputParameters.C.

354 {
355  return _buildable_types;
356 }

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

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

1164 {
1165  T param = this->get<T>(name);
1166 
1167  // Note: You will receive a compile error on this line if you attempt to pass a non-pointer
1168  // template type to this method
1169  if (param == NULL)
1170  mooseError("Parameter ", name, " is NULL.\n", error_string);
1171  return this->get<T>(name);
1172 }

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

◆ getClassDescription()

std::string InputParameters::getClassDescription ( ) const

Returns the class description.

Definition at line 102 of file InputParameters.C.

103 {
104  return _class_description;
105 }

Referenced by JsonSyntaxTree::addParameters().

◆ getControllableExecuteOnTypes()

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

Return the allowed execute flags for a controllable parameter.

Definition at line 324 of file InputParameters.C.

325 {
326  return _params[name]._controllable_flags;
327 }

◆ getControllableParameters()

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

Return list of controllable parameters.

Definition at line 732 of file InputParameters.h.

733  {
734  std::set<std::string> controllable;
735  for (auto it = _params.begin(); it != _params.end(); ++it)
736  if (it->second._controllable)
737  controllable.insert(it->first);
738  return controllable;
739  }

Referenced by checkParams().

◆ getCoupledVariableParamNames()

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

Return the coupled variable parameter names.

Definition at line 558 of file InputParameters.h.

558 { return _coupled_vars; }

◆ getDefaultPostprocessorValue()

const PostprocessorValue & InputParameters::getDefaultPostprocessorValue ( const std::string &  name,
bool  suppress_error = false,
unsigned int  index = 0 
) 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
indexThe index in the default postprocessor vector
Returns
The default value for the postprocessor

Definition at line 629 of file InputParameters.C.

632 {
633  // Check that a default exists, error if it does not
634  auto it = _params.find(name);
635  if (!suppress_error &&
636  (it == _params.end() || !it->second._have_default_postprocessor_val[index]))
637  mooseError("A default PostprcessorValue does not exist for the given name: ", name);
638 
639  if (index >= it->second._default_postprocessor_val.size())
640  mooseError("Default postprocessor with parameter name ",
641  name,
642  " requested with index ",
643  index,
644  " but only ",
645  it->second._default_postprocessor_val.size(),
646  " exists.");
647 
648  return it->second._default_postprocessor_val[index];
649 }

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

◆ getDescription()

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

Get the documentation string for a parameter.

Definition at line 848 of file InputParameters.C.

849 {
850  if (_params.count(name) == 0)
851  mooseError("No parameter exists with the name ", name);
852  return _params[name]._doc_string;
853 }

◆ 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.

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 }

Referenced by applyCoupledVar(), and checkParams().

◆ getGroupName()

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

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

Otherwise an empty string is returned.

Definition at line 620 of file InputParameters.C.

621 {
622  auto it = _params.find(param_name);
623  if (it != _params.end())
624  return it->second._group;
625  return std::string();
626 }

◆ getMooseType()

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

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

Scalar and Vector versions are supplied

Definition at line 529 of file InputParameters.C.

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

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

◆ getParamHelper() [1/6]

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

Definition at line 1062 of file InputParameters.C.

1065 {
1066  return pars.get<MooseEnum>(name);
1067 }

◆ getParamHelper() [2/6]

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

◆ getParamHelper() [3/6]

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

Definition at line 1071 of file InputParameters.C.

1074 {
1075  return pars.get<MultiMooseEnum>(name);
1076 }

◆ getParamHelper() [4/6]

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

◆ getParamHelper() [5/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 1540 of file InputParameters.h.

1543 {
1544  return pars.get<std::vector<T>>(name);
1545 }

◆ getParamHelper() [6/6]

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

Definition at line 1517 of file InputParameters.h.

1518 {
1519  if (!pars.isParamValid(name))
1520  mooseError("The parameter \"", name, "\" is being retrieved before being set.\n");
1521 
1522  return pars.get<T>(name);
1523 }

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

◆ getSyntax()

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

Get the syntax for a command-line parameter.

Definition at line 614 of file InputParameters.C.

615 {
616  return _params[name]._cli_flag_names;
617 }

◆ getVecMooseType()

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

Definition at line 556 of file InputParameters.C.

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

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

◆ hasCoupledValue()

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

Return whether or not the coupled variable exists.

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

Definition at line 458 of file InputParameters.C.

459 {
460  return _coupled_vars.find(coupling_name) != _coupled_vars.end();
461 }

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

◆ hasDefaultCoupledValue()

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

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

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

Definition at line 464 of file InputParameters.C.

465 {
466  return _params.count(coupling_name) > 0 && _params.at(coupling_name)._have_coupled_default &&
467  _coupled_vars.count(coupling_name) > 0;
468 }

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

◆ hasDefaultPostprocessorValue()

bool InputParameters::hasDefaultPostprocessorValue ( const std::string &  name,
unsigned int  index = 0 
) const

Returns true if a default PostprocessorValue is defined.

Parameters
nameThe name of the postprocessor
indexThe index in the default postprocessor vector
Returns
True if a default value exists

Definition at line 683 of file InputParameters.C.

684 {
685  if (_params.at(name)._have_default_postprocessor_val.size() <= index)
686  mooseError("Attempting to access _have_default_postprocessor_val with index ",
687  index,
688  " but size is ",
689  _params.at(name)._have_default_postprocessor_val.size(),
690  ". This can be caused by trying to assign default postprocessor values "
691  "programmatically (by using set method).");
692  return _params.count(name) > 0 && _params.at(name)._have_default_postprocessor_val[index];
693 }

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

◆ ignoreParameter()

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

Informs this object that values for this parameter set from the input file or from the command line should be ignored.

Definition at line 1378 of file InputParameters.h.

1379 {
1380  suppressParameter<T>(name);
1381  _params[name]._ignore = true;
1382 }

Referenced by AddElementalFieldAction::validParams().

◆ inputLocation() [1/2]

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

Definition at line 777 of file InputParameters.h.

777 { return at(param)._input_location; };

◆ inputLocation() [2/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 773 of file InputParameters.h.

774  {
775  return at(param)._input_location;
776  };

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

◆ isControllable()

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

Returns a Boolean indicating whether the specified parameter is controllable.

Definition at line 318 of file InputParameters.C.

319 {
320  return _params.count(name) > 0 && _params[name]._controllable;
321 }

◆ 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 }

◆ 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.

252 {
253  return _params.count(name) > 0 && _params.at(name)._required;
254 }

Referenced by areAllRequiredParamsValid(), and checkParams().

◆ 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.

271 {
272  return _params.count(name) > 0 && _params.at(name)._set_by_add_param;
273 }

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

◆ isParamSetByUser()

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

◆ 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.

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 }

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

◆ 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.

292 {
293  return _params.count(name) > 0 && _params.at(name)._is_private;
294 }

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

◆ isSinglePostprocessor()

bool InputParameters::isSinglePostprocessor ( const std::string &  pp_name) const
inline

Getter for the _vector_of_postprocessors flag in parameters.

Parameters
pp_nameThe name of the postprocessor parameter

Definition at line 816 of file InputParameters.h.

817  {
818  return !_params.find(pp_name)->second._vector_of_postprocessors;
819  }

Referenced by GeneralUserObject::getPostprocessorValue(), and PostprocessorInterface::singlePostprocessor().

◆ makeParamNotRequired()

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

Changes the parameter to not be required.

Parameters
nameThe parameter name

Definition at line 1396 of file InputParameters.h.

1397 {
1398  if (!this->have_parameter<T>(name))
1399  mooseError("Unable to un-require nonexistent parameter: ", name);
1400 
1401  _params[name]._required = false;
1402 }

◆ makeParamRequired()

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

Changes the parameter to be required.

Parameters
nameThe parameter name

Definition at line 1386 of file InputParameters.h.

1387 {
1388  if (!this->have_parameter<T>(name))
1389  mooseError("Unable to require nonexistent parameter: ", name);
1390 
1391  _params[name]._required = true;
1392 }

◆ 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]

bool InputParameters::mooseObjectSyntaxVisibility ( ) const

Definition at line 385 of file InputParameters.C.

386 {
388 }

◆ mooseObjectSyntaxVisibility() [2/2]

void InputParameters::mooseObjectSyntaxVisibility ( bool  visibility)

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

Definition at line 379 of file InputParameters.C.

380 {
381  _moose_object_syntax_visibility = visibility;
382 }

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

◆ numberDefaultCoupledValues()

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

Get the number of defaulted coupled value entries.

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

Definition at line 496 of file InputParameters.C.

497 {
498  auto value_it = _params.find(coupling_name);
499  if (value_it == _params.end())
500  mooseError("Attempted to retrieve default value for coupled variable '",
501  coupling_name,
502  "' when none was provided.");
503  return value_it->second._coupled_default.size();
504 }

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

◆ 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 }

◆ 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 }

◆ paramFullpath() [1/2]

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

Definition at line 789 of file InputParameters.h.

789 { return at(param)._param_fullpath; };

◆ paramFullpath() [2/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 785 of file InputParameters.h.

786  {
787  return at(param)._param_fullpath;
788  };

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

◆ paramSetByUser()

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

Deprecated method.

Use isParamSetByUser() instead.

Definition at line 830 of file InputParameters.C.

831 {
832  mooseDeprecated("paramSetByUser() is deprecated. Use isParamSetByUser() instead.");
833  return isParamSetByUser(name);
834 }

◆ rangeCheck() [1/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 1007 of file InputParameters.h.

1011 {
1012  mooseAssert(param, "Parameter is NULL");
1013 
1014  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1015  return;
1016 
1029  std::vector<std::string> vars;
1030  if (fp.ParseAndDeduceVariables(_params[short_name]._range_function, vars) != -1) // -1 for success
1031  {
1032  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1033  return;
1034  }
1035 
1036  // Fparser parameter buffer
1037  std::vector<UP_T> parbuf(vars.size());
1038 
1039  // parameter vector
1040  const std::vector<T> & value = param->set();
1041 
1042  // iterate over all vector values (maybe ;)
1043  bool need_to_iterate = false;
1044  unsigned int i = 0;
1045  do
1046  {
1047  // set parameters
1048  for (unsigned int j = 0; j < vars.size(); j++)
1049  {
1050  if (vars[j] == short_name)
1051  {
1052  if (value.size() == 0)
1053  {
1054  oss << "Range checking empty vector: " << _params[short_name]._range_function << '\n';
1055  return;
1056  }
1057 
1058  parbuf[j] = value[i];
1059  need_to_iterate = true;
1060  }
1061  else if (vars[j] == short_name + "_size")
1062  parbuf[j] = value.size();
1063  else
1064  {
1065  if (vars[j].substr(0, short_name.size() + 1) != short_name + "_")
1066  {
1067  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1068  return;
1069  }
1070  std::istringstream iss(vars[j]);
1071  iss.seekg(short_name.size() + 1);
1072 
1073  size_t index;
1074  if (iss >> index && iss.eof())
1075  {
1076  if (index >= value.size())
1077  {
1078  oss << "Error parsing expression: " << _params[short_name]._range_function
1079  << "\nOut of range variable " << vars[j] << '\n';
1080  return;
1081  }
1082  parbuf[j] = value[index];
1083  }
1084  else
1085  {
1086  oss << "Error parsing expression: " << _params[short_name]._range_function
1087  << "\nInvalid variable " << vars[j] << '\n';
1088  return;
1089  }
1090  }
1091  }
1092 
1093  // ensure range-checked input file parameter comparison functions
1094  // do absolute floating point comparisons instead of using a default epsilon.
1095  auto tmp_eps = fp.epsilon();
1096  fp.setEpsilon(0);
1097  UP_T result = fp.Eval(&parbuf[0]);
1098  fp.setEpsilon(tmp_eps);
1099 
1100  // test function using the parameters determined above
1101  if (fp.EvalError())
1102  {
1103  oss << "Error evaluating expression: " << _params[short_name]._range_function << '\n';
1104  return;
1105  }
1106 
1107  if (!result)
1108  {
1109  oss << "Range check failed for parameter " << full_name
1110  << "\n\tExpression: " << _params[short_name]._range_function << "\n";
1111  if (need_to_iterate)
1112  oss << "\t Component: " << i << '\n';
1113  }
1114 
1115  } while (need_to_iterate && ++i < value.size());
1116 }

◆ rangeCheck() [2/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 1120 of file InputParameters.h.

1124 {
1125  mooseAssert(param, "Parameter is NULL");
1126 
1127  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1128  return;
1129 
1130  // Parse the expression
1132  if (fp.Parse(_params[short_name]._range_function, short_name) != -1) // -1 for success
1133  {
1134  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1135  return;
1136  }
1137 
1138  // ensure range-checked input file parameter comparison functions
1139  // do absolute floating point comparisons instead of using a default epsilon.
1140  auto tmp_eps = fp.epsilon();
1141  fp.setEpsilon(0);
1142  // We require a non-const value for the implicit upscaling of the parameter type
1143  std::vector<UP_T> value(1, param->set());
1144  UP_T result = fp.Eval(&value[0]);
1145  fp.setEpsilon(tmp_eps);
1146 
1147  if (fp.EvalError())
1148  {
1149  oss << "Error evaluating expression: " << _params[short_name]._range_function
1150  << "\nPerhaps you used the wrong variable name?\n";
1151  return;
1152  }
1153 
1154  if (!result)
1155  oss << "Range check failed for parameter " << full_name
1156  << "\n\tExpression: " << _params[short_name]._range_function << "\n\tValue: " << value[0]
1157  << '\n';
1158 }

Referenced by Parser::setScalarValueTypeParameter().

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

796 { return _params[param]._raw_val; };

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

◆ registerBase()

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

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

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

Definition at line 330 of file InputParameters.C.

331 {
332  InputParameters::set<std::string>("_moose_base") = value;
333  _params["_moose_base"]._is_private = true;
334 }

Referenced by Kernel::validParams(), VectorKernel::validParams(), LineSearch::validParams(), ArrayKernel::validParams(), Distribution::validParams(), Problem::validParams(), TimeStepper::validParams(), MoosePartitioner::validParams(), NearestPointIntegralVariablePostprocessor::validParams(), EigenKernel::validParams(), Split::validParams(), Postprocessor::validParams(), RelationshipManager::validParams(), Damper::validParams(), Predictor::validParams(), MoosePreconditioner::validParams(), VectorPostprocessor::validParams(), MooseVariableBase::validParams(), MeshGenerator::validParams(), Indicator::validParams(), InterfaceKernelTempl< T >::validParams(), TimeIntegrator::validParams(), AuxScalarKernel::validParams(), ScalarKernel::validParams(), Output::validParams(), Executioner::validParams(), UserObject::validParams(), Constraint::validParams(), Sampler::validParams(), Control::validParams(), Marker::validParams(), ScalarInitialCondition::validParams(), Function::validParams(), DiracKernel::validParams(), MultiApp::validParams(), InitialConditionBase::validParams(), DGKernelBase::validParams(), BoundaryCondition::validParams(), NodalKernel::validParams(), AuxKernelTempl< ComputeValueType >::validParams(), MooseMesh::validParams(), and validParams< MeshModifier >().

◆ registerBuildableTypes()

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

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

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

Definition at line 337 of file InputParameters.C.

338 {
339  _buildable_types.clear();
340  MooseUtils::tokenize(names, _buildable_types, 1, " \t\n\v\f\r"); // tokenize on whitespace
341 }

◆ reserveDefaultPostprocessorValueStorage()

void InputParameters::reserveDefaultPostprocessorValueStorage ( const std::string &  name,
unsigned int  size 
)
private

Reserve space for default postprocessor values.

Parameters
nameThe name of the postprocessor
sizeNumber of entries required in default p

Definition at line 652 of file InputParameters.C.

654 {
655  if (_params[name]._default_postprocessor_val.size() >= size)
656  return;
657  _params[name]._default_postprocessor_val.resize(size, 0);
658  _params[name]._have_default_postprocessor_val.resize(size, false);
659 }

Referenced by Parser::setVectorParameter().

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

1086 {
1087  auto it = _params.find(name);
1088  if (it == _params.end())
1089  return std::set<std::string>();
1090  return it->second._reserved_values;
1091 }

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

988 {
989  checkParamName(name);
990  checkConsistentType<T>(name);
991 
992  if (!this->have_parameter<T>(name))
993  _values[name] = new Parameter<T>;
994 
995  set_attributes(name, false);
996 
997  if (quiet_mode)
998  _params[name]._set_by_add_param = true;
999 
1000  setHelper<T>(name);
1001 
1002  return cast_ptr<Parameter<T> *>(_values[name])->set();
1003 }

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), AddICAction::act(), CreateExecutionerAction::act(), PartitionerAction::act(), SetAdaptivityOptionsAction::act(), CreateProblemAction::act(), AddMeshModifierAction::act(), AdaptivityAction::act(), SetupDebugAction::act(), SetupTimeStepperAction::act(), SetupPredictorAction::act(), SetupResidualDebugAction::act(), CreateDisplacedProblemAction::act(), MaterialDerivativeTestAction::act(), DisplayGhostingAction::act(), AddPeriodicBCAction::act(), MaterialOutputAction::act(), CommonOutputAction::act(), AddNodalNormalsAction::act(), FEProblemBase::addArrayVariable(), Executioner::addAttributeReporter(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), FEProblemBase::addFunction(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), MooseEigenSystem::addKernel(), AuxiliarySystem::addKernel(), FEProblemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addOutput(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FEProblemBase::addScalarKernel(), FEProblemBase::addScalarVariable(), AuxiliarySystem::addTimeIntegrator(), NonlinearSystemBase::addTimeIntegrator(), FEProblemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), SystemBase::addVariable(), FEProblemBase::addVariable(), 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(), AddElementalFieldAction::init(), Transient::init(), MaterialOutputAction::materialOutputHelper(), SetupMeshAction::modifyParamsForUseSplit(), NearestPointBase< LayeredSideAverage, SideIntegralVariableUserObject >::NearestPointBase(), MultiAppProjectionTransfer::projectSolution(), GlobalParamsAction::setDoubleIndexParam(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), GlobalParamsAction::setScalarParam(), CreateExecutionerAction::setupAutoPreconditioning(), MooseApp::setupOptions(), GlobalParamsAction::setVectorParam(), ADTimeKernelGradTempl< T, compute_stage >::validParams(), ADTimeKernelValueTempl< T, compute_stage >::validParams(), ExternalProblem::validParams(), ADTimeKernelTempl< T, compute_stage >::validParams(), NonlinearEigen::validParams(), InversePowerMethod::validParams(), ElementQualityChecker::validParams(), PenetrationAux::validParams(), DiscreteElementUserObject::validParams(), GapValueAux::validParams(), GhostingAux::validParams(), CSVReader::validParams(), DistributedGeneratedMesh::validParams(), NodalNormalsEvaluator::validParams(), EigenDirichletBC::validParams(), MeshGeneratorMesh::validParams(), NodalSum::validParams(), NodalNormalBC::validParams(), TagVectorAux::validParams(), VectorTimeKernel::validParams(), Console::validParams(), ControlOutput::validParams(), ConvectiveFluxBC::validParams(), PerfGraphOutput::validParams(), VTKOutput::validParams(), ArrayTimeKernel::validParams(), ODETimeKernel::validParams(), NearestNodeDistanceAux::validParams(), TagMatrixAux::validParams(), TimeKernel::validParams(), ADPresetBC< compute_stage >::validParams(), InterfaceTimeKernel::validParams(), EqualValueEmbeddedConstraint::validParams(), TiedValueConstraint::validParams(), PresetBC::validParams(), NearestNodeValueAux::validParams(), DOFMapOutput::validParams(), NodalL2Norm::validParams(), PresetNodalBC::validParams(), CoupledTiedValueConstraint::validParams(), LeastSquaresFitHistory::validParams(), FunctionPresetBC::validParams(), TwoMaterialPropertyInterface::validParams(), VectorOfPostprocessors::validParams(), TimeNodalKernel::validParams(), ScalarConstantIC::validParams(), VariableResidualNormsDebugOutput::validParams(), InterfaceMaterial::validParams(), BlockWeightedPartitioner::validParams(), ADFunctionPresetBC< compute_stage >::validParams(), ElementVariablesDifferenceMax::validParams(), Postprocessor::validParams(), Exodus::validParams(), GhostingUserObject::validParams(), SinDirichletBC::validParams(), ADPresetNodalBC< compute_stage >::validParams(), IntegratedBCBase::validParams(), GridPartitioner::validParams(), NodalBCBase::validParams(), MultiAppTransfer::validParams(), SamplerBase::validParams(), Output::validParams(), UserObject::validParams(), MortarConstraintBase::validParams(), Sampler::validParams(), InterfaceKernelBase::validParams(), Marker::validParams(), Control::validParams(), MultiApp::validParams(), AuxKernelTempl< ComputeValueType >::validParams(), TopResidualDebugOutput::validParams(), Parser::walkRaw(), and RelationshipManager::zeroLayerGhosting().

◆ 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.

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 }

Referenced by applyParameter(), and set().

◆ setDefaultPostprocessorValue()

void InputParameters::setDefaultPostprocessorValue ( const std::string &  name,
const PostprocessorValue value,
unsigned int  index = 0 
)

Set the default value for a postprocessor added with addPostprocessor.

Parameters
nameThe name of the postprocessor @value value The value of the postprocessor default to set
indexThe index in the default postprocessor vector

Definition at line 662 of file InputParameters.C.

665 {
666  if (_params.at(name)._default_postprocessor_val.size() <= index)
667  mooseError("Attempting to access _default_postprocessor_val with index ",
668  index,
669  " but size is ",
670  _params.at(name)._default_postprocessor_val.size());
671  if (_params.at(name)._have_default_postprocessor_val.size() <= index)
672  mooseError("Attempting to access _have_default_postprocessor_val with index ",
673  index,
674  " but size is ",
675  _params.at(name)._have_default_postprocessor_val.size(),
676  ". This can be caused by trying to assign default postprocessor values "
677  "programmatically (by using set method).");
678  _params.at(name)._default_postprocessor_val[index] = value;
679  _params.at(name)._have_default_postprocessor_val[index] = true;
680 }

Referenced by Parser::setScalarParameter(), and Parser::setVectorParameter().

◆ 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.

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 }

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

◆ setHelper()

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

This functions is called in set as a 'callback' to avoid code duplication.

Definition at line 980 of file InputParameters.h.

981 {
982 }

◆ setParamHelper() [1/13]

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

Definition at line 1019 of file InputParameters.C.

1022 {
1023  // Assign the default value so that it appears in the dump
1024  std::ostringstream oss;
1025  oss << r_value;
1026  l_value = oss.str();
1027 }

◆ setParamHelper() [2/13]

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

◆ setParamHelper() [3/13]

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

Definition at line 1007 of file InputParameters.C.

1010 {
1011  // Assign the default value so that it appears in the dump
1012  std::ostringstream oss;
1013  oss << r_value;
1014  l_value = oss.str();
1015 }

◆ setParamHelper() [4/13]

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

◆ setParamHelper() [5/13]

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

Definition at line 1043 of file InputParameters.C.

1046 {
1047  // Assign the default value so that it appears in the dump
1048  std::ostringstream oss;
1049  oss << r_value;
1050  l_value = oss.str();
1051 }

◆ setParamHelper() [6/13]

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

◆ setParamHelper() [7/13]

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

Definition at line 1031 of file InputParameters.C.

1034 {
1035  // Assign the default value so that it appears in the dump
1036  std::ostringstream oss;
1037  oss << r_value;
1038  l_value = oss.str();
1039 }

◆ setParamHelper() [8/13]

template<>
void InputParameters::setParamHelper ( const std::string &  ,
MaterialPropertyName &  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

Definition at line 987 of file InputParameters.C.

990 {
991  mooseAssert(_params[name]._default_postprocessor_val.size() == 1 &&
992  _params[name]._have_default_postprocessor_val.size() == 1,
993  "Default postprocessor size is not equal to 1.");
994 
995  // Store the default value
996  _params[name]._default_postprocessor_val[0] = r_value;
997  _params[name]._have_default_postprocessor_val[0] = true;
998 
999  // Assign the default value so that it appears in the dump
1000  std::ostringstream oss;
1001  oss << r_value;
1002  l_value = oss.str();
1003 }

◆ setParamHelper() [10/13]

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

◆ setParamHelper() [11/13]

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

Definition at line 967 of file InputParameters.C.

970 {
971  mooseAssert(_params[name]._default_postprocessor_val.size() == 1 &&
972  _params[name]._have_default_postprocessor_val.size() == 1,
973  "Default postprocessor size is not equal to 1.");
974 
975  // Store the default value
976  _params[name]._default_postprocessor_val[0] = r_value;
977  _params[name]._have_default_postprocessor_val[0] = true;
978 
979  // Assign the default value so that it appears in the dump
980  std::ostringstream oss;
981  oss << r_value;
982  l_value = oss.str();
983 }

◆ setParamHelper() [12/13]

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

◆ setParamHelper() [13/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 1228 of file InputParameters.h.

1229 {
1230  l_value = r_value;
1231 }

Referenced by addParam().

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

1080 {
1081  _params[name]._reserved_values = reserved;
1082 }

Referenced by OutputInterface::validParams().

◆ setVectorOfPostprocessors()

void InputParameters::setVectorOfPostprocessors ( const std::string &  pp_name,
bool  b 
)
inlineprivate

Setter for the _vector_of_postprocessors flag in parameters.

Parameters
pp_nameThe name of the postprocessor parameter
bvalue that _vector_of_postprocessors is set to

Definition at line 923 of file InputParameters.h.

924  {
925  _params[pp_name]._vector_of_postprocessors = b;
926  }

Referenced by Parser::setVectorParameter().

◆ shouldIgnore()

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

Whether to ignore the value of an input parameter set in the input file or from the command line.

Definition at line 1102 of file InputParameters.C.

1103 {
1104  auto it = _params.find(name);
1105  if (it != _params.end())
1106  return it->second._ignore;
1107  mooseError("Parameter ", name, " does not exist");
1108 }

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

1368 {
1369  if (!this->have_parameter<T>(name))
1370  mooseError("Unable to suppress nonexistent parameter: ", name);
1371 
1372  _params[name]._required = false;
1373  _params[name]._is_private = true;
1374 }

Referenced by DiscreteElementUserObject::validParams(), CentroidMultiApp::validParams(), ADPresetBC< compute_stage >::validParams(), PresetBC::validParams(), PresetNodalBC::validParams(), CSV::validParams(), FunctionPresetBC::validParams(), MultiAppUserObjectTransfer::validParams(), MaterialPropertyDebugOutput::validParams(), ADFunctionPresetBC< compute_stage >::validParams(), VariableResidualNormsDebugOutput::validParams(), ADPresetNodalBC< compute_stage >::validParams(), GridPartitioner::validParams(), and Marker::validParams().

◆ type()

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

Prints the type of the requested parameter by name.

Definition at line 519 of file InputParameters.C.

520 {
521  if (_coupled_vars.find(name) != _coupled_vars.end())
522  return "std::vector<VariableName>";
523  else if (_params.count(name) > 0 && !_params[name]._custom_type.empty())
524  return _params[name]._custom_type;
525  return _values[name]->type();
526 }

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 }

◆ InputParameterWarehouse

friend class InputParameterWarehouse
friend

Definition at line 974 of file InputParameters.h.

◆ Parser

friend class Parser
friend

Definition at line 975 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 970 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 932 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 929 of file InputParameters.h.

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

◆ _buildable_rm_types

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

The RelationshipManagers that this object may either build or require.

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

Definition at line 956 of file InputParameters.h.

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

◆ _buildable_types

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

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

Typically this is used for MooseObjectAction derived Actions.

Definition at line 947 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 943 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 960 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 963 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 967 of file InputParameters.h.

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


The documentation for this class was generated from the following files:
InputParameters::isParamSetByUser
bool isParamSetByUser(const std::string &name) const
Method returns true if the parameter was by the user.
Definition: InputParameters.C:837
InputParameters::_buildable_rm_types
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.
Definition: InputParameters.h:956
InputParameters::_allow_copy
bool _allow_copy
A flag for toggling the error message in the copy constructor.
Definition: InputParameters.h:970
InputParameters::_class_description
std::string _class_description
The class description for the owning object.
Definition: InputParameters.h:943
InputParameters::defaultCoupledValue
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.
Definition: InputParameters.C:479
InputParameters::applyCoupledVar
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 ...
Definition: InputParameters.C:764
MooseEnum
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:31
Moose::execute_flags
ExecFlagEnum execute_flags
Storage for the registered execute flags.
InputParameters::_block_fullpath
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.
Definition: InputParameters.h:932
InputParameters::_buildable_types
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.
Definition: InputParameters.h:947
InputParameters::paramFullpath
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.
Definition: InputParameters.h:785
InputParameters::blockLocation
std::string & blockLocation()
Get/set a string representing the location (i.e.
Definition: InputParameters.h:757
InputParameters::Metadata::_input_location
std::string _input_location
original location of parameter (i.e. filename,linenum) - used for nice error messages.
Definition: InputParameters.h:861
InputParameters::applyParameter
void applyParameter(const InputParameters &common, const std::string &common_name, bool allow_private=false)
Apply values from a single parameter in common, to a single parameter stored in this object.
Definition: InputParameters.C:791
InputParameters::Metadata::_param_fullpath
std::string _param_fullpath
full HIT path of the parameter from the input file - used for nice error messages.
Definition: InputParameters.h:863
mooseError
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application.
Definition: MooseError.h:210
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
MooseUtils::tokenize
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:535
InputParameters::set
T & set(const std::string &name, bool quiet_mode=false)
Returns a writable reference to the named parameters.
Definition: InputParameters.h:987
InputParameters::inputLocation
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....
Definition: InputParameters.h:773
InputParameters::hasCoupledValue
bool hasCoupledValue(const std::string &coupling_name) const
Return whether or not the coupled variable exists.
Definition: InputParameters.C:458
InputParameters::_params
std::map< std::string, Metadata > _params
The actual parameter data.
Definition: InputParameters.h:936
InputParameters::getControllableParameters
std::set< std::string > getControllableParameters() const
Return list of controllable parameters.
Definition: InputParameters.h:732
InputParameters::numberDefaultCoupledValues
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
Definition: InputParameters.C:496
InputParameters::checkParamName
void checkParamName(const std::string &name) const
Make sure the parameter name doesn't have any invalid characters.
Definition: InputParameters.C:1094
InputParameters::_moose_object_syntax_visibility
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
Definition: InputParameters.h:963
InputParameters::isPrivate
bool isPrivate(const std::string &name) const
Returns a Boolean indicating whether the specified parameter is private or not.
Definition: InputParameters.C:291
InputParameters::setParamHelper
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...
Definition: InputParameters.h:1228
InputParameters::isParamValid
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another,...
Definition: InputParameters.C:257
InputParameters::_block_location
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.
Definition: InputParameters.h:929
mooseDeprecated
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:239
InputParameters::addCoupledVarWithAutoBuild
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.
Definition: InputParameters.C:190
InputParameters::blockFullpath
std::string & blockFullpath()
Get/set a string representing the full HIT parameter path from the input file (e.g.
Definition: InputParameters.h:764
InputParameters::addCoupledVar
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
Definition: InputParameters.C:183
MultiMooseEnum
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MultiMooseEnum.h:38
InputParameters::isParamRequired
bool isParamRequired(const std::string &name) const
Returns a boolean indicating whether the specified parameter is required or not.
Definition: InputParameters.C:251
InputParameters::_collapse_nesting
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
Definition: InputParameters.h:960
InputParameters::getDocString
std::string getDocString(const std::string &name) const
Returns the documentation string for the specified parameter name.
Definition: InputParameters.C:223
InputParameters::_show_deprecated_message
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
Definition: InputParameters.h:967
InputParameters::at
Metadata & at(const std::string &param)
Definition: InputParameters.h:874
InputParameters::_coupled_vars
std::set< std::string > _coupled_vars
The coupled variables set.
Definition: InputParameters.h:939
InputParameters::hasDefaultCoupledValue
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
Definition: InputParameters.C:464
InputParameters::set_attributes
virtual void set_attributes(const std::string &name, bool inserted_only) override
Override from libMesh to set user-defined attributes on our parameter.
Definition: InputParameters.C:76
FunctionParserBase
Definition: InputParameters.h:26