https://mooseframework.inl.gov
Classes | Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Static 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  CommandLineMetadata
 Structure for storing information about a command line parameter. More...
 
class  CommandLineParamSetKey
 Class that is used as a parameter to commandLineParamSet() that allows only the CommandLine to set that a parmeter is set by the command line. More...
 
struct  isValidCommandLineType
 Determines whether or not the given type is a type that is supported for a command line parameter. More...
 
struct  Metadata
 
class  SetHitNodeKey
 Class that is used as a parameter to setHitNode() that allows only relevant classes to set the hit node. More...
 
class  SetParamHitNodeKey
 Class that is used as a parameter to setHitNode(param) that allows only relevant classes to set the hit node. More...
 

Public Types

typedef std::map< std::string, std::unique_ptr< Value >, std::less<> > map_type
 
typedef map_type::iterator iterator
 
typedef map_type::const_iterator const_iterator
 

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...
 
bool attemptPrintDeprecated (const std::string &name)
 Prints the deprecated parameter message, assuming we have the right flags set. 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... Ts>
void setParameters (const std::string &name, const T &value, Ts... extra_input_parameters)
 Given a series of parameters names and values, sets each name to the corresponding value. 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 addParam (const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
 Enable support for initializer lists as default arguments for container type. 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 addDeprecatedCustomTypeParam (const std::string &name, const std::string &custom_type, const std::string &doc_string, const std::string &deprecation_msg)
 
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 addCommandLineParam (const std::string &name, const std::string &syntax, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
 
template<typename T >
void addOptionalValuedCommandLineParam (const std::string &name, const std::string &syntax, const T &value, const std::string &doc_string)
 Add a command line parameter with an optional value. More...
 
void setGlobalCommandLineParam (const std::string &name)
 Sets the command line parameter with name as global. More...
 
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...
 
bool isCommandLineParameter (const std::string &name) const
 
std::optional< InputParameters::CommandLineMetadataqueryCommandLineMetadata (const std::string &name) const
 
const InputParameters::CommandLineMetadatagetCommandLineMetadata (const std::string &name) const
 
void commandLineParamSet (const std::string &name, const CommandLineParamSetKey)
 Marks the command line parameter name as set by the CommandLine. More...
 
const std::string & getDescription (const std::string &name) const
 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...
 
void renameParameterGroup (const std::string &old_name, const std::string &new_name)
 This method renames a parameter group. 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 addDeprecatedCoupledVar (const std::string &old_name, const std::string &new_name, const std::string &removal_date="")
 This method adds a deprecated 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...
 
std::string getDocUnit (const std::string &name) const
 Returns the documentation unit string for the specified parameter name. More...
 
void setDocUnit (const std::string &name, const std::string &doc_unit)
 Set the unit 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...
 
void makeParamNotRequired (const std::string &name)
 Forces parameter of given name to be not required regardless of type. 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) const
 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) const
 Returns a Boolean indicating whether the specified parameter is controllable. More...
 
const std::set< ExecFlagType > & getControllableExecuteOnTypes (const std::string &name) const
 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...
 
std::optional< std::string > getBase () const
 
void registerSystemAttributeName (const std::string &value)
 This method is used to define the MOOSE system name that is used by the TheWarehouse object for storing objects to be retrieved for execution. More...
 
const std::string & getSystemAttributeName () const
 Get the system attribute name if it was registered. 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...
 
void finalize (const std::string &parsing_syntax)
 Finalizes the parameters, which must be done before constructing any objects with these parameters (to be called in the corresponding factories). More...
 
std::filesystem::path getFileBase (const std::optional< std::string > &param_name=std::optional< std::string >()) const
 
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...
 
const std::unordered_map< std::string, std::string > & getNewToDeprecatedVarMap () const
 Return the new to deprecated variable name map. More...
 
bool isRangeChecked (const std::string &param_name) const
 Return whether a parameter has a range check. More...
 
std::string rangeCheckedFunction (const std::string &name) const
 Return the range check function for any parameter (empty string if it is not range checked) More...
 
bool hasDefault (const std::string &param_name) const
 Return whether a parameter has a default. 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...
 
void applyParameters (const InputParameters &common, const std::vector< std::string > &exclude={}, const bool allow_private=false)
 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, bool override_default=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 set by the user. More...
 
bool isParamDefined (const std::string &name) const
 Method returns true if the parameter is defined for any type. More...
 
template<typename R1 , typename R2 , typename V1 = typename std::conditional<std::is_same<R1, MooseEnumItem>::value, MultiMooseEnum, std::vector<R1>>::type, typename V2 = typename std::conditional<std::is_same<R2, MooseEnumItem>::value, MultiMooseEnum, std::vector<R2>>::type>
std::vector< std::pair< R1, R2 > > get (const std::string &param1, const std::string &param2) const
 Combine two vector parameters into a single vector of pairs. More...
 
std::set< std::string > getParametersList () const
 
std::set< std::string > getControllableParameters () const
 Return list of controllable parameters. More...
 
std::set< std::string > getGroupParameters (const std::string &group) const
 Return names of parameters within a group. 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 () const
 
std::string blockFullpath () const
 
const hit::Node * getHitNode (const std::string &param) const
 
void setHitNode (const std::string &param, const hit::Node &node, const SetParamHitNodeKey)
 Sets the hit node associated with the parameter param to node. More...
 
std::string inputLocation (const std::string &param) const
 
std::string paramFullpath (const std::string &param) const
 
std::string errorPrefix (const std::string &param) const
 generate error message prefix with parameter name and location (if available) More...
 
std::string rawParamVal (const std::string &param) const
 
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...
 
template<typename T >
bool isType (const std::string &name) const
 
std::string varName (const std::string &var_param_name, const std::string &moose_object_with_var_param_name) const
 Determine the actual variable name from the given variable parameter name. More...
 
void renameParam (const std::string &old_name, const std::string &new_name, const std::string &new_docstring)
 Rename a parameter and provide a new documentation string. More...
 
void renameCoupledVar (const std::string &old_name, const std::string &new_name, const std::string &new_docstring)
 Rename a coupled variable and provide a new documentation string. More...
 
void deprecateParam (const std::string &old_name, const std::string &new_name, const std::string &removal_date)
 
void deprecateCoupledVar (const std::string &old_name, const std::string &new_name, const std::string &removal_date)
 
std::string checkForRename (const std::string &name) const
 Checks whether the provided name is a renamed parameter name. More...
 
template<typename T >
const T & get (std::string_view name) const
 A wrapper around the Parameters base class method. More...
 
template<typename T >
bool have_parameter (std::string_view name) const
 A wrapper around the Parameters base class method. More...
 
template<typename T >
void transferParam (const InputParameters &source_param, const std::string &name, const std::string &new_name="", const std::string &new_description="")
 A routine to transfer a parameter from one class' validParams to another. More...
 
std::vector< std::string > paramAliases (const std::string &param_name) const
 Return all the aliased names associated with param_name. More...
 
const hit::Node * getHitNode () const
 
void setHitNode (const hit::Node &node, const SetHitNodeKey)
 Sets the hit node that represents the syntax responsible for creating these parameters. More...
 
bool isFinalized () const
 
std::optional< Moose::DataFileUtils::PathqueryDataFileNamePath (const std::string &name) const
 
template<>
void addRequiredParam (const std::string &name, const MooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addRequiredParam (const std::string &name, const MultiMooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
const MooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MooseEnum *, const MooseBase *moose_base)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MultiMooseEnum *, const MooseBase *moose_base)
 
template<>
void addRequiredParam (const std::string &name, const MooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addRequiredParam (const std::string &name, const MultiMooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
const MooseEnumgetParamHelper (const std::string &name_in, const InputParameters &pars, const MooseEnum *, const MooseBase *)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name_in, const InputParameters &pars, const MultiMooseEnum *, const MooseBase *)
 
virtual Parametersoperator+= (const Parameters &source)
 
void insert (const std::string &)
 
T & set (const std::string &)
 
void remove (std::string_view)
 
std::size_t n_parameters () const
 
unsigned int n_parameters () const
 
void print (std::ostream &os=libMesh::out) const
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
template<typename T , typename S >
void addParam (const std::string &name, const S &value, const std::string &doc_string)
 These methods add an optional 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)
 

Static Public Member Functions

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

Protected Attributes

map_type _values
 

Private Member Functions

 InputParameters ()
 
void setParameters ()
 Method to terminate the recursive setParameters definition. More...
 
template<typename T >
std::string appendFunctorDescription (const std::string &doc_string) const
 Appends description of what a functor is to a doc string. More...
 
void setDeprecatedVarDocString (const std::string &new_name, const std::string &doc_string)
 Private method for setting deprecated coupled variable documentation strings. More...
 
void renameParamInternal (const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)
 
void renameCoupledVarInternal (const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)
 
Metadataat (const std::string &param_name)
 
const Metadataat (const std::string &param_name) const
 
void allowCopy (bool status)
 Toggle the availability of the copy constructor. More...
 
void checkParamName (const std::string &name) const
 Make sure the parameter name doesn't have any invalid characters. More...
 
template<typename T , typename S >
void setParamHelper (const std::string &name, T &l_value, const S &r_value)
 This method is called when adding a Parameter with a default value, can be specialized for non-matching types. More...
 
template<typename T >
void addCommandLineParamHelper (const std::string &name, const std::string &syntax, const bool required, const bool value_required)
 Helper for all of the addCommandLineParam() calls, which sets up _cl_data in the metadata. 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 &, MooseFunctorName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, MooseFunctorName &l_value, const int &r_value)
 
template<>
void setParamHelper (const std::string &, PostprocessorName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, 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 &, MooseFunctorName &l_value, const Real &r_value)
 
template<>
void setParamHelper (const std::string &, MooseFunctorName &l_value, const int &r_value)
 

Static Private Member Functions

template<typename T >
static constexpr bool isFunctorNameType ()
 
static void callMooseErrorHelper (const MooseBase &moose_base, const std::string &error)
 

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...
 
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
 A map from deprecated coupled variable names to the new blessed name. More...
 
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
 A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the deprecation messages in the case that the "old" parameter name is a deprecated parameter name. More...
 
std::multimap< std::string, std::string > _new_to_old_names
 A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names. More...
 
const hit::Node * _hit_node
 The hit node representing the syntax that created these parameters, if any. More...
 
bool _finalized
 Whether or not we've called finalize() on these parameters yet. More...
 

Friends

class InputParameterWarehouse
 
class Parser
 
class ActionWarehouse
 
InputParameters emptyInputParameters ()
 

Detailed Description

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

Definition at line 66 of file InputParameters.h.

Constructor & Destructor Documentation

◆ InputParameters() [1/3]

InputParameters::InputParameters ( const InputParameters rhs)

Definition at line 47 of file InputParameters.C.

49 {
50  *this = rhs;
51 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...

◆ InputParameters() [2/3]

InputParameters::InputParameters ( const Parameters rhs)

Definition at line 53 of file InputParameters.C.

55 {
56  _params.clear();
58  _collapse_nesting = false;
60 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
infix_ostream_iterator< T, charT, traits > & operator=(T const &item)
Definition: InfixIterator.h:46
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ ~InputParameters()

virtual InputParameters::~InputParameters ( )
virtualdefault

◆ InputParameters() [3/3]

InputParameters::InputParameters ( )
private

Definition at line 36 of file InputParameters.C.

37  : Parameters(),
38  _collapse_nesting(false),
41  _allow_copy(true),
42  _hit_node(nullptr),
43  _finalized(false)
44 {
45 }
bool _allow_copy
A flag for toggling the error message in the copy constructor.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
bool _finalized
Whether or not we&#39;ve called finalize() on these parameters yet.
const hit::Node * _hit_node
The hit node representing the syntax that created these parameters, if any.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.

Member Function Documentation

◆ addClassDescription()

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

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

Definition at line 82 of file InputParameters.C.

Referenced by ConservativeAdvectionTempl< is_ad >::generalParams(), FVDiffusionInterface::validParams(), FVOneVarDiffusionInterface::validParams(), FVTwoVarContinuityConstraint::validParams(), AddBoundsVectorsAction::validParams(), AddInitialConditionAction::validParams(), AddInterfaceKernelAction::validParams(), CopyNodalVarsAction::validParams(), ADDGKernel::validParams(), ArrayHFEMDiffusion::validParams(), DGConvection::validParams(), HFEMDiffusion::validParams(), CreateExecutionerAction::validParams(), AddKernelAction::validParams(), ProcessorIDAux::validParams(), InversePowerMethod::validParams(), CoupledVarThresholdElementSubdomainModifier::validParams(), AddDamperAction::validParams(), AddMarkerAction::validParams(), DynamicObjectRegistrationAction::validParams(), ElementIDOutputAction::validParams(), GlobalParamsAction::validParams(), AddDGKernelAction::validParams(), AddMaterialAction::validParams(), PartitionerAction::validParams(), AddBCAction::validParams(), AddDiracKernelAction::validParams(), AddMeshGeneratorAction::validParams(), ReadExecutorParamsAction::validParams(), FVScalarLagrangeMultiplierInterface::validParams(), FVAdvection::validParams(), PenaltyDirichletNodalKernel::validParams(), FVFunctorTimeKernel::validParams(), FVMatAdvection::validParams(), AddMultiAppAction::validParams(), SetupMeshCompleteAction::validParams(), FVReaction::validParams(), FVTimeKernel::validParams(), ADRobinBC::validParams(), AddNodalKernelAction::validParams(), ADVectorRobinBC::validParams(), AverageNodalVariableValue::validParams(), ArrayHFEMDirichletBC::validParams(), ArrayNeumannBC::validParams(), AnalyticalIndicator::validParams(), ArrayPenaltyDirichletBC::validParams(), GradientJumpIndicator::validParams(), ElementArrayL2Norm::validParams(), LaplacianJumpIndicator::validParams(), ArrayVacuumBC::validParams(), ADTimeDerivative::validParams(), AddElementalFieldAction::validParams(), ADVectorDiffusion::validParams(), ADVectorTimeDerivative::validParams(), EmptyPostprocessor::validParams(), ArrayDiffusion::validParams(), ArrayReaction::validParams(), ArrayTimeDerivative::validParams(), ArrayVariableComponent::validParams(), ArrayVarReductionAux::validParams(), BuildArrayVariableAux::validParams(), AddConstraintAction::validParams(), AddFunctorMaterialAction::validParams(), AddPostprocessorAction::validParams(), HFEMDirichletBC::validParams(), MassEigenKernel::validParams(), NumLinearIterations::validParams(), NumNodes::validParams(), NumRelationshipManagers::validParams(), MassLumpedTimeDerivative::validParams(), NumVars::validParams(), PerfGraphData::validParams(), Residual::validParams(), AddScalarKernelAction::validParams(), TimeDerivative::validParams(), TimestepSize::validParams(), VariableResidual::validParams(), VectorPostprocessorComponent::validParams(), VectorTimeDerivative::validParams(), VectorPostprocessorReductionValue::validParams(), ElementIntegerAux::validParams(), ExternalProblem::validParams(), ConstantReporter::validParams(), ElementVariableStatistics::validParams(), NodalVariableStatistics::validParams(), AddFVInitialConditionAction::validParams(), ErrorFractionMarker::validParams(), ADScalarTimeDerivative::validParams(), CoupledODETimeDerivative::validParams(), ODETimeDerivative::validParams(), ErrorToleranceMarker::validParams(), UniformMarker::validParams(), AddTransferAction::validParams(), ExtraElementIDAux::validParams(), ValueRangeMarker::validParams(), ValueThresholdMarker::validParams(), ConstantDT::validParams(), TestSourceStepper::validParams(), AddUserObjectAction::validParams(), GenericConstant2DArray::validParams(), GenericConstantArray::validParams(), AddFVInterfaceKernelAction::validParams(), AddVectorPostprocessorAction::validParams(), AutoCheckpointAction::validParams(), EqualValueBoundaryConstraint::validParams(), FileMesh::validParams(), TiledMesh::validParams(), ConstantVectorPostprocessor::validParams(), AddIndicatorAction::validParams(), CheckFVBCAction::validParams(), BoundaryDeletionGenerator::validParams(), ElementOrderConversionGenerator::validParams(), CreateProblemAction::validParams(), PeriodicFunction::validParams(), MFEMBoundaryIntegratedBC::validParams(), MFEMBoundaryNormalIntegratedBC::validParams(), MFEMScalarDirichletBC::validParams(), MFEMVectorBoundaryIntegratedBC::validParams(), MFEMScalarFESpace::validParams(), MFEMVectorFESpace::validParams(), JSONOutput::validParams(), XMLOutput::validParams(), AddFieldSplitAction::validParams(), CoefReactionTempl< is_ad >::validParams(), ExtraIDIntegralReporter::validParams(), DerivativeSumMaterialTempl< is_ad >::validParams(), GenericConstantVectorMaterialTempl< is_ad >::validParams(), VerifyElementUniqueID::validParams(), VerifyNodalUniqueID::validParams(), PointValueSampler::validParams(), SideValueSampler::validParams(), OverlayMeshGenerator::validParams(), NodalPatchRecoveryAuxBase::validParams(), PenetrationAux::validParams(), UniqueExtraIDMeshGenerator::validParams(), ActivateElementsUserObjectBase::validParams(), MFEMVectorDirichletBC::validParams(), MFEMVectorNormalDirichletBC::validParams(), MFEMVectorTangentialDirichletBC::validParams(), MFEMTransient::validParams(), MFEMSteady::validParams(), MooseObjectAction::validParams(), FVPostprocessorDirichletBC::validParams(), AdaptivityAction::validParams(), SetupMeshAction::validParams(), ArrayFunctionIC::validParams(), FunctionScalarIC::validParams(), ElementExtremeMaterialPropertyTempl< is_ad >::validParams(), ElementExtremeValue::validParams(), ElementL2Error::validParams(), ArrayBodyForce::validParams(), NodalExtremeValue::validParams(), SideExtremeValue::validParams(), TimeExtremeValue::validParams(), BoxMarker::validParams(), AddFVBCAction::validParams(), LogConstantDT::validParams(), ElementQualityChecker::validParams(), AddFVKernelAction::validParams(), GapValueAux::validParams(), CSVReaderVectorPostprocessor::validParams(), Eigenvalues::validParams(), LineValueSampler::validParams(), LowerDBlockFromSidesetGenerator::validParams(), ArrayDGDiffusion::validParams(), SidesetInfoVectorPostprocessor::validParams(), MoveNodeGenerator::validParams(), NodeSetsFromSideSetsGenerator::validParams(), ParsedSubdomainIDsGenerator::validParams(), FunctionDiracSource::validParams(), ParsedSubdomainMeshGenerator::validParams(), PlaneIDMeshGenerator::validParams(), RefineBlockGenerator::validParams(), RefineSidesetGenerator::validParams(), RenameBlockGenerator::validParams(), RenameBoundaryGenerator::validParams(), RinglebMeshGenerator::validParams(), ElementsAlongPlane::validParams(), Steady::validParams(), SideSetsFromNodeSetsGenerator::validParams(), SideSetsFromNormalsGenerator::validParams(), SmoothMeshGenerator::validParams(), SphereMeshGenerator::validParams(), SpiralAnnularMeshGenerator::validParams(), SubdomainIDGenerator::validParams(), SubdomainPerElementGenerator::validParams(), SymmetryTransformGenerator::validParams(), TiledMeshGenerator::validParams(), SecondTimeDerivativeAux::validParams(), ScalePostprocessor::validParams(), ConstantFunction::validParams(), DeprecatedBlockAction::validParams(), MoveNodesToSphere::validParams(), VariableValueElementSubdomainModifier::validParams(), PiecewiseConstant::validParams(), TimeDerivativeAux::validParams(), MFEMSimplifiedFESpace::validParams(), AddDefaultConvergenceAction::validParams(), VectorVariableMagnitudeAux::validParams(), AddMeshDivisionAction::validParams(), VolumeAux::validParams(), WeightedGapAux::validParams(), ConstantScalarAux::validParams(), CoupledForceNodalKernel::validParams(), LowerBoundNodalKernel::validParams(), FVCoupledForce::validParams(), ReactionNodalKernel::validParams(), UpperBoundNodalKernel::validParams(), SetupDebugAction::validParams(), AddDistributionAction::validParams(), SetupPreconditionerAction::validParams(), FunctionIC::validParams(), SetupPredictorAction::validParams(), ADVectorMatchedValueBC::validParams(), ScalarComponentIC::validParams(), AreaPostprocessor::validParams(), AverageElementSize::validParams(), SetupTimeIntegratorAction::validParams(), ConstantPostprocessor::validParams(), ElementAverageSecondTimeDerivative::validParams(), ElementAverageTimeDerivative::validParams(), ElementExtremeFunctorValueTempl< is_ad >::validParams(), InterfaceDiffusion::validParams(), ADKernelCurl::validParams(), SetupTimeStepperAction::validParams(), AdvectiveFluxAux::validParams(), ElementL2Difference::validParams(), ElementMaxLevelPostProcessor::validParams(), FunctionElementAverage::validParams(), FunctionElementIntegral::validParams(), FunctionSideAverage::validParams(), ArrayCoupledTimeDerivative::validParams(), AddPositionsAction::validParams(), MatrixSymmetryCheck::validParams(), NodalL2Error::validParams(), CoupledTimeDerivative::validParams(), NodalMaxValueId::validParams(), NodalSum::validParams(), DivField::validParams(), NumElements::validParams(), FunctionDiffusion::validParams(), FunctorKernel::validParams(), AddChainControlAction::validParams(), GradField::validParams(), FunctorDirichletBC::validParams(), KernelCurl::validParams(), FunctorNeumannBC::validParams(), NumResidualEvaluations::validParams(), NumTimeSteps::validParams(), ConstantAux::validParams(), MassMatrix::validParams(), AddReporterAction::validParams(), CopyValueAux::validParams(), MaterialDerivativeTestKernel::validParams(), ScalarVariable::validParams(), SideAverageFunctorPostprocessor::validParams(), DebugResidualAux::validParams(), NullKernel::validParams(), ImplicitEuler::validParams(), TimeIntegratedPostprocessor::validParams(), TimePostprocessor::validParams(), VolumePostprocessor::validParams(), VectorCoupledTimeDerivative::validParams(), MooseStaticCondensationPreconditioner::validParams(), SingleMatrixPreconditioner::validParams(), AddFunctionAction::validParams(), BoundaryMarker::validParams(), RestartableDataReporter::validParams(), NullScalarKernel::validParams(), AddTimesAction::validParams(), VariableOldValueBounds::validParams(), ExplicitEuler::validParams(), ExplicitSSPRungeKutta::validParams(), AddTimeStepperAction::validParams(), ComboMarker::validParams(), GetPostprocessorChainControl::validParams(), LimitChainControl::validParams(), PIDChainControl::validParams(), TimeIntervalTimes::validParams(), RealToBoolChainControl::validParams(), FixedPointIterationAdaptiveDT::validParams(), ScaleOldChainControl::validParams(), ForcingFunctionAux::validParams(), MultiAppCloneReporterTransfer::validParams(), FunctionArrayAux::validParams(), TerminateChainControl::validParams(), UnitTripChainControl::validParams(), MultiAppReporterTransfer::validParams(), ElemSideNeighborLayersGeomTester::validParams(), ElemSideNeighborLayersTester::validParams(), InterfaceQpMaterialPropertyRealUO::validParams(), InterfaceQpValueUserObject::validParams(), JSONFileReader::validParams(), AnnularMesh::validParams(), GeneratedMesh::validParams(), RinglebMesh::validParams(), SpiralAnnularMesh::validParams(), AddConvergenceAction::validParams(), ChainControlSetupAction::validParams(), ExtraElementIntegerDivision::validParams(), NestedDivision::validParams(), ElementsAlongLine::validParams(), AddMetaDataGenerator::validParams(), LineFunctionSampler::validParams(), IntersectionPointsAlongLine::validParams(), BlockToMeshConverterGenerator::validParams(), BlockDeletionGenerator::validParams(), BoundaryLayerSubdomainGenerator::validParams(), CombineComponentsMeshes::validParams(), BreakBoundaryOnSubdomainGenerator::validParams(), BreakMeshByBlockGeneratorBase::validParams(), IterationCountConvergence::validParams(), CoarsenBlockGenerator::validParams(), AddHDGKernelAction::validParams(), PostprocessorConvergence::validParams(), ElementGenerator::validParams(), ComposeTimeStepperAction::validParams(), ElementsToTetrahedronsConverter::validParams(), ExtraNodesetGenerator::validParams(), FileMeshGenerator::validParams(), FillBetweenCurvesGenerator::validParams(), FillBetweenPointVectorsGenerator::validParams(), FillBetweenSidesetsGenerator::validParams(), FlipSidesetGenerator::validParams(), GeneratedMeshGenerator::validParams(), ADDGAdvection::validParams(), ImageSubdomainGenerator::validParams(), MaterialStdVectorRealGradientAux::validParams(), MeshDiagnosticsGenerator::validParams(), MaterialStdVectorAuxTempl< is_ad >::validParams(), MeshRepairGenerator::validParams(), SphericalAverage::validParams(), ParsedSubdomainGeneratorBase::validParams(), ConstantPointSource::validParams(), PolyLineMeshGenerator::validParams(), FiniteDifferencePreconditioner::validParams(), AddAuxVariableAction::validParams(), ParsedAux::validParams(), SideSetExtruderGenerator::validParams(), SideSetsBetweenSubdomainsGenerator::validParams(), ParsedVectorAux::validParams(), SideSetsFromPointsGenerator::validParams(), CreateMeshSetupActionsForComponents::validParams(), NullExecutor::validParams(), TransformGenerator::validParams(), LinearCombinationFunction::validParams(), AddLinearFVBCAction::validParams(), MaterialDerivativeRankTwoTestKernel::validParams(), MoveNodesToGeometryModifierBase::validParams(), PiecewiseConstantFromCSV::validParams(), PiecewiseLinear::validParams(), CSVFileTimes::validParams(), PiecewiseLinearBase::validParams(), TagVectorArrayVariableValueAux::validParams(), MFEMConvectiveHeatFluxBC::validParams(), ElementValueSampler::validParams(), ReporterTimes::validParams(), LinearFVDiffusion::validParams(), AddLinearFVKernelAction::validParams(), MFEMExecutioner::validParams(), SplineFunction::validParams(), FunctorADConverterTempl< T >::validParams(), ParsedODEKernel::validParams(), FunctorSmootherTempl< T >::validParams(), VariableGradientComponent::validParams(), VectorMagnitudeAux::validParams(), MFEMMixedBilinearFormKernel::validParams(), VectorPostprocessorVisualizationAux::validParams(), FVBoundaryScalarLagrangeMultiplierConstraint::validParams(), MFEMVectorDomainLFKernel::validParams(), MFEMVectorFEDomainLFKernel::validParams(), VectorVariableComponentAux::validParams(), MFEMConduitDataCollection::validParams(), MFEMParaViewDataCollection::validParams(), MFEMVisItDataCollection::validParams(), MFEMProblem::validParams(), Receiver::validParams(), CentroidMultiApp::validParams(), QuadraturePointMultiApp::validParams(), CylindricalAverage::validParams(), Console::validParams(), ControlOutput::validParams(), GMVOutput::validParams(), FVMassMatrix::validParams(), PerfGraphOutput::validParams(), ReporterDebugOutput::validParams(), Tecplot::validParams(), FVScalarLagrangeMultiplierConstraint::validParams(), VTKOutput::validParams(), XDA::validParams(), FunctorBinnedValuesDivision::validParams(), DiffusionCG::validParams(), DiffusionFV::validParams(), NumFailedTimeSteps::validParams(), FunctorIC::validParams(), FilePositions::validParams(), IntegralPreservingFunctionIC::validParams(), InputPositions::validParams(), NumFixedPointIterations::validParams(), ReporterPositions::validParams(), TransformedPositions::validParams(), AverageVariableChange::validParams(), AxisymmetricCenterlineAverageValue::validParams(), ChainControlDataPostprocessor::validParams(), ChangeOverFixedPointPostprocessor::validParams(), ChangeOverTimePostprocessor::validParams(), AddActionComponentAction::validParams(), Diffusion::validParams(), SetupResidualDebugAction::validParams(), ElementAverageMaterialPropertyTempl< is_ad >::validParams(), ADMatInterfaceReaction::validParams(), AddOutputAction::validParams(), ConvectiveFluxBC::validParams(), InterfaceReaction::validParams(), PenaltyInterfaceDiffusionTempl< T, is_ad >::validParams(), ElementL2FunctorErrorTempl< is_ad >::validParams(), ElementSidesL2Norm::validParams(), NearestNodeNumberUO::validParams(), ArrayParsedAux::validParams(), EigenDirichletBC::validParams(), NearestNodeNumber::validParams(), NodalMaxValue::validParams(), LayeredAverageFunctor::validParams(), NumNonlinearIterations::validParams(), ParsedPostprocessor::validParams(), MatchedValueBCTempl< is_ad >::validParams(), PseudoTimestep::validParams(), MaterialDerivativeRankFourTestKernel::validParams(), SideAverageMaterialPropertyTempl< is_ad >::validParams(), ReactionTempl< is_ad >::validParams(), DiffusionFluxAux::validParams(), DivergenceAuxTempl< is_ad >::validParams(), VectorDiffusion::validParams(), AccumulateReporter::validParams(), LinearFVAdvectionDiffusionExtrapolatedBC::validParams(), IterationInfo::validParams(), LinearFVAdvectionDiffusionOutflowBC::validParams(), LinearFVAdvection::validParams(), LinearFVAnisotropicDiffusion::validParams(), MultiAppScalarToAuxScalarTransfer::validParams(), ElementLengthAux::validParams(), LinearFVReaction::validParams(), LinearFVSource::validParams(), ConstantBounds::validParams(), ActuallyExplicitEuler::validParams(), BDF2::validParams(), NewmarkBeta::validParams(), ReporterPointMarker::validParams(), ExodusFileTimes::validParams(), InputTimes::validParams(), SimulationTimes::validParams(), ExodusTimeSequenceStepper::validParams(), FunctionDT::validParams(), PostprocessorDT::validParams(), MultiAppPositions::validParams(), TimeSequenceStepper::validParams(), SetValueChainControlTempl< T >::validParams(), SmootherChainControl::validParams(), MultiAppPostprocessorToAuxScalarTransfer::validParams(), GenericConstantRealVectorValueTempl< is_ad >::validParams(), FunctorAux::validParams(), EqualGradientConstraint::validParams(), MaterialFunctorConverterTempl< T >::validParams(), InterfaceValueUserObject::validParams(), VectorFromComponentVariablesMaterialTempl< is_ad >::validParams(), EqualValueConstraint::validParams(), ConcentricCircleMesh::validParams(), LayeredSideAverageFunctor::validParams(), LayeredSideIntegralFunctor::validParams(), MessageFromInput::validParams(), ImageMesh::validParams(), MeshGeneratorMesh::validParams(), OldEqualValueConstraint::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryBase::validParams(), HardwareIDAux::validParams(), SubdomainsDivision::validParams(), PIDTransientControl::validParams(), InterfaceValueUserObjectAux::validParams(), BoundaryPreservedMarker::validParams(), AnnularMeshGenerator::validParams(), NodalValueSampler::validParams(), SpatialUserObjectVectorPostprocessor::validParams(), BreakMeshByBlockGenerator::validParams(), CartesianMeshGenerator::validParams(), MaterialRealDenseMatrixAux::validParams(), ConcentricCircleMeshGenerator::validParams(), CutMeshByPlaneGenerator::validParams(), ExamplePatchMeshGenerator::validParams(), MaxIncrement::validParams(), ImageMeshGenerator::validParams(), MeshCollectionGenerator::validParams(), PositionsFunctorValueSampler::validParams(), MeshExtruderGenerator::validParams(), MeshDivisionAux::validParams(), ParsedCurveGenerator::validParams(), NearestNodeDistanceAux::validParams(), ParsedExtraElementIDGenerator::validParams(), TimesEnableControl::validParams(), CreateDisplacedProblemAction::validParams(), VectorFunctionReaction::validParams(), NormalizationAux::validParams(), VectorConstantPointSource::validParams(), AddCorrectorAction::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), InterfaceQpMaterialPropertyBaseUserObject< Real >::validParams(), LineMaterialRealSampler::validParams(), NeumannBCTempl< is_ad >::validParams(), StackGenerator::validParams(), StitchBoundaryMeshGenerator::validParams(), StitchedMeshGenerator::validParams(), AdvancedExtruderGenerator::validParams(), BicubicSplineFunction::validParams(), CompositeFunction::validParams(), XYZDelaunayGenerator::validParams(), TimedSubdomainModifier::validParams(), SpatialUserObjectAux::validParams(), TagMatrixAux::validParams(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::validParams(), TagVectorArrayVariableAux::validParams(), LinearFVTimeDerivative::validParams(), MFEMBoundaryCondition::validParams(), TagVectorAux::validParams(), MFEMDataCollection::validParams(), MFEMVectorL2Error::validParams(), MatDiffusion::validParams(), MFEMGenericFESpace::validParams(), MFEML2Error::validParams(), FunctorTimes::validParams(), LeastSquaresFit::validParams(), MaterialDerivativeTestAction::validParams(), VariableTimeIntegrationAux::validParams(), VectorFunctionAux::validParams(), ParsedFunctorMaterialTempl< is_ad >::validParams(), VectorMagnitudeFunctorMaterialTempl< is_ad >::validParams(), FVConstantScalarOutflowBC::validParams(), FVDirichletBC::validParams(), FVFunctionDirichletBC::validParams(), MFEMHypreADS::validParams(), MFEMHypreAMS::validParams(), FVNeumannBC::validParams(), FunctionScalarAux::validParams(), ElementMaterialSampler::validParams(), FullSolveMultiApp::validParams(), QuotientScalarAux::validParams(), LayeredAverage::validParams(), ScalarTagMatrixAux::validParams(), SphericalGridDivision::validParams(), ConditionalFunctionEnableControl::validParams(), FVAnisotropicDiffusion::validParams(), ScalarTagVectorAux::validParams(), SolutionInvalidityReporter::validParams(), SetAdaptivityOptionsAction::validParams(), ADDirichletBC::validParams(), AddMeshModifiersAction::validParams(), ADFunctionDirichletBC::validParams(), ADFunctionNeumannBC::validParams(), LayeredSideAverage::validParams(), TiedValueConstraint::validParams(), ArrayConstantIC::validParams(), ADVectorFunctionDirichletBC::validParams(), ADVectorFunctionNeumannBC::validParams(), InterfaceUserObject::validParams(), FunctorPositions::validParams(), NodePositions::validParams(), ArrayDirichletBC::validParams(), NumMeshDivisions::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), ElementHCurlError::validParams(), ElementHCurlSemiError::validParams(), ElementHDivSemiError::validParams(), ADMatCoupledForce::validParams(), ElementL1Error::validParams(), FunctionGradientNeumannBC::validParams(), NodalL2Norm::validParams(), ADMatReaction::validParams(), DirichletBC::validParams(), LayeredSideDiffusiveFluxAverage::validParams(), EigenArrayDirichletBC::validParams(), FunctionSideIntegral::validParams(), InterfaceIntegralPostprocessor::validParams(), MemoryUsage::validParams(), CoupledForceTempl< is_ad >::validParams(), SolutionTimeAdaptiveDT::validParams(), NumPositions::validParams(), FunctionNeumannBC::validParams(), PercentChangePostprocessor::validParams(), NodalNormalsEvaluator::validParams(), ElementHDivError::validParams(), RelativeSolutionDifferenceNorm::validParams(), FunctionAux::validParams(), PostprocessorDirichletBC::validParams(), CoupledTiedValueConstraint::validParams(), VectorCurlPenaltyDirichletBC::validParams(), ReferenceResidualProblem::validParams(), VectorDirichletBC::validParams(), VectorDivPenaltyDirichletBC::validParams(), VectorFunctionDirichletBC::validParams(), VectorPenaltyDirichletBC::validParams(), ElementLpNormAux::validParams(), GetFunctionValueChainControl::validParams(), DifferencePostprocessor::validParams(), ElementQualityAux::validParams(), GenericConstantRankTwoTensorTempl< is_ad >::validParams(), CoupledGradientMaterialTempl< is_ad >::validParams(), MultiAppGeneralFieldShapeEvaluationTransfer::validParams(), ParsedGenerateNodeset::validParams(), MultiAppShapeEvaluationTransfer::validParams(), MultiAppVariableValueSampleTransfer::validParams(), GenericFunctionRankTwoTensorTempl< is_ad >::validParams(), TimeSequenceFromTimes::validParams(), ElementGroupCentroidPositions::validParams(), DistributedPositions::validParams(), ElementCentroidPositions::validParams(), FunctorVectorElementalAuxTempl< is_ad >::validParams(), NodalNormalsCorner::validParams(), CartesianGridDivision::validParams(), CylindricalGridDivision::validParams(), BoolFunctionControl::validParams(), AllSideSetsByNormalsGenerator::validParams(), VariableValueVolumeHistogram::validParams(), WorkBalance::validParams(), BreakMeshByElementGenerator::validParams(), SolutionInvalidityOutput::validParams(), DefaultNonlinearConvergence::validParams(), MaterialRateRealAuxTempl< is_ad >::validParams(), CircularBoundaryCorrectionGenerator::validParams(), CutMeshByLevelSetGenerator::validParams(), MaterialRealAuxTempl< is_ad, is_functor >::validParams(), ElementsToSimplicesConverter::validParams(), BoundingValueElementDamper::validParams(), MaterialRealTensorValueAuxTempl< is_ad >::validParams(), BoundingValueNodalDamper::validParams(), CombinerGenerator::validParams(), BlockWeightedPartitioner::validParams(), MFEMDiffusionKernel::validParams(), VectorMemoryUsage::validParams(), TimeDerivativeNodalKernel::validParams(), CreateApplicationBlockAction::validParams(), OrientedSubdomainBoundingBoxGenerator::validParams(), ParsedNodeTransformGenerator::validParams(), NearestNodeValueAux::validParams(), LayeredExtremumMaterialProperty::validParams(), ConstantRate::validParams(), Transient::validParams(), CoarsenedPiecewiseLinear::validParams(), CentralDifference::validParams(), QuotientAux::validParams(), XYDelaunayGenerator::validParams(), XYMeshLineCutter::validParams(), MaterialRealVectorValueAuxTempl< T, is_ad, is_functor >::validParams(), SideAverageValue::validParams(), NodalPatchRecoveryMaterialProperty::validParams(), MaterialPropertyValueTempl< is_ad >::validParams(), DisplayGhostingAction::validParams(), MatNeumannBCTempl< is_ad >::validParams(), SetMFEMMeshFESpaceAction::validParams(), MFEMDivDivKernel::validParams(), LeastSquaresFitHistory::validParams(), PiecewiseLinearFromVectorPostprocessor::validParams(), MultiAppPostprocessorTransfer::validParams(), MultiAppGeneralFieldUserObjectTransfer::validParams(), GenericFunctorMaterialTempl< is_ad >::validParams(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::validParams(), GenericVectorFunctorMaterialTempl< is_ad >::validParams(), MFEMDomainLFKernel::validParams(), MFEMMixedScalarCurlKernel::validParams(), MFEMMixedVectorGradientKernel::validParams(), MFEMMassKernel::validParams(), MFEMVectorFEWeakDivergenceKernel::validParams(), MFEMVectorFEMassKernel::validParams(), MFEMTimeDerivativeMassKernel::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), FVFunctorNeumannBC::validParams(), MatCoupledForce::validParams(), ExtraIDIntegralVectorPostprocessor::validParams(), CumulativeValuePostprocessor::validParams(), CSV::validParams(), DOFMapOutput::validParams(), MFEMCurlCurlKernel::validParams(), GenericFunctorGradientMaterialTempl< is_ad >::validParams(), SingleRankPartitioner::validParams(), SetupQuadratureAction::validParams(), VectorOfPostprocessors::validParams(), MFEMAuxKernel::validParams(), AddMFEMProblemOperatorAction::validParams(), NearestPointLayeredSideIntegralFunctor::validParams(), MultiAppVariableValueSamplePostprocessorTransfer::validParams(), ElementIntegralMaterialPropertyTempl< is_ad >::validParams(), AnisotropicDiffusion::validParams(), GreaterThanLessThanPostprocessor::validParams(), FunctionDirichletBC::validParams(), InterfaceAverageVariableValuePostprocessor::validParams(), LayeredSideIntegral::validParams(), PointValue::validParams(), OneDEqualValueConstraintBC::validParams(), FEProblem::validParams(), ElementAverageValue::validParams(), PerfGraphReporter::validParams(), ParsedChainControl::validParams(), NearestPositionsDivision::validParams(), MultiAppVectorPostprocessorTransfer::validParams(), FunctionElementIntegralUserObject::validParams(), MultiAppPostprocessorInterpolationTransfer::validParams(), FunctorCoordinatesFunctionAux::validParams(), NearestPointLayeredSideAverageFunctor::validParams(), Gnuplot::validParams(), SolutionHistory::validParams(), CoupledValueFunctionMaterialTempl< is_ad >::validParams(), PointwiseRenormalizeVector::validParams(), DefaultMultiAppFixedPointConvergence::validParams(), ParsedConvergence::validParams(), CutMeshByLevelSetGeneratorBase::validParams(), FVOrthogonalDiffusion::validParams(), ConstantDamper::validParams(), FileOutput::validParams(), MaterialRankFourTensorAuxTempl< is_ad >::validParams(), FVBodyForce::validParams(), ReporterPointSource::validParams(), InterpolatedStatefulMaterialTempl< T >::validParams(), SidesetAroundSubdomainUpdater::validParams(), MFEMGenericFunctorMaterial::validParams(), MFEMCurlAux::validParams(), FVDirichletBCBase::validParams(), DerivativeParsedMaterialTempl< is_ad >::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), MFEMBoundarySubMesh::validParams(), MFEMDomainSubMesh::validParams(), SideIntegralMaterialPropertyTempl< is_ad >::validParams(), UserForcingFunctorNodalKernel::validParams(), ADConservativeAdvectionBC::validParams(), MFEMGenericFunctorVectorMaterial::validParams(), FVFunctionNeumannBC::validParams(), MFEMFunctorMaterial::validParams(), NumDOFs::validParams(), MFEMDivAux::validParams(), ElementUOAux::validParams(), RandomPartitioner::validParams(), MFEMGradAux::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), ElementH1Error::validParams(), ElementH1ErrorFunctionAux::validParams(), VectorBodyForce::validParams(), ElementVectorL2Error::validParams(), DirectionalNeumannBC::validParams(), InterfacePostprocessor::validParams(), FunctionValuePostprocessor::validParams(), LinearNodalConstraint::validParams(), ElementIntegralFunctorPostprocessorTempl< is_ad >::validParams(), AddSamplerAction::validParams(), MaterialADConverterTempl< T >::validParams(), ElementH1SemiError::validParams(), TorchScriptMaterial::validParams(), ADPiecewiseLinearInterpolationMaterial::validParams(), QuadraturePointsPositions::validParams(), AddControlAction::validParams(), CopyMeshPartitioner::validParams(), BatchMeshGeneratorAction::validParams(), EigenProblem::validParams(), GhostingFromUOAux::validParams(), ParsedMaterialTempl< is_ad >::validParams(), UserForcingFunctionNodalKernel::validParams(), LibtorchControlValuePostprocessor::validParams(), BlockRestrictionDebugOutput::validParams(), ElementIntegralUserObject::validParams(), CrankNicolson::validParams(), PlaneDeletionGenerator::validParams(), SideSetsAroundSubdomainGenerator::validParams(), PostprocessorNeumannBC::validParams(), MFEMSolverBase::validParams(), MeshDivisionFunctorReductionVectorPostprocessor::validParams(), SolutionAux::validParams(), MFEMHypreBoomerAMG::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), MaterialOutputAction::validParams(), MFEMOperatorJacobiSmoother::validParams(), FVBoundaryIntegralValueConstraint::validParams(), MFEMHyprePCG::validParams(), MFEMCGSolver::validParams(), MatBodyForceTempl< is_ad, Parent >::validParams(), ParsedGenerateSideset::validParams(), SolutionScalarAux::validParams(), MFEMGMRESSolver::validParams(), PetscExternalPartitioner::validParams(), MFEMHypreFGMRES::validParams(), NodalEqualValueConstraint::validParams(), ElementL2ErrorFunctionAux::validParams(), FindValueOnLine::validParams(), ElementalVariableValue::validParams(), TimePeriod::validParams(), MatReaction::validParams(), TorchScriptUserObject::validParams(), NearestPointIntegralVariablePostprocessor::validParams(), ProjectionAux::validParams(), FunctorExtremaPositions::validParams(), ElementIntegralVariablePostprocessor::validParams(), InterfaceQpUserObjectBase::validParams(), SideFVFluxBCIntegral::validParams(), ElementIntegralVariableUserObject::validParams(), ValueJumpIndicatorTempl< ComputeValueType >::validParams(), TimePeriodBase::validParams(), NearestPointAverage::validParams(), ScalarConstantIC::validParams(), MultiAppDofCopyTransfer::validParams(), TransfiniteMeshGenerator::validParams(), BoundingBoxIC::validParams(), FVDivergence::validParams(), ElementIntegralArrayVariablePostprocessor::validParams(), StitchedMesh::validParams(), CSVTimeSequenceStepper::validParams(), MaterialPropertyDebugOutput::validParams(), ImageFunction::validParams(), ElementVariablesDifferenceMax::validParams(), OrientedBoxMarker::validParams(), AddMFEMSolverAction::validParams(), MFEMSubMeshTransfer::validParams(), MFEMHypreGMRES::validParams(), ScalarL2Error::validParams(), SideIntegralFunctorPostprocessorTempl< false >::validParams(), MultiAppCopyTransfer::validParams(), TransientMultiApp::validParams(), FVOrthogonalBoundaryDiffusion::validParams(), TagVectorSum::validParams(), LibtorchArtificialNeuralNetParameters::validParams(), EqualValueEmbeddedConstraintTempl< is_ad >::validParams(), CoupledVarNeumannBCTempl< false >::validParams(), MaterialRankTwoTensorAuxTempl< T, is_ad >::validParams(), FieldSplitPreconditioner::validParams(), MultiAppProjectionTransfer::validParams(), ContainsPointAux::validParams(), GenericConstantMaterialTempl< is_ad >::validParams(), FunctionLayeredIntegral::validParams(), AddMFEMPreconditionerAction::validParams(), AddMFEMFESpaceAction::validParams(), AddMFEMSubMeshAction::validParams(), ADDGDiffusion::validParams(), PiecewiseMultilinear::validParams(), LibmeshPartitioner::validParams(), HistogramVectorPostprocessor::validParams(), ParsedDownSelectionPositions::validParams(), RealFunctionControl::validParams(), ADMatDiffusionBase< Real >::validParams(), Exodus::validParams(), LinearCombinationPostprocessor::validParams(), InterfaceIntegralVariableValuePostprocessor::validParams(), LinearFVAdvectionDiffusionFunctorDirichletBC::validParams(), VariableResidualNormsDebugOutput::validParams(), LinearFVAdvectionDiffusionFunctorNeumannBC::validParams(), PiecewiseMulticonstant::validParams(), SideIntegralVariablePostprocessor::validParams(), NearestPointLayeredSideIntegral::validParams(), VacuumBC::validParams(), DGDiffusion::validParams(), MeshInfo::validParams(), FVConstantIC::validParams(), PNGOutput::validParams(), MooseParsedVectorFunction::validParams(), MultiAppNearestNodeTransfer::validParams(), PenaltyEqualValueConstraintTempl< is_ad >::validParams(), SinDirichletBC::validParams(), NearestPointLayeredSideAverage::validParams(), Heun::validParams(), AdamsPredictor::validParams(), ParsedElementDeletionGenerator::validParams(), FVDiffusion::validParams(), CommonOutputAction::validParams(), MFEMGeneralUserObject::validParams(), SubdomainBoundingBoxGenerator::validParams(), ReferenceResidualConvergence::validParams(), AddPeriodicBCAction::validParams(), NearestPointLayeredIntegral::validParams(), NearestPointLayeredSideDiffusiveFluxAverage::validParams(), NEML2Action::validParams(), PatternedMeshGenerator::validParams(), InternalSideIntegralVariablePostprocessor::validParams(), NodalVariableValue::validParams(), BodyForceTempl< is_ad >::validParams(), NearestPointLayeredAverage::validParams(), Ralston::validParams(), LibtorchNeuralNetControl::validParams(), ExplicitMidpoint::validParams(), Split::validParams(), DistributedRectilinearMeshGenerator::validParams(), WeakGradientBC::validParams(), EigenExecutionerBase::validParams(), GhostingUserObject::validParams(), TransientBase::validParams(), ADFunctionPenaltyDirichletBC::validParams(), DiffusionFluxBC::validParams(), FVFunctionIC::validParams(), SideAdvectiveFluxIntegralTempl< is_ad >::validParams(), WebServerControl::validParams(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::validParams(), NodalNormalsPreprocessor::validParams(), NearestRadiusLayeredAverage::validParams(), SinNeumannBC::validParams(), ActionComponent::validParams(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::validParams(), Axisymmetric2D3DSolutionFunction::validParams(), FunctionPenaltyDirichletBC::validParams(), HFEMTestJump::validParams(), FVIntegralValueConstraint::validParams(), VectorConstantIC::validParams(), MFEMLinearElasticityKernel::validParams(), PropertyReadFile::validParams(), FVBoundedValueConstraint::validParams(), MooseParsedGradFunction::validParams(), AddNodalNormalsAction::validParams(), HFEMTrialJump::validParams(), BoundingBoxNodeSetGenerator::validParams(), DiffusionPhysicsBase::validParams(), MultiAppUserObjectTransfer::validParams(), ProjectedStatefulMaterialStorageAction::validParams(), MultiAppMFEMCopyTransfer::validParams(), DGFunctionDiffusionDirichletBC::validParams(), MooseParsedFunction::validParams(), GenericFunctionMaterialTempl< is_ad >::validParams(), GenericFunctionVectorMaterialTempl< is_ad >::validParams(), VectorFunctionIC::validParams(), CylinderComponent::validParams(), MultiAppGeometricInterpolationTransfer::validParams(), PatternedMesh::validParams(), GridPartitioner::validParams(), AB2PredictorCorrector::validParams(), FVPointValueConstraint::validParams(), InterfaceUserObjectBase::validParams(), MeshGeneratorComponent::validParams(), PostprocessorComparison::validParams(), PenaltyPeriodicSegmentalConstraint::validParams(), ADPenaltyPeriodicSegmentalConstraint::validParams(), PeriodicSegmentalConstraint::validParams(), ADPeriodicSegmentalConstraint::validParams(), PhysicsBase::validParams(), SolutionUserObjectBase::validParams(), ConstantIC::validParams(), AverageValueConstraint::validParams(), ScalarSolutionIC::validParams(), ElementW1pError::validParams(), RelativeDifferencePostprocessor::validParams(), VectorPostprocessorComparison::validParams(), ScalarLagrangeMultiplier::validParams(), IterationAdaptiveDT::validParams(), PhysicsBasedPreconditioner::validParams(), MFEMMesh::validParams(), RadialAverage::validParams(), PostprocessorSpatialUserObject::validParams(), ScalarLMKernelTempl< is_ad >::validParams(), FunctionMaterialBase< is_ad >::validParams(), ADPenaltyDirichletBC::validParams(), VariableCondensationPreconditioner::validParams(), CompositionDT::validParams(), PenaltyDirichletBC::validParams(), SimplePredictor::validParams(), DumpObjectsProblem::validParams(), Eigenvalue::validParams(), SolutionIC::validParams(), GhostBoundary::validParams(), RandomIC::validParams(), DerivativeParsedMaterialHelperTempl< is_ad >::validParams(), DisplacedProblem::validParams(), MooseVariableBase::validParams(), LStableDirk2::validParams(), Terminator::validParams(), RandomICBase::validParams(), MeshDivision::validParams(), LStableDirk3::validParams(), ImplicitMidpoint::validParams(), DerivativeFunctionMaterialBaseTempl< is_ad >::validParams(), OutputInterface::validParams(), MFEMSuperLU::validParams(), ExplicitTVDRK2::validParams(), PiecewiseBilinear::validParams(), LStableDirk4::validParams(), AStableDirk4::validParams(), Sampler::validParams(), ParsedMaterialHelper< is_ad >::validParams(), Checkpoint::validParams(), and TopResidualDebugOutput::validParams().

83 {
84  _class_description = doc_string;
85 }
std::string _class_description
The class description for the owning object.

◆ addCommandLineParam() [1/3]

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

Definition at line 1873 of file InputParameters.h.

Referenced by MooseApp::addAppParam(), MooseApp::addInputParam(), and MooseApp::validParams().

1876 {
1877  static_assert(!std::is_same_v<T, MooseEnum>,
1878  "addCommandLineParam() without a value cannot be used with a MooseEnum because a "
1879  "MooseEnum requires initialization");
1880 
1881  auto constexpr is_bool = std::is_same_v<T, bool>;
1882  if constexpr (is_bool)
1883  addParam<T>(name, false, doc_string);
1884  else
1885  addParam<T>(name, doc_string);
1886 
1887  addCommandLineParamHelper<T>(
1888  name, syntax, /* required = */ false, /* value_required = */ !is_bool);
1889 }
std::string name(const ElemQuality q)

◆ addCommandLineParam() [2/3]

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

1897 {
1898  if constexpr (std::is_same_v<T, bool>)
1899  mooseAssert(!value, "Default for bool must be false");
1900 
1901  addParam<T>(name, value, doc_string);
1902  addCommandLineParamHelper<T>(name, syntax, /* required = */ false, /* value_required = */ true);
1903 }
std::string name(const ElemQuality q)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ addCommandLineParam() [3/3]

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

Definition at line 343 of file InputParameters.h.

347  {
348  addCommandLineParam<T>(name, syntax, T{value}, doc_string);
349  }
std::string name(const ElemQuality q)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ addCommandLineParamHelper()

template<typename T >
void InputParameters::addCommandLineParamHelper ( const std::string &  name,
const std::string &  syntax,
const bool  required,
const bool  value_required 
)
private

Helper for all of the addCommandLineParam() calls, which sets up _cl_data in the metadata.

Parameters
nameThe parameter name
syntaxThe parameter syntax
requiredWhether or not the parameter is required
value_requiredWhethre or not the parameter requires a value

Definition at line 1698 of file InputParameters.h.

1702 {
1703  static_assert(isValidCommandLineType<T>::value,
1704  "This type is not a supported command line parameter type. See "
1705  "CommandLine::populateCommandLineParams to add it as a supported type.");
1706 
1707  auto & cl_data = at(name)._cl_data;
1708  cl_data = CommandLineMetadata();
1709 
1710  // Split up the syntax by whitespace
1711  std::vector<std::string> syntax_split;
1712  MooseUtils::tokenize(syntax, syntax_split, 1, " \t\n\v\f\r");
1713 
1714  // Set the single syntax string as the combined syntax with removed whitespace
1715  cl_data->syntax = MooseUtils::stringJoin(syntax_split);
1716  mooseAssert(cl_data->syntax.size(), "Empty token");
1717 
1718  // Set the switches; only parse those that begin with "-" as we also
1719  // provide examples within the syntax
1720  for (const auto & val : syntax_split)
1721  if (val.rfind("-", 0) == 0)
1722  {
1723  if (!std::regex_search(val, std::regex("^\\-+[a-zA-Z]")))
1724  mooseError("The switch '",
1725  val,
1726  "' for the command line parameter '",
1727  name,
1728  "' is invalid. It must begin with an alphabetical character.");
1729 
1730  cl_data->switches.push_back(val);
1732  }
1733 
1734  cl_data->required = required;
1735  cl_data->global = false;
1736 
1737  // No arguments needed for a boolean parameter
1738  if constexpr (std::is_same_v<T, bool>)
1739  {
1740  (void)value_required; // purposely unused; doesn't take a value
1741  cl_data->argument_type = CommandLineMetadata::ArgumentType::NONE;
1742  }
1743  // MooseEnums require a value
1744  else if constexpr (std::is_same_v<T, MooseEnum>)
1745  {
1746  (void)value_required; // purposely unused; always required
1747  cl_data->argument_type = CommandLineMetadata::ArgumentType::REQUIRED;
1748  }
1749  // The user didn't specify a default, so a value is required
1750  else if (value_required)
1751  cl_data->argument_type = CommandLineMetadata::ArgumentType::REQUIRED;
1752  // Otherwise, it's optional (user specified a default)
1753  else
1754  cl_data->argument_type = CommandLineMetadata::ArgumentType::OPTIONAL;
1755 }
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 ...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void add_command_line_name(const std::string &name)
class infix_ostream_iterator if void
Definition: InfixIterator.h:26
std::optional< CommandLineMetadata > _cl_data
The data pertaining to a command line parameter (empty if not a command line param) ...
std::string stringJoin(const std::vector< std::string > &values, const std::string &separator=" ")
Concatenates value into a single string separated by separator.
Definition: MooseUtils.C:1050
Metadata & at(const std::string &param_name)

◆ addCoupledVar() [1/3]

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

This method adds a coupled variable name pair.

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

Definition at line 257 of file InputParameters.C.

Referenced by applyCoupledVar(), transferParam(), BuildArrayVariableAux::validParams(), ArrayHFEMDirichletBC::validParams(), HFEMDirichletBC::validParams(), DerivativeSumMaterialTempl< is_ad >::validParams(), PenetrationAux::validParams(), ElementExtremeValue::validParams(), SideExtremeValue::validParams(), NodalExtremeValue::validParams(), InterfaceQpValueUserObject::validParams(), FunctionDiffusion::validParams(), ParsedODEKernel::validParams(), ParsedMaterialBase::validParams(), VectorFromComponentVariablesMaterialTempl< is_ad >::validParams(), VectorMagnitudeAux::validParams(), ArrayParsedAux::validParams(), SpatialAverageBase::validParams(), ParsedAux::validParams(), ParsedVectorAux::validParams(), NodalNormalBC::validParams(), VariableValueVolumeHistogram::validParams(), ADMatReaction::validParams(), QuotientScalarAux::validParams(), PointwiseRenormalizeVector::validParams(), QuotientAux::validParams(), CoupledValueFunctionMaterialTempl< is_ad >::validParams(), ElementVectorL2Error::validParams(), ADKernelSUPGTempl< T >::validParams(), FindValueOnLine::validParams(), MatReaction::validParams(), ADMortarScalarBase::validParams(), MortarScalarBase::validParams(), CoupledVarNeumannBCTempl< false >::validParams(), KernelScalarBase::validParams(), ADKernelScalarBase::validParams(), ADMatDiffusionBase< Real >::validParams(), InterfaceIntegralVariableValuePostprocessor::validParams(), SideAdvectiveFluxIntegralTempl< is_ad >::validParams(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::validParams(), BoundaryCondition::validParams(), NodeFaceConstraint::validParams(), ConservativeAdvectionTempl< is_ad >::validParams(), MortarConstraintBase::validParams(), MatDiffusionBase< Real >::validParams(), FVInterfaceKernel::validParams(), and FVBoundaryCondition::validParams().

258 {
259  addParam<std::vector<VariableName>>(name, doc_string);
260  _coupled_vars.insert(name);
261 
262  // Set the doc string for any associated deprecated coupled var
263  setDeprecatedVarDocString(name, doc_string);
264 }
std::string name(const ElemQuality q)
void setDeprecatedVarDocString(const std::string &new_name, const std::string &doc_string)
Private method for setting deprecated coupled variable documentation strings.
std::set< std::string > _coupled_vars
The coupled variables set.

◆ addCoupledVar() [2/3]

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

This method adds a coupled variable name pair.

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

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

Definition at line 228 of file InputParameters.C.

229 {
230  addParam<std::vector<VariableName>>(name, doc_string);
231  _coupled_vars.insert(name);
232  auto & metadata = _params[name];
233  metadata._coupled_default.assign(1, value);
234  metadata._have_coupled_default = true;
235 
236  // Set the doc string for any associated deprecated coupled var
237  setDeprecatedVarDocString(name, doc_string);
238 }
std::string name(const ElemQuality q)
void setDeprecatedVarDocString(const std::string &new_name, const std::string &doc_string)
Private method for setting deprecated coupled variable documentation strings.
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCoupledVar() [3/3]

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

This method adds a coupled variable name pair.

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

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

Definition at line 241 of file InputParameters.C.

244 {
245  // std::vector<VariableName>(1, Moose::stringify(value)),
246  addParam<std::vector<VariableName>>(name, doc_string);
247  _coupled_vars.insert(name);
248  auto & metadata = _params[name];
249  metadata._coupled_default = value;
250  metadata._have_coupled_default = true;
251 
252  // Set the doc string for any associated deprecated coupled var
253  setDeprecatedVarDocString(name, doc_string);
254 }
std::string name(const ElemQuality q)
void setDeprecatedVarDocString(const std::string &new_name, const std::string &doc_string)
Private method for setting deprecated coupled variable documentation strings.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCoupledVarWithAutoBuild()

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

These methods add a coupled variable name pair.

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

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

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

Definition at line 295 of file InputParameters.C.

Referenced by addRequiredCoupledVarWithAutoBuild().

299 {
300  addParam<std::vector<VariableName>>(name, doc_string);
301  _coupled_vars.insert(name);
302  _params[name]._autobuild_vecs = std::make_pair(base_name, num_name);
303 
304  // Additionally there are two more parameters that need to be added:
305  addParam<std::string>(base_name, doc_string + " (base_name)");
306  addParam<unsigned int>(num_name, doc_string + " (num_name)");
307 }
std::string name(const ElemQuality q)
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCustomTypeParam() [1/2]

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

Definition at line 1800 of file InputParameters.h.

Referenced by ParsedVectorAux::validParams(), ParsedMaterialBase::validParams(), ParsedConvergence::validParams(), SolutionUserObject::validParams(), and MooseParsedFunction::validParams().

1804 {
1805  addParam<T>(name, value, doc_string);
1806  _params[name]._custom_type = custom_type;
1807 }
std::string name(const ElemQuality q)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addCustomTypeParam() [2/2]

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

Definition at line 1811 of file InputParameters.h.

1814 {
1815  addParam<T>(name, doc_string);
1816  _params[name]._custom_type = custom_type;
1817 }
std::string name(const ElemQuality q)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addDeprecatedCoupledVar()

void InputParameters::addDeprecatedCoupledVar ( const std::string &  old_name,
const std::string &  new_name,
const std::string &  removal_date = "" 
)

This method adds a deprecated 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. The doc string for the deprecated variable will be constructed from the doc string for the new variable. A deprecation message will also be automatically generated

Definition at line 267 of file InputParameters.C.

270 {
271  mooseDeprecated("Please use 'deprecateCoupledVar'");
272 
273  _show_deprecated_message = false;
274 
275  // Set the doc string if we are adding the deprecated var after the new var has already been added
276  auto params_it = _params.find(new_name);
277  std::string doc_string;
278  if (params_it != _params.end())
279  doc_string = params_it->second._doc_string;
280 
281  addParam<std::vector<VariableName>>(old_name, doc_string);
282  _coupled_vars.insert(old_name);
283  _new_to_deprecated_coupled_vars.emplace(new_name, old_name);
284 
285  std::string deprecation_message =
286  "The coupled variable parameter '" + old_name + "' has been deprecated";
287  if (!removal_date.empty())
288  deprecation_message += " and will be removed " + removal_date;
289  deprecation_message += ". Please use the '" + new_name + "' coupled variable parameter instead.";
290  _params[old_name]._deprecation_message = deprecation_message;
292 }
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:353
std::set< std::string > _coupled_vars
The coupled variables set.
void addParam(const std::string &name, const S &value, const std::string &doc_string)
These methods add an optional parameter and a documentation string to the InputParameters object...
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addDeprecatedCustomTypeParam()

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

Definition at line 1821 of file InputParameters.h.

Referenced by ParsedMaterialBase::validParams(), and MooseParsedFunction::validParams().

1825 {
1826  _show_deprecated_message = false;
1827  addParam<T>(name, doc_string);
1828  auto & metadata = _params[name];
1829  metadata._custom_type = custom_type;
1830 
1831  metadata._deprecation_message = deprecation_message;
1832  _show_deprecated_message = true;
1833 }
std::string name(const ElemQuality q)
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addDeprecatedParam() [1/6]

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

Definition at line 1991 of file InputParameters.h.

Referenced by AdaptivityAction::validParams(), SetupDebugAction::validParams(), BlockDeletionGenerator::validParams(), RenameBlockGenerator::validParams(), AnnularMesh::validParams(), AnnularMeshGenerator::validParams(), ParsedSubdomainGeneratorBase::validParams(), Console::validParams(), PostprocessorDT::validParams(), ElementSubdomainModifierBase::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), VectorFunctionDirichletBC::validParams(), FixedPointSolve::validParams(), DerivativeKernelInterface< T >::validParams(), MooseParsedVectorFunction::validParams(), Exodus::validParams(), CommonOutputAction::validParams(), TransientBase::validParams(), MooseParsedGradFunction::validParams(), PropertyReadFile::validParams(), MultiAppUserObjectTransfer::validParams(), MultiAppTransfer::validParams(), FunctionMaterialBase< is_ad >::validParams(), SampledOutput::validParams(), DerivativeFunctionMaterialBaseTempl< is_ad >::validParams(), MooseParsedFunctionBase::validParams(), MatDiffusionBase< Real >::validParams(), Executioner::validParams(), Output::validParams(), MultiApp::validParams(), and FEProblemBase::validParams().

1995 {
1996  _show_deprecated_message = false;
1997  mooseAssert(!_old_to_new_name_and_dep.count(name),
1998  "Attempting to deprecate via addDeprecatedParam the parameter, '"
1999  << name << "', already deprecated via deprecateParam or renamed via renameParam");
2000  addParam<T>(name, value, doc_string);
2001 
2002  _params[name]._deprecation_message = deprecation_message;
2003  _show_deprecated_message = true;
2004 }
std::string name(const ElemQuality q)
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::map< std::string, Metadata > _params
The actual parameter data.
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

◆ addDeprecatedParam() [2/6]

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

Definition at line 2008 of file InputParameters.h.

2011 {
2012  _show_deprecated_message = false;
2013  mooseAssert(!_old_to_new_name_and_dep.count(name),
2014  "Attempting to deprecate via addDeprecatedParam the parameter, '"
2015  << name << "', already deprecated via deprecateParam or renamed via renameParam");
2016  addParam<T>(name, doc_string);
2017 
2018  _params[name]._deprecation_message = deprecation_message;
2019  _show_deprecated_message = true;
2020 }
std::string name(const ElemQuality q)
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::map< std::string, Metadata > _params
The actual parameter data.
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

◆ addDeprecatedParam() [3/6]

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

Definition at line 1334 of file InputParameters.C.

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

◆ addDeprecatedParam() [4/6]

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

Definition at line 1344 of file InputParameters.C.

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

◆ addDeprecatedParam() [5/6]

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

◆ addDeprecatedParam() [6/6]

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

◆ addOptionalValuedCommandLineParam()

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

Add a command line parameter with an optional value.

This is a deprecated option and only remains for two parameters: "mesh_only" and "recover". There are issues with command line parameters with optional values because if a value following one of these is a hit cli parameter, we don't know if we should apply it to the optional option or as a hit parameter.

It is also allowed for "run" as we take all arguments past –run and pass to python.

Parameters
nameThe name of the parameer
syntaxSpace separated list of command-line switch syntax that can set this option
valueThe default value to assign
doc_stringDocumentation. This will be shown for –help

Definition at line 1907 of file InputParameters.h.

Referenced by MooseApp::validParams().

1911 {
1912  mooseAssert(name == "mesh_only" || name == "recover" || name == "run",
1913  "Not supported for new parameters");
1914  static_assert(!std::is_same_v<T, bool>, "Cannot be used for a bool (does not take a value)");
1915  addParam<T>(name, value, doc_string);
1916  addCommandLineParamHelper<T>(name, syntax, /* required = */ false, /* value_required = */ false);
1917 }
std::string name(const ElemQuality q)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ addParam() [1/7]

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

These methods add an optional 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 1654 of file InputParameters.h.

Referenced by addDeprecatedCoupledVar(), ConstantReporter::addReporterTypeParams(), MultiAppTransfer::addSkipCoordCollapsingParam(), AdvancedOutput::addValidParams(), Moose::commonAdaptivityParams(), FEProblemSolve::feProblemDefaultConvergenceParams(), FixedPointSolve::fixedPointDefaultConvergenceParams(), ConservativeAdvectionTempl< is_ad >::generalParams(), Moose::PetscSupport::getPetscValidParams(), Moose::SlepcSupport::getSlepcEigenProblemValidParams(), FVOneVarDiffusionInterface::validParams(), FVDiffusionInterface::validParams(), AutoCheckpointAction::validParams(), EqualValueBoundaryConstraint::validParams(), ArrayTimeDerivative::validParams(), NumRelationshipManagers::validParams(), NumVars::validParams(), PerfGraphData::validParams(), Residual::validParams(), MassEigenKernel::validParams(), TimeDerivative::validParams(), VectorPostprocessorReductionValue::validParams(), VectorTimeDerivative::validParams(), ElementStatistics::validParams(), NodalStatistics::validParams(), DynamicObjectRegistrationAction::validParams(), ErrorFractionMarker::validParams(), ValueRangeMarker::validParams(), ValueThresholdMarker::validParams(), ErrorToleranceMarker::validParams(), ReadExecutorParamsAction::validParams(), FileMesh::validParams(), ConstantVectorPostprocessor::validParams(), TiledMesh::validParams(), ArrayVariableComponent::validParams(), BoundaryDeletionGenerator::validParams(), InversePowerMethod::validParams(), ArrayVarReductionAux::validParams(), NonlinearEigen::validParams(), ElementOrderConversionGenerator::validParams(), ADRobinBC::validParams(), ADVectorRobinBC::validParams(), ArrayHFEMDirichletBC::validParams(), ArrayNeumannBC::validParams(), ArrayPenaltyDirichletBC::validParams(), ArrayVacuumBC::validParams(), CopyNodalVarsAction::validParams(), ElementIntegerAux::validParams(), HFEMDirichletBC::validParams(), FVFunctorTimeKernel::validParams(), CreateExecutionerAction::validParams(), FVReaction::validParams(), FVMatAdvection::validParams(), PenaltyDirichletNodalKernel::validParams(), GradientJumpIndicator::validParams(), CoefReactionTempl< is_ad >::validParams(), ExtremeValueBase< SideVariablePostprocessor >::validParams(), ExtraIDIntegralReporter::validParams(), DerivativeSumMaterialTempl< is_ad >::validParams(), AddFieldSplitAction::validParams(), ActivateElementsByPath::validParams(), ActivateElementsCoupled::validParams(), ThresholdElementSubdomainModifier::validParams(), MFEMBoundaryIntegratedBC::validParams(), MFEMBoundaryNormalIntegratedBC::validParams(), MFEMScalarDirichletBC::validParams(), MFEMVectorBoundaryIntegratedBC::validParams(), MFEMScalarFESpace::validParams(), MFEMVectorFESpace::validParams(), CreateProblemAction::validParams(), JSONOutput::validParams(), MooseObjectAction::validParams(), TimeExtremeValue::validParams(), AdaptivityAction::validParams(), PenetrationAux::validParams(), ElementQualityChecker::validParams(), CSVReaderVectorPostprocessor::validParams(), Eigenvalues::validParams(), SetupMeshAction::validParams(), UniqueExtraIDMeshGenerator::validParams(), ActivateElementsUserObjectBase::validParams(), MFEMVectorDirichletBCBase::validParams(), MFEMSteady::validParams(), MFEMTransient::validParams(), GapValueAux::validParams(), ConstantPostprocessor::validParams(), ElementExtremeFunctorValueTempl< is_ad >::validParams(), ScaleOldChainControl::validParams(), UnitTripChainControl::validParams(), TerminateChainControl::validParams(), CoefTimeDerivative::validParams(), DivField::validParams(), MatrixSymmetryCheck::validParams(), NumElements::validParams(), FunctionDiffusion::validParams(), GradField::validParams(), MassMatrix::validParams(), ScalarVariable::validParams(), ScalePostprocessor::validParams(), AnnularMesh::validParams(), TimeIntegratedPostprocessor::validParams(), MooseStaticCondensationPreconditioner::validParams(), NullKernel::validParams(), SingleMatrixPreconditioner::validParams(), RestartableDataReporter::validParams(), NullScalarKernel::validParams(), SecondTimeDerivativeAux::validParams(), ConditionalEnableControl::validParams(), TimeIntervalTimes::validParams(), BoundaryMarker::validParams(), MultiAppCloneReporterTransfer::validParams(), MultiAppReporterTransfer::validParams(), IterationCountConvergence::validParams(), TimeDerivativeAux::validParams(), ElemSideNeighborLayersTester::validParams(), GeneratedMesh::validParams(), SetupDebugAction::validParams(), SidesetInfoVectorPostprocessor::validParams(), ArrayDGDiffusion::validParams(), SpiralAnnularMesh::validParams(), RinglebMesh::validParams(), AddMetaDataGenerator::validParams(), BlockDeletionGenerator::validParams(), BoundaryLayerSubdomainGenerator::validParams(), BreakBoundaryOnSubdomainGenerator::validParams(), BreakMeshByBlockGeneratorBase::validParams(), CoarsenBlockGenerator::validParams(), ElementGenerator::validParams(), ExtraNodesetGenerator::validParams(), FileMeshGenerator::validParams(), FillBetweenCurvesGenerator::validParams(), FillBetweenPointVectorsGenerator::validParams(), FillBetweenSidesetsGenerator::validParams(), LowerDBlockFromSidesetGenerator::validParams(), MoveNodeGenerator::validParams(), ConstantFunction::validParams(), NodeSetsGeneratorBase::validParams(), AdvectiveFluxAux::validParams(), PiecewiseConstant::validParams(), ParsedSubdomainMeshGenerator::validParams(), PlaneIDMeshGenerator::validParams(), RefineBlockGenerator::validParams(), RefineSidesetGenerator::validParams(), RenameBlockGenerator::validParams(), CopyValueAux::validParams(), RinglebMeshGenerator::validParams(), SideSetsFromNormalsGenerator::validParams(), SmoothMeshGenerator::validParams(), SphereMeshGenerator::validParams(), SpiralAnnularMeshGenerator::validParams(), SubdomainPerElementGenerator::validParams(), TiledMeshGenerator::validParams(), MoveNodesToSphere::validParams(), FunctorDirichletBC::validParams(), DirichletBCBase::validParams(), MFEMSimplifiedFESpace::validParams(), FunctorNeumannBC::validParams(), FVCoupledForce::validParams(), ConstantAux::validParams(), FunctionIC::validParams(), CoupledForceNodalKernel::validParams(), LowerBoundNodalKernel::validParams(), ReactionNodalKernel::validParams(), UpperBoundNodalKernel::validParams(), DeprecatedBlockAction::validParams(), BoundsBase::validParams(), InterfaceDiffusion::validParams(), GetPostprocessorChainControl::validParams(), LimitChainControl::validParams(), PIDChainControl::validParams(), TransformedPositions::validParams(), ChangeOverFixedPointPostprocessor::validParams(), ChangeOverTimePostprocessor::validParams(), MaterialStdVectorRealGradientAux::validParams(), NumNonlinearIterations::validParams(), ParsedPostprocessor::validParams(), PseudoTimestep::validParams(), Receiver::validParams(), ParsedAux::validParams(), EqualValueConstraint::validParams(), ConcentricCircleMesh::validParams(), FiniteDifferencePreconditioner::validParams(), ReactionTempl< is_ad >::validParams(), IterationInfo::validParams(), ParsedVectorAux::validParams(), LinearFVAdvectionDiffusionExtrapolatedBC::validParams(), ParsedODEKernel::validParams(), LinearFVAnisotropicDiffusion::validParams(), LinearFVDiffusion::validParams(), ActuallyExplicitEuler::validParams(), LinearFVReaction::validParams(), NewmarkBeta::validParams(), CSVFileTimes::validParams(), LinearFVSource::validParams(), Times::validParams(), FunctionDT::validParams(), AddActionComponentAction::validParams(), TimeSequenceStepperBase::validParams(), MultiAppConservativeTransfer::validParams(), PIDTransientControl::validParams(), VariableGradientComponent::validParams(), InterfaceValueUserObject::validParams(), MaterialFunctorConverterTempl< T >::validParams(), ParsedMaterialBase::validParams(), MaxIncrement::validParams(), VectorPostprocessorVisualizationAux::validParams(), ImageMesh::validParams(), MeshGeneratorMesh::validParams(), ADDGAdvection::validParams(), SpatialAverageBase::validParams(), SpatialUserObjectVectorPostprocessor::validParams(), VectorVariableComponentAux::validParams(), FunctorBinnedValuesDivision::validParams(), AnnularMeshGenerator::validParams(), SetupResidualDebugAction::validParams(), BreakMeshByBlockGenerator::validParams(), CartesianMeshGenerator::validParams(), ConcentricCircleMeshGenerator::validParams(), ArrayParsedAux::validParams(), ExamplePatchMeshGenerator::validParams(), GeneratedMeshGenerator::validParams(), MeshDiagnosticsGenerator::validParams(), MeshRepairGenerator::validParams(), ParsedSubdomainGeneratorBase::validParams(), PiecewiseLinear::validParams(), PolyLineMeshGenerator::validParams(), SideSetExtruderGenerator::validParams(), SplineFunction::validParams(), FunctorADConverterTempl< T >::validParams(), FunctorSmootherTempl< T >::validParams(), TransformGenerator::validParams(), DivergenceAuxTempl< is_ad >::validParams(), MoveNodesToGeometryModifierBase::validParams(), FVBoundaryScalarLagrangeMultiplierConstraint::validParams(), MFEMConvectiveHeatFluxBC::validParams(), PostprocessorDT::validParams(), MFEMExecutioner::validParams(), NodalConstraint::validParams(), FunctorAux::validParams(), MFEMMixedBilinearFormKernel::validParams(), MFEMVectorDomainLFKernel::validParams(), MatchedValueBCTempl< is_ad >::validParams(), MFEMVectorFEDomainLFKernel::validParams(), FVMassMatrix::validParams(), MFEMConduitDataCollection::validParams(), MFEMParaViewDataCollection::validParams(), MFEMVisItDataCollection::validParams(), FVScalarLagrangeMultiplierConstraint::validParams(), FunctorIC::validParams(), Console::validParams(), ControlOutput::validParams(), GMVOutput::validParams(), ADMatInterfaceReaction::validParams(), PerfGraphOutput::validParams(), InterfaceValueUserObjectAux::validParams(), MaterialRealDenseMatrixAux::validParams(), PenaltyInterfaceDiffusionTempl< T, is_ad >::validParams(), Tecplot::validParams(), VTKOutput::validParams(), DiffusionCG::validParams(), DiffusionFV::validParams(), MultiAppPositions::validParams(), InterfaceQpMaterialPropertyBaseUserObject< Real >::validParams(), ADMatCoupledForce::validParams(), MeshDivisionAux::validParams(), ElementMaterialSampler::validParams(), FunctionSideIntegral::validParams(), ScalarKernelBase::validParams(), Constraint::validParams(), MemoryUsage::validParams(), MaterialDerivativeTestAction::validParams(), CoupledTiedValueConstraint::validParams(), PositionsFunctorValueSampler::validParams(), LeastSquaresFit::validParams(), NormalizationAux::validParams(), VectorFunctionReaction::validParams(), TiedValueConstraint::validParams(), LinearFVTimeDerivative::validParams(), MFEMHypreAMS::validParams(), TagMatrixAux::validParams(), QuadraturePointMarker::validParams(), CoupledGradientMaterialTempl< is_ad >::validParams(), MultiAppShapeEvaluationTransfer::validParams(), TimesEnableControl::validParams(), MaterialStdVectorAuxBaseTempl< Real, is_ad >::validParams(), VariableTimeIntegrationAux::validParams(), BoundingValueElementDamper::validParams(), WorkBalance::validParams(), BoundingValueNodalDamper::validParams(), SetAdaptivityOptionsAction::validParams(), CoupledForceTempl< is_ad >::validParams(), VariableValueVolumeHistogram::validParams(), ScalarTagMatrixAux::validParams(), CylindricalGridDivision::validParams(), CartesianGridDivision::validParams(), SphericalGridDivision::validParams(), ScalarTagVectorAux::validParams(), AdvancedExtruderGenerator::validParams(), FEProblemSolve::validParams(), BreakMeshByElementGenerator::validParams(), CircularBoundaryCorrectionGenerator::validParams(), CombinerGenerator::validParams(), CutMeshByLevelSetGenerator::validParams(), BicubicSplineFunction::validParams(), ImageMeshGenerator::validParams(), ADFunctionDirichletBC::validParams(), MeshExtruderGenerator::validParams(), CompositeFunction::validParams(), ParsedCurveGenerator::validParams(), ParsedExtraElementIDGenerator::validParams(), ParsedGenerateNodeset::validParams(), ADVectorFunctionDirichletBC::validParams(), ADVectorFunctionNeumannBC::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), StackGenerator::validParams(), StitchBoundaryMeshGenerator::validParams(), StitchedMeshGenerator::validParams(), SolutionTimeAdaptiveDT::validParams(), XYZDelaunayGenerator::validParams(), ParsedFunctorMaterialTempl< is_ad >::validParams(), ElementSubdomainModifierBase::validParams(), VectorMagnitudeFunctorMaterialTempl< is_ad >::validParams(), CreateDisplacedProblemAction::validParams(), TimedSubdomainModifier::validParams(), MFEMBoundaryCondition::validParams(), FVNeumannBC::validParams(), MFEMGenericFESpace::validParams(), FunctionGradientNeumannBC::validParams(), FVAnisotropicDiffusion::validParams(), FVDiffusionInterpolationInterface::validParams(), NeumannBCTempl< is_ad >::validParams(), MFEMDataCollection::validParams(), LinearFVFluxKernel::validParams(), MFEML2Error::validParams(), MFEMVectorL2Error::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), FunctorVectorElementalAuxTempl< is_ad >::validParams(), MFEMHypreADS::validParams(), FullSolveMultiApp::validParams(), GetFunctionValueChainControl::validParams(), VectorCurlPenaltyDirichletBC::validParams(), VectorDivPenaltyDirichletBC::validParams(), FunctorTimes::validParams(), VectorFunctionDirichletBC::validParams(), InternalSideIndicatorBase::validParams(), VectorPenaltyDirichletBC::validParams(), SolutionInvalidityOutput::validParams(), MaterialRealTensorValueAuxTempl< is_ad >::validParams(), ElementGroupCentroidPositions::validParams(), ExtraIDIntegralVectorPostprocessor::validParams(), DOFMapOutput::validParams(), MatCoupledForce::validParams(), MaterialPropertyValueTempl< is_ad >::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), PointVariableSamplerBase::validParams(), MultiAppPostprocessorInterpolationTransfer::validParams(), MultiAppPostprocessorTransfer::validParams(), CoupledValueFunctionMaterialTempl< is_ad >::validParams(), Gnuplot::validParams(), MultiAppVariableValueSamplePostprocessorTransfer::validParams(), ParsedConvergence::validParams(), PointwiseRenormalizeVector::validParams(), CoarsenedPiecewiseLinear::validParams(), FVOrthogonalDiffusion::validParams(), MFEMMixedScalarCurlKernel::validParams(), FunctorCoordinatesFunctionAux::validParams(), LeastSquaresFitHistory::validParams(), MFEMVectorFEWeakDivergenceKernel::validParams(), GreaterThanLessThanPostprocessor::validParams(), MFEMVectorFEMassKernel::validParams(), VectorMemoryUsage::validParams(), SetupQuadratureAction::validParams(), CutMeshByLevelSetGeneratorBase::validParams(), MFEMDivDivKernel::validParams(), OrientedSubdomainBoundingBoxGenerator::validParams(), ParsedNodeTransformGenerator::validParams(), PiecewiseLinearFromVectorPostprocessor::validParams(), SingleRankPartitioner::validParams(), PiecewiseTabularBase::validParams(), GenericFunctorGradientMaterialTempl< is_ad >::validParams(), GenericFunctorMaterialTempl< is_ad >::validParams(), XYDelaunayGenerator::validParams(), XYMeshLineCutter::validParams(), FVFunctorNeumannBC::validParams(), CreateApplicationBlockAction::validParams(), MFEMCurlCurlKernel::validParams(), MFEMDiffusionKernel::validParams(), MFEMDomainLFKernel::validParams(), MFEMMassKernel::validParams(), MFEMMixedVectorGradientKernel::validParams(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::validParams(), GenericVectorFunctorMaterialTempl< is_ad >::validParams(), SolutionHistory::validParams(), CSV::validParams(), FileOutput::validParams(), DisplayGhostingAction::validParams(), FVRelationshipManagerInterface::validParams(), ParsedChainControl::validParams(), MaterialRealVectorValueAuxTempl< T, is_ad, is_functor >::validParams(), Positions::validParams(), QuadraturePointsPositions::validParams(), ADKernelSUPGTempl< T >::validParams(), ElementIntegralFunctorPostprocessorTempl< is_ad >::validParams(), ElementVectorL2Error::validParams(), LinearNodalConstraint::validParams(), GhostingFromUOAux::validParams(), NodalScalarKernel::validParams(), VectorBodyForce::validParams(), EigenProblem::validParams(), MaterialADConverterTempl< T >::validParams(), ElemElemConstraint::validParams(), PointSamplerBase::validParams(), ElementDeletionGeneratorBase::validParams(), ReporterPointSource::validParams(), NumDOFs::validParams(), IntegratedBCBase::validParams(), ADConservativeAdvectionBC::validParams(), MultiSystemSolveObject::validParams(), FunctionValuePostprocessor::validParams(), BatchMeshGeneratorAction::validParams(), FVBodyForce::validParams(), ReferenceResidualInterface::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), SidesetAroundSubdomainUpdater::validParams(), FVFunctionNeumannBC::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), DirectionalNeumannBC::validParams(), ElementUOAux::validParams(), TagAuxBase< AuxKernel >::validParams(), MFEMKernel::validParams(), MFEMCurlAux::validParams(), MFEMGradAux::validParams(), MFEMDivAux::validParams(), ADPiecewiseLinearInterpolationMaterial::validParams(), RandomPartitioner::validParams(), ElementIntegralVariablePostprocessor::validParams(), ElementIntegralArrayVariablePostprocessor::validParams(), MFEMFESpace::validParams(), FindValueOnLine::validParams(), MortarNodalAuxKernelTempl< ComputeValueType >::validParams(), MultiAppDofCopyTransfer::validParams(), MaterialOutputAction::validParams(), LibtorchControlValuePostprocessor::validParams(), MFEMHypreFGMRES::validParams(), MFEMGMRESSolver::validParams(), MFEMHyprePCG::validParams(), MFEMHypreBoomerAMG::validParams(), TimePeriod::validParams(), ParsedGenerateSideset::validParams(), InterfaceQpUserObjectBase::validParams(), FunctorExtremaPositions::validParams(), SolutionScalarAux::validParams(), FixedPointSolve::validParams(), PetscExternalPartitioner::validParams(), TransfiniteMeshGenerator::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), ProjectionAux::validParams(), TorchScriptUserObject::validParams(), TimeStepper::validParams(), BoundingBoxIC::validParams(), PostprocessorNeumannBC::validParams(), MFEMSolverBase::validParams(), SolutionAux::validParams(), BlockRestrictionDebugOutput::validParams(), MFEMCGSolver::validParams(), DerivativeKernelInterface< T >::validParams(), ADKernelScalarBase::validParams(), ElementVariablesDifferenceMax::validParams(), SideIntegralFunctorPostprocessorTempl< false >::validParams(), EqualValueEmbeddedConstraintTempl< is_ad >::validParams(), MortarScalarBase::validParams(), FieldSplitPreconditioner::validParams(), MaterialAuxBaseTempl< RealTensorValue, is_ad >::validParams(), EigenKernel::validParams(), MFEMHypreGMRES::validParams(), KernelScalarBase::validParams(), StitchedMesh::validParams(), MFEMBoundaryRestrictable::validParams(), ADMortarScalarBase::validParams(), MultiAppProjectionTransfer::validParams(), CoupledVarNeumannBCTempl< false >::validParams(), FVOrthogonalBoundaryDiffusion::validParams(), CSVTimeSequenceStepper::validParams(), MFEMBlockRestrictable::validParams(), ElementSideNeighborLayers::validParams(), TransientMultiApp::validParams(), PiecewiseMultilinear::validParams(), InterfaceIntegralVariableValuePostprocessor::validParams(), Exodus::validParams(), ADMatDiffusionBase< Real >::validParams(), MultiAppNearestNodeTransfer::validParams(), ADDirichletBCBase::validParams(), SteadyBase::validParams(), MooseParsedVectorFunction::validParams(), ParsedDownSelectionPositions::validParams(), PiecewiseMulticonstant::validParams(), LinearFVAdvectionDiffusionFunctorNeumannBC::validParams(), LibmeshPartitioner::validParams(), LinearCombinationPostprocessor::validParams(), DGDiffusion::validParams(), ADDGDiffusion::validParams(), MeshInfo::validParams(), VacuumBC::validParams(), PNGOutput::validParams(), VariableResidualNormsDebugOutput::validParams(), SideSetsGeneratorBase::validParams(), Convergence::validParams(), BodyForceTempl< is_ad >::validParams(), ExplicitTimeIntegrator::validParams(), AdamsPredictor::validParams(), AddPeriodicBCAction::validParams(), NodalVariableValue::validParams(), FVDiffusion::validParams(), LibtorchNeuralNetControl::validParams(), NEML2Action::validParams(), ParsedElementDeletionGenerator::validParams(), PatternedMeshGenerator::validParams(), SubdomainBoundingBoxGenerator::validParams(), NodalPatchRecovery::validParams(), CommonOutputAction::validParams(), Split::validParams(), GhostingUserObject::validParams(), WebServerControl::validParams(), ActionComponent::validParams(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::validParams(), TransientBase::validParams(), NodalNormalsPreprocessor::validParams(), DistributedRectilinearMeshGenerator::validParams(), FVFunctionIC::validParams(), PiecewiseMultiInterpolation::validParams(), SideAdvectiveFluxIntegralTempl< is_ad >::validParams(), EigenExecutionerBase::validParams(), ADDirichletBCBaseTempl< Real >::validParams(), SinNeumannBC::validParams(), RelationshipManager::validParams(), SetupInterface::validParams(), Damper::validParams(), VectorConstantIC::validParams(), MooseParsedGradFunction::validParams(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::validParams(), AddNodalNormalsAction::validParams(), BoundingBoxNodeSetGenerator::validParams(), InitialConditionInterface::validParams(), Axisymmetric2D3DSolutionFunction::validParams(), MFEMLinearElasticityKernel::validParams(), DiffusionPhysicsBase::validParams(), NodalBCBase::validParams(), PropertyReadFile::validParams(), InterfaceKernelBase::validParams(), Predictor::validParams(), VectorFunctionIC::validParams(), ProjectedStatefulMaterialStorageAction::validParams(), CylinderComponent::validParams(), MultiAppGeometricInterpolationTransfer::validParams(), GenericFunctionVectorMaterialTempl< is_ad >::validParams(), MooseObject::validParams(), GenericFunctionMaterialTempl< is_ad >::validParams(), DGFunctionDiffusionDirichletBC::validParams(), MultiAppUserObjectTransfer::validParams(), ComparisonPostprocessor::validParams(), TableOutput::validParams(), DiracKernelBase::validParams(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::validParams(), GridPartitioner::validParams(), NodalUserObject::validParams(), PatternedMesh::validParams(), AB2PredictorCorrector::validParams(), MeshGeneratorComponent::validParams(), PhysicsBase::validParams(), PenaltyPeriodicSegmentalConstraint::validParams(), SolutionUserObjectBase::validParams(), ADNodalBCTempl< RealVectorValue, ADDirichletBCBase >::validParams(), ElementIndicator::validParams(), ADPenaltyPeriodicSegmentalConstraint::validParams(), MultiAppTransfer::validParams(), BoundaryCondition::validParams(), NEML2ModelInterface< GeneralUserObject >::validParams(), TransientInterface::validParams(), IterationAdaptiveDT::validParams(), MFEMMesh::validParams(), VectorPostprocessor::validParams(), FunctionMaterialBase< is_ad >::validParams(), Action::validParams(), FileRangeBuilder::validParams(), NodalKernelBase::validParams(), Material::validParams(), PenaltyDirichletBC::validParams(), NodeFaceConstraint::validParams(), VariableCondensationPreconditioner::validParams(), ADPenaltyDirichletBC::validParams(), Indicator::validParams(), FVFluxKernel::validParams(), MoosePreconditioner::validParams(), RandomInterface::validParams(), LayeredBase::validParams(), SolutionIC::validParams(), ConservativeAdvectionTempl< is_ad >::validParams(), Eigenvalue::validParams(), DumpObjectsProblem::validParams(), RandomIC::validParams(), DerivativeParsedMaterialHelperTempl< is_ad >::validParams(), MortarConsumerInterface::validParams(), MultiAppGeneralFieldTransfer::validParams(), AuxScalarKernel::validParams(), RandomICBase::validParams(), MooseVariableBase::validParams(), Terminator::validParams(), SampledOutput::validParams(), PetscOutput::validParams(), ShapeUserObject< SideUserObject >::validParams(), BoundaryRestrictable::validParams(), MooseParsedFunctionBase::validParams(), OutputInterface::validParams(), DGKernelBase::validParams(), NestedSolveTempl< is_ad >::validParams(), TimeIntegrator::validParams(), Transfer::validParams(), MeshGenerator::validParams(), Control::validParams(), MortarConstraintBase::validParams(), ScalarInitialCondition::validParams(), MatDiffusionBase< Real >::validParams(), DomainUserObject::validParams(), PiecewiseBilinear::validParams(), Executioner::validParams(), AStableDirk4::validParams(), Output::validParams(), TaggingInterface::validParams(), UserObject::validParams(), FunctionParserUtils< false >::validParams(), Sampler::validParams(), ParsedMaterialHelper< is_ad >::validParams(), InitialConditionBase::validParams(), Checkpoint::validParams(), FVInterfaceKernel::validParams(), FVBoundaryCondition::validParams(), BlockRestrictable::validParams(), Moose::Builder::validParams(), MaterialPropertyInterface::validParams(), AuxKernelTempl< Real >::validParams(), TopResidualDebugOutput::validParams(), SubProblem::validParams(), MaterialBase::validParams(), MeshBaseImageSampler::validParams(), ImageSampler::validParams(), MooseMesh::validParams(), MooseApp::validParams(), MultiApp::validParams(), Executor::validParams(), and FEProblemBase::validParams().

1655 {
1656  checkParamName(name);
1657  checkConsistentType<T>(name);
1658 
1659  T & l_value = InputParameters::set<T>(name);
1660  auto & metadata = _params[name];
1661  if constexpr (isFunctorNameType<T>())
1662  metadata._doc_string = appendFunctorDescription<T>(doc_string);
1663  else
1664  metadata._doc_string = doc_string;
1665 
1666  // Set the parameter now
1667  setParamHelper(name, l_value, value);
1668 
1669  /* Indicate the default value, as set via addParam, is being used. The parameter is removed from
1670  the list whenever
1671  it changes, see set_attributes */
1672  metadata._set_by_add_param = true;
1673 }
std::string name(const ElemQuality q)
std::string appendFunctorDescription(const std::string &doc_string) const
Appends description of what a functor is to a doc string.
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.
void setParamHelper(const std::string &name, T &l_value, const S &r_value)
This method is called when adding a Parameter with a default value, can be specialized for non-matchi...

◆ addParam() [2/7]

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

Definition at line 1677 of file InputParameters.h.

1678 {
1679  checkParamName(name);
1680  checkConsistentType<T>(name);
1681 
1682  InputParameters::insert<T>(name);
1683  if constexpr (isFunctorNameType<T>())
1684  _params[name]._doc_string = appendFunctorDescription<T>(doc_string);
1685  else
1686  _params[name]._doc_string = doc_string;
1687 }
std::string name(const ElemQuality q)
std::string appendFunctorDescription(const std::string &doc_string) const
Appends description of what a functor is to a doc string.
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addParam() [3/7]

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

Enable support for initializer lists as default arguments for container type.

Definition at line 257 of file InputParameters.h.

260  {
261  addParam<T>(name, T{value}, doc_string);
262  }
std::string name(const ElemQuality q)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)

◆ addParam() [4/7]

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

Definition at line 1273 of file InputParameters.C.

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

◆ addParam() [5/7]

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

Definition at line 1282 of file InputParameters.C.

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

◆ addParam() [6/7]

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

◆ addParam() [7/7]

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

◆ addParamNamesToGroup()

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

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

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

Definition at line 930 of file InputParameters.C.

Referenced by MultiAppTransfer::addSkipCoordCollapsingParam(), AdvancedOutput::addValidParams(), FEProblemSolve::feProblemDefaultConvergenceParams(), FixedPointSolve::fixedPointDefaultConvergenceParams(), Moose::PetscSupport::getPetscValidParams(), Moose::SlepcSupport::getSlepcEigenProblemValidParams(), CopyNodalVarsAction::validParams(), DerivativeSumMaterialTempl< is_ad >::validParams(), NodalPatchRecoveryBase::validParams(), SetupMeshAction::validParams(), GeneratedMesh::validParams(), FileMeshGenerator::validParams(), NodeSetsGeneratorBase::validParams(), Tecplot::validParams(), VTKOutput::validParams(), DiffusionFV::validParams(), Times::validParams(), MultiAppConservativeTransfer::validParams(), AddActionComponentAction::validParams(), Console::validParams(), GMVOutput::validParams(), Constraint::validParams(), SetAdaptivityOptionsAction::validParams(), ScalarKernelBase::validParams(), AdvancedExtruderGenerator::validParams(), ParsedGenerateNodeset::validParams(), TimedSubdomainModifier::validParams(), FVRelationshipManagerInterface::validParams(), Positions::validParams(), LeastSquaresFitHistory::validParams(), XYDelaunayGenerator::validParams(), PiecewiseTabularBase::validParams(), CSV::validParams(), FileOutput::validParams(), ReferenceResidualInterface::validParams(), EigenProblem::validParams(), MultiSystemSolveObject::validParams(), BatchMeshGeneratorAction::validParams(), IntegratedBCBase::validParams(), FixedPointSolve::validParams(), TransfiniteMeshGenerator::validParams(), MaterialAuxBaseTempl< RealTensorValue, is_ad >::validParams(), TransientMultiApp::validParams(), Exodus::validParams(), Postprocessor::validParams(), Split::validParams(), NodalPatchRecovery::validParams(), SideSetsGeneratorBase::validParams(), EigenExecutionerBase::validParams(), TransientBase::validParams(), NodalBCBase::validParams(), DiffusionPhysicsBase::validParams(), TableOutput::validParams(), InterfaceKernelBase::validParams(), MooseObject::validParams(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::validParams(), DiracKernelBase::validParams(), PhysicsBase::validParams(), SolutionUserObjectBase::validParams(), TransientInterface::validParams(), BoundaryCondition::validParams(), Action::validParams(), RadialAverage::validParams(), VectorPostprocessor::validParams(), NodalKernelBase::validParams(), Material::validParams(), RandomInterface::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >::validParams(), Indicator::validParams(), FVFluxKernel::validParams(), LayeredBase::validParams(), Eigenvalue::validParams(), MultiAppGeneralFieldTransfer::validParams(), AuxScalarKernel::validParams(), MooseVariableBase::validParams(), SampledOutput::validParams(), PetscOutput::validParams(), ShapeUserObject< SideUserObject >::validParams(), OutputInterface::validParams(), DGKernelBase::validParams(), MeshGenerator::validParams(), Executioner::validParams(), Output::validParams(), TaggingInterface::validParams(), UserObject::validParams(), FunctionParserUtils< false >::validParams(), InitialConditionBase::validParams(), FVInterfaceKernel::validParams(), FVBoundaryCondition::validParams(), MaterialPropertyInterface::validParams(), AuxKernelTempl< Real >::validParams(), SubProblem::validParams(), MeshBaseImageSampler::validParams(), ImageSampler::validParams(), MultiApp::validParams(), and FEProblemBase::validParams().

932 {
933  std::vector<std::string> elements;
934  MooseUtils::tokenize(space_delim_names, elements, 1, " \t\n\v\f\r"); // tokenize on whitespace
935 
936  // Since we don't require types (templates) for this method, we need
937  // to get a raw list of parameter names to compare against.
938  std::set<std::string> param_names;
939  for (const auto & it : *this)
940  param_names.insert(it.first);
941 
942  for (const auto & param_name : elements)
943  if (_params.count(param_name) > 0)
944  _params[param_name]._group = group_name;
945  else
946  mooseError("Unable to find a parameter with name: ",
947  param_name,
948  " when adding to group ",
949  group_name,
950  '.');
951 }
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 ...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addPrivateParam() [1/6]

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

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

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

Definition at line 1848 of file InputParameters.h.

Referenced by AddControlAction::act(), FEProblemBase::addOutput(), ActionFactory::create(), ActionFactory::getValidParams(), AppFactory::storeAppParams(), GlobalParamsAction::validParams(), CreateProblemDefaultAction::validParams(), ElementReporter::validParams(), GeneralReporter::validParams(), NodalReporter::validParams(), DefaultConvergenceBase::validParams(), XDA::validParams(), InternalSideIndicatorBase::validParams(), DefaultNonlinearConvergence::validParams(), MFEMFunctorMaterial::validParams(), CopyMeshPartitioner::validParams(), MoosePartitioner::validParams(), MaterialOutputAction::validParams(), BoundaryRestrictableRequired::validParams(), RelationshipManager::validParams(), NodalNormalsPreprocessor::validParams(), EigenExecutionerBase::validParams(), MooseObject::validParams(), VectorPostprocessor::validParams(), Action::validParams(), MoosePreconditioner::validParams(), Eigenvalue::validParams(), DisplacedProblem::validParams(), MooseVariableBase::validParams(), BoundaryRestrictable::validParams(), MeshGenerator::validParams(), Output::validParams(), Checkpoint::validParams(), BlockRestrictable::validParams(), MaterialPropertyInterface::validParams(), AuxKernelTempl< Real >::validParams(), MaterialBase::validParams(), MooseApp::validParams(), MultiApp::validParams(), and FEProblemBase::validParams().

1849 {
1850  checkParamName(name);
1851  checkConsistentType<T>(name);
1852 
1853  InputParameters::set<T>(name) = value;
1854  auto & metadata = _params[name];
1855  metadata._is_private = true;
1856  metadata._set_by_add_param = true;
1857 }
std::string name(const ElemQuality q)
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addPrivateParam() [2/6]

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

Definition at line 1837 of file InputParameters.h.

1838 {
1839  checkParamName(name);
1840  checkConsistentType<T>(name);
1841 
1842  InputParameters::insert<T>(name);
1843  _params[name]._is_private = true;
1844 }
std::string name(const ElemQuality q)
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addPrivateParam() [3/6]

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

Definition at line 1318 of file InputParameters.C.

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

◆ addPrivateParam() [4/6]

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

Definition at line 1326 of file InputParameters.C.

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

◆ addPrivateParam() [5/6]

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

◆ addPrivateParam() [6/6]

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

◆ addRangeCheckedParam() [1/2]

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

Definition at line 1769 of file InputParameters.h.

Referenced by MultiAppTransfer::addBBoxFactorParam(), Moose::commonAdaptivityParams(), FixedPointSolve::fixedPointDefaultConvergenceParams(), ErrorFractionMarker::validParams(), ConstantDT::validParams(), PeriodicFunction::validParams(), LogConstantDT::validParams(), AnnularMesh::validParams(), CoarsenBlockGenerator::validParams(), FixedPointIterationAdaptiveDT::validParams(), FillBetweenCurvesGenerator::validParams(), GeneratedMesh::validParams(), FillBetweenPointVectorsGenerator::validParams(), FillBetweenSidesetsGenerator::validParams(), AnnularMeshGenerator::validParams(), NewmarkBeta::validParams(), PIDTransientControl::validParams(), ConcentricCircleMeshGenerator::validParams(), ConcentricCircleMesh::validParams(), ImageMesh::validParams(), GeneratedMeshGenerator::validParams(), EqualValueConstraint::validParams(), ElementLpNormAux::validParams(), SphericalGridDivision::validParams(), XYZDelaunayGenerator::validParams(), AdvancedExtruderGenerator::validParams(), CircularBoundaryCorrectionGenerator::validParams(), ImageMeshGenerator::validParams(), ParsedCurveGenerator::validParams(), CylindricalGridDivision::validParams(), XYDelaunayGenerator::validParams(), TimeStepper::validParams(), FixedPointSolve::validParams(), TransfiniteMeshGenerator::validParams(), ElementSideNeighborLayers::validParams(), PNGOutput::validParams(), ElementPointNeighborLayers::validParams(), PatternedMeshGenerator::validParams(), SideSetsGeneratorBase::validParams(), DistributedRectilinearMeshGenerator::validParams(), PatternedMesh::validParams(), ElementW1pError::validParams(), IterationAdaptiveDT::validParams(), RadialAverage::validParams(), MultiAppGeneralFieldTransfer::validParams(), MooseVariableBase::validParams(), DerivativeFunctionMaterialBaseTempl< is_ad >::validParams(), Output::validParams(), and MultiApp::validParams().

1773 {
1774  addParam<T>(name, value, doc_string);
1775  _params[name]._range_function = parsed_function;
1776 }
std::string name(const ElemQuality q)
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRangeCheckedParam() [2/2]

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

Definition at line 1780 of file InputParameters.h.

1783 {
1784  addParam<T>(name, doc_string);
1785  _params[name]._range_function = parsed_function;
1786 }
std::string name(const ElemQuality q)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRelationshipManager()

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

Tells MOOSE about a RelationshipManager that this object needs.

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

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

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

Definition at line 526 of file InputParameters.C.

Referenced by GradientJumpIndicator::validParams(), NodalPatchRecoveryBase::validParams(), ElemSideNeighborLayersGeomTester::validParams(), ElemSideNeighborLayersTester::validParams(), Tecplot::validParams(), GMVOutput::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryBase::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), FVAnisotropicDiffusion::validParams(), FVRelationshipManagerInterface::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), ProjectionAux::validParams(), MultiAppProjectionTransfer::validParams(), Exodus::validParams(), FVDiffusion::validParams(), DistributedRectilinearMeshGenerator::validParams(), InterfaceKernelBase::validParams(), InterfaceUserObjectBase::validParams(), InternalSideUserObject::validParams(), SideUserObject::validParams(), RadialAverage::validParams(), InterfaceMaterial::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >::validParams(), MortarConsumerInterface::validParams(), DGKernelBase::validParams(), MortarConstraintBase::validParams(), DomainUserObject::validParams(), FVInterfaceKernel::validParams(), AuxKernelTempl< Real >::validParams(), and MooseVariableFV< Real >::validParams().

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

◆ addRequiredCommandLineParam()

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

Add parameters for retrieval from the command line.

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

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

Definition at line 1861 of file InputParameters.h.

1864 {
1865  static_assert(!std::is_same_v<T, bool>, "Cannot be used for a bool");
1866 
1867  addRequiredParam<T>(name, doc_string);
1868  addCommandLineParamHelper<T>(name, syntax, /* required = */ true, /* value_required = */ true);
1869 }
std::string name(const ElemQuality q)

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

Referenced by transferParam(), ArrayVariableComponent::validParams(), FVScalarLagrangeMultiplierInterface::validParams(), VariableInnerProduct::validParams(), ElementVariableStatistics::validParams(), NodalVariableStatistics::validParams(), CoupledODETimeDerivative::validParams(), LowerDIntegratedBC::validParams(), ArrayVarReductionAux::validParams(), CoupledVarThresholdElementSubdomainModifier::validParams(), SideVariablePostprocessor::validParams(), SideValueSampler::validParams(), DerivativeSumMaterialTempl< is_ad >::validParams(), ActivateElementsCoupled::validParams(), ElementVariablePostprocessor::validParams(), NodalVariableVectorPostprocessor::validParams(), VectorVariableMagnitudeAux::validParams(), ArrayCoupledTimeDerivative::validParams(), InterfaceQpValueUserObject::validParams(), ArrayLowerDIntegratedBC::validParams(), ElementVariableVectorPostprocessor::validParams(), CoupledTimeDerivative::validParams(), DivField::validParams(), GradField::validParams(), ADVectorMatchedValueBC::validParams(), VectorCoupledTimeDerivative::validParams(), SecondTimeDerivativeAux::validParams(), VariableValueElementSubdomainModifier::validParams(), CopyValueAux::validParams(), CoupledForceNodalKernel::validParams(), LowerBoundNodalKernel::validParams(), UpperBoundNodalKernel::validParams(), ElementL2Difference::validParams(), VectorMagnitudeAux::validParams(), FVBoundaryScalarLagrangeMultiplierConstraint::validParams(), VectorVariableComponentAux::validParams(), DiffusionFluxAux::validParams(), FVScalarLagrangeMultiplierConstraint::validParams(), MatchedValueBCTempl< is_ad >::validParams(), VectorFromComponentVariablesMaterialTempl< is_ad >::validParams(), VariableGradientComponent::validParams(), ElementHCurlSemiError::validParams(), ElementLpNormAux::validParams(), CoupledForceTempl< is_ad >::validParams(), ScalarTagMatrixAux::validParams(), NormalizationAux::validParams(), CoupledGradientMaterialTempl< is_ad >::validParams(), ElementHDivSemiError::validParams(), VariableTimeIntegrationAux::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), NodalVariablePostprocessor::validParams(), PointVariableSamplerBase::validParams(), MatCoupledForce::validParams(), NearestNodeValueAux::validParams(), OneDEqualValueConstraintBC::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), InterpolatedStatefulMaterialTempl< T >::validParams(), ADPiecewiseLinearInterpolationMaterial::validParams(), TagAuxBase< AuxKernel >::validParams(), ElementIntegralVariableUserObject::validParams(), SideIntegralVariableUserObject::validParams(), ElementIntegralVariablePostprocessor::validParams(), ElementIntegralArrayVariablePostprocessor::validParams(), ProjectionAux::validParams(), NodalEqualValueConstraint::validParams(), CoupledVarNeumannBCTempl< false >::validParams(), ElementVariablesDifferenceMax::validParams(), InterfaceIntegralVariableValuePostprocessor::validParams(), DGLowerDKernel::validParams(), SideIntegralVariablePostprocessor::validParams(), InternalSideIntegralVariablePostprocessor::validParams(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::validParams(), CompositeTensorBase< T, U >::validParams(), HFEMTestJump::validParams(), ArrayDGLowerDKernel::validParams(), HFEMTrialJump::validParams(), InterfaceKernelBase::validParams(), ADPeriodicSegmentalConstraint::validParams(), PeriodicSegmentalConstraint::validParams(), NodeElemConstraintBase::validParams(), ADPenaltyPeriodicSegmentalConstraint::validParams(), PenaltyPeriodicSegmentalConstraint::validParams(), and ScalarLagrangeMultiplier::validParams().

322 {
323  addRequiredParam<std::vector<VariableName>>(name, doc_string);
324  _coupled_vars.insert(name);
325 }
std::string name(const ElemQuality q)
std::set< std::string > _coupled_vars
The coupled variables set.

◆ addRequiredCoupledVarWithAutoBuild()

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

Definition at line 310 of file InputParameters.C.

314 {
315  addRequiredParam<std::vector<VariableName>>(name, doc_string);
316 
317  addCoupledVarWithAutoBuild(name, base_name, num_name, doc_string);
318 }
std::string name(const ElemQuality q)
void addCoupledVarWithAutoBuild(const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
These methods add a coupled variable name pair.

◆ addRequiredCustomTypeParam()

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

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

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

Definition at line 1790 of file InputParameters.h.

Referenced by ArrayParsedAux::validParams(), ParsedAux::validParams(), ParsedPostprocessor::validParams(), ParsedODEKernel::validParams(), ParsedVectorAux::validParams(), ParsedFunctorMaterialTempl< is_ad >::validParams(), ParsedConvergence::validParams(), ParsedChainControl::validParams(), ParsedDownSelectionPositions::validParams(), and Terminator::validParams().

1793 {
1794  addRequiredParam<T>(name, doc_string);
1795  _params[name]._custom_type = custom_type;
1796 }
std::string name(const ElemQuality q)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [1/6]

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

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

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

Definition at line 1628 of file InputParameters.h.

Referenced by FVDiffusionInterface::validParams(), FVOneVarDiffusionInterface::validParams(), ExtraElementIDAux::validParams(), EqualValueBoundaryConstraint::validParams(), FVAdvection::validParams(), FVMatAdvection::validParams(), AnalyticalIndicator::validParams(), ArrayDiffusion::validParams(), PenaltyDirichletNodalKernel::validParams(), ArrayReaction::validParams(), PerfGraphData::validParams(), VariableResidual::validParams(), ArrayPenaltyDirichletBC::validParams(), DGConvection::validParams(), IndicatorMarker::validParams(), UniformMarker::validParams(), VectorPostprocessorComponent::validParams(), VectorPostprocessorReductionValue::validParams(), ValueRangeMarker::validParams(), ConstantDT::validParams(), GenericConstant2DArray::validParams(), GenericConstantArray::validParams(), TestSourceStepper::validParams(), FileMesh::validParams(), TiledMesh::validParams(), ConstantVectorPostprocessor::validParams(), BoundaryDeletionGenerator::validParams(), ElementOrderConversionGenerator::validParams(), ActivateElementsCoupled::validParams(), ThresholdElementSubdomainModifier::validParams(), ExtraIDIntegralReporter::validParams(), NodalPatchRecoveryBase::validParams(), GenericConstantVectorMaterialTempl< is_ad >::validParams(), PeriodicFunction::validParams(), PointValueSampler::validParams(), FVPostprocessorDirichletBC::validParams(), OverlayMeshGenerator::validParams(), NodalPatchRecoveryAuxBase::validParams(), ArrayFunctionIC::validParams(), FunctionScalarIC::validParams(), UniqueExtraIDMeshGenerator::validParams(), PenetrationAux::validParams(), ActivateElementsUserObjectBase::validParams(), MooseObjectAction::validParams(), ArrayBodyForce::validParams(), ElementExtremeMaterialPropertyTempl< is_ad >::validParams(), ElementL2Error::validParams(), TimeExtremeValue::validParams(), BoxMarker::validParams(), ElementQualityChecker::validParams(), CSVReaderVectorPostprocessor::validParams(), GapValueAux::validParams(), LineValueSampler::validParams(), FunctorNeumannBC::validParams(), FlipSidesetGenerator::validParams(), LowerDBlockFromSidesetGenerator::validParams(), MoveNodeGenerator::validParams(), NodeSetsFromSideSetsGenerator::validParams(), NodeSetsGeneratorBase::validParams(), FunctorDirichletBC::validParams(), ParsedSubdomainMeshGenerator::validParams(), PlaneIDMeshGenerator::validParams(), RefineBlockGenerator::validParams(), RefineSidesetGenerator::validParams(), RenameBlockGenerator::validParams(), RenameBoundaryGenerator::validParams(), FVCoupledForce::validParams(), RinglebMeshGenerator::validParams(), SideSetsFromNodeSetsGenerator::validParams(), BoundsBase::validParams(), SideSetsFromNormalsGenerator::validParams(), SmoothMeshGenerator::validParams(), SubdomainIDGenerator::validParams(), SubdomainPerElementGenerator::validParams(), SymmetryTransformGenerator::validParams(), TiledMeshGenerator::validParams(), FunctionIC::validParams(), GetPostprocessorChainControl::validParams(), ScalarComponentIC::validParams(), LimitChainControl::validParams(), ProjectedMaterialPropertyNodalPatchRecoveryAux::validParams(), PIDChainControl::validParams(), RealToBoolChainControl::validParams(), ScaleOldChainControl::validParams(), TerminateChainControl::validParams(), UnitTripChainControl::validParams(), ElementExtremeFunctorValueTempl< is_ad >::validParams(), FunctorKernel::validParams(), DebugResidualAux::validParams(), ElementMaxLevelPostProcessor::validParams(), FunctionElementIntegral::validParams(), NodalL2Error::validParams(), BoundaryMarker::validParams(), ScalePostprocessor::validParams(), ScalarVariable::validParams(), ConstantScalarAux::validParams(), PostprocessorConvergence::validParams(), ComboMarker::validParams(), ExplicitSSPRungeKutta::validParams(), RinglebMesh::validParams(), ArrayDGDiffusion::validParams(), MultiAppCloneReporterTransfer::validParams(), FunctionDiracSource::validParams(), MultiAppReporterTransfer::validParams(), FunctionArrayAux::validParams(), AnnularMesh::validParams(), ElemSideNeighborLayersGeomTester::validParams(), ElemSideNeighborLayersTester::validParams(), JSONFileReader::validParams(), GeneratedMesh::validParams(), NestedDivision::validParams(), ElementsAlongLine::validParams(), ElementsAlongPlane::validParams(), IntersectionPointsAlongLine::validParams(), LineFunctionSampler::validParams(), ExtraElementIntegerDivision::validParams(), BlockToMeshConverterGenerator::validParams(), AdvectiveFluxAux::validParams(), BoundaryLayerSubdomainGenerator::validParams(), BreakBoundaryOnSubdomainGenerator::validParams(), CoarsenBlockGenerator::validParams(), ElementGenerator::validParams(), ElementsToTetrahedronsConverter::validParams(), ExtraNodesetGenerator::validParams(), FileMeshGenerator::validParams(), FillBetweenCurvesGenerator::validParams(), FillBetweenPointVectorsGenerator::validParams(), FillBetweenSidesetsGenerator::validParams(), GeneratedMeshGenerator::validParams(), ImageSubdomainGenerator::validParams(), MeshDiagnosticsGenerator::validParams(), MeshRepairGenerator::validParams(), SpatialUserObjectVectorPostprocessor::validParams(), InterfaceValueUserObjectAux::validParams(), ParsedSubdomainGeneratorBase::validParams(), Times::validParams(), SideSetExtruderGenerator::validParams(), ExodusFileTimes::validParams(), SideSetsFromPointsGenerator::validParams(), FunctorAux::validParams(), ConstantPointSource::validParams(), TransformGenerator::validParams(), VectorFromComponentVariablesMaterialTempl< is_ad >::validParams(), FunctorIC::validParams(), SpatialAverageBase::validParams(), ConstantBounds::validParams(), IntegralPreservingFunctionIC::validParams(), DivergenceAuxTempl< is_ad >::validParams(), DiffusionFluxAux::validParams(), InterfaceReaction::validParams(), DiffusionFV::validParams(), PenaltyInterfaceDiffusionTempl< T, is_ad >::validParams(), FilePositions::validParams(), SetValueChainControlTempl< T >::validParams(), InputPositions::validParams(), MultiAppPositions::validParams(), ReporterPositions::validParams(), TransformedPositions::validParams(), AverageVariableChange::validParams(), SmootherChainControl::validParams(), ChainControlDataPostprocessor::validParams(), ChangeOverTimePostprocessor::validParams(), PIDTransientControl::validParams(), EqualGradientConstraint::validParams(), TagVectorArrayVariableValueAux::validParams(), MaterialDerivativeRankFourTestKernel::validParams(), MaterialDerivativeRankTwoTestKernel::validParams(), ElementL2FunctorErrorTempl< is_ad >::validParams(), ElementLengthAux::validParams(), NearestNodeNumber::validParams(), PseudoTimestep::validParams(), VectorPostprocessorVisualizationAux::validParams(), LinearFVAdvection::validParams(), LinearFVAnisotropicDiffusion::validParams(), BoundaryPreservedMarker::validParams(), AccumulateReporter::validParams(), ReporterPointMarker::validParams(), CSVFileTimes::validParams(), ADDGAdvection::validParams(), InputTimes::validParams(), ReporterTimes::validParams(), ExodusTimeSequenceStepper::validParams(), CylindricalAverage::validParams(), PostprocessorDT::validParams(), AddActionComponentAction::validParams(), TimeSequenceStepper::validParams(), MultiAppConservativeTransfer::validParams(), MultiAppPostprocessorToAuxScalarTransfer::validParams(), GenericConstantRealVectorValueTempl< is_ad >::validParams(), MultiAppScalarToAuxScalarTransfer::validParams(), ConcentricCircleMesh::validParams(), MessageFromInput::validParams(), NearestNodeNumberUO::validParams(), Distribution::validParams(), FunctorBinnedValuesDivision::validParams(), LinearCombinationFunction::validParams(), AnnularMeshGenerator::validParams(), PiecewiseConstantFromCSV::validParams(), BreakMeshByBlockGenerator::validParams(), CartesianMeshGenerator::validParams(), SplineFunction::validParams(), ChangeOverFixedPointPostprocessor::validParams(), ConcentricCircleMeshGenerator::validParams(), CutMeshByPlaneGenerator::validParams(), SolutionTimeAdaptiveDT::validParams(), InterfaceQpMaterialPropertyBaseUserObject< Real >::validParams(), MeshCollectionGenerator::validParams(), MeshExtruderGenerator::validParams(), BicubicSplineFunction::validParams(), TimeSequenceFromTimes::validParams(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::validParams(), ParsedCurveGenerator::validParams(), ParsedExtraElementIDGenerator::validParams(), FunctorPositions::validParams(), FunctorTimes::validParams(), FunctionGradientNeumannBC::validParams(), ParsedGenerateNodeset::validParams(), MeshDivisionAux::validParams(), NodalNormalsCorner::validParams(), FVAnisotropicDiffusion::validParams(), PostprocessorDirichletBC::validParams(), CoupledGradientMaterialTempl< is_ad >::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), VectorDirichletBC::validParams(), CutMeshByLevelSetGenerator::validParams(), ArrayConstantIC::validParams(), StackGenerator::validParams(), StitchBoundaryMeshGenerator::validParams(), VectorDivPenaltyDirichletBC::validParams(), QuadraturePointMarker::validParams(), VectorPenaltyDirichletBC::validParams(), NearestNodeDistanceAux::validParams(), XYZDelaunayGenerator::validParams(), GetFunctionValueChainControl::validParams(), MFEMGenericFESpace::validParams(), StitchedMeshGenerator::validParams(), MaterialDerivativeTestAction::validParams(), InternalSideIndicatorBase::validParams(), DistributedPositions::validParams(), SpatialUserObjectAux::validParams(), ADMatReaction::validParams(), TagVectorArrayVariableAux::validParams(), DifferencePostprocessor::validParams(), AdvancedExtruderGenerator::validParams(), ElementHCurlSemiError::validParams(), ElementL1Error::validParams(), TagVectorAux::validParams(), NumMeshDivisions::validParams(), BoolFunctionControl::validParams(), PercentChangePostprocessor::validParams(), NumPositions::validParams(), GenericFunctionRankTwoTensorTempl< is_ad >::validParams(), ConditionalFunctionEnableControl::validParams(), VectorFunctionAux::validParams(), ArrayDirichletBC::validParams(), TimesEnableControl::validParams(), VectorConstantPointSource::validParams(), GenericConstantRankTwoTensorTempl< is_ad >::validParams(), CylindricalGridDivision::validParams(), FunctionAux::validParams(), VectorCurlPenaltyDirichletBC::validParams(), FunctionScalarAux::validParams(), ADDirichletBC::validParams(), MultiAppVariableValueSampleTransfer::validParams(), ADFunctionNeumannBC::validParams(), LeastSquaresFit::validParams(), LayeredSideDiffusiveFluxAverage::validParams(), PositionsFunctorValueSampler::validParams(), ElementHDivSemiError::validParams(), VariableValueVolumeHistogram::validParams(), FunctorVectorElementalAuxTempl< is_ad >::validParams(), BreakMeshByElementGenerator::validParams(), CircularBoundaryCorrectionGenerator::validParams(), DirichletBC::validParams(), ParsedFunctorMaterialTempl< is_ad >::validParams(), CombinerGenerator::validParams(), VectorMagnitudeFunctorMaterialTempl< is_ad >::validParams(), FVConstantScalarOutflowBC::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), ElementQualityAux::validParams(), FVDirichletBC::validParams(), ElementsToSimplicesConverter::validParams(), FVFunctionDirichletBC::validParams(), FunctionNeumannBC::validParams(), FunctionElementIntegralUserObject::validParams(), FVFunctorNeumannBC::validParams(), MultiAppVariableValueSamplePostprocessorTransfer::validParams(), Positions::validParams(), MatNeumannBCTempl< is_ad >::validParams(), FunctionDirichletBC::validParams(), VectorOfPostprocessors::validParams(), CoupledValueFunctionMaterialTempl< is_ad >::validParams(), PiecewiseLinearFromVectorPostprocessor::validParams(), CutMeshByLevelSetGeneratorBase::validParams(), FVOrthogonalDiffusion::validParams(), NearestNodeValueAux::validParams(), XYMeshLineCutter::validParams(), MFEMAuxKernel::validParams(), MFEMVariable::validParams(), MultiAppVectorPostprocessorTransfer::validParams(), ConstantRate::validParams(), BlockWeightedPartitioner::validParams(), CoarsenedPiecewiseLinear::validParams(), LeastSquaresFitHistory::validParams(), ElementIntegralMaterialPropertyTempl< is_ad >::validParams(), XYDelaunayGenerator::validParams(), MultiAppPostprocessorTransfer::validParams(), GreaterThanLessThanPostprocessor::validParams(), PointValue::validParams(), NearestPositionsDivision::validParams(), ConstantDamper::validParams(), ParsedNodeTransformGenerator::validParams(), ExtraIDIntegralVectorPostprocessor::validParams(), MultiAppGeneralFieldUserObjectTransfer::validParams(), MultiAppPostprocessorInterpolationTransfer::validParams(), FunctorCoordinatesFunctionAux::validParams(), OneDEqualValueConstraintBC::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), MaterialPropertyValueTempl< is_ad >::validParams(), AnisotropicDiffusion::validParams(), OrientedSubdomainBoundingBoxGenerator::validParams(), CumulativeValuePostprocessor::validParams(), ElementDeletionGeneratorBase::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), GhostingFromUOAux::validParams(), ADPiecewiseLinearInterpolationMaterial::validParams(), ElementH1SemiError::validParams(), InterpolatedStatefulMaterialTempl< T >::validParams(), ElementIntegralFunctorPostprocessorTempl< is_ad >::validParams(), SidesetAroundSubdomainUpdater::validParams(), MFEMCurlAux::validParams(), MFEMDivAux::validParams(), MFEMGradAux::validParams(), MFEMGenericFunctorVectorMaterial::validParams(), UserForcingFunctorNodalKernel::validParams(), LinearNodalConstraint::validParams(), TorchScriptMaterial::validParams(), BatchMeshGeneratorAction::validParams(), MFEMGenericFunctorMaterial::validParams(), ReporterPointSource::validParams(), FunctionValuePostprocessor::validParams(), SideIntegralFunctorUserObject::validParams(), ElementUOAux::validParams(), MaterialRankFourTensorAuxTempl< is_ad >::validParams(), FVFunctionNeumannBC::validParams(), ParsedGenerateSideset::validParams(), ElementalVariableValue::validParams(), PlaneDeletionGenerator::validParams(), BoundingBoxIC::validParams(), TransfiniteMeshGenerator::validParams(), ElementL2ErrorFunctionAux::validParams(), UserForcingFunctionNodalKernel::validParams(), SolutionAux::validParams(), FunctorExtremaPositions::validParams(), ScalarConstantIC::validParams(), AuxNodalScalarKernel::validParams(), SolutionScalarAux::validParams(), LibtorchControlValuePostprocessor::validParams(), TorchScriptUserObject::validParams(), FVDivergence::validParams(), MatReaction::validParams(), ElementIntegralFunctorUserObject::validParams(), SideFVFluxBCIntegral::validParams(), MeshDivisionFunctorReductionVectorPostprocessor::validParams(), MatBodyForceTempl< is_ad, Parent >::validParams(), BoundaryRestrictableRequired::validParams(), FVOrthogonalBoundaryDiffusion::validParams(), TagVectorSum::validParams(), OrientedBoxMarker::validParams(), MaterialAuxBaseTempl< RealTensorValue, is_ad >::validParams(), MFEMSubMeshTransfer::validParams(), MultiAppCopyTransfer::validParams(), MaterialRankTwoTensorAuxTempl< T, is_ad >::validParams(), FieldSplitPreconditioner::validParams(), ScalarL2Error::validParams(), SideIntegralFunctorPostprocessorTempl< false >::validParams(), CSVTimeSequenceStepper::validParams(), ContainsPointAux::validParams(), StitchedMesh::validParams(), EqualValueEmbeddedConstraintTempl< is_ad >::validParams(), GenericConstantMaterialTempl< is_ad >::validParams(), LibtorchArtificialNeuralNetParameters::validParams(), RealFunctionControl::validParams(), LinearFVAdvectionDiffusionFunctorDirichletBC::validParams(), LinearCombinationPostprocessor::validParams(), LibmeshPartitioner::validParams(), DGDiffusion::validParams(), PNGOutput::validParams(), FVConstantIC::validParams(), HistogramVectorPostprocessor::validParams(), LinearFVAdvectionDiffusionFunctorNeumannBC::validParams(), ParsedDownSelectionPositions::validParams(), ADDGDiffusion::validParams(), SubdomainBoundingBoxGenerator::validParams(), LibtorchNeuralNetControl::validParams(), NodalVariableValue::validParams(), SideSetsGeneratorBase::validParams(), PatternedMeshGenerator::validParams(), FVDiffusion::validParams(), ParsedElementDeletionGenerator::validParams(), RelationshipManager::validParams(), SideAdvectiveFluxIntegralTempl< is_ad >::validParams(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::validParams(), FVFunctionIC::validParams(), NodalNormalsPreprocessor::validParams(), ADFunctionPenaltyDirichletBC::validParams(), ProxyRelationshipManager::validParams(), EigenExecutionerBase::validParams(), DistributedRectilinearMeshGenerator::validParams(), BoundingBoxNodeSetGenerator::validParams(), VectorConstantIC::validParams(), FunctionPenaltyDirichletBC::validParams(), PropertyReadFile::validParams(), Axisymmetric2D3DSolutionFunction::validParams(), CompositeTensorBase< T, U >::validParams(), FVBoundedValueConstraint::validParams(), NodalDamper::validParams(), ComparisonPostprocessor::validParams(), CylinderComponent::validParams(), MultiAppMFEMCopyTransfer::validParams(), CompileTimeDerivativesMaterial< N, is_ad, MaxD >::validParams(), Predictor::validParams(), DGFunctionDiffusionDirichletBC::validParams(), MultiAppUserObjectTransfer::validParams(), MeshGeneratorComponent::validParams(), FVPointValueConstraint::validParams(), AB2PredictorCorrector::validParams(), PatternedMesh::validParams(), SolutionUserObjectBase::validParams(), PostprocessorComparison::validParams(), ElementIndicator::validParams(), ConstantIC::validParams(), NodeElemConstraintBase::validParams(), ElementW1pError::validParams(), AverageValueConstraint::validParams(), VectorPostprocessorComparison::validParams(), RelativeDifferencePostprocessor::validParams(), ScalarSolutionIC::validParams(), IterationAdaptiveDT::validParams(), PhysicsBasedPreconditioner::validParams(), ScalarLMKernelTempl< is_ad >::validParams(), ElementDamper::validParams(), RadialAverage::validParams(), PostprocessorSpatialUserObject::validParams(), VariableCondensationPreconditioner::validParams(), InternalSideIndicatorTempl< ComputeValueType >::validParams(), PenaltyDirichletBC::validParams(), ADPenaltyDirichletBC::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >::validParams(), SamplerBase::validParams(), SolutionIC::validParams(), LayeredBase::validParams(), MortarConsumerInterface::validParams(), GhostBoundary::validParams(), AuxScalarKernel::validParams(), LineMaterialSamplerBase< Real >::validParams(), OrientedBoxInterface::validParams(), FVInitialConditionBase::validParams(), InitialConditionBase::validParams(), LinearFVBoundaryCondition::validParams(), FVInterfaceKernel::validParams(), FVBoundaryCondition::validParams(), AuxKernelTempl< Real >::validParams(), and MultiApp::validParams().

1629 {
1630  checkParamName(name);
1631  checkConsistentType<T>(name);
1632 
1633  InputParameters::insert<T>(name);
1634  auto & metadata = _params[name];
1635  metadata._required = true;
1636  if constexpr (isFunctorNameType<T>())
1637  metadata._doc_string = appendFunctorDescription<T>(doc_string);
1638  else
1639  metadata._doc_string = doc_string;
1640 }
std::string name(const ElemQuality q)
std::string appendFunctorDescription(const std::string &doc_string) const
Appends description of what a functor is to a doc string.
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [2/6]

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

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

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

Definition at line 1644 of file InputParameters.h.

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

◆ addRequiredParam() [3/6]

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

Definition at line 1213 of file InputParameters.C.

1216 {
1217  InputParameters::set<MooseEnum>(name) = moose_enum; // valid parameter is set by set_attributes
1218  auto & metadata = _params[name];
1219  metadata._required = true;
1220  metadata._doc_string = doc_string;
1221 }
std::string name(const ElemQuality q)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [4/6]

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

Definition at line 1225 of file InputParameters.C.

1228 {
1229  InputParameters::set<MultiMooseEnum>(name) =
1230  moose_enum; // valid parameter is set by set_attributes
1231  auto & metadata = _params[name];
1232  metadata._required = true;
1233  metadata._doc_string = doc_string;
1234 }
std::string name(const ElemQuality q)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ addRequiredParam() [5/6]

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

◆ addRequiredParam() [6/6]

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

◆ addRequiredRangeCheckedParam()

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

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

Referenced by ActionWarehouse::printInputFile().

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

◆ appendFunctorDescription()

template<typename T >
std::string InputParameters::appendFunctorDescription ( const std::string &  doc_string) const
private

Appends description of what a functor is to a doc string.

Definition at line 2402 of file InputParameters.h.

2403 {
2404  auto numeric_value_type = []()
2405  {
2407  Moose::internal::getNullptrExample<T>()))
2408  return "number";
2409  else if constexpr (Moose::internal::isVectorFunctorNameTypeHelper(
2410  Moose::internal::getNullptrExample<T>()))
2411  return "numeric vector value (enclosed in curly braces)";
2412  else
2413  {
2414  mooseAssert(false, "We control instantiations of this method");
2415  return "";
2416  }
2417  };
2418 
2419  return MooseUtils::trim(doc_string, ". ") + ". A functor is any of the following: a variable, " +
2420  (
2421 #ifdef MFEM_ENABLED
2422  Moose::internal::isMFEMFunctorNameTypeHelper(Moose::internal::getNullptrExample<T>())
2423  ? "an MFEM"
2424  :
2425 #endif
2426  "a functor") +
2427  " material property, a function, a postprocessor or a " + numeric_value_type() + ".";
2428 }
constexpr bool isMFEMFunctorNameTypeHelper(T *)
constexpr bool isVectorFunctorNameTypeHelper(std::vector< T, A > *)
std::string trim(const std::string &str, const std::string &white_space=" \\\)
Standard scripting language trim function.
constexpr bool isScalarFunctorNameTypeHelper(T *)
constexpr T * getNullptrExample()
if(!dmm->_nl) SETERRQ(PETSC_COMM_WORLD
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...

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

Referenced by applyParameters(), and applySpecificParameters().

1093 {
1094  // Disable the display of deprecated message when applying common parameters, this avoids a dump
1095  // of messages
1096  _show_deprecated_message = false;
1097 
1098  // If the local parameters has a coupled variable, populate it with the value from the common
1099  // parameters, if the common parameters has the coupled variable too
1100  if (hasCoupledValue(var_name))
1101  {
1102  if (common.hasDefaultCoupledValue(var_name))
1103  {
1104  // prepare a vector of default coupled values
1105  std::vector<Real> defaults(common.numberDefaultCoupledValues(var_name));
1106  for (unsigned int j = 0; j < common.numberDefaultCoupledValues(var_name); ++j)
1107  defaults[j] = common.defaultCoupledValue(var_name, j);
1108  addCoupledVar(var_name, defaults, common.getDocString(var_name));
1109  }
1110  else if (common.hasCoupledValue(var_name))
1111  addCoupledVar(var_name, common.getDocString(var_name));
1112  }
1113 
1114  // Enable deprecated message printing
1115  _show_deprecated_message = true;
1116 }
bool hasCoupledValue(const std::string &coupling_name) const
Return whether or not the coupled variable exists.
unsigned int numberDefaultCoupledValues(const std::string &coupling_name) const
Get the number of defaulted coupled value entries.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::string getDocString(const std::string &name) const
Returns the documentation string for the specified parameter name.
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
Real defaultCoupledValue(const std::string &coupling_name, unsigned int i=0) const
Get the default value for an optionally coupled variable.
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.

◆ applyParameter()

void InputParameters::applyParameter ( const InputParameters common,
const std::string &  common_name,
bool  allow_private = false,
bool  override_default = 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 (except if override_default is set) (4) Both cannot be private

Definition at line 1119 of file InputParameters.C.

Referenced by ComposeTimeStepperAction::act(), applyParameters(), and applySpecificParameters().

1123 {
1124  // Disable the display of deprecated message when applying common parameters, this avoids a dump
1125  // of messages
1126  _show_deprecated_message = false;
1127 
1128  const auto local_name = checkForRename(common_name);
1129 
1130  // Extract the properties from the local parameter for the current common parameter name
1131  const bool local_exist = _values.find(local_name) != _values.end();
1132  const bool local_set = _params.count(local_name) > 0 && !_params[local_name]._set_by_add_param;
1133  const bool local_priv = allow_private ? false : isPrivate(local_name);
1134  const bool local_valid = isParamValid(local_name);
1135 
1136  // Extract the properties from the common parameter
1137  const bool common_exist = common._values.find(common_name) != common._values.end();
1138  const bool common_priv = allow_private ? false : common.isPrivate(common_name);
1139  const bool common_valid = common.isParamValid(common_name) || override_default;
1140 
1141  /* In order to apply a common parameter 4 statements must be satisfied
1142  * (1) A local parameter must exist with the same name as the common parameter
1143  * (2) Common parameter must be valid and exist
1144  * (3) Local parameter must be invalid OR not have been set from its default
1145  * (4) Both cannot be private
1146  */
1147  if (local_exist && common_exist && common_valid && (!local_valid || !local_set) &&
1148  (!common_priv || !local_priv))
1149  {
1150  remove(local_name);
1151  _values[local_name] = common._values.find(common_name)->second->clone();
1152  set_attributes(local_name, false);
1153  _params[local_name]._set_by_add_param =
1154  libmesh_map_find(common._params, common_name)._set_by_add_param;
1155  // Keep track of where this param came from if we can. This will enable us to
1156  // produce param errors from objects created within an action that link to
1157  // the parameter in the action
1158  at(local_name)._hit_node = common.getHitNode(common_name);
1159  }
1160  else if (!local_exist && !common_exist)
1161  mooseError("InputParameters::applyParameter(): Attempted to apply invalid parameter \"",
1162  common_name,
1163  "\"");
1164 
1165  // Enable deprecated message printing
1166  _show_deprecated_message = true;
1167 }
const hit::Node * getHitNode(const std::string &param) const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
const hit::Node * _hit_node
Original location of parameter node; used for error messages.
bool isPrivate(const std::string &name) const
Returns a Boolean indicating whether the specified parameter is private or not.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.
virtual void set_attributes(const std::string &name, bool inserted_only) override
Override from libMesh to set user-defined attributes on our parameter.
Metadata & at(const std::string &param_name)
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ applyParameters()

void InputParameters::applyParameters ( const InputParameters common,
const std::vector< std::string > &  exclude = {},
const bool  allow_private = false 
)

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 be valid (3) Local parameter must be invalid OR not have been set from its default (4) Both cannot be private (unless allow_private = true)

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

Referenced by AddActionComponentAction::act(), FEProblemBase::addDefaultMultiAppFixedPointConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), FEProblemBase::addOutput(), SampledOutput::cloneMesh(), DumpObjectsProblem::DumpObjectsProblem(), and ProjectedStatefulMaterialStorageAction::processProperty().

1023 {
1024  // If we're applying all of the things, also associate the top level hit node
1025  if (exclude.empty() && !getHitNode() && common.getHitNode())
1026  setHitNode(*common.getHitNode(), {});
1027 
1028  // Loop through the common parameters
1029  for (const auto & it : common)
1030  {
1031  // Common parameter name
1032  const std::string & common_name = it.first;
1033  // Continue to next parameter, if the current is in list of excluded parameters
1034  if (std::find(exclude.begin(), exclude.end(), common_name) != exclude.end())
1035  continue;
1036 
1037  applyParameter(common, common_name, allow_private);
1038  }
1039 
1040  // Loop through the coupled variables
1041  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
1042  it != common.coupledVarsEnd();
1043  ++it)
1044  {
1045  // Variable name
1046  const std::string var_name = *it;
1047 
1048  // Continue to next variable, if the current is in list of excluded parameters
1049  if (std::find(exclude.begin(), exclude.end(), var_name) != exclude.end())
1050  continue;
1051 
1052  applyCoupledVar(common, var_name);
1053  }
1054 }
const hit::Node * getHitNode(const std::string &param) const
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 ...
void setHitNode(const std::string &param, const hit::Node &node, const SetParamHitNodeKey)
Sets the hit node associated with the parameter param to node.
void applyParameter(const InputParameters &common, const std::string &common_name, bool allow_private=false, bool override_default=false)
Apply values from a single parameter in common, to a single parameter stored in this object...
const hit::Node * getHitNode() const

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

Referenced by AddVariableAction::init(), OverlayMeshGenerator::OverlayMeshGenerator(), and ProjectedStatefulMaterialStorageAction::processProperty().

1060 {
1061  // Loop through the common parameters
1062  for (const auto & it : common)
1063  {
1064 
1065  // Common parameter name
1066  const std::string & common_name = it.first;
1067 
1068  // Continue to next parameter, if the current is not in list of included parameters
1069  if (std::find(include.begin(), include.end(), common_name) == include.end())
1070  continue;
1071 
1072  applyParameter(common, common_name, allow_private);
1073  }
1074 
1075  // Loop through the coupled variables
1076  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
1077  it != common.coupledVarsEnd();
1078  ++it)
1079  {
1080  // Variable name
1081  const std::string var_name = *it;
1082 
1083  // Continue to next variable, if the current is not in list of included parameters
1084  if (std::find(include.begin(), include.end(), var_name) == include.end())
1085  continue;
1086 
1087  applyCoupledVar(common, var_name);
1088  }
1089 }
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 ...
void applyParameter(const InputParameters &common, const std::string &common_name, bool allow_private=false, bool override_default=false)
Apply values from a single parameter in common, to a single parameter stored in this object...

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

Referenced by ActionWarehouse::buildBuildableActions().

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

◆ at() [1/2]

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

Definition at line 1296 of file InputParameters.h.

Referenced by addCommandLineParamHelper(), applyParameter(), commandLineParamSet(), finalize(), getCommandLineMetadata(), getControllableExecuteOnTypes(), getHitNode(), isCommandLineParameter(), queryCommandLineMetadata(), queryDataFileNamePath(), setGlobalCommandLineParam(), and setHitNode().

1297  {
1298  const auto param = checkForRename(param_name);
1299  if (_params.count(param) == 0)
1300  mooseError("param '", param, "' not present in InputParams");
1301  return _params[param];
1302  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ at() [2/2]

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

Definition at line 1303 of file InputParameters.h.

1304  {
1305  const auto param = checkForRename(param_name);
1306  if (_params.count(param) == 0)
1307  mooseError("param '", param, "' not present in InputParams");
1308  return _params.at(param);
1309  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ attemptPrintDeprecated()

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

Prints the deprecated parameter message, assuming we have the right flags set.

Definition at line 110 of file InputParameters.C.

111 {
112  const auto name = checkForRename(name_in);
114  {
115  auto emit_deprecation_message =
116  [this](const auto & deprecated_name, const auto & deprecation_message)
117  {
118  // This is user-facing, no need for a backtrace
119  const auto current_show_trace = Moose::show_trace;
120  Moose::show_trace = false;
122  Moose::out, false, true, errorPrefix(deprecated_name), ":\n", deprecation_message, "\n");
123  Moose::show_trace = current_show_trace;
124  return true;
125  };
126 
127  if (_params.count(name) && !libmesh_map_find(_params, name)._deprecation_message.empty())
128  return emit_deprecation_message(name,
129  "The parameter '" + name + "' is deprecated.\n" +
130  libmesh_map_find(_params, name)._deprecation_message);
131  else if (auto it = _old_to_new_name_and_dep.find(name_in);
132  it != _old_to_new_name_and_dep.end() && !it->second.second.empty())
133  return emit_deprecation_message(name_in, it->second.second);
134  }
135  return false;
136 }
std::string name(const ElemQuality q)
bool show_trace
Set to true (the default) to print the stack trace with error and warning messages - false to omit it...
Definition: Moose.C:761
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
void mooseDeprecatedStream(S &oss, const bool expired, const bool print_title, Args &&... args)
Definition: MooseError.h:239
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.
std::string errorPrefix(const std::string &param) const
generate error message prefix with parameter name and location (if available)
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

◆ blockFullpath()

std::string InputParameters::blockFullpath ( ) const
Returns
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 1508 of file InputParameters.C.

Referenced by AddFVICAction::act(), AddICAction::act(), AddAuxKernelAction::act(), AddActionComponentAction::AddActionComponentAction(), checkParams(), MooseBaseParameterInterface::getRenamedParam(), MooseApp::getRenamedParam(), MooseObjectAction::MooseObjectAction(), FVRelationshipManagerInterface::parameterError(), and NEML2Action::printSummary().

1509 {
1510  if (const auto hit_node = getHitNode())
1511  return hit_node->fullpath();
1512  return "";
1513 }
const hit::Node * getHitNode() const

◆ blockLocation()

std::string InputParameters::blockLocation ( ) const
Returns
A string representing the location (i.e. filename,linenum) in the input text for the block containing parameters for this object.

Definition at line 1500 of file InputParameters.C.

Referenced by checkParams().

1501 {
1502  if (const auto hit_node = getHitNode())
1503  return hit_node->fileLocation(/* with_column = */ false);
1504  return "";
1505 }
const hit::Node * getHitNode() const

◆ callMooseErrorHelper()

void InputParameters::callMooseErrorHelper ( const MooseBase moose_base,
const std::string &  error 
)
staticprivate

Definition at line 1754 of file InputParameters.C.

Referenced by getParamHelper().

1755 {
1756  moose_base.callMooseError(error, true);
1757 }
void callMooseError(std::string msg, const bool with_prefix) const
Calls moose error with the message msg.
Definition: MooseBase.C:33

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

1922 {
1923  const auto name = checkForRename(name_in);
1924 
1925  // If we don't currently have the Parameter, can't be any inconsistency
1926  InputParameters::const_iterator it = _values.find(name);
1927  if (it == _values.end())
1928  return;
1929 
1930  // Now, if we already have the Parameter, but it doesn't have the
1931  // right type, throw an error.
1932  if (!this->Parameters::have_parameter<T>(name))
1933  mooseError("Attempting to set parameter \"",
1934  name,
1935  "\" with type (",
1936  libMesh::demangle(typeid(T).name()),
1937  ")\nbut the parameter already exists as type (",
1938  it->second->type(),
1939  ")");
1940 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string demangle(const char *name)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
map_type::const_iterator const_iterator

◆ checkForRename()

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

Checks whether the provided name is a renamed parameter name.

If so we return the 'new' name. If not we return the incoming name

Parameters
nameThe name to check for whether it is a renamed name
Returns
The new name if the incoming name is a renamed name, else name

Definition at line 1726 of file InputParameters.C.

Referenced by applyParameter(), at(), attemptPrintDeprecated(), checkConsistentType(), checkParams(), ScalarCoupleable::checkVar(), Coupleable::checkVar(), commandLineParamSet(), Coupleable::coupledComponents(), ScalarCoupleable::coupledScalarComponents(), declareControllable(), defaultCoupledValue(), get(), getCheckedPointerParam(), getCommandLineMetadata(), getControllableExecuteOnTypes(), getDescription(), getDocString(), getDocUnit(), getGroupName(), getMooseType(), getParamHelper(), ScalarCoupleable::getScalarVar(), Coupleable::getVarHelper(), getVecMooseType(), hasDefault(), have_parameter(), ignoreParameter(), isCommandLineParameter(), isControllable(), Coupleable::isCoupled(), ScalarCoupleable::isCoupledScalar(), isParamDefined(), isParamDeprecated(), isParamRequired(), isParamSetByAddParam(), isParamSetByUser(), isParamValid(), isPrivate(), isRangeChecked(), isType(), makeParamNotRequired(), makeParamRequired(), queryCommandLineMetadata(), queryDataFileNamePath(), rangeCheckedFunction(), reservedValues(), set(), set_attributes(), setDocString(), setDocUnit(), setGlobalCommandLineParam(), setReservedValues(), shouldIgnore(), suppressParameter(), transferParam(), and type().

1727 {
1728  if (auto it = _old_to_new_name_and_dep.find(name); it != _old_to_new_name_and_dep.end())
1729  return it->second.first;
1730  else
1731  return name;
1732 }
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

◆ checkParamName()

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

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

Definition at line 1547 of file InputParameters.C.

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

1548 {
1549  const static pcrecpp::RE valid("[\\w:/]+");
1550  if (!valid.FullMatch(name))
1551  mooseError("Invalid parameter name: '", name, "'");
1552 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< ElemQuality > valid(const ElemType t)

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

Referenced by FEProblemBase::addFVInitialCondition(), FEProblemBase::addInitialCondition(), and finalize().

593 {
594  std::string parampath = blockFullpath() != "" ? blockFullpath() : parsing_syntax;
595  std::ostringstream oss;
596  // Required parameters
597  for (const auto & it : *this)
598  {
599  const auto param_name = checkForRename(it.first);
600  if (!isParamValid(param_name) && isParamRequired(param_name))
601  {
602  // check if an old, deprecated name exists for this parameter that may be specified
603  auto oit = _new_to_deprecated_coupled_vars.find(param_name);
604  if (oit != _new_to_deprecated_coupled_vars.end() && isParamValid(oit->second))
605  continue;
606 
607  oss << blockLocation() << ": missing required parameter '" << parampath + "/" + param_name
608  << "'\n";
609  oss << "\tDoc String: \"" + getDocString(param_name) + "\"" << std::endl;
610  }
611  }
612 
613  // Range checked parameters
614  for (const auto & it : *this)
615  {
616  std::string long_name(parampath + "/" + it.first);
617 
618  dynamicCastRangeCheck(Real, Real, long_name, it.first, it.second, oss);
619  dynamicCastRangeCheck(int, long, long_name, it.first, it.second, oss);
620  dynamicCastRangeCheck(long, long, long_name, it.first, it.second, oss);
621  dynamicCastRangeCheck(unsigned int, long, long_name, it.first, it.second, oss);
622  }
623 
624  // Controllable parameters
625  for (const auto & param_name : getControllableParameters())
626  {
627  if (isPrivate(param_name))
628  oss << inputLocation(param_name) << ": private parameter '" << paramFullpath(param_name)
629  << "' marked controllable";
630 
631  checkMooseType(NonlinearVariableName, param_name);
632  checkMooseType(AuxVariableName, param_name);
633  checkMooseType(VariableName, param_name);
634  checkMooseType(BoundaryName, param_name);
635  checkMooseType(SubdomainName, param_name);
636  checkMooseType(PostprocessorName, param_name);
637  checkMooseType(VectorPostprocessorName, param_name);
638  checkMooseType(UserObjectName, param_name);
639  checkMooseType(MaterialPropertyName, param_name);
640  }
641 
642  if (!oss.str().empty())
643  mooseError(oss.str());
644 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
bool isPrivate(const std::string &name) const
Returns a Boolean indicating whether the specified parameter is private or not.
std::string getDocString(const std::string &name) const
Returns the documentation string for the specified parameter name.
std::string inputLocation(const std::string &param) const
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::string blockFullpath() const
bool isParamRequired(const std::string &name) const
Returns a boolean indicating whether the specified parameter is required or not.
std::string blockLocation() const
std::set< std::string > getControllableParameters() const
Return list of controllable parameters.
std::string paramFullpath(const std::string &param) const
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ clear()

void InputParameters::clear ( )
overridevirtual

Reimplemented from libMesh::Parameters.

Definition at line 63 of file InputParameters.C.

64 {
66  _params.clear();
67  _coupled_vars.clear();
69  _collapse_nesting = false;
72  _allow_copy = true;
73  _block_fullpath = "";
74  _block_location = "";
76  _new_to_old_names.clear();
77  _hit_node = nullptr;
78  _finalized = false;
79 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
bool _allow_copy
A flag for toggling the error message in the copy constructor.
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
sideset clear()
std::set< std::string > _coupled_vars
The coupled variables set.
bool _finalized
Whether or not we&#39;ve called finalize() on these parameters yet.
const hit::Node * _hit_node
The hit node representing the syntax that created these parameters, if any.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
std::map< std::string, Metadata > _params
The actual parameter data.
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

◆ clearRelationshipManagers()

void InputParameters::clearRelationshipManagers ( )
inline

Clears all currently registered RelationshipManagers.

Definition at line 737 of file InputParameters.h.

Referenced by ElemSideNeighborLayersGeomTester::validParams().

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

◆ collapseSyntaxNesting() [1/2]

void InputParameters::collapseSyntaxNesting ( bool  collapse)

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

Definition at line 549 of file InputParameters.C.

Referenced by Moose::Builder::buildFullTree(), and Moose::Builder::buildJsonSyntaxTree().

550 {
551  _collapse_nesting = collapse;
552 }
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.

◆ collapseSyntaxNesting() [2/2]

bool InputParameters::collapseSyntaxNesting ( ) const

Definition at line 555 of file InputParameters.C.

556 {
557  return _collapse_nesting;
558 }
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.

◆ commandLineParamSet()

void InputParameters::commandLineParamSet ( const std::string &  name,
const CommandLineParamSetKey   
)

Marks the command line parameter name as set by the CommandLine.

Protected by the CommandLineParamSetKey so that only the CommandLine can call this.

Definition at line 999 of file InputParameters.C.

1000 {
1001  auto & cl_data = at(checkForRename(name))._cl_data;
1002  if (!cl_data)
1003  mooseError("InputParameters::commandLineParamSet: The parameter '",
1004  name,
1005  "' is not a command line parameter");
1006  cl_data->set_by_command_line = true;
1007 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::optional< CommandLineMetadata > _cl_data
The data pertaining to a command line parameter (empty if not a command line param) ...
Metadata & at(const std::string &param_name)

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

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

818  {
819  return _coupled_vars.begin();
820  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ coupledVarsEnd()

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

Definition at line 821 of file InputParameters.h.

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

822  {
823  return _coupled_vars.end();
824  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ declareControllable()

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

Declare the given parameters as controllable.

Definition at line 452 of file InputParameters.C.

Referenced by GenericConstant2DArray::validParams(), PenaltyDirichletNodalKernel::validParams(), GenericConstantArray::validParams(), GenericConstantVectorMaterialTempl< is_ad >::validParams(), ConstantScalarAux::validParams(), ConstantFunction::validParams(), ConstantPostprocessor::validParams(), ConstantAux::validParams(), ReactionTempl< is_ad >::validParams(), ConstantPointSource::validParams(), DirichletBC::validParams(), NeumannBCTempl< is_ad >::validParams(), ADDirichletBC::validParams(), VectorDirichletBC::validParams(), ArrayDirichletBC::validParams(), VectorConstantPointSource::validParams(), ConstantRate::validParams(), PiecewiseTabularBase::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), FunctionValuePostprocessor::validParams(), FVBodyForce::validParams(), VectorBodyForce::validParams(), TimeStepper::validParams(), TorchScriptUserObject::validParams(), GenericConstantMaterialTempl< is_ad >::validParams(), BodyForceTempl< is_ad >::validParams(), Damper::validParams(), InterfaceKernelBase::validParams(), DiracKernelBase::validParams(), IterationAdaptiveDT::validParams(), PenaltyDirichletBC::validParams(), ADPenaltyDirichletBC::validParams(), AuxScalarKernel::validParams(), Output::validParams(), UserObject::validParams(), LinearFVBoundaryCondition::validParams(), FVInterfaceKernel::validParams(), FVBoundaryCondition::validParams(), AuxKernelTempl< Real >::validParams(), MultiApp::validParams(), and FEProblemBase::validParams().

454 {
455  std::vector<std::string> names;
456  MooseUtils::tokenize<std::string>(input_names, names, 1, " ");
457  for (auto & name_in : names)
458  {
459  const auto name = checkForRename(name_in);
460  auto map_iter = _params.find(name);
461  if (map_iter != _params.end()) // error is handled by checkParams method
462  {
463  map_iter->second._controllable = true;
464  map_iter->second._controllable_flags = execute_flags;
465  }
466  else
467  mooseError("The input parameter '",
468  name,
469  "' does not exist, thus cannot be marked as controllable.");
470  }
471 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.
ExecFlagEnum execute_flags
Storage for the registered execute flags.

◆ defaultCoupledValue() [1/2]

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

Get the default value for an optionally coupled variable.

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

Definition at line 811 of file InputParameters.C.

Referenced by applyCoupledVar(), ScalarCoupleable::getADDefaultValue(), Coupleable::getADDefaultValue(), Coupleable::getADDefaultVectorValue(), Coupleable::getDefaultArrayValue(), ScalarCoupleable::getDefaultValue(), Coupleable::getDefaultValue(), Coupleable::getDefaultVectorValue(), and transferParam().

812 {
813  auto value_it = _params.find(coupling_name);
814 
815  if (value_it == _params.end() || !value_it->second._have_coupled_default)
816  mooseError("Attempted to retrieve default value for coupled variable '",
817  coupling_name,
818  "' when none was provided. \n\nThere are three reasons why this may have "
819  "occurred:\n 1. The other version of params.addCoupledVar() should be used in order "
820  "to provide a default value. \n 2. This should have been a required coupled "
821  "variable added with params.addRequiredCoupledVar() \n 3. The call to get the "
822  "coupled value should have been properly guarded with isCoupled()\n");
823 
824  return value_it->second._coupled_default.at(i);
825 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::map< std::string, Metadata > _params
The actual parameter data.

◆ defaultCoupledValue() [2/2]

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

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

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

Definition at line 802 of file InputParameters.C.

803 {
804  const auto actual_name = checkForRename(coupling_name);
805  _params[actual_name]._coupled_default.resize(i + 1);
806  _params[actual_name]._coupled_default[i] = value;
807  _params[actual_name]._have_coupled_default = true;
808 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ deprecateCoupledVar()

void InputParameters::deprecateCoupledVar ( const std::string &  old_name,
const std::string &  new_name,
const std::string &  removal_date 
)

◆ deprecateParam()

void InputParameters::deprecateParam ( const std::string &  old_name,
const std::string &  new_name,
const std::string &  removal_date 
)

◆ errorPrefix()

std::string InputParameters::errorPrefix ( const std::string &  param) const

generate error message prefix with parameter name and location (if available)

Definition at line 1594 of file InputParameters.C.

Referenced by attemptPrintDeprecated(), finalize(), get(), getFileBase(), and paramErrorPrefix().

1595 {
1596  auto prefix = param + ":";
1597  if (!inputLocation(param).empty())
1598  prefix = inputLocation(param) + ": (" + paramFullpath(param) + ")";
1599  return prefix;
1600 }
std::string inputLocation(const std::string &param) const
std::string paramFullpath(const std::string &param) const

◆ finalize()

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

Finalizes the parameters, which must be done before constructing any objects with these parameters (to be called in the corresponding factories).

typed parameters.

This calls checkParams() and sets up the absolute paths for all file name.

Definition at line 647 of file InputParameters.C.

Referenced by Factory::initialize().

648 {
649  mooseAssert(!isFinalized(), "Already finalized");
650 
651  checkParams(parsing_syntax);
652 
653  // Helper for setting the absolute paths for each set file name parameter
654  const auto set_absolute_path = [this](const std::string & param_name, auto & value)
655  {
656  // We don't need to set a path if nothing is there
657  if (value.empty())
658  return;
659 
660  std::filesystem::path value_path = std::string(value);
661  // Is already absolute, nothing to do
662  if (value_path.is_absolute())
663  return;
664 
665  // The base by which to make things relative to
666  const auto file_base = getFileBase(param_name);
667  value = std::filesystem::absolute(file_base / value_path).c_str();
668  };
669 
670  // Set the absolute path for each file name typed parameter
671  for (const auto & [param_name, param_value] : *this)
672  {
673 #define set_if_filename(type) \
674  else if (auto type_value = dynamic_cast<Parameters::Parameter<type> *>(param_value.get())) \
675  set_absolute_path(param_name, type_value->set()); \
676  else if (auto type_values = dynamic_cast<Parameters::Parameter<std::vector<type>> *>( \
677  param_value.get())) for (auto & value : type_values->set()) \
678  set_absolute_path(param_name, value)
679 
680  if (false)
681  ;
682  // Note that we explicitly skip DataFileName here because we do not want absolute
683  // file paths for data files, as they're searched in the data directories
684  set_if_filename(FileName);
685  set_if_filename(FileNameNoExtension);
686  set_if_filename(MeshFileName);
687  set_if_filename(MatrixFileName);
688 #undef set_if_filename
689  // Set paths for data files
690  else if (auto data_file_name =
691  dynamic_cast<Parameters::Parameter<DataFileName> *>(param_value.get()))
692  {
693  Moose::DataFileUtils::Path found_path;
694  std::optional<std::string> error;
695 
696  // Catch this so that we can add additional error context if it fails (the param path)
697  const auto throw_on_error_before = Moose::_throw_on_error;
698  Moose::_throw_on_error = true;
699  try
700  {
701  found_path = Moose::DataFileUtils::getPath(data_file_name->get(), getFileBase(param_name));
702  }
703  catch (std::exception & e)
704  {
705  error = errorPrefix(param_name) + " " + e.what();
706  }
707  Moose::_throw_on_error = throw_on_error_before;
708 
709  if (error)
710  mooseError(*error);
711 
712  // Set the value to the absolute searched path
713  data_file_name->set() = found_path.path;
714  // And store the path in metadata so that we can dump it later
715  at(param_name)._data_file_name_path = found_path;
716  }
717  }
718 
719  _finalized = true;
720 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::optional< Moose::DataFileUtils::Path > _data_file_name_path
The searched path information pertaining to a DataFileName parameter.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
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 th...
Representation of a data file path.
Definition: DataFileUtils.h:36
bool isFinalized() const
Path getPath(std::string path, const std::optional< std::string > &base=std::optional< std::string >())
Get the data path for a given path, searching the registered data.
Definition: DataFileUtils.C:22
bool _finalized
Whether or not we&#39;ve called finalize() on these parameters yet.
std::string errorPrefix(const std::string &param) const
generate error message prefix with parameter name and location (if available)
std::filesystem::path getFileBase(const std::optional< std::string > &param_name=std::optional< std::string >()) const
bool _throw_on_error
Variable to turn on exceptions during mooseError(), should only be used within MOOSE unit tests or wh...
Definition: Moose.C:758
Metadata & at(const std::string &param_name)

◆ get() [1/2]

template<typename R1 , typename R2 , typename V1 , typename V2 >
std::vector< std::pair< R1, R2 > > InputParameters::get ( const std::string &  param1,
const std::string &  param2 
) const

Combine two vector parameters into a single vector of pairs.

Definition at line 2172 of file InputParameters.h.

Referenced by ElementIDOutputAction::act(), AddMaterialAction::act(), SplitMeshAction::act(), MeshOnlyAction::act(), SetupMeshAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), ActionWarehouse::addActionBlock(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxVariable(), FEProblemBase::addConstraint(), NonlinearSystemBase::addDGKernel(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addFVInitialCondition(), FEProblemBase::addFVKernel(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), FEProblemBase::addInterfaceKernel(), MooseEigenSystem::addKernel(), AuxiliarySystem::addKernel(), NonlinearSystemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), FEProblemBase::addMultiApp(), NonlinearSystemBase::addNodalKernel(), FEProblemBase::addNodalKernel(), MooseObjectWarehouseBase< Indicator >::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), JsonSyntaxTree::addParameters(), Action::addRelationshipManager(), FEProblemBase::addScalarKernel(), MFEMProblem::addTransfer(), FEProblemBase::addTransfer(), FEProblemBase::addUserObject(), MooseServer::addValuesToList(), AuxiliarySystem::addVariable(), AddVariableAction::addVariable(), SystemBase::addVariable(), FEProblemBase::addVariable(), AuxKernelTempl< Real >::AuxKernelTempl(), AuxScalarKernel::AuxScalarKernel(), BoundsBase::BoundsBase(), Moose::Builder::buildFullTree(), Moose::Builder::buildJsonSyntaxTree(), PostprocessorInterface::checkParam(), Moose::SlepcSupport::clearFreeNonlinearPowerIterations(), MooseBaseParameterInterface::connectControllableParams(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledMatrixTagValues(), PostprocessorInterface::coupledPostprocessors(), Coupleable::coupledVectorTagArrayGradient(), Coupleable::coupledVectorTagArrayGradients(), Coupleable::coupledVectorTagArrayValues(), Coupleable::coupledVectorTagDofValues(), Coupleable::coupledVectorTagGradient(), Coupleable::coupledVectorTagGradients(), Coupleable::coupledVectorTagValues(), ActionFactory::create(), AppFactory::createShared(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), Postprocessor::declareValue(), FunctorInterface::deduceFunctorName(), AddVariableAction::feType(), FileRangeBuilder::FileRangeBuilder(), GapValueAux::GapValueAux(), ParsedSubdomainGeneratorBase::generate(), MooseServer::getActionParameters(), AppFactory::getAppParamsID(), MooseApp::getCheckpointDirectories(), DistributionInterface::getDistribution(), ElementIDInterface::getElementID(), ElementIDInterface::getElementIDByName(), ElementIDInterface::getElementIDIndex(), ElementIDInterface::getElementIDNeighbor(), ElementIDInterface::getElementIDNeighborByName(), FunctionInterface::getFunction(), MaterialBase::getGenericZeroMaterialProperty(), MooseServer::getHoverDisplayText(), MaterialPropertyInterface::getMaterial(), MaterialPropertyInterface::getMaterialDataType(), MaterialPropertyInterface::getMaterialPropertyName(), MooseServer::getObjectParameters(), MooseBaseParameterInterface::getParam(), getParamHelper(), PostprocessorInterface::getPostprocessorNameInternal(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), SamplerInterface::getSampler(), AddVariableAction::getSubdomainIDs(), CommonOutputAction::hasConsole(), MeshGeneratorSystem::hasDataDrivenAllowed(), FunctionInterface::hasFunction(), MeshGenerator::hasGenerateData(), ImageSampler::ImageSampler(), AddVariableAction::init(), FullSolveMultiApp::initialSetup(), FEProblemBase::initNullSpaceVectors(), isValid(), IterationAdaptiveDT::IterationAdaptiveDT(), LayeredBase::LayeredBase(), SubProblem::markFamilyPRefinement(), SetupMeshAction::modifyParamsForUseSplit(), MooseApp::MooseApp(), MooseVariableInterface< Real >::MooseVariableInterface(), NodeFaceConstraint::NodeFaceConstraint(), operator=(), OrientedBoxInterface::OrientedBoxInterface(), OutputInterface::OutputInterface(), ConsoleUtils::outputLegacyInformation(), InputParametersChecksUtils< BatchMeshGeneratorAction >::parameterConsistent(), ParsedMaterialBase::ParsedMaterialBase(), PenetrationAux::PenetrationAux(), NEML2Action::printSummary(), ProjectedStatefulMaterialStorageAction::ProjectedStatefulMaterialStorageAction(), ReferenceResidualConvergence::ReferenceResidualConvergence(), InputParameterWarehouse::removeInputParameters(), Moose::SlepcSupport::setEigenProblemSolverParams(), Moose::PetscSupport::setLineSearchFromParams(), Moose::PetscSupport::setMFFDTypeFromParams(), Moose::SlepcSupport::setNewtonPetscOptions(), MooseMesh::setPartitioner(), FEProblemBase::setResidualObjectParamsAndLog(), FVRelationshipManagerInterface::setRMParams(), Moose::SlepcSupport::setSlepcEigenSolverTolerances(), Moose::PetscSupport::setSolveTypeFromParams(), ReadExecutorParamsAction::setupAutoPreconditioning(), CreateExecutionerAction::setupAutoPreconditioning(), MeshBaseImageSampler::setupImageSampler(), ImageSampler::setupImageSampler(), NonlinearSystemBase::shouldEvaluatePreSMOResidual(), SideSetsFromBoundingBoxGenerator::SideSetsFromBoundingBoxGenerator(), Reporter::store(), Moose::SlepcSupport::storeSolveType(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), transferParam(), MooseBaseParameterInterface::uniqueName(), MooseBaseParameterInterface::uniqueParameterName(), GradientJumpIndicator::validParams(), ElemSideNeighborLayersTester::validParams(), ElemSideNeighborLayersGeomTester::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), FVRelationshipManagerInterface::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), ProjectionAux::validParams(), DistributedRectilinearMeshGenerator::validParams(), NearestRadiusLayeredAverage::validParams(), MortarConsumerInterface::validParams(), MortarConstraintBase::validParams(), FVInterfaceKernel::validParams(), MooseVariableFV< Real >::validParams(), Coupleable::vectorTagDofValueHelper(), Coupleable::vectorTagValueHelper(), MeshBaseImageSampler::vtkFlip(), MeshBaseImageSampler::vtkShiftAndScale(), ImageSampler::vtkShiftAndScale(), MeshBaseImageSampler::vtkThreshold(), ImageSampler::vtkThreshold(), and Moose::Builder::walkRaw().

2173 {
2174  const auto param1 = checkForRename(param1_in);
2175  const auto param2 = checkForRename(param2_in);
2176 
2177  const auto & v1 = get<V1>(param1);
2178  const auto & v2 = get<V2>(param2);
2179 
2180  auto controllable = getControllableParameters();
2181  if (controllable.count(param1) || controllable.count(param2))
2182  mooseError(errorPrefix(param1),
2183  " and/or ",
2184  errorPrefix(param2) +
2185  " are controllable parameters and cannot be retireved using "
2186  "the MooseObject::getParam/InputParameters::get methods for pairs");
2187 
2188  if (v1.size() != v2.size())
2189  mooseError("Vector parameters ",
2190  errorPrefix(param1),
2191  "(size: ",
2192  v1.size(),
2193  ") and " + errorPrefix(param2),
2194  "(size: ",
2195  v2.size(),
2196  ") are of different lengths \n");
2197 
2198  std::vector<std::pair<R1, R2>> parameter_pairs;
2199  auto i1 = v1.begin();
2200  auto i2 = v2.begin();
2201  for (; i1 != v1.end() && i2 != v2.end(); ++i1, ++i2)
2202  parameter_pairs.emplace_back(std::make_pair(*i1, *i2));
2203  return parameter_pairs;
2204 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::string errorPrefix(const std::string &param) const
generate error message prefix with parameter name and location (if available)
std::set< std::string > getControllableParameters() const
Return list of controllable parameters.

◆ get() [2/2]

template<typename T >
const T & InputParameters::get ( std::string_view  name) const

A wrapper around the Parameters base class method.

Checks for parameter rename before calling the base class method

Parameters
nameThe name to query the parameter values map with
Returns
The parameter value corresponding to the (possibly renamed) name

Definition at line 2221 of file InputParameters.h.

2222 {
2223  const auto name = checkForRename(std::string(name_in));
2224 
2225  return Parameters::get<T>(name);
2226 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

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

840 {
841  std::map<std::string, std::pair<std::string, std::string>> abv;
842  for (auto it = _params.begin(); it != _params.end(); ++it)
843  {
844  if (!it->second._autobuild_vecs.first.empty())
845  abv[it->first] = it->second._autobuild_vecs;
846  }
847  return abv;
848 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getBase()

std::optional< std::string > InputParameters::getBase ( ) const
Returns
The base system of the object these parameters are for, if any

Definition at line 495 of file InputParameters.C.

Referenced by MooseBase::errorPrefix().

496 {
497  if (have_parameter<std::string>("_moose_base"))
498  return get<std::string>("_moose_base");
499  return {};
500 }

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

Referenced by Action::addRelationshipManagers().

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

◆ getBuildableTypes()

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

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

Definition at line 535 of file InputParameters.C.

Referenced by Moose::Builder::buildFullTree(), and Moose::Builder::buildJsonSyntaxTree().

536 {
537  return _buildable_types;
538 }
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.

◆ getCheckedPointerParam()

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

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

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

Definition at line 1612 of file InputParameters.h.

Referenced by Coupleable::Coupleable(), Postprocessor::declareValue(), MooseBaseParameterInterface::getCheckedPointerParam(), ElementIDInterface::getElementID(), ElementIDInterface::getElementIDByName(), ElementIDInterface::getElementIDNeighbor(), ElementIDInterface::getElementIDNeighborByName(), MooseVariableInterface< Real >::MooseVariableInterface(), ScalarCoupleable::ScalarCoupleable(), and TaggingInterface::TaggingInterface().

1614 {
1615  const auto name = checkForRename(name_in);
1616 
1617  T param = this->get<T>(name);
1618 
1619  // Note: You will receive a compile error on this line if you attempt to pass a non-pointer
1620  // template type to this method
1621  if (param == NULL)
1622  mooseError("Parameter ", name, " is NULL.\n", error_string);
1623  return this->get<T>(name);
1624 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ getClassDescription()

std::string InputParameters::getClassDescription ( ) const

Returns the class description.

Definition at line 139 of file InputParameters.C.

Referenced by JsonSyntaxTree::addParameters(), MooseServer::addValuesToList(), and MooseServer::getHoverDisplayText().

140 {
141  return _class_description;
142 }
std::string _class_description
The class description for the owning object.

◆ getCommandLineMetadata()

const InputParameters::CommandLineMetadata & InputParameters::getCommandLineMetadata ( const std::string &  name) const
Returns
The command line metadata for the parameter name.

Definition at line 988 of file InputParameters.C.

Referenced by MooseApp::copyInputs(), and MooseApp::showInputs().

989 {
990  const auto & cl_data = at(checkForRename(name))._cl_data;
991  if (!cl_data)
992  mooseError("InputParameters::getCommandLineMetadata: The parameter '",
993  name,
994  "' is not a command line parameter");
995  return *cl_data;
996 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::optional< CommandLineMetadata > _cl_data
The data pertaining to a command line parameter (empty if not a command line param) ...
Metadata & at(const std::string &param_name)

◆ getControllableExecuteOnTypes()

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

Return the allowed execute flags for a controllable parameter.

Definition at line 481 of file InputParameters.C.

482 {
483  const auto name = checkForRename(name_in);
484  return at(name)._controllable_flags;
485 }
std::string name(const ElemQuality q)
std::set< ExecFlagType > _controllable_flags
Controllable execute flag restriction.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
Metadata & at(const std::string &param_name)

◆ getControllableParameters()

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

Return list of controllable parameters.

Definition at line 1584 of file InputParameters.C.

Referenced by checkParams(), and get().

1585 {
1586  std::set<std::string> controllable;
1587  for (auto it = _params.begin(); it != _params.end(); ++it)
1588  if (it->second._controllable)
1589  controllable.emplace(it->first);
1590  return controllable;
1591 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getCoupledVariableParamNames()

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

Return the coupled variable parameter names.

Definition at line 829 of file InputParameters.h.

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

◆ getDescription()

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

Get the documentation string for a parameter.

Definition at line 1202 of file InputParameters.C.

Referenced by transferParam().

1203 {
1204  const auto name = checkForRename(name_in);
1205  auto it = _params.find(name);
1206  if (it == _params.end())
1207  mooseError("No parameter exists with the name ", name);
1208  return it->second._doc_string;
1209 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getDocString()

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

Returns the documentation string for the specified parameter name.

Definition at line 328 of file InputParameters.C.

Referenced by applyCoupledVar(), checkParams(), and MooseServer::getHoverDisplayText().

329 {
330  const auto name = checkForRename(name_in);
331 
332  std::string doc_string;
333  auto it = _params.find(name);
334  if (it != _params.end())
335  for (const auto & ch : it->second._doc_string)
336  {
337  if (ch == '\n')
338  doc_string += " ... ";
339  else
340  doc_string += ch;
341  }
342 
343  return doc_string;
344 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getDocUnit()

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

Returns the documentation unit string for the specified parameter name.

Definition at line 360 of file InputParameters.C.

361 {
362  const auto name = checkForRename(name_in);
363  return _params.at(name)._doc_unit;
364 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getFileBase()

std::filesystem::path InputParameters::getFileBase ( const std::optional< std::string > &  param_name = std::optional<std::string>()) const
Returns
A file base to associate with these parameters.

Optionally, an input parameter can be provided via param_name.

If the parameter is provided, we have the following options:

  • The parameter itself has a hit node set (context for that parameter)
  • The InputParameters object has a hit node set (context for all parameters)
  • Neither of the above and we die

In the event that a the parameter is set via command line, this will attempt to look at the parameter's parents to find a suitable context.

Definition at line 723 of file InputParameters.C.

Referenced by finalize().

724 {
725  mooseAssert(!have_parameter<std::string>("_app_name"),
726  "Not currently setup to work with app FileName parameters");
727 
728  const hit::Node * hit_node = nullptr;
729 
730  // Context from the individual parameter
731  if (param_name)
732  hit_node = getHitNode(*param_name);
733  // Context from the parameters
734  if (!hit_node)
735  hit_node = getHitNode();
736  // No hit node, so use the cwd (no input files)
737  if (!hit_node)
738  return std::filesystem::current_path();
739 
740  // Find any context that isn't command line arguments
741  while (hit_node && hit_node->filename() == "CLI_ARGS")
742  hit_node = hit_node->parent();
743 
744  // Failed to find a node up the tree that isn't a command line argument
745  if (!hit_node)
746  {
747  std::string prefix = "";
748  if (param_name)
749  prefix = errorPrefix(*param_name) + " ";
750  mooseError(prefix,
751  "Input context was set via a command-line argument and does not have sufficient "
752  "context for "
753  "determining a file path.");
754  }
755 
756  return std::filesystem::absolute(std::filesystem::path(hit_node->filename()).parent_path());
757 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string errorPrefix(const std::string &param) const
generate error message prefix with parameter name and location (if available)
const hit::Node * getHitNode() const

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

1011 {
1012  const auto param_name = checkForRename(param_name_in);
1013  auto it = _params.find(param_name);
1014  if (it != _params.end())
1015  return it->second._group;
1016  return std::string();
1017 }
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getGroupParameters()

std::set< std::string > InputParameters::getGroupParameters ( const std::string &  group) const

Return names of parameters within a group.

Definition at line 1565 of file InputParameters.C.

1566 {
1567  std::set<std::string> names;
1568  for (auto it = _params.begin(); it != _params.end(); ++it)
1569  if (it->second._group == group)
1570  names.emplace(it->first);
1571  return names;
1572 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getHitNode() [1/2]

const hit::Node * InputParameters::getHitNode ( const std::string &  param) const
Returns
The hit node associated with setting the parameter param, if any

Definition at line 1516 of file InputParameters.C.

Referenced by applyParameter(), applyParameters(), Action::associateWithParameter(), MooseBase::errorPrefix(), ActionWarehouse::getCurrentActionName(), and Factory::initialize().

1517 {
1518  return at(param)._hit_node;
1519 }
const hit::Node * _hit_node
Original location of parameter node; used for error messages.
Metadata & at(const std::string &param_name)

◆ getHitNode() [2/2]

const hit::Node* InputParameters::getHitNode ( ) const
inline
Returns
The hit node that represents the syntax responsible for creating these parameters, if any

Definition at line 1195 of file InputParameters.h.

Referenced by applyParameters(), blockFullpath(), blockLocation(), getFileBase(), inputLocation(), paramFullpath(), and rawParamVal().

1195 { return _hit_node; }
const hit::Node * _hit_node
The hit node representing the syntax that created these parameters, if any.

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

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

866 {
867  const auto name = checkForRename(name_in);
868  std::string var;
869 
870  if (have_parameter<VariableName>(name))
871  var = get<VariableName>(name);
872  else if (have_parameter<NonlinearVariableName>(name))
873  var = get<NonlinearVariableName>(name);
874  else if (have_parameter<LinearVariableName>(name))
875  var = get<LinearVariableName>(name);
876  else if (have_parameter<AuxVariableName>(name))
877  var = get<AuxVariableName>(name);
878  else if (have_parameter<PostprocessorName>(name))
879  var = get<PostprocessorName>(name);
880  else if (have_parameter<VectorPostprocessorName>(name))
881  var = get<VectorPostprocessorName>(name);
882  else if (have_parameter<FunctionName>(name))
883  var = get<FunctionName>(name);
884  else if (have_parameter<UserObjectName>(name))
885  var = get<UserObjectName>(name);
886  else if (have_parameter<MaterialPropertyName>(name))
887  var = get<MaterialPropertyName>(name);
888  else if (have_parameter<std::string>(name))
889  var = get<std::string>(name);
890 
891  return var;
892 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ getNewToDeprecatedVarMap()

const std::unordered_map<std::string, std::string>& InputParameters::getNewToDeprecatedVarMap ( ) const
inline

Return the new to deprecated variable name map.

Definition at line 834 of file InputParameters.h.

835  {
837  }
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.

◆ getParametersList()

std::set< std::string > InputParameters::getParametersList ( ) const
Returns
list of all parameters

Definition at line 1575 of file InputParameters.C.

Referenced by MooseServer::gatherDocumentCompletionItems(), and MooseServer::getHoverDisplayText().

1576 {
1577  std::set<std::string> param_set;
1578  for (auto it = _params.begin(); it != _params.end(); ++it)
1579  param_set.emplace(it->first);
1580  return param_set;
1581 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getParamHelper() [1/5]

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

Definition at line 2133 of file InputParameters.h.

Referenced by MooseBaseParameterInterface::getParam(), MooseApp::getParam(), MooseBaseParameterInterface::getRenamedParam(), and MooseApp::getRenamedParam().

2137 {
2138  const auto name = pars.checkForRename(name_in);
2139 
2140  if (!pars.isParamValid(name))
2141  {
2142  std::stringstream err;
2143  err << "The parameter \"" << name << "\" is being retrieved before being set.";
2144  if (moose_base)
2145  callMooseErrorHelper(*moose_base, err.str());
2146  else
2147  mooseError(err.str());
2148  }
2149 
2150  return pars.get<T>(name);
2151 }
std::string name(const ElemQuality q)
OStreamProxy err
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
static void callMooseErrorHelper(const MooseBase &moose_base, const std::string &error)
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ getParamHelper() [2/5]

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

Definition at line 1461 of file InputParameters.C.

1465 {
1466  const auto name = pars.checkForRename(name_in);
1467  return pars.get<MooseEnum>(name);
1468 }
std::string name(const ElemQuality q)
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
Definition: MooseEnum.h:33
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ getParamHelper() [3/5]

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

Definition at line 1472 of file InputParameters.C.

1476 {
1477  const auto name = pars.checkForRename(name_in);
1478  return pars.get<MultiMooseEnum>(name);
1479 }
std::string name(const ElemQuality q)
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...

◆ getParamHelper() [4/5]

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

◆ getParamHelper() [5/5]

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

◆ getSystemAttributeName()

const std::string & InputParameters::getSystemAttributeName ( ) const

Get the system attribute name if it was registered.

Otherwise throw an error. See the AttribSystem object for use Attribute.h/C.

Definition at line 510 of file InputParameters.C.

Referenced by AttribSystem::initFrom().

511 {
512  mooseAssert(have_parameter<std::string>("_moose_warehouse_system_name"),
513  "SystemAttributeName is not available! Call 'registerSystemAttributeName' (usually "
514  "in the validParams function) before you try accessing it!");
515  return Parameters::get<std::string>("_moose_warehouse_system_name");
516 }

◆ getVecMooseType()

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

Definition at line 895 of file InputParameters.C.

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

896 {
897  const auto name = checkForRename(name_in);
898  std::vector<std::string> svars;
899 
900  if (have_parameter<std::vector<VariableName>>(name))
901  {
902  std::vector<VariableName> vars = get<std::vector<VariableName>>(name);
903  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
904  }
905  else if (have_parameter<std::vector<NonlinearVariableName>>(name))
906  {
907  std::vector<NonlinearVariableName> vars = get<std::vector<NonlinearVariableName>>(name);
908  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
909  }
910  else if (have_parameter<std::vector<AuxVariableName>>(name))
911  {
912  std::vector<AuxVariableName> vars = get<std::vector<AuxVariableName>>(name);
913  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
914  }
915  else if (have_parameter<std::vector<MaterialPropertyName>>(name))
916  {
917  std::vector<MaterialPropertyName> vars = get<std::vector<MaterialPropertyName>>(name);
918  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
919  }
920  else if (have_parameter<std::vector<std::string>>(name))
921  {
922  std::vector<std::string> vars = get<std::vector<std::string>>(name);
923  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
924  }
925 
926  return svars;
927 }
std::string name(const ElemQuality q)
char ** vars
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

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

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

790 {
791  return _coupled_vars.find(coupling_name) != _coupled_vars.end();
792 }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ hasDefault()

bool InputParameters::hasDefault ( const std::string &  param_name) const

Return whether a parameter has a default.

Definition at line 774 of file InputParameters.C.

Referenced by transferParam().

775 {
776  const auto name = checkForRename(param_name);
777  if (hasDefaultCoupledValue(name))
778  return true;
779  // If it has a default, it's already valid
780  else if (isParamSetByAddParam(name))
781  return true;
782  else if (isParamValid(name))
783  mooseError("No way to know if the parameter '", param_name, "' has a default");
784  else
785  return false;
786 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
bool isParamSetByAddParam(const std::string &name) const
Returns whether or not the parameter was set due to addParam.
bool hasDefaultCoupledValue(const std::string &coupling_name) const
Return whether or not the requested parameter has a default coupled value.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

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

Referenced by applyCoupledVar(), Coupleable::coupledComponents(), FunctionMaterialBase< is_ad >::FunctionMaterialBase(), hasDefault(), Coupleable::isCoupledConstant(), and transferParam().

796 {
797  return _params.count(coupling_name) > 0 && _params.at(coupling_name)._have_coupled_default &&
798  _coupled_vars.count(coupling_name) > 0;
799 }
std::set< std::string > _coupled_vars
The coupled variables set.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ have_parameter()

template<typename T >
bool InputParameters::have_parameter ( std::string_view  name) const

A wrapper around the Parameters base class method.

Checks for parameter rename before calling the base class method. This method tells whether a parameter with a known type is defined. If the type is unknown, use isParamDefined().

Parameters
nameThe name to query the parameter values map with
Returns
Whether there is a key in the parameter values map corresponding to the (possibly renamed) name

Definition at line 2230 of file InputParameters.h.

Referenced by ActionWarehouse::addActionBlock(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addConstraint(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addIndicator(), FEProblemBase::addInterfaceKernel(), MooseEigenSystem::addKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addScalarKernel(), FEProblemBase::addTransfer(), MooseServer::addValuesToList(), MeshGeneratorSystem::appendMeshGenerator(), Moose::Builder::buildFullTree(), Moose::Builder::buildJsonSyntaxTree(), Coupleable::checkVar(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FunctorInterface::deduceFunctorName(), MooseServer::getActionParameters(), AppFactory::getAppParamsID(), MooseServer::getCompletionItemKind(), MaterialBase::getGenericZeroMaterialProperty(), MooseServer::getHoverDisplayText(), MaterialPropertyInterface::getMaterialPropertyName(), MooseServer::getObjectParameters(), MaterialOutputAction::getParams(), getVecMooseType(), AdvancedOutput::initExecutionTypes(), AttribDisplaced::initFrom(), isParamValid(), MooseApp::MooseApp(), MooseApp::outputMachineReadableData(), OutputOnWarehouse::OutputOnWarehouse(), InputParametersChecksUtils< BatchMeshGeneratorAction >::parameterConsistent(), FVRelationshipManagerInterface::parameterError(), NEML2Action::printSummary(), FEProblemBase::setResidualObjectParamsAndLog(), DumpObjectsProblem::stringifyParameters(), transferParam(), BlockRestrictable::validParams(), and Moose::Builder::walkRaw().

2231 {
2232  const auto name = checkForRename(std::string(name_in));
2233 
2234  return Parameters::have_parameter<T>(name);
2235 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

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

Referenced by AddElementalFieldAction::validParams().

1959 {
1960  const auto name = checkForRename(name_in);
1961  suppressParameter<T>(name);
1962  _params[name]._ignore = true;
1963 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ inputLocation()

std::string InputParameters::inputLocation ( const std::string &  param) const
Returns
A string representing the location in the input text the parameter originated from (i.e. filename,linenum) for the given param

Definition at line 1531 of file InputParameters.C.

Referenced by checkParams(), errorPrefix(), and MooseBaseParameterInterface::paramErrorMsg().

1532 {
1533  if (const auto hit_node = getHitNode(param))
1534  return hit_node->fileLocation(/* with_column = */ false);
1535  return "";
1536 }
const hit::Node * getHitNode() const

◆ isCommandLineParameter()

bool InputParameters::isCommandLineParameter ( const std::string &  name) const
Returns
Whether or not the parameter name is a command line parameter

Definition at line 973 of file InputParameters.C.

974 {
975  return at(checkForRename(name))._cl_data.has_value();
976 }
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::optional< CommandLineMetadata > _cl_data
The data pertaining to a command line parameter (empty if not a command line param) ...
Metadata & at(const std::string &param_name)

◆ isControllable()

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

Returns a Boolean indicating whether the specified parameter is controllable.

Definition at line 474 of file InputParameters.C.

Referenced by transferParam().

475 {
476  const auto name = checkForRename(name_in);
477  return _params.count(name) > 0 && _params.at(name)._controllable;
478 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isFinalized()

bool InputParameters::isFinalized ( ) const
inline
Returns
Whether or not finalize() has been called

Definition at line 1208 of file InputParameters.h.

Referenced by finalize(), and MooseBaseParameterInterface::MooseBaseParameterInterface().

1208 { return _finalized; }
bool _finalized
Whether or not we&#39;ve called finalize() on these parameters yet.

◆ isFunctorNameType()

template<typename T >
constexpr bool InputParameters::isFunctorNameType ( )
staticprivate

Definition at line 2395 of file InputParameters.h.

2396 {
2397  return Moose::internal::isFunctorNameTypeHelper(Moose::internal::getNullptrExample<T>());
2398 }
constexpr bool isFunctorNameTypeHelper(T *ex)

◆ isParamDefined()

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

Method returns true if the parameter is defined for any type.

If the type is known, use have_parameter<T>() instead.

Parameters
nameThe parameter name

Definition at line 1195 of file InputParameters.C.

1196 {
1197  const auto name = checkForRename(name_in);
1198  return _params.count(name) > 0;
1199 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamDeprecated()

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

Returns True if the parameters is deprecated.

Definition at line 429 of file InputParameters.C.

430 {
431  const auto name = checkForRename(name_in);
432  return _params.count(name) > 0 && !_params.at(name)._deprecation_message.empty();
433 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamRequired()

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

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

Definition at line 374 of file InputParameters.C.

Referenced by areAllRequiredParamsValid(), checkParams(), MooseServer::getCompletionItemKind(), and transferParam().

375 {
376  const auto name = checkForRename(name_in);
377  return _params.count(name) > 0 && _params.at(name)._required;
378 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamSetByAddParam()

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

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

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

Definition at line 422 of file InputParameters.C.

Referenced by MultiApp::createApp(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), hasDefault(), and TransientBase::TransientBase().

423 {
424  const auto name = checkForRename(name_in);
425  return _params.count(name) > 0 && _params.at(name)._set_by_add_param;
426 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isParamSetByUser()

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

Method returns true if the parameter was set by the user.

Parameters
nameThe parameter name

Definition at line 1178 of file InputParameters.C.

Referenced by CreateProblemAction::act(), SplitMeshAction::act(), MeshOnlyAction::act(), SetupMeshAction::act(), FEProblemBase::addOutput(), SystemBase::addVariable(), ADVectorFunctionDirichletBC::ADVectorFunctionDirichletBC(), AnnularMesh::AnnularMesh(), AnnularMeshGenerator::AnnularMeshGenerator(), BreakMeshByBlockGeneratorBase::BreakMeshByBlockGeneratorBase(), PiecewiseTabularBase::buildFromFile(), PNGOutput::calculateRescalingValues(), Console::Console(), DumpObjectsProblem::deduceNecessaryParameters(), DefaultMultiAppFixedPointConvergence::DefaultMultiAppFixedPointConvergence(), ExamplePatchMeshGenerator::ExamplePatchMeshGenerator(), Executor::Executor(), Exodus::Exodus(), FEProblemBase::FEProblemBase(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::generate(), AddVariableAction::init(), Console::initialSetup(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MooseBaseParameterInterface::isParamSetByUser(), MooseApp::isParamSetByUser(), MultiApp::keepSolutionDuringRestore(), LayeredBase::LayeredBase(), LibtorchNeuralNetControl::LibtorchNeuralNetControl(), MultiApp::MultiApp(), MultiAppGeneralFieldUserObjectTransfer::MultiAppGeneralFieldUserObjectTransfer(), MultiAppTransfer::MultiAppTransfer(), MultiAppVariableValueSamplePostprocessorTransfer::MultiAppVariableValueSamplePostprocessorTransfer(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::NearestPointBase(), paramSetByUser(), MooseMesh::prepare(), PropertyReadFile::PropertyReadFile(), RandomIC::RandomIC(), MooseMesh::setCoordSystem(), TransientBase::setupTimeIntegrator(), Transfer::Transfer(), TransientBase::TransientBase(), VectorBodyForce::VectorBodyForce(), vectorFunctionDim(), VectorFunctionDirichletBC::VectorFunctionDirichletBC(), VectorFunctionIC::VectorFunctionIC(), and VectorMagnitudeFunctorMaterialTempl< is_ad >::VectorMagnitudeFunctorMaterialTempl().

1179 {
1180  const auto name = checkForRename(name_in);
1181  // Invalid; for sure not set by the user
1182  if (!isParamValid(name))
1183  return false;
1184  // Parameter is not located in the list (called Parameters::set)
1185  if (!_params.count(name))
1186  return false;
1187  // Special case for a command line option, which is a private parameter
1188  if (const auto cl_data = queryCommandLineMetadata(name))
1189  return cl_data->set_by_command_line;
1190  // Not a command line option, not set by addParam and not private
1191  return !_params.at(name)._set_by_add_param && !_params.at(name)._is_private;
1192 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::optional< InputParameters::CommandLineMetadata > queryCommandLineMetadata(const std::string &name) const
std::map< std::string, Metadata > _params
The actual parameter data.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ isParamValid()

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

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

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

Definition at line 390 of file InputParameters.C.

Referenced by ElementIDOutputAction::act(), ReadExecutorParamsAction::act(), CreateExecutionerAction::act(), CreateProblemDefaultAction::act(), MeshOnlyAction::act(), SetupMeshAction::act(), MaterialOutputAction::act(), AddPeriodicBCAction::act(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblem::addLineSearch(), MooseObjectWarehouseBase< Indicator >::addObject(), FEProblemBase::addObjectParamsHelper(), JsonSyntaxTree::addParameters(), FEProblemBase::addTransfer(), AddVariableAction::addVariable(), SystemBase::addVariable(), ADInterfaceKernelTempl< T >::ADInterfaceKernelTempl(), ADPiecewiseLinearInterpolationMaterial::ADPiecewiseLinearInterpolationMaterial(), applyParameter(), areAllRequiredParamsValid(), PostprocessorInterface::checkParam(), checkParams(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledMatrixTagValues(), Coupleable::coupledVectorTagArrayGradient(), Coupleable::coupledVectorTagArrayGradients(), Coupleable::coupledVectorTagArrayValues(), Coupleable::coupledVectorTagDofValues(), Coupleable::coupledVectorTagGradient(), Coupleable::coupledVectorTagGradients(), Coupleable::coupledVectorTagValues(), AppFactory::createShared(), FunctorInterface::deduceFunctorName(), ElementMaterialSampler::ElementMaterialSampler(), FileRangeBuilder::FileRangeBuilder(), GapValueAux::GapValueAux(), MooseServer::getCompletionItemKind(), MaterialPropertyInterface::getMaterialDataType(), MaterialPropertyInterface::getMaterialPropertyName(), getParamHelper(), ReporterInterface::getReporterName(), Reporter::getReporterValueName(), GhostingUserObject::GhostingUserObject(), hasDefault(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), isParamSetByUser(), MooseBaseParameterInterface::isParamValid(), MooseApp::isParamValid(), isValid(), LayeredBase::LayeredBase(), LayeredIntegralBase< ElementIntegralVariableUserObject >::LayeredIntegralBase(), SubProblem::markFamilyPRefinement(), UserObjectInterface::mooseObjectError(), MultiApp::MultiApp(), NodeFaceConstraint::NodeFaceConstraint(), InputParametersChecksUtils< BatchMeshGeneratorAction >::parameterConsistent(), ParsedMaterialBase::ParsedMaterialBase(), PenetrationAux::PenetrationAux(), PiecewiseBilinear::PiecewiseBilinear(), PiecewiseLinearInterpolationMaterial::PiecewiseLinearInterpolationMaterial(), ReporterInterface::possiblyCheckHasReporter(), PseudoTimestep::PseudoTimestep(), rangeCheck(), ReferenceResidualConvergence::ReferenceResidualConvergence(), Moose::PetscSupport::setLineSearchFromParams(), Moose::PetscSupport::setMFFDTypeFromParams(), MooseMesh::setPartitioner(), Moose::PetscSupport::setSolveTypeFromParams(), SideSetsGeneratorBase::setup(), MeshBaseImageSampler::setupImageSampler(), ImageSampler::setupImageSampler(), SetupMeshAction::setupMesh(), Moose::SlepcSupport::storeSolveType(), DumpObjectsProblem::stringifyParameters(), BoundaryRestrictableRequired::validParams(), BoundaryRestrictable::validParams(), Coupleable::vectorTagDofValueHelper(), Coupleable::vectorTagValueHelper(), MeshBaseImageSampler::vtkMagnitude(), ImageSampler::vtkMagnitude(), MeshBaseImageSampler::vtkThreshold(), and ImageSampler::vtkThreshold().

391 {
392  const auto name = checkForRename(name_in);
393  if (have_parameter<MooseEnum>(name))
394  return get<MooseEnum>(name).isValid();
395  else if (have_parameter<std::vector<MooseEnum>>(name))
396  {
397  for (auto it = get<std::vector<MooseEnum>>(name).begin();
398  it != get<std::vector<MooseEnum>>(name).end();
399  ++it)
400  if (!it->isValid())
401  return false;
402  return true;
403  }
404  else if (have_parameter<MultiMooseEnum>(name))
405  return get<MultiMooseEnum>(name).isValid();
406  else if (have_parameter<std::vector<MultiMooseEnum>>(name))
407  {
408  for (auto it = get<std::vector<MultiMooseEnum>>(name).begin();
409  it != get<std::vector<MultiMooseEnum>>(name).end();
410  ++it)
411  if (!it->isValid())
412  return false;
413  return true;
414  }
415  else if (have_parameter<ExecFlagEnum>(name))
416  return get<ExecFlagEnum>(name).isValid();
417  else
418  return _params.count(name) > 0 && _params.at(name)._valid;
419 }
std::string name(const ElemQuality q)
void isValid(MooseObject *obj)
Definition: TheWarehouse.C:287
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isPrivate()

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

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

Definition at line 445 of file InputParameters.C.

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

446 {
447  const auto name = checkForRename(name_in);
448  return _params.count(name) > 0 && _params.at(name)._is_private;
449 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isRangeChecked()

bool InputParameters::isRangeChecked ( const std::string &  param_name) const

Return whether a parameter has a range check.

Definition at line 760 of file InputParameters.C.

Referenced by transferParam().

761 {
762  const auto name = checkForRename(param_name);
763  return !_params.find(name)->second._range_function.empty();
764 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ isType()

template<typename T >
bool InputParameters::isType ( const std::string &  name) const
Returns
True if the parameter with name name is of type T.

Definition at line 2210 of file InputParameters.h.

Referenced by BatchMeshGeneratorAction::checkInputParameterType(), PostprocessorInterface::checkParam(), PostprocessorInterface::coupledPostprocessors(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), PostprocessorInterface::getPostprocessorNameInternal(), ReporterInterface::getReporterName(), and Reporter::getReporterValueName().

2211 {
2212  const auto name = checkForRename(name_in);
2213 
2214  if (!_params.count(name))
2215  mooseError("Parameter \"", name, "\" is not valid.");
2216  return have_parameter<T>(name);
2217 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ makeParamNotRequired() [1/2]

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

Changes the parameter to not be required.

Parameters
nameThe parameter name

Definition at line 1979 of file InputParameters.h.

Referenced by MooseServer::getObjectParameters(), ExtraIDIntegralVectorPostprocessor::validParams(), and MortarConstraintBase::validParams().

1980 {
1981  const auto name = checkForRename(name_in);
1982 
1983  if (!this->have_parameter<T>(name))
1984  mooseError("Unable to un-require nonexistent parameter: ", name);
1985 
1986  _params[name]._required = false;
1987 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ makeParamNotRequired() [2/2]

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

Forces parameter of given name to be not required regardless of type.

Definition at line 381 of file InputParameters.C.

382 {
383  const auto name = checkForRename(name_in);
384 
385  if (_params.count(name))
386  _params[name]._required = false;
387 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ makeParamRequired()

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

Changes the parameter to be required.

Parameters
nameThe parameter name

Definition at line 1967 of file InputParameters.h.

Referenced by SideSetsBetweenSubdomainsGenerator::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), and SideSetsAroundSubdomainGenerator::validParams().

1968 {
1969  const auto name = checkForRename(name_in);
1970 
1971  if (!this->have_parameter<T>(name))
1972  mooseError("Unable to require nonexistent parameter: ", name);
1973 
1974  _params[name]._required = true;
1975 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ markControlled()

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

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

◆ mooseObjectSyntaxVisibility() [1/2]

void InputParameters::mooseObjectSyntaxVisibility ( bool  visibility)

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

Definition at line 561 of file InputParameters.C.

Referenced by Moose::Builder::buildFullTree(), and Moose::Builder::buildJsonSyntaxTree().

562 {
563  _moose_object_syntax_visibility = visibility;
564 }
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.

◆ mooseObjectSyntaxVisibility() [2/2]

bool InputParameters::mooseObjectSyntaxVisibility ( ) const

Definition at line 567 of file InputParameters.C.

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

◆ numberDefaultCoupledValues()

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

Get the number of defaulted coupled value entries.

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

Definition at line 828 of file InputParameters.C.

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

829 {
830  auto value_it = _params.find(coupling_name);
831  if (value_it == _params.end())
832  mooseError("Attempted to retrieve default value for coupled variable '",
833  coupling_name,
834  "' when none was provided.");
835  return value_it->second._coupled_default.size();
836 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::map< std::string, Metadata > _params
The actual parameter data.

◆ operator+=()

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

Definition at line 184 of file InputParameters.C.

185 {
186  Parameters::operator+=(rhs);
187 
188  // TODO: this is not a proper merge - if a particular parameter exists in both this and rhs,
189  // then we should actually smartly merge both metadata structs before storing in this.
190  for (auto it = rhs._params.begin(); it != rhs._params.end(); ++it)
191  _params[it->first] = it->second;
192 
193  _buildable_types.insert(
194  _buildable_types.end(), rhs._buildable_types.begin(), rhs._buildable_types.end());
195  _buildable_rm_types.insert(
196  _buildable_rm_types.end(), rhs._buildable_rm_types.begin(), rhs._buildable_rm_types.end());
197 
198  // Collapse nesting and moose object syntax hiding are not modified with +=
199  _coupled_vars.insert(rhs._coupled_vars.begin(), rhs._coupled_vars.end());
202 
204  rhs._old_to_new_name_and_dep.end());
205  _new_to_old_names.insert(rhs._new_to_old_names.begin(), rhs._new_to_old_names.end());
206  return *this;
207 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
std::set< std::string > _coupled_vars
The coupled variables set.
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.
std::map< std::string, Metadata > _params
The actual parameter data.
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

◆ operator=()

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

Definition at line 145 of file InputParameters.C.

146 {
147  // An error to help minimize the segmentation faults that occure when MooseObjects do not have the
148  // correct constructor
149  if (!rhs._allow_copy)
150  {
151  const std::string & name =
152  rhs.get<std::string>("_object_name"); // If _allow_parameter_copy is set then so is name
153  // (see InputParameterWarehouse::addInputParameters)
154  mooseError("Copying of the InputParameters object for the ",
155  name,
156  " object is not allowed.\n\nThe likely cause for this error ",
157  "is having a constructor that does not use a const reference, all constructors\nfor "
158  "MooseObject based classes should be as follows:\n\n",
159  " MyObject::MyObject(const InputParameters & parameters);");
160  }
161 
163 
164  _params = rhs._params;
165 
172  _allow_copy = rhs._allow_copy;
177  _hit_node = rhs._hit_node;
178  _finalized = false;
179 
180  return *this;
181 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
std::string name(const ElemQuality q)
bool _allow_copy
A flag for toggling the error message in the copy constructor.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
infix_ostream_iterator< T, charT, traits > & operator=(T const &item)
Definition: InfixIterator.h:46
std::set< std::string > _coupled_vars
The coupled variables set.
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.
bool _finalized
Whether or not we&#39;ve called finalize() on these parameters yet.
const hit::Node * _hit_node
The hit node representing the syntax that created these parameters, if any.
std::vector< std::string > _buildable_types
The parameter is used to restrict types that can be built.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
std::map< std::string, Metadata > _params
The actual parameter data.
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

◆ paramAliases()

std::vector< std::string > InputParameters::paramAliases ( const std::string &  param_name) const

Return all the aliased names associated with param_name.

The returned container will always contain param_name itself. Other aliases in addition to param_name will include the base class parameter name if param_name is the derived class parameter name, or deprecated names that param_name is meant to replace.

Parameters
param_nameThe name of the parameter that we want to lookup aliases for. This parameter name must exist in our metadata and parameter names to values map, e.g. this parameter must represent the derived class parameter name if a base class parameter has been renamed or the blessed parameter name in situations where associated parameter names have been deprecated
Returns
All aliases which logically resolve-to/are-associated-with param_name, including param_name itself

Definition at line 1735 of file InputParameters.C.

1736 {
1737  mooseAssert(_values.find(param_name) != _values.end(),
1738  "The parameter we are searching for aliases for should exist in our parameter map");
1739  std::vector<std::string> aliases = {param_name};
1740 
1741  for (const auto & pr : as_range(_new_to_old_names.equal_range(param_name)))
1742  aliases.push_back(pr.second);
1743 
1744  return aliases;
1745 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)

◆ paramFullpath()

std::string InputParameters::paramFullpath ( const std::string &  param) const
Returns
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 1539 of file InputParameters.C.

Referenced by checkParams(), and errorPrefix().

1540 {
1541  if (const auto hit_node = getHitNode(param))
1542  return hit_node->fullpath();
1543  return "";
1544 }
const hit::Node * getHitNode() const

◆ paramSetByUser()

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

Deprecated method.

Use isParamSetByUser() instead.

Definition at line 1171 of file InputParameters.C.

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

◆ queryCommandLineMetadata()

std::optional< InputParameters::CommandLineMetadata > InputParameters::queryCommandLineMetadata ( const std::string &  name) const
Returns
Queries for the command line metadata for the parameter name

Will return an empty optional if the parameter is not a command line param.

Definition at line 979 of file InputParameters.C.

Referenced by isParamSetByUser().

980 {
981  const auto & cl_data = at(checkForRename(name))._cl_data;
982  if (!cl_data)
983  return {};
984  return *cl_data;
985 }
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::optional< CommandLineMetadata > _cl_data
The data pertaining to a command line parameter (empty if not a command line param) ...
Metadata & at(const std::string &param_name)

◆ queryDataFileNamePath()

std::optional< Moose::DataFileUtils::Path > InputParameters::queryDataFileNamePath ( const std::string &  name) const
Returns
The DataFileName path for the parameter name (if any).

Definition at line 1748 of file InputParameters.C.

1749 {
1750  return at(checkForRename(name))._data_file_name_path;
1751 }
std::optional< Moose::DataFileUtils::Path > _data_file_name_path
The searched path information pertaining to a DataFileName parameter.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
Metadata & at(const std::string &param_name)

◆ rangeCheck() [1/2]

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

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

Returns
Boolean indicating whether range check exists

Definition at line 1570 of file InputParameters.h.

Referenced by Moose::Builder::setScalarValueTypeParameter().

1574 {
1575  mooseAssert(param, "Parameter is NULL");
1576 
1577  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1578  return;
1579 
1580  // Parse the expression
1582  if (fp.Parse(_params[short_name]._range_function, short_name) != -1) // -1 for success
1583  {
1584  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1585  return;
1586  }
1587 
1588  // ensure range-checked input file parameter comparison functions
1589  // do absolute floating point comparisons instead of using a default epsilon.
1590  auto tmp_eps = fp.epsilon();
1591  fp.setEpsilon(0);
1592  // We require a non-const value for the implicit upscaling of the parameter type
1593  std::vector<UP_T> value(1, param->set());
1594  UP_T result = fp.Eval(&value[0]);
1595  fp.setEpsilon(tmp_eps);
1596 
1597  if (fp.EvalError())
1598  {
1599  oss << "Error evaluating expression: " << _params[short_name]._range_function
1600  << "\nPerhaps you used the wrong variable name?\n";
1601  return;
1602  }
1603 
1604  if (!result)
1605  oss << "Range check failed for parameter " << full_name
1606  << "\n\tExpression: " << _params[short_name]._range_function << "\n\tValue: " << value[0]
1607  << '\n';
1608 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::map< std::string, Metadata > _params
The actual parameter data.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ rangeCheck() [2/2]

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

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

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

Definition at line 1457 of file InputParameters.h.

1461 {
1462  mooseAssert(param, "Parameter is NULL");
1463 
1464  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1465  return;
1466 
1479  std::vector<std::string> vars;
1480  if (fp.ParseAndDeduceVariables(_params[short_name]._range_function, vars) != -1) // -1 for success
1481  {
1482  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1483  return;
1484  }
1485 
1486  // Fparser parameter buffer
1487  std::vector<UP_T> parbuf(vars.size());
1488 
1489  // parameter vector
1490  const std::vector<T> & value = param->set();
1491 
1492  // iterate over all vector values (maybe ;)
1493  bool need_to_iterate = false;
1494  unsigned int i = 0;
1495  do
1496  {
1497  // set parameters
1498  for (unsigned int j = 0; j < vars.size(); j++)
1499  {
1500  if (vars[j] == short_name)
1501  {
1502  if (value.size() == 0)
1503  {
1504  oss << "Range checking empty vector: " << _params[short_name]._range_function << '\n';
1505  return;
1506  }
1507 
1508  parbuf[j] = value[i];
1509  need_to_iterate = true;
1510  }
1511  else if (vars[j] == short_name + "_size")
1512  parbuf[j] = value.size();
1513  else
1514  {
1515  if (vars[j].substr(0, short_name.size() + 1) != short_name + "_")
1516  {
1517  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1518  return;
1519  }
1520  std::istringstream iss(vars[j]);
1521  iss.seekg(short_name.size() + 1);
1522 
1523  size_t index;
1524  if (iss >> index && iss.eof())
1525  {
1526  if (index >= value.size())
1527  {
1528  oss << "Error parsing expression: " << _params[short_name]._range_function
1529  << "\nOut of range variable " << vars[j] << '\n';
1530  return;
1531  }
1532  parbuf[j] = value[index];
1533  }
1534  else
1535  {
1536  oss << "Error parsing expression: " << _params[short_name]._range_function
1537  << "\nInvalid variable " << vars[j] << '\n';
1538  return;
1539  }
1540  }
1541  }
1542 
1543  // ensure range-checked input file parameter comparison functions
1544  // do absolute floating point comparisons instead of using a default epsilon.
1545  auto tmp_eps = fp.epsilon();
1546  fp.setEpsilon(0);
1547  UP_T result = fp.Eval(&parbuf[0]);
1548  fp.setEpsilon(tmp_eps);
1549 
1550  // test function using the parameters determined above
1551  if (fp.EvalError())
1552  {
1553  oss << "Error evaluating expression: " << _params[short_name]._range_function << '\n';
1554  return;
1555  }
1556 
1557  if (!result)
1558  {
1559  oss << "Range check failed for parameter " << full_name
1560  << "\n\tExpression: " << _params[short_name]._range_function << "\n";
1561  if (need_to_iterate)
1562  oss << "\t Component: " << i << '\n';
1563  }
1564 
1565  } while (need_to_iterate && ++i < value.size());
1566 }
char ** vars
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::map< std::string, Metadata > _params
The actual parameter data.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ rangeCheckedFunction()

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

Return the range check function for any parameter (empty string if it is not range checked)

Definition at line 767 of file InputParameters.C.

Referenced by transferParam().

768 {
769  const auto name = checkForRename(param_name);
770  return _params.at(name)._range_function;
771 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ rawParamVal()

std::string InputParameters::rawParamVal ( const std::string &  param) const
Returns
A string representing the raw, unmodified token text for the given param. This is only set if this parameter is parsed from hit

Definition at line 1603 of file InputParameters.C.

1604 {
1605  if (const auto hit_node = getHitNode(param))
1606  return hit_node->strVal();
1607  return "";
1608 }
const hit::Node * getHitNode() const

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

Referenced by Kernel::validParams(), LineSearch::validParams(), VectorKernel::validParams(), ActivateElementsUserObjectBase::validParams(), ArrayKernel::validParams(), HDGKernel::validParams(), BoundsBase::validParams(), Distribution::validParams(), Times::validParams(), ElementSubdomainModifierBase::validParams(), MFEMBoundaryCondition::validParams(), Constraint::validParams(), Problem::validParams(), ScalarKernelBase::validParams(), LayeredExtremumMaterialProperty::validParams(), PointwiseRenormalizeVector::validParams(), MFEMAuxKernel::validParams(), ADInterfaceKernelTempl< T >::validParams(), Positions::validParams(), SidesetAroundSubdomainUpdater::validParams(), MFEMKernel::validParams(), MoosePartitioner::validParams(), ChainControl::validParams(), TimeStepper::validParams(), NearestPointIntegralVariablePostprocessor::validParams(), MFEMFESpace::validParams(), MFEMSolverBase::validParams(), MFEMSubMesh::validParams(), MFEMSubMeshTransfer::validParams(), EigenKernel::validParams(), Convergence::validParams(), Postprocessor::validParams(), Split::validParams(), RelationshipManager::validParams(), Damper::validParams(), Predictor::validParams(), LinearFVKernel::validParams(), BoundaryCondition::validParams(), DiracKernelTempl< T >::validParams(), VectorPostprocessor::validParams(), Action::validParams(), NodalKernelBase::validParams(), InterfaceKernelTempl< T >::validParams(), FVKernel::validParams(), MoosePreconditioner::validParams(), Indicator::validParams(), MooseVariableBase::validParams(), AuxScalarKernel::validParams(), MeshDivision::validParams(), DGKernelBase::validParams(), TimeIntegrator::validParams(), MeshGenerator::validParams(), Control::validParams(), Reporter::validParams(), ScalarInitialCondition::validParams(), Function::validParams(), FVInitialConditionBase::validParams(), Executioner::validParams(), Marker::validParams(), Output::validParams(), UserObject::validParams(), Sampler::validParams(), InitialConditionBase::validParams(), LinearFVBoundaryCondition::validParams(), FVInterfaceKernel::validParams(), FVBoundaryCondition::validParams(), AuxKernelTempl< Real >::validParams(), MultiApp::validParams(), and Executor::validParams().

489 {
490  InputParameters::set<std::string>("_moose_base") = value;
491  _params["_moose_base"]._is_private = true;
492 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ registerBuildableTypes()

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

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

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

Definition at line 519 of file InputParameters.C.

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

◆ registerSystemAttributeName()

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

This method is used to define the MOOSE system name that is used by the TheWarehouse object for storing objects to be retrieved for execution.

The base class of every object class that will be called for execution (e.g., UserObject objects) should call this method.

This is different from registerBase because the name supplied to registerBase is used to associate syntax, but the objects created often go to the same objects for execution, as is the case for Postprocessor object which are executed with UserObjects.

See the AttribSystem object for use Attribute.h/C.

Definition at line 503 of file InputParameters.C.

Referenced by Distribution::validParams(), LinearFVFluxKernel::validParams(), ScalarKernelBase::validParams(), Constraint::validParams(), LinearFVElementalKernel::validParams(), FVDirichletBCBase::validParams(), TimeStepper::validParams(), Split::validParams(), Damper::validParams(), FVElementalKernel::validParams(), FVFluxBC::validParams(), InterfaceKernelBase::validParams(), DiracKernelBase::validParams(), BoundaryCondition::validParams(), NodalKernelBase::validParams(), FVFluxKernel::validParams(), DGKernelBase::validParams(), UserObject::validParams(), Sampler::validParams(), LinearFVBoundaryCondition::validParams(), FVInterfaceKernel::validParams(), and AuxKernelTempl< Real >::validParams().

504 {
505  InputParameters::set<std::string>("_moose_warehouse_system_name") = value;
506  _params["_moose_warehouse_system_name"]._is_private = true;
507 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ renameCoupledVar()

void InputParameters::renameCoupledVar ( const std::string &  old_name,
const std::string &  new_name,
const std::string &  new_docstring 
)

Rename a coupled variable and provide a new documentation string.

Parameters
old_nameThe old name of the coupled variable
new_nameThe new name of the coupled variable
new_docstringThe new documentation string for the coupled variable

Definition at line 1702 of file InputParameters.C.

Referenced by ADPenaltyPeriodicSegmentalConstraint::validParams(), ADPeriodicSegmentalConstraint::validParams(), PeriodicSegmentalConstraint::validParams(), PenaltyPeriodicSegmentalConstraint::validParams(), and ScalarLMKernelTempl< is_ad >::validParams().

1705 {
1706  renameCoupledVarInternal(old_name, new_name, new_docstring, "");
1707 }
void renameCoupledVarInternal(const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)

◆ renameCoupledVarInternal()

void InputParameters::renameCoupledVarInternal ( const std::string &  old_name,
const std::string &  new_name,
const std::string &  docstring,
const std::string &  removal_date 
)
private

Definition at line 1676 of file InputParameters.C.

Referenced by deprecateCoupledVar(), and renameCoupledVar().

1680 {
1681  auto coupled_vars_it = _coupled_vars.find(old_name);
1682  if (coupled_vars_it == _coupled_vars.end())
1683  mooseError("Requested to rename coupled variable '",
1684  old_name,
1685  "' but that coupled variable name doesn't exist in the parameters object.");
1686 
1687  _coupled_vars.insert(new_name);
1688  _coupled_vars.erase(coupled_vars_it);
1689 
1690  renameParamInternal(old_name, new_name, docstring, removal_date);
1691 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void renameParamInternal(const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)
std::string docstring(const std::string &desc)
Augment docstring if NEML2 is not enabled.
Definition: NEML2Utils.C:77
std::set< std::string > _coupled_vars
The coupled variables set.

◆ renameParam()

void InputParameters::renameParam ( const std::string &  old_name,
const std::string &  new_name,
const std::string &  new_docstring 
)

Rename a parameter and provide a new documentation string.

Parameters
old_nameThe old name of the parameter
new_nameThe new name of the parameter
new_docstringThe new documentation string for the parameter If left empty, uses the old docstring for the renamed parameter

Definition at line 1694 of file InputParameters.C.

Referenced by ParsedSubdomainMeshGenerator::validParams(), SideSetsBetweenSubdomainsGenerator::validParams(), SidesetAroundSubdomainUpdater::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), and SideSetsAroundSubdomainGenerator::validParams().

1697 {
1698  renameParamInternal(old_name, new_name, new_docstring, "");
1699 }
void renameParamInternal(const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)

◆ renameParameterGroup()

void InputParameters::renameParameterGroup ( const std::string &  old_name,
const std::string &  new_name 
)

This method renames a parameter group.

Parameters
old_nameprevious name of the parameter group
new_namenew name of the parameter group

Definition at line 954 of file InputParameters.C.

955 {
956  for (auto & param : _params)
957  if (param.second._group == old_name)
958  param.second._group = new_name;
959 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ renameParamInternal()

void InputParameters::renameParamInternal ( const std::string &  old_name,
const std::string &  new_name,
const std::string &  docstring,
const std::string &  removal_date 
)
private

Definition at line 1642 of file InputParameters.C.

Referenced by deprecateParam(), renameCoupledVarInternal(), and renameParam().

1646 {
1647  auto params_it = _params.find(old_name);
1648  if (params_it == _params.end())
1649  mooseError("Requested to rename parameter '",
1650  old_name,
1651  "' but that parameter name doesn't exist in the parameters object.");
1652  mooseAssert(params_it->second._deprecation_message.empty(),
1653  "Attempting to rename the parameter, '" << old_name << "', that is deprecated");
1654 
1655  auto new_metadata = std::move(params_it->second);
1656  if (!docstring.empty())
1657  new_metadata._doc_string = docstring;
1658  _params.emplace(new_name, std::move(new_metadata));
1659  _params.erase(params_it);
1660 
1661  auto values_it = _values.find(old_name);
1662  auto new_value = std::move(values_it->second);
1663  _values.emplace(new_name, std::move(new_value));
1664  _values.erase(values_it);
1665 
1666  std::string deprecation_message;
1667  if (!removal_date.empty())
1668  deprecation_message = "'" + old_name + "' has been deprecated and will be removed on " +
1669  removal_date + ". Please use '" + new_name + "' instead.";
1670 
1671  _old_to_new_name_and_dep.emplace(old_name, std::make_pair(new_name, deprecation_message));
1672  _new_to_old_names.emplace(new_name, old_name);
1673 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string docstring(const std::string &desc)
Augment docstring if NEML2 is not enabled.
Definition: NEML2Utils.C:77
std::map< std::string, Metadata > _params
The actual parameter data.
std::map< std::string, std::pair< std::string, std::string > > _old_to_new_name_and_dep
A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the dep...

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

1491 {
1492  const auto name = checkForRename(name_in);
1493  auto it = _params.find(name);
1494  if (it == _params.end())
1495  return std::set<std::string>();
1496  return it->second._reserved_values;
1497 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ set()

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

Returns a writable reference to the named parameters.

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

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

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

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

Definition at line 1428 of file InputParameters.h.

Referenced by AB2PredictorCorrector::AB2PredictorCorrector(), ElementIDOutputAction::act(), AddFVICAction::act(), CreateExecutionerAction::act(), AddICAction::act(), PartitionerAction::act(), AutoCheckpointAction::act(), CreateProblemAction::act(), CombineComponentsMeshes::act(), AddTimeStepperAction::act(), SetupDebugAction::act(), SetupPredictorAction::act(), SetupTimeStepperAction::act(), AddAuxKernelAction::act(), AddActionComponentAction::act(), SetupResidualDebugAction::act(), CreateDisplacedProblemAction::act(), MaterialDerivativeTestAction::act(), SetAdaptivityOptionsAction::act(), DisplayGhostingAction::act(), MaterialOutputAction::act(), CommonOutputAction::act(), AddNodalNormalsAction::act(), FEProblemBase::addAnyRedistributers(), FEProblemBase::addAuxArrayVariable(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addAuxScalarVariable(), FEProblemBase::addAuxVariable(), DiffusionCG::addBoundaryConditionsFromComponents(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDefaultMultiAppFixedPointConvergence(), ReferenceResidualProblem::addDefaultNonlinearConvergence(), FEProblemBase::addDefaultNonlinearConvergence(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addDistribution(), DiffusionCG::addFEBCs(), DiffusionCG::addFEKernels(), FEProblemBase::addFunction(), FEProblemBase::addFunctorMaterial(), DiffusionFV::addFVBCs(), FEProblemBase::addFVInitialCondition(), DiffusionFV::addFVKernels(), FEProblemBase::addIndicator(), FEProblemBase::addInitialCondition(), DiffusionPhysicsBase::addInitialConditions(), DiffusionPhysicsBase::addInitialConditionsFromComponents(), FEProblemBase::addInterfaceKernel(), MooseEigenSystem::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), ComponentMaterialPropertyInterface::addMaterials(), FEProblemBase::addMeshDivision(), ComponentMeshTransformHelper::addMeshGenerators(), CylinderComponent::addMeshGenerators(), MeshGenerator::addMeshSubgenerator(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), DiffusionPhysicsBase::addPostprocessors(), FEProblemBase::addPredictor(), CreateDisplacedProblemAction::addProxyRelationshipManagers(), Action::addRelationshipManager(), FEProblemBase::addScalarKernel(), DiffusionCG::addSolverVariables(), DiffusionFV::addSolverVariables(), FEProblemBase::addTimeIntegrator(), SystemBase::addTimeIntegrator(), FEProblemBase::addTransfer(), SystemBase::addVariable(), FEProblemBase::addVariable(), MeshGeneratorSystem::appendMeshGenerator(), PhysicsBase::assignBlocks(), AStableDirk4::AStableDirk4(), ActionWarehouse::buildBuildableActions(), MooseObjectUnitTest::buildObjects(), SampledOutput::cloneMesh(), BatchMeshGeneratorAction::convertAndSetCompoundRealScalarVector(), BatchMeshGeneratorAction::convertAndSetNumericVector(), BatchMeshGeneratorAction::convertAndSetStringLikeVector(), CommonOutputAction::create(), MultiApp::createApp(), AppFactory::createAppShared(), AddVariableAction::createInitialConditionAction(), MooseApp::createMinimalApp(), AppFactory::createShared(), ExtraIDIntegralReporter::ExtraIDIntegralReporter(), FEProblemBase::getFunction(), MaterialOutputAction::getParams(), Moose::SlepcSupport::getSlepcValidParams(), AddElementalFieldAction::init(), Factory::initialize(), SetupMeshAction::modifyParamsForUseSplit(), MooseServer::parseDocumentForDiagnostics(), GlobalParamsAction::setDoubleIndexParam(), MeshGenerator::setHasGenerateData(), FEProblem::setInputParametersFEProblem(), FEProblemBase::setInputParametersFEProblem(), GlobalParamsAction::setParam(), FEProblemBase::setResidualObjectParamsAndLog(), FVRelationshipManagerInterface::setRMParams(), GlobalParamsAction::setScalarParam(), BatchMeshGeneratorAction::setScalarParams(), GlobalParamsAction::setTripleIndexParam(), CreateExecutionerAction::setupAutoPreconditioning(), ReadExecutorParamsAction::setupAutoPreconditioning(), GlobalParamsAction::setVectorParam(), SideSetExtruderGenerator::SideSetExtruderGenerator(), FVOneVarDiffusionInterface::validParams(), AddFVICAction::validParams(), AddICAction::validParams(), InversePowerMethod::validParams(), NonlinearEigen::validParams(), ExternalProblem::validParams(), FVFunctorTimeKernel::validParams(), FVTimeKernel::validParams(), GradientJumpIndicator::validParams(), ADScalarTimeKernel::validParams(), GenericConstant2DArray::validParams(), GenericConstantArray::validParams(), NodalPatchRecoveryBase::validParams(), JSONOutput::validParams(), GenericConstantVectorMaterialTempl< is_ad >::validParams(), DiscreteElementUserObject::validParams(), CSVReaderVectorPostprocessor::validParams(), GapValueAux::validParams(), PenetrationAux::validParams(), ElementQualityChecker::validParams(), NodalSum::validParams(), MooseStaticCondensationPreconditioner::validParams(), ElemSideNeighborLayersGeomTester::validParams(), MassMatrix::validParams(), TimeIntervalTimes::validParams(), WeightedGapAux::validParams(), ElemSideNeighborLayersTester::validParams(), JSONFileReader::validParams(), TransformedPositions::validParams(), MessageFromInput::validParams(), AddOutputAction::validParams(), ConvectiveFluxBC::validParams(), Console::validParams(), ControlOutput::validParams(), EigenDirichletBC::validParams(), PerfGraphOutput::validParams(), ReporterDebugOutput::validParams(), VTKOutput::validParams(), MoveNodesToGeometryModifierBase::validParams(), GhostLowerDElems::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryBase::validParams(), PiecewiseConstantFromCSV::validParams(), FilePositions::validParams(), InputPositions::validParams(), MultiAppPositions::validParams(), ArrayTimeKernel::validParams(), ReporterPositions::validParams(), PseudoTimestep::validParams(), MeshGeneratorMesh::validParams(), SimulationTimes::validParams(), ReporterTimes::validParams(), FVMassMatrix::validParams(), CSVFileTimes::validParams(), GhostEverything::validParams(), ODETimeKernel::validParams(), TimeKernel::validParams(), VectorTimeKernel::validParams(), AccumulateReporter::validParams(), GhostHigherDLowerDPointNeighbors::validParams(), ExodusFileTimes::validParams(), InputTimes::validParams(), GenericConstantRealVectorValueTempl< is_ad >::validParams(), AddAuxKernelAction::validParams(), ElementSubdomainModifierBase::validParams(), VectorMagnitudeFunctorMaterialTempl< is_ad >::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), ADTimeKernelTempl< T >::validParams(), NodalNormalBC::validParams(), CoupledTiedValueConstraint::validParams(), NearestNodeDistanceAux::validParams(), TiedValueConstraint::validParams(), DistributedPositions::validParams(), FunctorPositions::validParams(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::validParams(), NodePositions::validParams(), NodalL2Norm::validParams(), ElementGroupCentroidPositions::validParams(), FVAnisotropicDiffusion::validParams(), GenericConstantRankTwoTensorTempl< is_ad >::validParams(), InterfaceTimeKernel::validParams(), EigenArrayDirichletBC::validParams(), ADTimeKernelGradTempl< T >::validParams(), ADTimeKernelValueTempl< T >::validParams(), ElementCentroidPositions::validParams(), NodalNormalsEvaluator::validParams(), SolutionInvalidityOutput::validParams(), FunctorTimes::validParams(), VectorOfPostprocessors::validParams(), GenericFunctorMaterialTempl< is_ad >::validParams(), NearestNodeValueAux::validParams(), GenericFunctorGradientMaterialTempl< is_ad >::validParams(), BlockWeightedPartitioner::validParams(), Positions::validParams(), GenericVectorFunctorMaterialTempl< is_ad >::validParams(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::validParams(), MultiAppGeneralFieldUserObjectTransfer::validParams(), LeastSquaresFitHistory::validParams(), PerfGraphReporter::validParams(), DOFMapOutput::validParams(), QuadraturePointsPositions::validParams(), ElementUOAux::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), TagAuxBase< AuxKernel >::validParams(), IntegratedBCBase::validParams(), ReporterPointSource::validParams(), GhostingFromUOAux::validParams(), BatchMeshGeneratorAction::validParams(), MFEMFunctorMaterial::validParams(), FunctorExtremaPositions::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), ProjectionAux::validParams(), NearestPointAverage::validParams(), MortarNodalAuxKernelTempl< ComputeValueType >::validParams(), TorchScriptUserObject::validParams(), InterfaceQpUserObjectBase::validParams(), BlockRestrictionDebugOutput::validParams(), TimeNodalKernel::validParams(), EqualValueEmbeddedConstraintTempl< is_ad >::validParams(), MaterialPropertyDebugOutput::validParams(), ElementVariablesDifferenceMax::validParams(), GenericConstantMaterialTempl< is_ad >::validParams(), Exodus::validParams(), ParsedDownSelectionPositions::validParams(), VariableResidualNormsDebugOutput::validParams(), FVDiffusion::validParams(), Postprocessor::validParams(), SinDirichletBC::validParams(), DistributedRectilinearMeshGenerator::validParams(), TwoMaterialPropertyInterface::validParams(), GhostingUserObject::validParams(), NearestRadiusLayeredAverage::validParams(), NodalBCBase::validParams(), PropertyReadFile::validParams(), ThreeMaterialPropertyInterface::validParams(), KernelBase::validParams(), InterfaceKernelBase::validParams(), FVFluxBC::validParams(), MultiAppUserObjectTransfer::validParams(), MultiAppTransfer::validParams(), RadialAverage::validParams(), InterfaceMaterial::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >::validParams(), SamplerBase::validParams(), MortarConsumerInterface::validParams(), Control::validParams(), MortarConstraintBase::validParams(), Marker::validParams(), Output::validParams(), UserObject::validParams(), Sampler::validParams(), LinearFVBoundaryCondition::validParams(), Checkpoint::validParams(), FVInterfaceKernel::validParams(), AuxKernelTempl< Real >::validParams(), TopResidualDebugOutput::validParams(), MooseLinearVariableFV< Real >::validParams(), MooseVariableFV< Real >::validParams(), MultiApp::validParams(), Moose::Builder::walkRaw(), and RelationshipManager::zeroLayerGhosting().

1429 {
1430  const auto name = checkForRename(name_in);
1431 
1432  checkParamName(name);
1433  checkConsistentType<T>(name);
1434 
1435  T & result = this->Parameters::set<T>(name);
1436 
1437  if (quiet_mode)
1438  _params[name]._set_by_add_param = true;
1439 
1440  setHelper<T>(name);
1441 
1442  return result;
1443 }
std::string name(const ElemQuality q)
void checkParamName(const std::string &name) const
Make sure the parameter name doesn&#39;t have any invalid characters.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

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

Reimplemented from libMesh::Parameters.

Definition at line 88 of file InputParameters.C.

Referenced by applyParameter().

89 {
90  const auto name = checkForRename(name_in);
91 
92  if (!inserted_only)
93  {
94  auto & metadata = _params[name];
101  metadata._set_by_add_param = false;
102 
103  // valid_params don't make sense for MooseEnums
104  if (!have_parameter<MooseEnum>(name) && !have_parameter<MultiMooseEnum>(name))
105  metadata._valid = true;
106  }
107 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setDeprecatedVarDocString()

void InputParameters::setDeprecatedVarDocString ( const std::string &  new_name,
const std::string &  doc_string 
)
private

Private method for setting deprecated coupled variable documentation strings.

Definition at line 210 of file InputParameters.C.

Referenced by addCoupledVar().

212 {
213  auto coupled_vars_it = _new_to_deprecated_coupled_vars.find(new_name);
214  if (coupled_vars_it != _new_to_deprecated_coupled_vars.end())
215  {
216  auto params_it = _params.find(coupled_vars_it->second);
217  if (params_it == _params.end())
218  mooseError("There must have been a mistake in the construction of the new to deprecated "
219  "coupled vars map because the old name ",
220  coupled_vars_it->second,
221  " doesn't exist in the parameters data.");
222 
223  params_it->second._doc_string = doc_string;
224  }
225 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setDocString()

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

Set the doc string of a parameter.

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

Definition at line 347 of file InputParameters.C.

Referenced by Moose::SlepcSupport::getSlepcValidParams(), FVBoundedValueConstraint::validParams(), PropertyReadFile::validParams(), FVIntegralValueConstraint::validParams(), FVPointValueConstraint::validParams(), MultiAppTransfer::validParams(), MortarConstraintBase::validParams(), Output::validParams(), AuxKernelTempl< Real >::validParams(), and MultiApp::validParams().

348 {
349  const auto name = checkForRename(name_in);
350 
351  auto it = _params.find(name);
352  if (it == _params.end())
353  mooseError("Unable to set the documentation string (using setDocString) for the \"",
354  name,
355  "\" parameter, the parameter does not exist.");
356  it->second._doc_string = doc;
357 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setDocUnit()

void InputParameters::setDocUnit ( const std::string &  name,
const std::string &  doc_unit 
)

Set the unit string of a parameter.

This method is only used within MooseDocs and the input syntax dump in order to provide a developer-expected unit for software quality assurance purposes.

Definition at line 367 of file InputParameters.C.

368 {
369  const auto name = checkForRename(name_in);
370  _params[name]._doc_unit = doc_unit;
371 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ setGlobalCommandLineParam()

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

Sets the command line parameter with name as global.

Global here means that it will be passed to all child MultiApps.

Definition at line 962 of file InputParameters.C.

Referenced by MooseApp::validParams().

963 {
964  auto & cl_data = at(checkForRename(name))._cl_data;
965  if (!cl_data)
966  mooseError("InputParameters::setGlobalCommandLineParam: The parameter '",
967  name,
968  "' is not a command line parameter");
969  cl_data->global = true;
970 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::optional< CommandLineMetadata > _cl_data
The data pertaining to a command line parameter (empty if not a command line param) ...
Metadata & at(const std::string &param_name)

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

1422 {
1423 }

◆ setHitNode() [1/2]

void InputParameters::setHitNode ( const std::string &  param,
const hit::Node &  node,
const SetParamHitNodeKey   
)

Sets the hit node associated with the parameter param to node.

Is protected to be called by only the Builder via the SetParamHitNodeKey.

Definition at line 1522 of file InputParameters.C.

Referenced by FEProblemBase::addAnyRedistributers(), applyParameters(), Action::associateWithParameter(), Factory::clone(), ActionFactory::create(), Factory::initialize(), and Moose::Builder::walkRaw().

1525 {
1526  mooseAssert(node.type() == hit::NodeType::Field, "Must be a field");
1527  at(param)._hit_node = &node;
1528 }
const hit::Node * _hit_node
Original location of parameter node; used for error messages.
Metadata & at(const std::string &param_name)

◆ setHitNode() [2/2]

void InputParameters::setHitNode ( const hit::Node &  node,
const SetHitNodeKey   
)
inline

Sets the hit node that represents the syntax responsible for creating these parameters.

Is protected to be called by only the ActionFactory, Builder, and Factory via the SetHitNodeKey.

Definition at line 1203 of file InputParameters.h.

1203 { _hit_node = &node; }
const hit::Node * _hit_node
The hit node representing the syntax that created these parameters, if any.

◆ setParameters() [1/2]

template<typename T , typename... Ts>
void InputParameters::setParameters ( const std::string &  name,
const T &  value,
Ts...  extra_input_parameters 
)

Given a series of parameters names and values, sets each name to the corresponding value.

Any number of name, value pairs can be supplied.

Note that each value must be of the correct type for the parameter of that name, not merely of a type convertible to the correct type.

Parameters
nameThe name of the first parameter to set

Definition at line 1447 of file InputParameters.h.

Referenced by MeshGenerator::addMeshSubgenerator(), SideSetsFromNormalsGenerator::validParams(), SideSetsFromPointsGenerator::validParams(), and AllSideSetsByNormalsGenerator::validParams().

1450 {
1451  this->set<T>(name) = value;
1452  this->setParameters(extra_input_parameters...);
1453 }
std::string name(const ElemQuality q)
void setParameters()
Method to terminate the recursive setParameters definition.

◆ setParameters() [2/2]

void InputParameters::setParameters ( )
inlineprivate

Method to terminate the recursive setParameters definition.

Definition at line 1222 of file InputParameters.h.

Referenced by setParameters().

1222 {}

◆ setParamHelper() [1/17]

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

Referenced by addParam().

1692 {
1693  l_value = r_value;
1694 }

◆ setParamHelper() [2/17]

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

Definition at line 1365 of file InputParameters.C.

1368 {
1369  // Assign the default value so that it appears in the dump
1370  std::ostringstream oss;
1371  oss << r_value;
1372  l_value = oss.str();
1373 }

◆ setParamHelper() [3/17]

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

Definition at line 1377 of file InputParameters.C.

1380 {
1381  // Assign the default value so that it appears in the dump
1382  std::ostringstream oss;
1383  oss << r_value;
1384  l_value = oss.str();
1385 }

◆ setParamHelper() [4/17]

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

Definition at line 1389 of file InputParameters.C.

1392 {
1393  // Assign the default value so that it appears in the dump
1394  std::ostringstream oss;
1395  oss << r_value;
1396  l_value = oss.str();
1397 }

◆ setParamHelper() [5/17]

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

Definition at line 1401 of file InputParameters.C.

1404 {
1405  // Assign the default value so that it appears in the dump
1406  std::ostringstream oss;
1407  oss << r_value;
1408  l_value = oss.str();
1409 }

◆ setParamHelper() [6/17]

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

Definition at line 1413 of file InputParameters.C.

1416 {
1417  // Assign the default value so that it appears in the dump
1418  std::ostringstream oss;
1419  oss << r_value;
1420  l_value = oss.str();
1421 }

◆ setParamHelper() [7/17]

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

Definition at line 1425 of file InputParameters.C.

1428 {
1429  // Assign the default value so that it appears in the dump
1430  std::ostringstream oss;
1431  oss << r_value;
1432  l_value = oss.str();
1433 }

◆ setParamHelper() [8/17]

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

Definition at line 1437 of file InputParameters.C.

1440 {
1441  // Assign the default value so that it appears in the dump
1442  std::ostringstream oss;
1443  oss << r_value;
1444  l_value = oss.str();
1445 }

◆ setParamHelper() [9/17]

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

Definition at line 1449 of file InputParameters.C.

1452 {
1453  // Assign the default value so that it appears in the dump
1454  std::ostringstream oss;
1455  oss << r_value;
1456  l_value = oss.str();
1457 }

◆ setParamHelper() [10/17]

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

◆ setParamHelper() [11/17]

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

◆ setParamHelper() [12/17]

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

◆ setParamHelper() [13/17]

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

◆ setParamHelper() [14/17]

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

◆ setParamHelper() [15/17]

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

◆ setParamHelper() [16/17]

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

◆ setParamHelper() [17/17]

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

◆ setReservedValues()

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

Provide a set of reserved values for a parameter.

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

Definition at line 1482 of file InputParameters.C.

Referenced by OutputInterface::validParams().

1484 {
1485  const auto name = checkForRename(name_in);
1486  _params[name]._reserved_values = reserved;
1487 }
std::string name(const ElemQuality q)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

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

1556 {
1557  const auto name = checkForRename(name_in);
1558  auto it = _params.find(name);
1559  if (it != _params.end())
1560  return it->second._ignore;
1561  mooseError("Parameter ", name, " does not exist");
1562 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ suppressParameter()

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

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

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

Definition at line 1944 of file InputParameters.h.

Referenced by TimestepSize::validParams(), ExternalProblem::validParams(), DiscreteElementUserObject::validParams(), MooseObjectAction::validParams(), CSVReaderVectorPostprocessor::validParams(), MassMatrix::validParams(), MooseStaticCondensationPreconditioner::validParams(), SideSetsFromNormalsGenerator::validParams(), MultiAppCloneReporterTransfer::validParams(), SideSetsBetweenSubdomainsGenerator::validParams(), AccumulateReporter::validParams(), FVMassMatrix::validParams(), Times::validParams(), SideSetsFromPointsGenerator::validParams(), CentroidMultiApp::validParams(), QuadraturePointMultiApp::validParams(), DiffusionFV::validParams(), NumNonlinearIterations::validParams(), PseudoTimestep::validParams(), MultiAppGeneralFieldShapeEvaluationTransfer::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), ElementHCurlSemiError::validParams(), ElementSubdomainModifierBase::validParams(), AllSideSetsByNormalsGenerator::validParams(), ParsedGenerateNodeset::validParams(), NodePositions::validParams(), ElementHDivSemiError::validParams(), MultiAppGeneralFieldUserObjectTransfer::validParams(), CSV::validParams(), TagAuxBase< AuxKernel >::validParams(), ReporterPointSource::validParams(), FunctorExtremaPositions::validParams(), SideSetsAroundSubdomainGenerator::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), MortarNodalAuxKernelTempl< ComputeValueType >::validParams(), ParsedGenerateSideset::validParams(), VariableResidualNormsDebugOutput::validParams(), Convergence::validParams(), NearestRadiusLayeredAverage::validParams(), ActionComponent::validParams(), MultiAppUserObjectTransfer::validParams(), MeshGenerator::validParams(), Function::validParams(), and Marker::validParams().

1945 {
1946  const auto name = checkForRename(name_in);
1947  if (!this->have_parameter<T>(name))
1948  mooseError("Unable to suppress nonexistent parameter: ", name);
1949 
1950  auto & metadata = _params[name];
1951  metadata._required = false;
1952  metadata._is_private = true;
1953  metadata._controllable = false;
1954 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ transferParam()

template<typename T >
void InputParameters::transferParam ( const InputParameters source_param,
const std::string &  name,
const std::string &  new_name = "",
const std::string &  new_description = "" 
)

A routine to transfer a parameter from one class' validParams to another.

Parameters
source_paramThe parameters list holding the param we would like to transfer
nameThe name of the parameter to transfer
new_descriptionA new description of the parameter. If unspecified, uses the source_params'

Definition at line 2239 of file InputParameters.h.

Referenced by DiffusionCG::validParams(), and MooseVariableBase::validParams().

2243 {
2244  const auto name = source_params.checkForRename(std::string(name_in));
2245  const auto p_name = new_name.empty() ? name_in : new_name;
2246  if (!source_params.have_parameter<T>(name) && !source_params.hasCoupledValue(name))
2247  mooseError("The '",
2248  name_in,
2249  "' parameter could not be transferred because it does not exist with type '",
2250  MooseUtils::prettyCppType<T>(),
2251  "' in the source parameters");
2252  if (name != name_in)
2253  mooseWarning("The transferred parameter " + name_in + " is deprecated in favor of " + name +
2254  " in the source parameters. The new name should likely be used for the parameter "
2255  "transfer instead.");
2256  const std::string description =
2257  new_description.empty() ? source_params.getDescription(name) : new_description;
2258 
2259  if (source_params.isParamRequired(name))
2260  {
2261  // Check for a variable parameter
2262  if (source_params.hasCoupledValue(name))
2263  addRequiredCoupledVar(p_name, description);
2264  // Enums parameters have a default list of options
2265  else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
2266  addRequiredParam<T>(p_name, source_params.get<T>(name), description);
2267  else if (source_params.isRangeChecked(name))
2268  addRequiredRangeCheckedParam<T>(
2269  p_name, source_params.rangeCheckedFunction(name), description);
2270  else
2271  addRequiredParam<T>(p_name, description);
2272  }
2273  else
2274  {
2275  // Check for a variable parameter
2276  if (source_params.hasCoupledValue(name))
2277  {
2278  if (!source_params.hasDefaultCoupledValue(name))
2279  addCoupledVar(p_name, description);
2280  else if (source_params.numberDefaultCoupledValues(name) == 1)
2281  addCoupledVar(p_name, source_params.defaultCoupledValue(name), description);
2282  else
2283  {
2284  std::vector<Real> coupled_values;
2285  for (const auto i : libMesh::make_range(source_params.numberDefaultCoupledValues(name)))
2286  coupled_values.push_back(source_params.defaultCoupledValue(name, i));
2287  addCoupledVar(p_name, coupled_values, description);
2288  }
2289  }
2290  else if (source_params.isRangeChecked(name))
2291  {
2292  if (source_params.hasDefault(name))
2293  addRangeCheckedParam<T>(p_name,
2294  source_params.get<T>(name),
2295  source_params.rangeCheckedFunction(name),
2296  description);
2297  else
2298  addRangeCheckedParam<T>(p_name, source_params.rangeCheckedFunction(name), description);
2299  }
2300  else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
2301  addParam<T>(p_name, source_params.get<T>(name), description);
2302  else
2303  {
2304  if (source_params.hasDefault(name))
2305  addParam<T>(p_name, source_params.get<T>(name), description);
2306  else
2307  addParam<T>(p_name, description);
2308  }
2309  }
2310 
2311  // Copy other attributes
2312  if (source_params.isPrivate(name))
2313  _params[p_name]._is_private = true;
2314  if (source_params.isControllable(name))
2315  _params[p_name]._controllable = true;
2316 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:336
void addCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
This method adds a coupled variable name pair.
IntRange< T > make_range(T beg, T end)
std::map< std::string, Metadata > _params
The actual parameter data.

◆ type()

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

Prints the type of the requested parameter by name.

Definition at line 851 of file InputParameters.C.

Referenced by MooseServer::addValuesToList(), BatchMeshGeneratorAction::checkInputParameterType(), PostprocessorInterface::checkParam(), MeshGenerator::getMeshGeneratorNameFromParam(), MeshGenerator::getMeshGeneratorNamesFromParam(), MooseServer::getNodesByValueAndTypes(), ReporterInterface::getReporterName(), and Reporter::getReporterValueName().

852 {
853  const auto name = checkForRename(name_in);
854  if (!_values.count(name))
855  mooseError("Parameter \"", name, "\" not found.\n\n", *this);
856 
857  if (_coupled_vars.find(name) != _coupled_vars.end())
858  return "std::vector<VariableName>";
859  else if (_params.count(name) > 0 && !_params.at(name)._custom_type.empty())
860  return _params.at(name)._custom_type;
861  return _values.at(name)->type();
862 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::set< std::string > _coupled_vars
The coupled variables set.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ varName()

std::string InputParameters::varName ( const std::string &  var_param_name,
const std::string &  moose_object_with_var_param_name 
) const

Determine the actual variable name from the given variable parameter name.

Parameters
var_param_namethe name of the variable parameter, e.g. 'variable'
moose_object_with_var_param_namethe name of the moose object holding the variable parameter. Used for potential error messaging

Definition at line 1611 of file InputParameters.C.

Referenced by FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FEProblemBase::addHDGKernel(), FEProblemBase::addInterfaceKernel(), FEProblemBase::addKernel(), FEProblemBase::addNodalKernel(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addScalarKernel(), and MooseVariableInterface< Real >::MooseVariableInterface().

1613 {
1614  // Try the scalar version first
1615  std::string variable_name = getMooseType(var_param_name);
1616  if (variable_name == "")
1617  {
1618  auto vec = getVecMooseType(var_param_name);
1619 
1620  // Catch the (very unlikely) case where a user specifies
1621  // variable = '' (the empty string)
1622  // in their input file. This could happen if e.g. something goes
1623  // wrong with dollar bracket expression expansion.
1624  if (vec.empty())
1625  mooseError("Error constructing object '",
1626  moose_object_with_var_param_name,
1627  "' while retrieving value for '",
1628  var_param_name,
1629  "' parameter! Did you forget to set '",
1630  var_param_name,
1631  "' or set it to '' (empty string) by accident?");
1632 
1633  // When using vector variables, we are only going to use the first one in the list at the
1634  // interface level...
1635  variable_name = vec[0];
1636  }
1637 
1638  return variable_name;
1639 }
std::string getMooseType(const std::string &name) const
Utility functions for retrieving one of the MooseTypes variables into the common "string" base class...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
std::vector< std::string > getVecMooseType(const std::string &name) const

Friends And Related Function Documentation

◆ ActionWarehouse

friend class ActionWarehouse
friend

Definition at line 1416 of file InputParameters.h.

◆ emptyInputParameters

InputParameters emptyInputParameters ( )
friend

Definition at line 30 of file InputParameters.C.

31 {
32  InputParameters params;
33  return params;
34 }
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...

◆ InputParameterWarehouse

friend class InputParameterWarehouse
friend

Definition at line 1413 of file InputParameters.h.

◆ Parser

friend class Parser
friend

Definition at line 1414 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 1390 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 1352 of file InputParameters.h.

Referenced by 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 1349 of file InputParameters.h.

Referenced by 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 1376 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 1367 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 1363 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 1380 of file InputParameters.h.

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

◆ _coupled_vars

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

◆ _finalized

bool InputParameters::_finalized
private

Whether or not we've called finalize() on these parameters yet.

Definition at line 1409 of file InputParameters.h.

Referenced by clear(), finalize(), isFinalized(), and operator=().

◆ _hit_node

const hit::Node* InputParameters::_hit_node
private

The hit node representing the syntax that created these parameters, if any.

Definition at line 1406 of file InputParameters.h.

Referenced by clear(), getHitNode(), operator=(), and setHitNode().

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

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

◆ _new_to_deprecated_coupled_vars

std::unordered_map<std::string, std::string> InputParameters::_new_to_deprecated_coupled_vars
private

A map from deprecated coupled variable names to the new blessed name.

Definition at line 1393 of file InputParameters.h.

Referenced by addDeprecatedCoupledVar(), checkParams(), clear(), getNewToDeprecatedVarMap(), operator+=(), operator=(), and setDeprecatedVarDocString().

◆ _new_to_old_names

std::multimap<std::string, std::string> InputParameters::_new_to_old_names
private

A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names.

Definition at line 1403 of file InputParameters.h.

Referenced by clear(), operator+=(), operator=(), paramAliases(), and renameParamInternal().

◆ _old_to_new_name_and_dep

std::map<std::string, std::pair<std::string, std::string> > InputParameters::_old_to_new_name_and_dep
private

A map from base-class/deprecated parameter names to derived-class/blessed parameter names and the deprecation messages in the case that the "old" parameter name is a deprecated parameter name.

The deprecation message will be empty if the "old" parameter name represents a base class parameter name

Definition at line 1399 of file InputParameters.h.

Referenced by addDeprecatedParam(), attemptPrintDeprecated(), checkForRename(), clear(), operator+=(), operator=(), and renameParamInternal().

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

Referenced by addDeprecatedCoupledVar(), addDeprecatedCustomTypeParam(), addDeprecatedParam(), applyCoupledVar(), applyParameter(), attemptPrintDeprecated(), and clear().


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