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...
 
std::optional< std::string > queryDeprecatedParamMessage (const std::string &name) const
 
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 >
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
 
bool isMooseBaseObject () const
 
const std::string & getObjectType () const
 
const std::string & getObjectName () 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...
 
bool hasBase () const
 
const 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 paramLocationPrefix (const std::string &param) const
 Returns a prefix containing the parameter name and location (if available) More...
 
template<typename... Args>
std::string paramMessage (const std::string &param, Args... args) const
 
template<typename... Args>
void mooseError (Args &&... args) const
 Emits an error prefixed with the object information, if available. More...
 
template<typename... Args>
void paramError (const std::string &param, Args... args) const
 Emits a parameter error prefixed with the parameter location and object information 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)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name, const InputParameters &pars)
 
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)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name_in, const InputParameters &pars)
 
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 UP_T >
std::optional< std::pair< bool, std::string > > rangeCheck (const std::string &full_name, const std::string &short_name, InputParameters::Parameter< T > *param, const bool include_param_path=true)
 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 >
std::optional< std::pair< bool, std::string > > rangeCheck (const std::string &full_name, const std::string &short_name, InputParameters::Parameter< std::vector< T >> *param, const bool include_param_path=true)
 
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)
 

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)
 
std::pair< std::string, const hit::Node * > paramMessageContext (const std::string &param) const
 Get the context associated with a parameter for a message. More...
 
std::string paramMessagePrefix (const std::string &param) const
 Get a prefix for messages associated with a parameter. More...
 
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...
 
void callMooseError (std::string msg, const bool with_prefix=true, const hit::Node *node=nullptr) const
 Internal helper for calling back to mooseError(), ideally from the underlying MooseBase object if it is available (for more context) 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 ()
 

Private Attributes

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

Constructor & Destructor Documentation

◆ InputParameters() [1/3]

InputParameters::InputParameters ( const InputParameters rhs)

Definition at line 48 of file InputParameters.C.

50 {
51  *this = rhs;
52 }
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 54 of file InputParameters.C.

56 {
57  _params.clear();
59  _collapse_nesting = false;
61 }
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 37 of file InputParameters.C.

38  : Parameters(),
39  _collapse_nesting(false),
42  _allow_copy(true),
43  _hit_node(nullptr),
44  _finalized(false)
45 {
46 }
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 81 of file InputParameters.C.

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

82 {
83  _class_description = doc_string;
84 }
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 1943 of file InputParameters.h.

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

1946 {
1947  static_assert(!std::is_same_v<T, MooseEnum>,
1948  "addCommandLineParam() without a value cannot be used with a MooseEnum because a "
1949  "MooseEnum requires initialization");
1950 
1951  auto constexpr is_bool = std::is_same_v<T, bool>;
1952  if constexpr (is_bool)
1953  addParam<T>(name, false, doc_string);
1954  else
1955  addParam<T>(name, doc_string);
1956 
1957  addCommandLineParamHelper<T>(
1958  name, syntax, /* required = */ false, /* value_required = */ !is_bool);
1959 }
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 1963 of file InputParameters.h.

1967 {
1968  if constexpr (std::is_same_v<T, bool>)
1969  mooseAssert(!value, "Default for bool must be false");
1970 
1971  addParam<T>(name, value, doc_string);
1972  addCommandLineParamHelper<T>(name, syntax, /* required = */ false, /* value_required = */ true);
1973 }
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 349 of file InputParameters.h.

353  {
354  addCommandLineParam<T>(name, syntax, T{value}, doc_string);
355  }
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 1768 of file InputParameters.h.

1772 {
1773  static_assert(isValidCommandLineType<T>::value,
1774  "This type is not a supported command line parameter type. See "
1775  "CommandLine::populateCommandLineParams to add it as a supported type.");
1776 
1777  auto & cl_data = at(name)._cl_data;
1778  cl_data = CommandLineMetadata();
1779 
1780  // Split up the syntax by whitespace
1781  std::vector<std::string> syntax_split;
1782  MooseUtils::tokenize(syntax, syntax_split, 1, " \t\n\v\f\r");
1783 
1784  // Set the single syntax string as the combined syntax with removed whitespace
1785  cl_data->syntax = MooseUtils::stringJoin(syntax_split);
1786  mooseAssert(cl_data->syntax.size(), "Empty token");
1787 
1788  // Set the switches; only parse those that begin with "-" as we also
1789  // provide examples within the syntax
1790  for (const auto & val : syntax_split)
1791  if (val.rfind("-", 0) == 0)
1792  {
1793  if (!std::regex_search(val, std::regex("^\\-+[a-zA-Z]")))
1794  mooseError("The switch '",
1795  val,
1796  "' for the command line parameter '",
1797  name,
1798  "' is invalid. It must begin with an alphabetical character.");
1799 
1800  cl_data->switches.push_back(val);
1802  }
1803 
1804  cl_data->required = required;
1805  cl_data->global = false;
1806 
1807  // No arguments needed for a boolean parameter
1808  if constexpr (std::is_same_v<T, bool>)
1809  {
1810  (void)value_required; // purposely unused; doesn't take a value
1811  cl_data->argument_type = CommandLineMetadata::ArgumentType::NONE;
1812  }
1813  // MooseEnums require a value
1814  else if constexpr (std::is_same_v<T, MooseEnum>)
1815  {
1816  (void)value_required; // purposely unused; always required
1817  cl_data->argument_type = CommandLineMetadata::ArgumentType::REQUIRED;
1818  }
1819  // The user didn't specify a default, so a value is required
1820  else if (value_required)
1821  cl_data->argument_type = CommandLineMetadata::ArgumentType::REQUIRED;
1822  // Otherwise, it's optional (user specified a default)
1823  else
1824  cl_data->argument_type = CommandLineMetadata::ArgumentType::OPTIONAL;
1825 }
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) const
Emits an error prefixed with the object information, if available.
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 253 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().

254 {
255  addParam<std::vector<VariableName>>(name, doc_string);
256  _coupled_vars.insert(name);
257 
258  // Set the doc string for any associated deprecated coupled var
259  setDeprecatedVarDocString(name, doc_string);
260 }
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 224 of file InputParameters.C.

225 {
226  addParam<std::vector<VariableName>>(name, doc_string);
227  _coupled_vars.insert(name);
228  auto & metadata = _params[name];
229  metadata._coupled_default.assign(1, value);
230  metadata._have_coupled_default = true;
231 
232  // Set the doc string for any associated deprecated coupled var
233  setDeprecatedVarDocString(name, doc_string);
234 }
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 237 of file InputParameters.C.

240 {
241  // std::vector<VariableName>(1, Moose::stringify(value)),
242  addParam<std::vector<VariableName>>(name, doc_string);
243  _coupled_vars.insert(name);
244  auto & metadata = _params[name];
245  metadata._coupled_default = value;
246  metadata._have_coupled_default = true;
247 
248  // Set the doc string for any associated deprecated coupled var
249  setDeprecatedVarDocString(name, doc_string);
250 }
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 291 of file InputParameters.C.

Referenced by addRequiredCoupledVarWithAutoBuild().

295 {
296  addParam<std::vector<VariableName>>(name, doc_string);
297  _coupled_vars.insert(name);
298  _params[name]._autobuild_vecs = std::make_pair(base_name, num_name);
299 
300  // Additionally there are two more parameters that need to be added:
301  addParam<std::string>(base_name, doc_string + " (base_name)");
302  addParam<unsigned int>(num_name, doc_string + " (num_name)");
303 }
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 1870 of file InputParameters.h.

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

1874 {
1875  addParam<T>(name, value, doc_string);
1876  _params[name]._custom_type = custom_type;
1877 }
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 1881 of file InputParameters.h.

1884 {
1885  addParam<T>(name, doc_string);
1886  _params[name]._custom_type = custom_type;
1887 }
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 263 of file InputParameters.C.

266 {
267  mooseDeprecated("Please use 'deprecateCoupledVar'");
268 
269  _show_deprecated_message = false;
270 
271  // Set the doc string if we are adding the deprecated var after the new var has already been added
272  auto params_it = _params.find(new_name);
273  std::string doc_string;
274  if (params_it != _params.end())
275  doc_string = params_it->second._doc_string;
276 
277  addParam<std::vector<VariableName>>(old_name, doc_string);
278  _coupled_vars.insert(old_name);
279  _new_to_deprecated_coupled_vars.emplace(new_name, old_name);
280 
281  std::string deprecation_message =
282  "The coupled variable parameter '" + old_name + "' has been deprecated";
283  if (!removal_date.empty())
284  deprecation_message += " and will be removed " + removal_date;
285  deprecation_message += ". Please use the '" + new_name + "' coupled variable parameter instead.";
286  _params[old_name]._deprecation_message = deprecation_message;
288 }
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:384
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 1891 of file InputParameters.h.

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

1895 {
1896  _show_deprecated_message = false;
1897  addParam<T>(name, doc_string);
1898  auto & metadata = _params[name];
1899  metadata._custom_type = custom_type;
1900 
1901  metadata._deprecation_message = deprecation_message;
1902  _show_deprecated_message = true;
1903 }
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 2061 of file InputParameters.h.

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

2065 {
2066  _show_deprecated_message = false;
2067  mooseAssert(!_old_to_new_name_and_dep.count(name),
2068  "Attempting to deprecate via addDeprecatedParam the parameter, '"
2069  << name << "', already deprecated via deprecateParam or renamed via renameParam");
2070  addParam<T>(name, value, doc_string);
2071 
2072  _params[name]._deprecation_message = deprecation_message;
2073  _show_deprecated_message = true;
2074 }
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 2078 of file InputParameters.h.

2081 {
2082  _show_deprecated_message = false;
2083  mooseAssert(!_old_to_new_name_and_dep.count(name),
2084  "Attempting to deprecate via addDeprecatedParam the parameter, '"
2085  << name << "', already deprecated via deprecateParam or renamed via renameParam");
2086  addParam<T>(name, doc_string);
2087 
2088  _params[name]._deprecation_message = deprecation_message;
2089  _show_deprecated_message = true;
2090 }
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 1369 of file InputParameters.C.

1372 {
1373  mooseError("You must supply a MooseEnum object and the deprecation string when using "
1374  "addDeprecatedParam, even if the parameter is not required!");
1375 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

◆ addDeprecatedParam() [4/6]

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

Definition at line 1379 of file InputParameters.C.

1382 {
1383  mooseError("You must supply a MultiMooseEnum object and the deprecation string when using "
1384  "addDeprecatedParam, even if the parameter is not required!");
1385 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

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

Referenced by MooseApp::validParams().

1981 {
1982  mooseAssert(name == "mesh_only" || name == "recover" || name == "run",
1983  "Not supported for new parameters");
1984  static_assert(!std::is_same_v<T, bool>, "Cannot be used for a bool (does not take a value)");
1985  addParam<T>(name, value, doc_string);
1986  addCommandLineParamHelper<T>(name, syntax, /* required = */ false, /* value_required = */ false);
1987 }
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 1724 of file InputParameters.h.

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

1725 {
1726  checkParamName(name);
1727  checkConsistentType<T>(name);
1728 
1729  T & l_value = InputParameters::set<T>(name);
1730  auto & metadata = _params[name];
1731  if constexpr (isFunctorNameType<T>())
1732  metadata._doc_string = appendFunctorDescription<T>(doc_string);
1733  else
1734  metadata._doc_string = doc_string;
1735 
1736  // Set the parameter now
1737  setParamHelper(name, l_value, value);
1738 
1739  /* Indicate the default value, as set via addParam, is being used. The parameter is removed from
1740  the list whenever
1741  it changes, see set_attributes */
1742  metadata._set_by_add_param = true;
1743 }
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 1747 of file InputParameters.h.

1748 {
1749  checkParamName(name);
1750  checkConsistentType<T>(name);
1751 
1752  InputParameters::insert<T>(name);
1753  if constexpr (isFunctorNameType<T>())
1754  _params[name]._doc_string = appendFunctorDescription<T>(doc_string);
1755  else
1756  _params[name]._doc_string = doc_string;
1757 }
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 263 of file InputParameters.h.

266  {
267  addParam<T>(name, T{value}, doc_string);
268  }
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 1308 of file InputParameters.C.

1310 {
1311  mooseError("You must supply a MooseEnum object when using addParam, even if the parameter is not "
1312  "required!");
1313 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

◆ addParam() [5/7]

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

Definition at line 1317 of file InputParameters.C.

1319 {
1320  mooseError("You must supply a MultiMooseEnum object when using addParam, even if the parameter "
1321  "is not required!");
1322 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

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

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

968 {
969  std::vector<std::string> elements;
970  MooseUtils::tokenize(space_delim_names, elements, 1, " \t\n\v\f\r"); // tokenize on whitespace
971 
972  // Since we don't require types (templates) for this method, we need
973  // to get a raw list of parameter names to compare against.
974  std::set<std::string> param_names;
975  for (const auto & it : *this)
976  param_names.insert(it.first);
977 
978  for (const auto & param_name : elements)
979  if (_params.count(param_name) > 0)
980  _params[param_name]._group = group_name;
981  else
982  mooseError("Unable to find a parameter with name: ",
983  param_name,
984  " when adding to group ",
985  group_name,
986  '.');
987 }
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) const
Emits an error prefixed with the object information, if available.
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 1918 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(), StitchMeshGenerator::validParams(), DefaultConvergenceBase::validParams(), XDA::validParams(), InternalSideIndicatorBase::validParams(), DefaultNonlinearConvergence::validParams(), MoosePartitioner::validParams(), MFEMFunctorMaterial::validParams(), CopyMeshPartitioner::validParams(), MaterialOutputAction::validParams(), BoundaryRestrictableRequired::validParams(), RelationshipManager::validParams(), NodalNormalsPreprocessor::validParams(), EigenExecutionerBase::validParams(), MooseObject::validParams(), VectorPostprocessor::validParams(), MoosePreconditioner::validParams(), Eigenvalue::validParams(), Action::validParams(), DisplacedProblem::validParams(), BoundaryRestrictable::validParams(), MeshGenerator::validParams(), MooseVariableBase::validParams(), Executioner::validParams(), Output::validParams(), MooseBase::validParams(), Checkpoint::validParams(), BlockRestrictable::validParams(), MaterialPropertyInterface::validParams(), AuxKernelTempl< Real >::validParams(), MaterialBase::validParams(), MultiApp::validParams(), MooseApp::validParams(), and FEProblemBase::validParams().

1919 {
1920  checkParamName(name);
1921  checkConsistentType<T>(name);
1922 
1923  InputParameters::set<T>(name) = value;
1924  auto & metadata = _params[name];
1925  metadata._is_private = true;
1926  metadata._set_by_add_param = true;
1927 }
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 1907 of file InputParameters.h.

1908 {
1909  checkParamName(name);
1910  checkConsistentType<T>(name);
1911 
1912  InputParameters::insert<T>(name);
1913  _params[name]._is_private = true;
1914 }
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 1353 of file InputParameters.C.

1354 {
1355  mooseError("You must supply a MooseEnum object when using addPrivateParam, even if the parameter "
1356  "is not required!");
1357 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

◆ addPrivateParam() [4/6]

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

Definition at line 1361 of file InputParameters.C.

1362 {
1363  mooseError("You must supply a MultiMooseEnum object when using addPrivateParam, even if the "
1364  "parameter is not required!");
1365 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

◆ 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 1839 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(), PNGOutput::validParams(), ElementSideNeighborLayers::validParams(), PatternedMeshGenerator::validParams(), SideSetsGeneratorBase::validParams(), ElementPointNeighborLayers::validParams(), DistributedRectilinearMeshGenerator::validParams(), PatternedMesh::validParams(), ElementW1pError::validParams(), IterationAdaptiveDT::validParams(), RadialAverage::validParams(), LayeredBase::validParams(), MultiAppGeneralFieldTransfer::validParams(), DerivativeFunctionMaterialBaseTempl< is_ad >::validParams(), MooseVariableBase::validParams(), Output::validParams(), and MultiApp::validParams().

1843 {
1844  addParam<T>(name, value, doc_string);
1845  _params[name]._range_function = parsed_function;
1846 }
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 1850 of file InputParameters.h.

1853 {
1854  addParam<T>(name, doc_string);
1855  _params[name]._range_function = parsed_function;
1856 }
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 529 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().

533 {
534  _buildable_rm_types.emplace_back(name, rm_type, input_parameter_callback);
535 }
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 1931 of file InputParameters.h.

1934 {
1935  static_assert(!std::is_same_v<T, bool>, "Cannot be used for a bool");
1936 
1937  addRequiredParam<T>(name, doc_string);
1938  addCommandLineParamHelper<T>(name, syntax, /* required = */ true, /* value_required = */ true);
1939 }
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 317 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().

318 {
319  addRequiredParam<std::vector<VariableName>>(name, doc_string);
320  _coupled_vars.insert(name);
321 }
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 306 of file InputParameters.C.

310 {
311  addRequiredParam<std::vector<VariableName>>(name, doc_string);
312 
313  addCoupledVarWithAutoBuild(name, base_name, num_name, doc_string);
314 }
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 1860 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().

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

1699 {
1700  checkParamName(name);
1701  checkConsistentType<T>(name);
1702 
1703  InputParameters::insert<T>(name);
1704  auto & metadata = _params[name];
1705  metadata._required = true;
1706  if constexpr (isFunctorNameType<T>())
1707  metadata._doc_string = appendFunctorDescription<T>(doc_string);
1708  else
1709  metadata._doc_string = doc_string;
1710 }
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 1714 of file InputParameters.h.

1717 {
1718  mooseError("You cannot call addRequiredParam and supply a default value for this type, please "
1719  "use addParam instead");
1720 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

◆ addRequiredParam() [3/6]

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

Definition at line 1248 of file InputParameters.C.

1251 {
1252  InputParameters::set<MooseEnum>(name) = moose_enum; // valid parameter is set by set_attributes
1253  auto & metadata = _params[name];
1254  metadata._required = true;
1255  metadata._doc_string = doc_string;
1256 }
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 1260 of file InputParameters.C.

1263 {
1264  InputParameters::set<MultiMooseEnum>(name) =
1265  moose_enum; // valid parameter is set by set_attributes
1266  auto & metadata = _params[name];
1267  metadata._required = true;
1268  metadata._doc_string = doc_string;
1269 }
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 1386 of file InputParameters.h.

Referenced by ActionWarehouse::printInputFile().

1386 { _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 2488 of file InputParameters.h.

2489 {
2490  auto numeric_value_type = []()
2491  {
2493  Moose::internal::getNullptrExample<T>()))
2494  return "number";
2495  else if constexpr (Moose::internal::isVectorFunctorNameTypeHelper(
2496  Moose::internal::getNullptrExample<T>()))
2497  return "numeric vector value (enclosed in curly braces)";
2498  else
2499  {
2500  mooseAssert(false, "We control instantiations of this method");
2501  return "";
2502  }
2503  };
2504 
2505  return MooseUtils::trim(doc_string, ". ") + ". A functor is any of the following: a variable, " +
2506  (
2507 #ifdef MOOSE_MFEM_ENABLED
2508  Moose::internal::isMFEMFunctorNameTypeHelper(Moose::internal::getNullptrExample<T>())
2509  ? "an MFEM"
2510  :
2511 #endif
2512  "a functor") +
2513  " material property, a function, a postprocessor or a " + numeric_value_type() + ".";
2514 }
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 1127 of file InputParameters.C.

Referenced by applyParameters(), and applySpecificParameters().

1128 {
1129  // Disable the display of deprecated message when applying common parameters, this avoids a dump
1130  // of messages
1131  _show_deprecated_message = false;
1132 
1133  // If the local parameters has a coupled variable, populate it with the value from the common
1134  // parameters, if the common parameters has the coupled variable too
1135  if (hasCoupledValue(var_name))
1136  {
1137  if (common.hasDefaultCoupledValue(var_name))
1138  {
1139  // prepare a vector of default coupled values
1140  std::vector<Real> defaults(common.numberDefaultCoupledValues(var_name));
1141  for (unsigned int j = 0; j < common.numberDefaultCoupledValues(var_name); ++j)
1142  defaults[j] = common.defaultCoupledValue(var_name, j);
1143  addCoupledVar(var_name, defaults, common.getDocString(var_name));
1144  }
1145  else if (common.hasCoupledValue(var_name))
1146  addCoupledVar(var_name, common.getDocString(var_name));
1147  }
1148 
1149  // Enable deprecated message printing
1150  _show_deprecated_message = true;
1151 }
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 1154 of file InputParameters.C.

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

1158 {
1159  // Disable the display of deprecated message when applying common parameters, this avoids a dump
1160  // of messages
1161  _show_deprecated_message = false;
1162 
1163  const auto local_name = checkForRename(common_name);
1164 
1165  // Extract the properties from the local parameter for the current common parameter name
1166  const bool local_exist = _values.find(local_name) != _values.end();
1167  const bool local_set = _params.count(local_name) > 0 && !_params[local_name]._set_by_add_param;
1168  const bool local_priv = allow_private ? false : isPrivate(local_name);
1169  const bool local_valid = isParamValid(local_name);
1170 
1171  // Extract the properties from the common parameter
1172  const bool common_exist = common._values.find(common_name) != common._values.end();
1173  const bool common_priv = allow_private ? false : common.isPrivate(common_name);
1174  const bool common_valid = common.isParamValid(common_name) || override_default;
1175 
1176  /* In order to apply a common parameter 4 statements must be satisfied
1177  * (1) A local parameter must exist with the same name as the common parameter
1178  * (2) Common parameter must be valid and exist
1179  * (3) Local parameter must be invalid OR not have been set from its default
1180  * (4) Both cannot be private
1181  */
1182  if (local_exist && common_exist && common_valid && (!local_valid || !local_set) &&
1183  (!common_priv || !local_priv))
1184  {
1185  remove(local_name);
1186  _values[local_name] = common._values.find(common_name)->second->clone();
1187  set_attributes(local_name, false);
1188  _params[local_name]._set_by_add_param =
1189  libmesh_map_find(common._params, common_name)._set_by_add_param;
1190  // Keep track of where this param came from if we can. This will enable us to
1191  // produce param errors from objects created within an action that link to
1192  // the parameter in the action
1193  at(local_name)._hit_node = common.getHitNode(common_name);
1194  }
1195  else if (!local_exist && !common_exist)
1196  mooseError("InputParameters::applyParameter(): Attempted to apply invalid parameter \"",
1197  common_name,
1198  "\"");
1199 
1200  // Enable deprecated message printing
1201  _show_deprecated_message = true;
1202 }
const hit::Node * getHitNode(const std::string &param) const
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.
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 1056 of file InputParameters.C.

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

1059 {
1060  // If we're applying all of the things, also associate the top level hit node
1061  if (exclude.empty() && !getHitNode() && common.getHitNode())
1062  setHitNode(*common.getHitNode(), {});
1063 
1064  // Loop through the common parameters
1065  for (const auto & it : common)
1066  {
1067  // Common parameter name
1068  const std::string & common_name = it.first;
1069  // Continue to next parameter, if the current is in list of excluded parameters
1070  if (std::find(exclude.begin(), exclude.end(), common_name) != exclude.end())
1071  continue;
1072 
1073  applyParameter(common, common_name, allow_private);
1074  }
1075 
1076  // Loop through the coupled variables
1077  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
1078  it != common.coupledVarsEnd();
1079  ++it)
1080  {
1081  // Variable name
1082  const std::string var_name = *it;
1083 
1084  // Continue to next variable, if the current is in list of excluded parameters
1085  if (std::find(exclude.begin(), exclude.end(), var_name) != exclude.end())
1086  continue;
1087 
1088  applyCoupledVar(common, var_name);
1089  }
1090 }
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 1093 of file InputParameters.C.

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

1096 {
1097  // Loop through the common parameters
1098  for (const auto & it : common)
1099  {
1100  // Common parameter name
1101  const std::string & common_name = it.first;
1102 
1103  // Continue to next parameter, if the current is not in list of included parameters
1104  if (std::find(include.begin(), include.end(), common_name) == include.end())
1105  continue;
1106 
1107  applyParameter(common, common_name, allow_private);
1108  }
1109 
1110  // Loop through the coupled variables
1111  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
1112  it != common.coupledVarsEnd();
1113  ++it)
1114  {
1115  // Variable name
1116  const std::string var_name = *it;
1117 
1118  // Continue to next variable, if the current is not in list of included parameters
1119  if (std::find(include.begin(), include.end(), var_name) == include.end())
1120  continue;
1121 
1122  applyCoupledVar(common, var_name);
1123  }
1124 }
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 432 of file InputParameters.C.

Referenced by ActionWarehouse::buildBuildableActions().

433 {
434  for (const auto & it : *this)
435  if (isParamRequired(it.first) && !isParamValid(it.first))
436  return false;
437  return true;
438 }
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 1362 of file InputParameters.h.

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

1363  {
1364  const auto param = checkForRename(param_name);
1365  if (_params.count(param) == 0)
1366  mooseError("param '", param, "' not present in InputParams");
1367  return _params[param];
1368  }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 1369 of file InputParameters.h.

1370  {
1371  const auto param = checkForRename(param_name);
1372  if (_params.count(param) == 0)
1373  mooseError("param '", param, "' not present in InputParams");
1374  return _params.at(param);
1375  }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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.

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

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

1540 {
1541  if (const auto hit_node = getHitNode())
1542  return hit_node->fullpath();
1543  return "";
1544 }
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 1531 of file InputParameters.C.

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

◆ callMooseError()

void InputParameters::callMooseError ( std::string  msg,
const bool  with_prefix = true,
const hit::Node *  node = nullptr 
) const
private

Internal helper for calling back to mooseError(), ideally from the underlying MooseBase object if it is available (for more context)

Definition at line 1819 of file InputParameters.C.

Referenced by mooseError(), and paramError().

1822 {
1823  // Find the context of the app if we can. This will let our errors be
1824  // prefixed by the multiapp name (if applicable) and will flush the
1825  // console before outputting an error
1826  MooseApp * app = nullptr;
1827  if (isMooseBaseObject() && have_parameter<MooseApp *>(MooseBase::app_param))
1828  app = get<MooseApp *>(MooseBase::app_param);
1829 
1830  MooseBase::callMooseError(app, *this, msg, with_prefix, node);
1831 }
static const std::string app_param
The name of the parameter that contains the MooseApp.
Definition: MooseBase.h:59
void callMooseError(std::string msg, const bool with_prefix, const hit::Node *node=nullptr) const
External method for calling moose error with added object context.
Definition: MooseBase.C:102
Base class for MOOSE-based applications.
Definition: MooseApp.h:96
bool isMooseBaseObject() const

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

1992 {
1993  const auto name = checkForRename(name_in);
1994 
1995  // If we don't currently have the Parameter, can't be any inconsistency
1996  InputParameters::const_iterator it = _values.find(name);
1997  if (it == _values.end())
1998  return;
1999 
2000  // Now, if we already have the Parameter, but it doesn't have the
2001  // right type, throw an error.
2002  if (!this->Parameters::have_parameter<T>(name))
2003  mooseError("Attempting to set parameter \"",
2004  name,
2005  "\" with type (",
2006  libMesh::demangle(typeid(T).name()),
2007  ")\nbut the parameter already exists as type (",
2008  it->second->type(),
2009  ")");
2010 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 1757 of file InputParameters.C.

Referenced by applyParameter(), at(), 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(), queryDeprecatedParamMessage(), rangeCheckedFunction(), reservedValues(), set(), set_attributes(), setDocString(), setDocUnit(), setGlobalCommandLineParam(), setReservedValues(), shouldIgnore(), suppressParameter(), transferParam(), and type().

1758 {
1759  if (auto it = _old_to_new_name_and_dep.find(name); it != _old_to_new_name_and_dep.end())
1760  return it->second.first;
1761  else
1762  return name;
1763 }
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 1578 of file InputParameters.C.

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

1579 {
1580  const static pcrecpp::RE valid("[\\w:/]+");
1581  if (!valid.FullMatch(name))
1582  mooseError("Invalid parameter name: '", name, "'");
1583 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 591 of file InputParameters.C.

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

592 {
593  const std::string parampath = blockFullpath() != "" ? blockFullpath() : parsing_syntax;
594  std::vector<std::pair<const hit::Node *, std::string>> errors;
595 
596  // Required parameters
597  std::vector<std::string> required_param_errors;
598  for (const auto & it : *this)
599  {
600  const auto param_name = checkForRename(it.first);
601  if (!isParamValid(param_name) && isParamRequired(param_name))
602  {
603  // check if an old, deprecated name exists for this parameter that may be specified
604  auto oit = _new_to_deprecated_coupled_vars.find(param_name);
605  if (oit != _new_to_deprecated_coupled_vars.end() && isParamValid(oit->second))
606  continue;
607 
608  required_param_errors.push_back("missing required parameter '" + parampath + "/" +
609  param_name + "'\n\tDoc String: \"" +
610  getDocString(param_name) + "\"");
611  }
612  }
613 
614  if (required_param_errors.size())
615  mooseError(MooseUtils::stringJoin(required_param_errors, "\n"));
616 
617  // Range checked parameters
618  for (const auto & it : *this)
619  {
620  const std::string long_name(parampath + "/" + it.first);
621 
622  std::optional<std::pair<bool, std::string>> error;
623  dynamicCastRangeCheck(Real, Real, long_name, it.first, it.second);
624  dynamicCastRangeCheck(int, long, long_name, it.first, it.second);
625  dynamicCastRangeCheck(long, long, long_name, it.first, it.second);
626  dynamicCastRangeCheck(unsigned int, long, long_name, it.first, it.second);
627 
628  if (error)
629  {
630  if (error->first)
631  paramError(it.first, error->second);
632  else
633  mooseError("For range checked parameter '" + it.first + "': " + error->second);
634  }
635  }
636 
637  // Controllable parameters
638  for (const auto & param_name : getControllableParameters())
639  {
640  if (isPrivate(param_name))
641  paramError(param_name,
642  "private parameter '" + paramFullpath(param_name) + "' marked controllable");
643 
644  std::optional<std::string> error;
645  checkMooseType(NonlinearVariableName, param_name);
646  checkMooseType(AuxVariableName, param_name);
647  checkMooseType(VariableName, param_name);
648  checkMooseType(BoundaryName, param_name);
649  checkMooseType(SubdomainName, param_name);
650  checkMooseType(PostprocessorName, param_name);
651  checkMooseType(VectorPostprocessorName, param_name);
652  checkMooseType(UserObjectName, param_name);
653  checkMooseType(MaterialPropertyName, param_name);
654  if (error)
655  paramError(param_name, *error);
656  }
657 }
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.
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available...
std::string getDocString(const std::string &name) const
Returns the documentation string for the specified parameter name.
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::set< std::string > getControllableParameters() const
Return list of controllable parameters.
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
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 64 of file InputParameters.C.

65 {
67  _params.clear();
68  _coupled_vars.clear();
70  _collapse_nesting = false;
73  _allow_copy = true;
75  _new_to_old_names.clear();
76  _hit_node = nullptr;
77  _finalized = false;
78 }
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::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...
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 769 of file InputParameters.h.

Referenced by ElemSideNeighborLayersGeomTester::validParams().

769 { _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 552 of file InputParameters.C.

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

553 {
554  _collapse_nesting = collapse;
555 }
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.

◆ collapseSyntaxNesting() [2/2]

bool InputParameters::collapseSyntaxNesting ( ) const

Definition at line 558 of file InputParameters.C.

559 {
560  return _collapse_nesting;
561 }
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 1035 of file InputParameters.C.

1036 {
1037  auto & cl_data = at(checkForRename(name))._cl_data;
1038  if (!cl_data)
1039  mooseError("InputParameters::commandLineParamSet: The parameter '",
1040  name,
1041  "' is not a command line parameter");
1042  cl_data->set_by_command_line = true;
1043 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 849 of file InputParameters.h.

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

850  {
851  return _coupled_vars.begin();
852  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ coupledVarsEnd()

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

Definition at line 853 of file InputParameters.h.

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

854  {
855  return _coupled_vars.end();
856  }
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 448 of file InputParameters.C.

Referenced by GenericConstant2DArray::validParams(), PenaltyDirichletNodalKernel::validParams(), GenericConstantArray::validParams(), GenericConstantVectorMaterialTempl< is_ad >::validParams(), ConstantScalarAux::validParams(), ConstantFunction::validParams(), ConstantPostprocessor::validParams(), ConstantAux::validParams(), ControllableInputTimes::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().

450 {
451  std::vector<std::string> names;
452  MooseUtils::tokenize<std::string>(input_names, names, 1, " ");
453  for (auto & name_in : names)
454  {
455  const auto name = checkForRename(name_in);
456  auto map_iter = _params.find(name);
457  if (map_iter != _params.end()) // error is handled by checkParams method
458  {
459  map_iter->second._controllable = true;
460  map_iter->second._controllable_flags = execute_flags;
461  }
462  else
463  mooseError("The input parameter '",
464  name,
465  "' does not exist, thus cannot be marked as controllable.");
466  }
467 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 823 of file InputParameters.C.

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

824 {
825  auto value_it = _params.find(coupling_name);
826 
827  if (value_it == _params.end() || !value_it->second._have_coupled_default)
828  mooseError("Attempted to retrieve default value for coupled variable '",
829  coupling_name,
830  "' when none was provided. \n\nThere are three reasons why this may have "
831  "occurred:\n 1. The other version of params.addCoupledVar() should be used in order "
832  "to provide a default value. \n 2. This should have been a required coupled "
833  "variable added with params.addRequiredCoupledVar() \n 3. The call to get the "
834  "coupled value should have been properly guarded with isCoupled()\n");
835 
836  return value_it->second._coupled_default.at(i);
837 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 814 of file InputParameters.C.

815 {
816  const auto actual_name = checkForRename(coupling_name);
817  _params[actual_name]._coupled_default.resize(i + 1);
818  _params[actual_name]._coupled_default[i] = value;
819  _params[actual_name]._have_coupled_default = true;
820 }
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 
)

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

Referenced by Factory::initialize().

661 {
662  mooseAssert(!isFinalized(), "Already finalized");
663 
664  checkParams(parsing_syntax);
665 
666  // Helper for setting the absolute paths for each set file name parameter
667  const auto set_absolute_path = [this](const std::string & param_name, auto & value)
668  {
669  // We don't need to set a path if nothing is there
670  if (value.empty())
671  return;
672 
673  std::filesystem::path value_path = std::string(value);
674  // Is already absolute, nothing to do
675  if (value_path.is_absolute())
676  return;
677 
678  // The base by which to make things relative to
679  const auto file_base = getFileBase(param_name);
680  value = std::filesystem::absolute(file_base / value_path).c_str();
681  };
682 
683  // Set the absolute path for each file name typed parameter
684  for (const auto & [param_name, param_value] : *this)
685  {
686 #define set_if_filename(type) \
687  else if (auto type_value = dynamic_cast<Parameters::Parameter<type> *>(param_value.get())) \
688  set_absolute_path(param_name, type_value->set()); \
689  else if (auto type_values = dynamic_cast<Parameters::Parameter<std::vector<type>> *>( \
690  param_value.get())) for (auto & value : type_values->set()) \
691  set_absolute_path(param_name, value)
692 
693  if (false)
694  ;
695  // Note that we explicitly skip DataFileName here because we do not want absolute
696  // file paths for data files, as they're searched in the data directories
697  set_if_filename(FileName);
698  set_if_filename(FileNameNoExtension);
699  set_if_filename(MeshFileName);
700  set_if_filename(MatrixFileName);
701 #undef set_if_filename
702  // Set paths for data files
703  else if (auto data_file_name =
704  dynamic_cast<Parameters::Parameter<DataFileName> *>(param_value.get()))
705  {
706  Moose::DataFileUtils::Path found_path;
707  std::optional<std::string> error;
708 
709  // Catch this so that we can add additional error context if it fails (the param path)
710  const auto throw_on_error_before = Moose::_throw_on_error;
711  Moose::_throw_on_error = true;
712  try
713  {
714  found_path = Moose::DataFileUtils::getPath(data_file_name->get(), getFileBase(param_name));
715  }
716  catch (std::exception & e)
717  {
718  error = e.what();
719  }
720  Moose::_throw_on_error = throw_on_error_before;
721 
722  if (error)
723  paramError(param_name, *error);
724 
725  // Set the value to the absolute searched path
726  data_file_name->set() = found_path.path;
727  // And store the path in metadata so that we can dump it later
728  at(param_name)._data_file_name_path = found_path;
729  }
730  }
731 
732  _finalized = true;
733 }
std::optional< Moose::DataFileUtils::Path > _data_file_name_path
The searched path information pertaining to a DataFileName parameter.
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available...
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::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:780
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 2226 of file InputParameters.h.

Referenced by ElementIDOutputAction::act(), AddMaterialAction::act(), MeshOnlyAction::act(), SetupMeshAction::act(), SplitMeshAction::act(), SetupDebugAction::act(), MaterialOutputAction::act(), 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(), NonlinearSystemBase::addKernel(), FEProblem::addLineSearch(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), MFEMProblem::addMFEMFESpaceFromMOOSEVariable(), FEProblemBase::addMultiApp(), NonlinearSystemBase::addNodalKernel(), FEProblemBase::addNodalKernel(), MooseObjectWarehouseBase< Indicator >::addObject(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addOutput(), FEProblemBase::addScalarKernel(), 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(), MooseBase::connectControllableParams(), Coupleable::coupledMatrixTagValue(), Coupleable::coupledMatrixTagValues(), PostprocessorInterface::coupledPostprocessors(), Coupleable::coupledVectorTagArrayGradient(), Coupleable::coupledVectorTagArrayGradients(), Coupleable::coupledVectorTagArrayValues(), Coupleable::coupledVectorTagDofValues(), Coupleable::coupledVectorTagGradient(), Coupleable::coupledVectorTagGradients(), Coupleable::coupledVectorTagValues(), ActionFactory::create(), AppFactory::create(), 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(), MooseBase::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(), MooseVariableInterface< Real >::MooseVariableInterface(), NodeFaceConstraint::NodeFaceConstraint(), OrientedBoxInterface::OrientedBoxInterface(), 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(), Moose::SlepcSupport::storeSolveType(), DumpObjectsProblem::stringifyParameters(), TaggingInterface::TaggingInterface(), transferParam(), MooseBase::uniqueName(), GradientJumpIndicator::validParams(), ElemSideNeighborLayersGeomTester::validParams(), ElemSideNeighborLayersTester::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), FVRelationshipManagerInterface::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), ProjectionAux::validParams(), NearestRadiusLayeredAverage::validParams(), DistributedRectilinearMeshGenerator::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().

2227 {
2228  const auto param1 = checkForRename(param1_in);
2229  const auto param2 = checkForRename(param2_in);
2230 
2231  const auto & v1 = get<V1>(param1);
2232  const auto & v2 = get<V2>(param2);
2233 
2234  auto controllable = getControllableParameters();
2235  if (controllable.count(param1) || controllable.count(param2))
2236  mooseError("Parameters ",
2237  param1,
2238  " and/or ",
2239  param2 + " are controllable parameters and cannot be retireved using "
2240  "the MooseObject::getParam/InputParameters::get methods for pairs");
2241 
2242  if (v1.size() != v2.size())
2243  paramError(param1,
2244  "Vector parameters ",
2245  param1,
2246  "(size: ",
2247  v1.size(),
2248  ") and " + param2,
2249  "(size: ",
2250  v2.size(),
2251  ") are of different lengths \n");
2252 
2253  std::vector<std::pair<R1, R2>> parameter_pairs;
2254  auto i1 = v1.begin();
2255  auto i2 = v2.begin();
2256  for (; i1 != v1.end() && i2 != v2.end(); ++i1, ++i2)
2257  parameter_pairs.emplace_back(std::make_pair(*i1, *i2));
2258  return parameter_pairs;
2259 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information if available...
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
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 2276 of file InputParameters.h.

2277 {
2278  const auto name = checkForRename(std::string(name_in));
2279 
2280  return Parameters::get<T>(name);
2281 }
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 851 of file InputParameters.C.

852 {
853  std::map<std::string, std::pair<std::string, std::string>> abv;
854  for (auto it = _params.begin(); it != _params.end(); ++it)
855  {
856  if (!it->second._autobuild_vecs.first.empty())
857  abv[it->first] = it->second._autobuild_vecs;
858  }
859  return abv;
860 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getBase()

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

Set via registerBase().

Definition at line 497 of file InputParameters.C.

Referenced by ActionWarehouse::addActionBlock(), AuxiliarySystem::addKernel(), FEProblemBase::addMaterialHelper(), JsonSyntaxTree::addParameters(), Action::addRelationshipManager(), MFEMProblem::addTransfer(), MooseServer::addValuesToList(), MooseBase::getBase(), MooseServer::getHoverDisplayText(), MooseServer::getObjectParameters(), and MooseBase::messagePrefix().

498 {
499  if (!have_parameter<std::string>(MooseBase::moose_base_param))
500  mooseError("InputParameters::getBase(): Parameters do not have base; one needs to be set with "
501  "registerBase()");
502  return get<std::string>(MooseBase::moose_base_param);
503 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
static const std::string moose_base_param
The name of the parameter that contains the moose system base.
Definition: MooseBase.h:61

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

Referenced by Action::addRelationshipManagers().

547 {
548  return _buildable_rm_types;
549 }
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 538 of file InputParameters.C.

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

539 {
540  return _buildable_types;
541 }
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 1682 of file InputParameters.h.

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

1684 {
1685  const auto name = checkForRename(name_in);
1686 
1687  T param = this->get<T>(name);
1688 
1689  // Note: You will receive a compile error on this line if you attempt to pass a non-pointer
1690  // template type to this method
1691  if (!param)
1692  mooseError("Parameter ", name, " is NULL.\n", error_string);
1693  return this->get<T>(name);
1694 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 129 of file InputParameters.C.

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

130 {
131  return _class_description;
132 }
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 1024 of file InputParameters.C.

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

1025 {
1026  const auto & cl_data = at(checkForRename(name))._cl_data;
1027  if (!cl_data)
1028  mooseError("InputParameters::getCommandLineMetadata: The parameter '",
1029  name,
1030  "' is not a command line parameter");
1031  return *cl_data;
1032 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 477 of file InputParameters.C.

478 {
479  const auto name = checkForRename(name_in);
480  return at(name)._controllable_flags;
481 }
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 1615 of file InputParameters.C.

Referenced by checkParams(), and get().

1616 {
1617  std::set<std::string> controllable;
1618  for (auto it = _params.begin(); it != _params.end(); ++it)
1619  if (it->second._controllable)
1620  controllable.emplace(it->first);
1621  return controllable;
1622 }
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 861 of file InputParameters.h.

Referenced by FunctionMaterialBase< is_ad >::FunctionMaterialBase().

861 { 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 1237 of file InputParameters.C.

Referenced by transferParam().

1238 {
1239  const auto name = checkForRename(name_in);
1240  auto it = _params.find(name);
1241  if (it == _params.end())
1242  mooseError("No parameter exists with the name ", name);
1243  return it->second._doc_string;
1244 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 324 of file InputParameters.C.

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

325 {
326  const auto name = checkForRename(name_in);
327 
328  std::string doc_string;
329  auto it = _params.find(name);
330  if (it != _params.end())
331  for (const auto & ch : it->second._doc_string)
332  {
333  if (ch == '\n')
334  doc_string += " ... ";
335  else
336  doc_string += ch;
337  }
338 
339  return doc_string;
340 }
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 356 of file InputParameters.C.

357 {
358  const auto name = checkForRename(name_in);
359  return _params.at(name)._doc_unit;
360 }
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 736 of file InputParameters.C.

Referenced by finalize().

737 {
738  mooseAssert(!have_parameter<std::string>("_app_name"),
739  "Not currently setup to work with app FileName parameters");
740 
741  const hit::Node * hit_node = nullptr;
742 
743  // Context from the individual parameter
744  if (param_name)
745  hit_node = getHitNode(*param_name);
746  // Context from the parameters
747  if (!hit_node)
748  hit_node = getHitNode();
749  // No hit node, so use the cwd (no input files)
750  if (!hit_node)
751  return std::filesystem::current_path();
752 
753  // Find any context that isn't command line arguments
754  while (hit_node && hit_node->filename() == "CLI_ARGS")
755  hit_node = hit_node->parent();
756 
757  // Failed to find a node up the tree that isn't a command line argument
758  if (!hit_node)
759  {
760  const std::string error = "Input context was set via a command-line argument and does not have "
761  "sufficient context for determining a file path.";
762  if (param_name)
763  paramError(*param_name, error);
764  else
765  mooseError(error);
766  }
767 
768  return std::filesystem::absolute(std::filesystem::path(hit_node->filename()).parent_path());
769 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
void paramError(const std::string &param, Args... args) const
Emits a parameter error prefixed with the parameter location and object information 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 1046 of file InputParameters.C.

1047 {
1048  const auto param_name = checkForRename(param_name_in);
1049  auto it = _params.find(param_name);
1050  if (it != _params.end())
1051  return it->second._group;
1052  return std::string();
1053 }
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 1596 of file InputParameters.C.

1597 {
1598  std::set<std::string> names;
1599  for (auto it = _params.begin(); it != _params.end(); ++it)
1600  if (it->second._group == group)
1601  names.emplace(it->first);
1602  return names;
1603 }
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 1547 of file InputParameters.C.

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

1548 {
1549  return at(param)._hit_node;
1550 }
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 1249 of file InputParameters.h.

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

1249 { 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 877 of file InputParameters.C.

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

878 {
879  const auto name = checkForRename(name_in);
880  std::string var;
881 
882  if (have_parameter<VariableName>(name))
883  var = get<VariableName>(name);
884  else if (have_parameter<NonlinearVariableName>(name))
885  var = get<NonlinearVariableName>(name);
886  else if (have_parameter<LinearVariableName>(name))
887  var = get<LinearVariableName>(name);
888  else if (have_parameter<AuxVariableName>(name))
889  var = get<AuxVariableName>(name);
890  else if (have_parameter<PostprocessorName>(name))
891  var = get<PostprocessorName>(name);
892  else if (have_parameter<VectorPostprocessorName>(name))
893  var = get<VectorPostprocessorName>(name);
894  else if (have_parameter<FunctionName>(name))
895  var = get<FunctionName>(name);
896  else if (have_parameter<UserObjectName>(name))
897  var = get<UserObjectName>(name);
898  else if (have_parameter<MaterialPropertyName>(name))
899  var = get<MaterialPropertyName>(name);
900  else if (have_parameter<std::string>(name))
901  var = get<std::string>(name);
902 
903  return var;
904 }
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 866 of file InputParameters.h.

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

◆ getObjectName()

const std::string & InputParameters::getObjectName ( ) const
Returns
The underlying owning object name, for MooseBase objects with parameters

Definition at line 958 of file InputParameters.C.

Referenced by FEProblemBase::addConstraint(), MooseBase::messagePrefix(), operator=(), OrientedBoxInterface::OrientedBoxInterface(), and OutputInterface::OutputInterface().

959 {
960  if (!have_parameter<std::string>(MooseBase::name_param))
961  ::mooseError("InputParameters::getObjectName(): Missing '", MooseBase::name_param, "' param");
962  return get<std::string>(MooseBase::name_param);
963 }
static const std::string name_param
The name of the parameter that contains the object name.
Definition: MooseBase.h:55
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

◆ getObjectType()

const std::string & InputParameters::getObjectType ( ) const
Returns
The underlying owning object type, for MooseBase objects with parameters

Definition at line 950 of file InputParameters.C.

Referenced by MooseBase::messagePrefix(), and operator=().

951 {
952  if (!have_parameter<std::string>(MooseBase::type_param))
953  ::mooseError("InputParameters::getObjectType(): Missing '", MooseBase::type_param, "' param");
954  return get<std::string>(MooseBase::type_param);
955 }
static const std::string type_param
The name of the parameter that contains the object type.
Definition: MooseBase.h:53
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.

◆ getParametersList()

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

Definition at line 1606 of file InputParameters.C.

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

1607 {
1608  std::set<std::string> param_set;
1609  for (auto it = _params.begin(); it != _params.end(); ++it)
1610  param_set.emplace(it->first);
1611  return param_set;
1612 }
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 
)
static

Definition at line 2202 of file InputParameters.h.

2203 {
2204  const auto name = pars.checkForRename(name_in);
2205 
2206  if (!pars.isParamValid(name))
2207  pars.mooseError("The parameter \"", name, "\" is being retrieved before being set.");
2208 
2209  return pars.get<T>(name);
2210 }
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.
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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.

◆ getParamHelper() [2/5]

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

Definition at line 1496 of file InputParameters.C.

1498 {
1499  const auto name = pars.checkForRename(name_in);
1500  return pars.get<MooseEnum>(name);
1501 }
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 
)

Definition at line 1505 of file InputParameters.C.

1507 {
1508  const auto name = pars.checkForRename(name_in);
1509  return pars.get<MultiMooseEnum>(name);
1510 }
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 
)

◆ getParamHelper() [5/5]

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

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

Referenced by AttribSystem::initFrom().

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

◆ getVecMooseType()

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

Definition at line 907 of file InputParameters.C.

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

908 {
909  const auto name = checkForRename(name_in);
910  std::vector<std::string> svars;
911 
912  if (have_parameter<std::vector<VariableName>>(name))
913  {
914  std::vector<VariableName> vars = get<std::vector<VariableName>>(name);
915  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
916  }
917  else if (have_parameter<std::vector<NonlinearVariableName>>(name))
918  {
919  std::vector<NonlinearVariableName> vars = get<std::vector<NonlinearVariableName>>(name);
920  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
921  }
922  else if (have_parameter<std::vector<AuxVariableName>>(name))
923  {
924  std::vector<AuxVariableName> vars = get<std::vector<AuxVariableName>>(name);
925  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
926  }
927  else if (have_parameter<std::vector<MaterialPropertyName>>(name))
928  {
929  std::vector<MaterialPropertyName> vars = get<std::vector<MaterialPropertyName>>(name);
930  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
931  }
932  else if (have_parameter<std::vector<std::string>>(name))
933  {
934  std::vector<std::string> vars = get<std::vector<std::string>>(name);
935  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
936  }
937 
938  return svars;
939 }
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.

◆ hasBase()

bool InputParameters::hasBase ( ) const
Returns
Whether or not the object has a registered base

The base is registered with registerBase()

Definition at line 491 of file InputParameters.C.

Referenced by ActionWarehouse::addActionBlock(), JsonSyntaxTree::addParameters(), MooseServer::addValuesToList(), MooseServer::getHoverDisplayText(), MooseServer::getObjectParameters(), MooseBase::hasBase(), and MooseBase::messagePrefix().

492 {
493  return have_parameter<std::string>(MooseBase::moose_base_param);
494 }
static const std::string moose_base_param
The name of the parameter that contains the moose system base.
Definition: MooseBase.h:61

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

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

802 {
803  return _coupled_vars.find(coupling_name) != _coupled_vars.end();
804 }
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 786 of file InputParameters.C.

Referenced by transferParam().

787 {
788  const auto name = checkForRename(param_name);
789  if (hasDefaultCoupledValue(name))
790  return true;
791  // If it has a default, it's already valid
792  else if (isParamSetByAddParam(name))
793  return true;
794  else if (isParamValid(name))
795  mooseError("No way to know if the parameter '", param_name, "' has a default");
796  else
797  return false;
798 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 807 of file InputParameters.C.

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

808 {
809  return _params.count(coupling_name) > 0 && _params.at(coupling_name)._have_coupled_default &&
810  _coupled_vars.count(coupling_name) > 0;
811 }
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 2285 of file InputParameters.h.

Referenced by 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::outputMachineReadableData(), OutputOnWarehouse::OutputOnWarehouse(), InputParametersChecksUtils< BatchMeshGeneratorAction >::parameterConsistent(), FVRelationshipManagerInterface::parameterError(), ParsedMaterialHelper< is_ad >::ParsedMaterialHelper(), NEML2Action::printSummary(), FEProblemBase::setResidualObjectParamsAndLog(), DumpObjectsProblem::stringifyParameters(), transferParam(), MooseBase::uniqueName(), BlockRestrictable::validParams(), and Moose::Builder::walkRaw().

2286 {
2287  const auto name = checkForRename(std::string(name_in));
2288 
2289  return Parameters::have_parameter<T>(name);
2290 }
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 2028 of file InputParameters.h.

Referenced by AddElementalFieldAction::validParams().

2029 {
2030  const auto name = checkForRename(name_in);
2031  suppressParameter<T>(name);
2032  _params[name]._ignore = true;
2033 }
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 1562 of file InputParameters.C.

Referenced by paramLocationPrefix().

1563 {
1564  if (const auto hit_node = getHitNode(param))
1565  return hit_node->fileLocation(/* with_column = */ false);
1566  return "";
1567 }
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 1009 of file InputParameters.C.

1010 {
1011  return at(checkForRename(name))._cl_data.has_value();
1012 }
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 470 of file InputParameters.C.

Referenced by transferParam().

471 {
472  const auto name = checkForRename(name_in);
473  return _params.count(name) > 0 && _params.at(name)._controllable;
474 }
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 1262 of file InputParameters.h.

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

1262 { 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 2481 of file InputParameters.h.

2482 {
2483  return Moose::internal::isFunctorNameTypeHelper(Moose::internal::getNullptrExample<T>());
2484 }
constexpr bool isFunctorNameTypeHelper(T *ex)

◆ isMooseBaseObject()

bool InputParameters::isMooseBaseObject ( ) const
Returns
Whether or not these parameters are for a MooseBase object, that is, one with a name and type.

Needed so that we can produce richer errors from within InputParameters that have the context of the underlying object, if possible.

Definition at line 942 of file InputParameters.C.

Referenced by callMooseError(), and MooseBase::messagePrefix().

943 {
944  return have_parameter<std::string>(MooseBase::type_param) &&
945  get<std::string>(MooseBase::type_param).size() &&
946  have_parameter<std::string>(MooseBase::name_param);
947 }
static const std::string name_param
The name of the parameter that contains the object name.
Definition: MooseBase.h:55
static const std::string type_param
The name of the parameter that contains the object type.
Definition: MooseBase.h:53

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

1231 {
1232  const auto name = checkForRename(name_in);
1233  return _params.count(name) > 0;
1234 }
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 425 of file InputParameters.C.

426 {
427  const auto name = checkForRename(name_in);
428  return _params.count(name) > 0 && !_params.at(name)._deprecation_message.empty();
429 }
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 370 of file InputParameters.C.

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

371 {
372  const auto name = checkForRename(name_in);
373  return _params.count(name) > 0 && _params.at(name)._required;
374 }
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 418 of file InputParameters.C.

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

419 {
420  const auto name = checkForRename(name_in);
421  return _params.count(name) > 0 && _params.at(name)._set_by_add_param;
422 }
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 1213 of file InputParameters.C.

Referenced by CreateProblemAction::act(), MeshOnlyAction::act(), SetupMeshAction::act(), SplitMeshAction::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(), FEProblemSolve::FEProblemSolve(), FileMeshGenerator::generate(), AddVariableAction::init(), Console::initialSetup(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::InterfaceDiffusiveFluxIntegralTempl(), InterfaceIntegralVariableValuePostprocessor::InterfaceIntegralVariableValuePostprocessor(), InterfaceKernelTempl< T >::InterfaceKernelTempl(), MooseBase::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().

1214 {
1215  const auto name = checkForRename(name_in);
1216  // Invalid; for sure not set by the user
1217  if (!isParamValid(name))
1218  return false;
1219  // Parameter is not located in the list (called Parameters::set)
1220  if (!_params.count(name))
1221  return false;
1222  // Special case for a command line option, which is a private parameter
1223  if (const auto cl_data = queryCommandLineMetadata(name))
1224  return cl_data->set_by_command_line;
1225  // Not a command line option, not set by addParam and not private
1226  return !_params.at(name)._set_by_add_param && !_params.at(name)._is_private;
1227 }
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 386 of file InputParameters.C.

Referenced by ElementIDOutputAction::act(), ReadExecutorParamsAction::act(), CreateExecutionerAction::act(), CreateProblemDefaultAction::act(), SetupMeshAction::act(), MeshOnlyAction::act(), MaterialOutputAction::act(), AddPeriodicBCAction::act(), FEProblemBase::addConstraint(), FEProblemBase::addDamper(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblem::addLineSearch(), MooseObjectWarehouseBase< Indicator >::addObject(), FEProblemBase::addObjectParamsHelper(), 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(), 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(), MooseBase::isParamValid(), isValid(), LayeredBase::LayeredBase(), LayeredIntegralBase< ElementIntegralVariableUserObject >::LayeredIntegralBase(), SubProblem::markFamilyPRefinement(), UserObjectInterface::mooseObjectError(), MultiApp::MultiApp(), NodeFaceConstraint::NodeFaceConstraint(), InputParametersChecksUtils< BatchMeshGeneratorAction >::parameterConsistent(), 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().

387 {
388  const auto name = checkForRename(name_in);
389  if (have_parameter<MooseEnum>(name))
390  return get<MooseEnum>(name).isValid();
391  else if (have_parameter<std::vector<MooseEnum>>(name))
392  {
393  for (auto it = get<std::vector<MooseEnum>>(name).begin();
394  it != get<std::vector<MooseEnum>>(name).end();
395  ++it)
396  if (!it->isValid())
397  return false;
398  return true;
399  }
400  else if (have_parameter<MultiMooseEnum>(name))
401  return get<MultiMooseEnum>(name).isValid();
402  else if (have_parameter<std::vector<MultiMooseEnum>>(name))
403  {
404  for (auto it = get<std::vector<MultiMooseEnum>>(name).begin();
405  it != get<std::vector<MultiMooseEnum>>(name).end();
406  ++it)
407  if (!it->isValid())
408  return false;
409  return true;
410  }
411  else if (have_parameter<ExecFlagEnum>(name))
412  return get<ExecFlagEnum>(name).isValid();
413  else
414  return _params.count(name) > 0 && _params.at(name)._valid;
415 }
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 441 of file InputParameters.C.

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

442 {
443  const auto name = checkForRename(name_in);
444  return _params.count(name) > 0 && _params.at(name)._is_private;
445 }
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 772 of file InputParameters.C.

Referenced by transferParam().

773 {
774  const auto name = checkForRename(param_name);
775  return !_params.find(name)->second._range_function.empty();
776 }
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 2265 of file InputParameters.h.

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

2266 {
2267  const auto name = checkForRename(name_in);
2268 
2269  if (!_params.count(name))
2270  mooseError("Parameter \"", name, "\" is not valid.");
2271  return have_parameter<T>(name);
2272 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 2049 of file InputParameters.h.

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

2050 {
2051  const auto name = checkForRename(name_in);
2052 
2053  if (!this->have_parameter<T>(name))
2054  mooseError("Unable to un-require nonexistent parameter: ", name);
2055 
2056  _params[name]._required = false;
2057 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 377 of file InputParameters.C.

378 {
379  const auto name = checkForRename(name_in);
380 
381  if (_params.count(name))
382  _params[name]._required = false;
383 }
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 2037 of file InputParameters.h.

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

2038 {
2039  const auto name = checkForRename(name_in);
2040 
2041  if (!this->have_parameter<T>(name))
2042  mooseError("Unable to require nonexistent parameter: ", name);
2043 
2044  _params[name]._required = true;
2045 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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)

◆ mooseError()

template<typename... Args>
void InputParameters::mooseError ( Args &&...  args) const

Emits an error prefixed with the object information, if available.

Definition at line 2375 of file InputParameters.h.

Referenced by addCommandLineParamHelper(), addParamNamesToGroup(), addRequiredParam(), applyParameter(), at(), checkConsistentType(), checkParamName(), checkParams(), commandLineParamSet(), declareControllable(), defaultCoupledValue(), get(), getBase(), getCheckedPointerParam(), getCommandLineMetadata(), getDescription(), getFileBase(), getObjectName(), getObjectType(), getParamHelper(), hasDefault(), isType(), makeParamNotRequired(), makeParamRequired(), numberDefaultCoupledValues(), operator=(), renameCoupledVarInternal(), renameParamInternal(), setDeprecatedVarDocString(), setDocString(), setGlobalCommandLineParam(), shouldIgnore(), suppressParameter(), transferParam(), type(), and varName().

2376 {
2377  std::ostringstream oss;
2378  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
2379  callMooseError(oss.str());
2380 }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:100
void callMooseError(std::string msg, const bool with_prefix=true, const hit::Node *node=nullptr) const
Internal helper for calling back to mooseError(), ideally from the underlying MooseBase object if it ...

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

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

565 {
566  _moose_object_syntax_visibility = visibility;
567 }
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 570 of file InputParameters.C.

571 {
573 }
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 840 of file InputParameters.C.

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

841 {
842  auto value_it = _params.find(coupling_name);
843  if (value_it == _params.end())
844  mooseError("Attempted to retrieve default value for coupled variable '",
845  coupling_name,
846  "' when none was provided.");
847  return value_it->second._coupled_default.size();
848 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ operator+=()

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

Definition at line 180 of file InputParameters.C.

181 {
182  Parameters::operator+=(rhs);
183 
184  // TODO: this is not a proper merge - if a particular parameter exists in both this and rhs,
185  // then we should actually smartly merge both metadata structs before storing in this.
186  for (auto it = rhs._params.begin(); it != rhs._params.end(); ++it)
187  _params[it->first] = it->second;
188 
189  _buildable_types.insert(
190  _buildable_types.end(), rhs._buildable_types.begin(), rhs._buildable_types.end());
191  _buildable_rm_types.insert(
192  _buildable_rm_types.end(), rhs._buildable_rm_types.begin(), rhs._buildable_rm_types.end());
193 
194  // Collapse nesting and moose object syntax hiding are not modified with +=
195  _coupled_vars.insert(rhs._coupled_vars.begin(), rhs._coupled_vars.end());
198 
200  rhs._old_to_new_name_and_dep.end());
201  _new_to_old_names.insert(rhs._new_to_old_names.begin(), rhs._new_to_old_names.end());
202  return *this;
203 }
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 135 of file InputParameters.C.

136 {
137  // An error to help minimize the segmentation faults that occure when MooseObjects do not have the
138  // correct constructor
139  if (!rhs._allow_copy)
140  {
141  // If _allow_parameter_copy is set, these should be too (see
142  // InputParameterWarehouse::addInputParameters)
143  const std::string & name = rhs.getObjectName();
144  const std::string & type = rhs.getObjectType(); // could be empty
145  const std::string name_example = type.size() ? type : "the " + name + " object";
146  const std::string type_example = type.size() ? type : "MyObject";
147  ::mooseError(
148  "Copying of the InputParameters object for ",
149  name_example,
150  " is not allowed.\n\nThe likely cause for this error ",
151  "is having a constructor that does not use a const reference, all constructors\nfor "
152  "MooseObject based classes should be as follows:\n\n",
153  " ",
154  type_example,
155  "::",
156  type_example,
157  "(const InputParameters & parameters);");
158  }
159 
161 
162  _params = rhs._params;
163 
170  _allow_copy = rhs._allow_copy;
173  _hit_node = rhs._hit_node;
174  _finalized = false;
175 
176  return *this;
177 }
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.
const std::string & getObjectName() const
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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
const std::string & getObjectType() const
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.
std::string type(const std::string &name) const
Prints the type of the requested parameter by name.
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 1766 of file InputParameters.C.

1767 {
1768  mooseAssert(_values.find(param_name) != _values.end(),
1769  "The parameter we are searching for aliases for should exist in our parameter map");
1770  std::vector<std::string> aliases = {param_name};
1771 
1772  for (const auto & pr : as_range(_new_to_old_names.equal_range(param_name)))
1773  aliases.push_back(pr.second);
1774 
1775  return aliases;
1776 }
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)

◆ paramError()

template<typename... Args>
void InputParameters::paramError ( const std::string &  param,
Args...  args 
) const

Emits a parameter error prefixed with the parameter location and object information if available.

Definition at line 2393 of file InputParameters.h.

Referenced by SystemBase::addVariable(), checkParams(), finalize(), get(), getFileBase(), and MooseBase::paramError().

2394 {
2395  std::ostringstream oss;
2396  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
2397  const auto [prefix, node] = paramMessageContext(param);
2398 
2399  Moose::show_trace = false;
2400  callMooseError(prefix + oss.str(), false, node);
2401  Moose::show_trace = true;
2402 }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:100
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:783
void callMooseError(std::string msg, const bool with_prefix=true, const hit::Node *node=nullptr) const
Internal helper for calling back to mooseError(), ideally from the underlying MooseBase object if it ...
std::pair< std::string, const hit::Node * > paramMessageContext(const std::string &param) const
Get the context associated with a parameter for a message.

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

Referenced by checkParams(), and paramLocationPrefix().

1571 {
1572  if (const auto hit_node = getHitNode(param))
1573  return hit_node->fullpath();
1574  return "";
1575 }
const hit::Node * getHitNode() const

◆ paramLocationPrefix()

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

Returns a prefix containing the parameter name and location (if available)

Definition at line 1625 of file InputParameters.C.

Referenced by MaterialPropertyInterface::checkBlockAndBoundaryCompatibility().

1626 {
1627  auto prefix = param + ":";
1628  if (!inputLocation(param).empty())
1629  prefix = inputLocation(param) + ": (" + paramFullpath(param) + ")";
1630  return prefix;
1631 }
std::string inputLocation(const std::string &param) const
std::string paramFullpath(const std::string &param) const

◆ paramMessage()

template<typename... Args>
std::string InputParameters::paramMessage ( const std::string &  param,
Args...  args 
) const
Returns
A message used as a prefix for output relating to a parameter.

Will first prefix with a path to the parameter, or the parameter that resulted in the creation of these parameters, if available. The message will then be prefixed with the block path to the parameter, if available.

Definition at line 2384 of file InputParameters.h.

Referenced by MooseBase::paramInfo(), and MooseBase::paramWarning().

2385 {
2386  std::ostringstream oss;
2387  moose::internal::mooseStreamAll(oss, std::forward<Args>(args)...);
2388  return paramMessagePrefix(param) + oss.str();
2389 }
void mooseStreamAll(std::ostringstream &ss)
All of the following are not meant to be called directly - they are called by the normal macros (moos...
Definition: MooseError.C:100
std::string paramMessagePrefix(const std::string &param) const
Get a prefix for messages associated with a parameter.

◆ paramMessageContext()

std::pair< std::string, const hit::Node * > InputParameters::paramMessageContext ( const std::string &  param) const
private

Get the context associated with a parameter for a message.

Parameters
paramThe parameter name
Returns
Pair that is the string prefix for the parameter (fullpath) and a pointer to the best hit node that can be associated with the parameter (if any)

Definition at line 1785 of file InputParameters.C.

Referenced by paramError(), and paramMessagePrefix().

1786 {
1787  const hit::Node * node = nullptr;
1788 
1789  std::string fullpath;
1790  // First try to find the parameter
1791  if (const hit::Node * param_node = getHitNode(param))
1792  {
1793  fullpath = param_node->fullpath();
1794  node = param_node;
1795  }
1796  // If no parameter node, hope for a block node
1797  else if (const hit::Node * block_node = getHitNode())
1798  {
1799  node = block_node;
1800  fullpath = block_node->fullpath() + "/" + param;
1801  }
1802  // Didn't find anything, at least use the parameter
1803  else
1804  fullpath = param;
1805 
1806  return {fullpath + ": ", node};
1807 }
const hit::Node * getHitNode() const

◆ paramMessagePrefix()

std::string InputParameters::paramMessagePrefix ( const std::string &  param) const
private

Get a prefix for messages associated with a parameter.

Will include the best file path possible for the parameter and the parameter's fullpath.

Definition at line 1810 of file InputParameters.C.

Referenced by paramMessage(), and queryDeprecatedParamMessage().

1811 {
1812  auto [prefix, node] = paramMessageContext(param);
1813  if (node)
1814  prefix = Moose::hitMessagePrefix(*node) + prefix;
1815  return prefix;
1816 }
std::pair< std::string, const hit::Node * > paramMessageContext(const std::string &param) const
Get the context associated with a parameter for a message.
std::string hitMessagePrefix(const hit::Node &node)
Get the prefix to be associated with a hit node for a message.
Definition: Moose.C:767

◆ paramSetByUser()

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

Deprecated method.

Use isParamSetByUser() instead.

Definition at line 1206 of file InputParameters.C.

1207 {
1208  mooseDeprecated("paramSetByUser() is deprecated. Use isParamSetByUser() instead.");
1209  return isParamSetByUser(name);
1210 }
void mooseDeprecated(Args &&... args)
Emit a deprecated code/feature message with the given stringified, concatenated args.
Definition: MooseError.h:384
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 1015 of file InputParameters.C.

Referenced by isParamSetByUser().

1016 {
1017  const auto & cl_data = at(checkForRename(name))._cl_data;
1018  if (!cl_data)
1019  return {};
1020  return *cl_data;
1021 }
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 1779 of file InputParameters.C.

1780 {
1781  return at(checkForRename(name))._data_file_name_path;
1782 }
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)

◆ queryDeprecatedParamMessage()

std::optional< std::string > InputParameters::queryDeprecatedParamMessage ( const std::string &  name) const
Returns
The deprecated parameter message for the given parameter, if any

Definition at line 109 of file InputParameters.C.

110 {
111  const auto name = checkForRename(name_in);
113  {
114  auto deprecation_message = [this](const auto & name, const auto & message) -> std::string
115  { return paramMessagePrefix(name) + message; };
116 
117  if (_params.count(name) && !libmesh_map_find(_params, name)._deprecation_message.empty())
118  return deprecation_message(name,
119  "The parameter '" + name + "' is deprecated.\n" +
120  libmesh_map_find(_params, name)._deprecation_message);
121  else if (auto it = _old_to_new_name_and_dep.find(name_in);
122  it != _old_to_new_name_and_dep.end() && !it->second.second.empty())
123  return deprecation_message(name_in, it->second.second);
124  }
125  return {};
126 }
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::string paramMessagePrefix(const std::string &param) const
Get a prefix for messages associated with a parameter.
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::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...

◆ rangeCheck() [1/2]

template<typename T , typename UP_T >
std::optional< std::pair< bool, std::string > > InputParameters::rangeCheck ( const std::string &  full_name,
const std::string &  short_name,
InputParameters::Parameter< T > *  param,
const bool  include_param_path = true 
)

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

Returns
Optional of whether or not the error is a user error (false = developer error) and the associated error

If include_param_path = true, include the parameter path in the error message

Definition at line 1633 of file InputParameters.h.

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

1637 {
1638  mooseAssert(param, "Parameter is NULL");
1639 
1640  if (!isParamValid(short_name))
1641  return {};
1642 
1643  const auto & range_function = _params[short_name]._range_function;
1644  if (range_function.empty())
1645  return {};
1646 
1647  // Parse the expression
1649  if (fp.Parse(range_function, short_name) != -1) // -1 for success
1650  return {{false,
1651  "Error parsing expression '" + range_function + "'" + " for parameter " + short_name}};
1652 
1653  // ensure range-checked input file parameter comparison functions
1654  // do absolute floating point comparisons instead of using a default epsilon.
1655  auto tmp_eps = fp.epsilon();
1656  fp.setEpsilon(0);
1657  // We require a non-const value for the implicit upscaling of the parameter type
1658  std::vector<UP_T> value(1, param->set());
1659  UP_T result = fp.Eval(&value[0]);
1660  fp.setEpsilon(tmp_eps);
1661 
1662  if (fp.EvalError())
1663  return {{true,
1664  "Error evaluating expression '" + range_function + "' for parameter " + short_name +
1665  "; perhaps you used the wrong variable name?"}};
1666 
1667  if (!result)
1668  {
1669  std::ostringstream oss;
1670  oss << "Range check failed";
1671  if (include_param_path)
1672  oss << " for parameter " << full_name;
1673  oss << "; expression = '" << range_function << "', value = " << value[0];
1674  return {{true, oss.str()}};
1675  }
1676 
1677  return {};
1678 }
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 >
std::optional< std::pair< bool, std::string > > InputParameters::rangeCheck ( const std::string &  full_name,
const std::string &  short_name,
InputParameters::Parameter< std::vector< T >> *  param,
const bool  include_param_path = true 
)

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

1529 {
1530  mooseAssert(param, "Parameter is NULL");
1531 
1532  if (!isParamValid(short_name))
1533  return {};
1534 
1535  const auto & range_function = _params[short_name]._range_function;
1536  if (range_function.empty())
1537  return {};
1538 
1551  std::vector<std::string> vars;
1552  if (fp.ParseAndDeduceVariables(range_function, vars) != -1) // -1 for success
1553  return {{false,
1554  "Error parsing expression '" + range_function + "' for parameter " + short_name + ""}};
1555 
1556  // Fparser parameter buffer
1557  std::vector<UP_T> parbuf(vars.size());
1558 
1559  // parameter vector
1560  const std::vector<T> & value = param->set();
1561 
1562  // iterate over all vector values (maybe ;)
1563  bool need_to_iterate = false;
1564  unsigned int i = 0;
1565  do
1566  {
1567  // set parameters
1568  for (unsigned int j = 0; j < vars.size(); j++)
1569  {
1570  if (vars[j] == short_name)
1571  {
1572  if (value.size() == 0)
1573  return {{true, "Range checking empty vector '" + range_function + "'"}};
1574 
1575  parbuf[j] = value[i];
1576  need_to_iterate = true;
1577  }
1578  else if (vars[j] == short_name + "_size")
1579  parbuf[j] = value.size();
1580  else
1581  {
1582  if (vars[j].substr(0, short_name.size() + 1) != short_name + "_")
1583  return {{false, "Error parsing expression '" + range_function + "'"}};
1584  std::istringstream iss(vars[j]);
1585  iss.seekg(short_name.size() + 1);
1586 
1587  size_t index;
1588  if (iss >> index && iss.eof())
1589  {
1590  if (index >= value.size())
1591  return {{true,
1592  "Error parsing expression '" + range_function + "'; out of range variable '" +
1593  vars[j] + "'"}};
1594  parbuf[j] = value[index];
1595  }
1596  else
1597  return {{false,
1598  "Error parsing expression '" + range_function + "'; invalid variable '" +
1599  vars[j] + "'"}};
1600  }
1601  }
1602 
1603  // ensure range-checked input file parameter comparison functions
1604  // do absolute floating point comparisons instead of using a default epsilon.
1605  auto tmp_eps = fp.epsilon();
1606  fp.setEpsilon(0);
1607  UP_T result = fp.Eval(&parbuf[0]);
1608  fp.setEpsilon(tmp_eps);
1609 
1610  // test function using the parameters determined above
1611  if (fp.EvalError())
1612  return {{false, "Error evaluating expression '" + range_function + "'"}};
1613 
1614  if (!result)
1615  {
1616  std::ostringstream oss;
1617  oss << "Range check failed";
1618  if (include_param_path)
1619  oss << " for parameter " << full_name;
1620  oss << "; expression = '" << range_function << "'";
1621  if (need_to_iterate)
1622  oss << ", component " << i;
1623  return {{true, oss.str()}};
1624  }
1625 
1626  } while (need_to_iterate && ++i < value.size());
1627 
1628  return {};
1629 }
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 779 of file InputParameters.C.

Referenced by transferParam().

780 {
781  const auto name = checkForRename(param_name);
782  return _params.at(name)._range_function;
783 }
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 1634 of file InputParameters.C.

1635 {
1636  if (const auto hit_node = getHitNode(param))
1637  return hit_node->strVal();
1638  return "";
1639 }
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 484 of file InputParameters.C.

Referenced by Kernel::validParams(), VectorKernel::validParams(), LineSearch::validParams(), ArrayKernel::validParams(), ActivateElementsUserObjectBase::validParams(), HDGKernel::validParams(), BoundsBase::validParams(), Times::validParams(), Distribution::validParams(), Constraint::validParams(), ElementSubdomainModifierBase::validParams(), MFEMBoundaryCondition::validParams(), Problem::validParams(), ScalarKernelBase::validParams(), LayeredExtremumMaterialProperty::validParams(), MFEMAuxKernel::validParams(), PointwiseRenormalizeVector::validParams(), ADInterfaceKernelTempl< T >::validParams(), Positions::validParams(), SidesetAroundSubdomainUpdater::validParams(), MFEMFunctorMaterial::validParams(), MFEMKernel::validParams(), MoosePartitioner::validParams(), ChainControl::validParams(), TimeStepper::validParams(), NearestPointAverage::validParams(), NearestPointIntegralVariablePostprocessor::validParams(), MFEMFESpace::validParams(), MFEMSolverBase::validParams(), MFEMSubMesh::validParams(), MFEMSubMeshTransfer::validParams(), EigenKernel::validParams(), Split::validParams(), Convergence::validParams(), Postprocessor::validParams(), RelationshipManager::validParams(), Damper::validParams(), InterfaceKernelBase::validParams(), Predictor::validParams(), LinearFVKernel::validParams(), DiracKernelTempl< T >::validParams(), BoundaryCondition::validParams(), NodalKernelBase::validParams(), VectorPostprocessor::validParams(), InterfaceKernelTempl< T >::validParams(), FVKernel::validParams(), Indicator::validParams(), MoosePreconditioner::validParams(), Action::validParams(), AuxScalarKernel::validParams(), MeshDivision::validParams(), TimeIntegrator::validParams(), DGKernelBase::validParams(), MeshGenerator::validParams(), MooseVariableBase::validParams(), Control::validParams(), ScalarInitialCondition::validParams(), Reporter::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(), MooseApp::validParams(), and Executor::validParams().

485 {
486  InputParameters::set<std::string>(MooseBase::moose_base_param) = value;
487  _params[MooseBase::moose_base_param]._is_private = true;
488 }
static const std::string moose_base_param
The name of the parameter that contains the moose system base.
Definition: MooseBase.h:61
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 522 of file InputParameters.C.

523 {
524  _buildable_types.clear();
525  MooseUtils::tokenize(names, _buildable_types, 1, " \t\n\v\f\r"); // tokenize on whitespace
526 }
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 506 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().

507 {
508  InputParameters::set<std::string>("_moose_warehouse_system_name") = value;
509  _params["_moose_warehouse_system_name"]._is_private = true;
510 }
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 1733 of file InputParameters.C.

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

1736 {
1737  renameCoupledVarInternal(old_name, new_name, new_docstring, "");
1738 }
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 1707 of file InputParameters.C.

Referenced by deprecateCoupledVar(), and renameCoupledVar().

1711 {
1712  auto coupled_vars_it = _coupled_vars.find(old_name);
1713  if (coupled_vars_it == _coupled_vars.end())
1714  mooseError("Requested to rename coupled variable '",
1715  old_name,
1716  "' but that coupled variable name doesn't exist in the parameters object.");
1717 
1718  _coupled_vars.insert(new_name);
1719  _coupled_vars.erase(coupled_vars_it);
1720 
1721  renameParamInternal(old_name, new_name, docstring, removal_date);
1722 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 1725 of file InputParameters.C.

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

1728 {
1729  renameParamInternal(old_name, new_name, new_docstring, "");
1730 }
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 990 of file InputParameters.C.

991 {
992  for (auto & param : _params)
993  if (param.second._group == old_name)
994  param.second._group = new_name;
995 }
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 1673 of file InputParameters.C.

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

1677 {
1678  auto params_it = _params.find(old_name);
1679  if (params_it == _params.end())
1680  mooseError("Requested to rename parameter '",
1681  old_name,
1682  "' but that parameter name doesn't exist in the parameters object.");
1683  mooseAssert(params_it->second._deprecation_message.empty(),
1684  "Attempting to rename the parameter, '" << old_name << "', that is deprecated");
1685 
1686  auto new_metadata = std::move(params_it->second);
1687  if (!docstring.empty())
1688  new_metadata._doc_string = docstring;
1689  _params.emplace(new_name, std::move(new_metadata));
1690  _params.erase(params_it);
1691 
1692  auto values_it = _values.find(old_name);
1693  auto new_value = std::move(values_it->second);
1694  _values.emplace(new_name, std::move(new_value));
1695  _values.erase(values_it);
1696 
1697  std::string deprecation_message;
1698  if (!removal_date.empty())
1699  deprecation_message = "'" + old_name + "' has been deprecated and will be removed on " +
1700  removal_date + ". Please use '" + new_name + "' instead.";
1701 
1702  _old_to_new_name_and_dep.emplace(old_name, std::make_pair(new_name, deprecation_message));
1703  _new_to_old_names.emplace(new_name, old_name);
1704 }
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) const
Emits an error prefixed with the object information, if available.
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 1521 of file InputParameters.C.

1522 {
1523  const auto name = checkForRename(name_in);
1524  auto it = _params.find(name);
1525  if (it == _params.end())
1526  return std::set<std::string>();
1527  return it->second._reserved_values;
1528 }
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 1496 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(), AddActionComponentAction::act(), AddAuxKernelAction::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::addDefaultSteadyStateConvergence(), 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(), TableOutput::addMultiAppFixedPointIterationEndExecFlag(), 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(), ActionFactory::create(), AppFactory::create(), MultiApp::createApp(), AppFactory::createAppShared(), AddVariableAction::createInitialConditionAction(), MooseApp::createMinimalApp(), 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(), MassMatrix::setMassMatrixParams(), GlobalParamsAction::setParam(), FEProblemBase::setResidualObjectParamsAndLog(), FVRelationshipManagerInterface::setRMParams(), GlobalParamsAction::setScalarParam(), BatchMeshGeneratorAction::setScalarParams(), GlobalParamsAction::setTripleIndexParam(), CreateExecutionerAction::setupAutoPreconditioning(), ReadExecutorParamsAction::setupAutoPreconditioning(), GlobalParamsAction::setVectorParam(), SideSetExtruderGenerator::SideSetExtruderGenerator(), FVOneVarDiffusionInterface::validParams(), AddFVICAction::validParams(), InversePowerMethod::validParams(), AddICAction::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(), JSONFileReader::validParams(), WeightedGapAux::validParams(), ElemSideNeighborLayersTester::validParams(), NodalSum::validParams(), TimeIntervalTimes::validParams(), ElemSideNeighborLayersGeomTester::validParams(), AddAuxKernelAction::validParams(), ControllableInputTimes::validParams(), ConvectiveFluxBC::validParams(), Console::validParams(), ControlOutput::validParams(), EigenDirichletBC::validParams(), PerfGraphOutput::validParams(), ReporterDebugOutput::validParams(), VTKOutput::validParams(), GhostHigherDLowerDPointNeighbors::validParams(), GenericConstantRealVectorValueTempl< is_ad >::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryBase::validParams(), VectorTimeKernel::validParams(), MoveNodesToGeometryModifierBase::validParams(), FilePositions::validParams(), PiecewiseConstantFromCSV::validParams(), InputPositions::validParams(), MultiAppPositions::validParams(), ReporterPositions::validParams(), TransformedPositions::validParams(), PseudoTimestep::validParams(), MessageFromInput::validParams(), SimulationTimes::validParams(), AddOutputAction::validParams(), FVMassMatrix::validParams(), MeshGeneratorMesh::validParams(), ArrayTimeKernel::validParams(), ExodusFileTimes::validParams(), AccumulateReporter::validParams(), ODETimeKernel::validParams(), GhostEverything::validParams(), GhostLowerDElems::validParams(), TimeKernel::validParams(), CSVFileTimes::validParams(), InputTimes::validParams(), ReporterTimes::validParams(), ElementCentroidPositions::validParams(), NodalNormalsEvaluator::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), VectorMagnitudeFunctorMaterialTempl< is_ad >::validParams(), ElementSubdomainModifierBase::validParams(), FunctorPositions::validParams(), TiedValueConstraint::validParams(), EigenArrayDirichletBC::validParams(), ADTimeKernelGradTempl< T >::validParams(), SolutionInvalidityOutput::validParams(), NodalNormalBC::validParams(), CoupledTiedValueConstraint::validParams(), ADTimeKernelTempl< T >::validParams(), DistributedPositions::validParams(), ElementGroupCentroidPositions::validParams(), FunctorChangeFunctorMaterialTempl< is_ad >::validParams(), NodePositions::validParams(), NodalL2Norm::validParams(), NearestNodeDistanceAux::validParams(), GenericConstantRankTwoTensorTempl< is_ad >::validParams(), FVAnisotropicDiffusion::validParams(), FunctorTimes::validParams(), InterfaceTimeKernel::validParams(), ADTimeKernelValueTempl< T >::validParams(), GenericConstantSymmetricRankTwoTensorTempl< is_ad >::validParams(), LeastSquaresFitHistory::validParams(), NearestNodeValueAux::validParams(), VectorOfPostprocessors::validParams(), GenericFunctorGradientMaterialTempl< is_ad >::validParams(), Positions::validParams(), BlockWeightedPartitioner::validParams(), PerfGraphReporter::validParams(), MultiAppGeneralFieldUserObjectTransfer::validParams(), GenericFunctorMaterialTempl< is_ad >::validParams(), GenericFunctorTimeDerivativeMaterialTempl< is_ad >::validParams(), DOFMapOutput::validParams(), GenericVectorFunctorMaterialTempl< is_ad >::validParams(), TagAuxBase< AuxKernel >::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), IntegratedBCBase::validParams(), ElementUOAux::validParams(), BatchMeshGeneratorAction::validParams(), ReporterPointSource::validParams(), QuadraturePointsPositions::validParams(), GhostingFromUOAux::validParams(), ProjectionAux::validParams(), TimeNodalKernel::validParams(), MortarNodalAuxKernelTempl< ComputeValueType >::validParams(), InterfaceQpUserObjectBase::validParams(), TorchScriptUserObject::validParams(), FunctorExtremaPositions::validParams(), BlockRestrictionDebugOutput::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), MaterialPropertyDebugOutput::validParams(), EqualValueEmbeddedConstraintTempl< is_ad >::validParams(), MooseStaticCondensationPreconditioner::validParams(), ElementVariablesDifferenceMax::validParams(), GenericConstantMaterialTempl< is_ad >::validParams(), VariableResidualNormsDebugOutput::validParams(), ParsedDownSelectionPositions::validParams(), Exodus::validParams(), SinDirichletBC::validParams(), FVDiffusion::validParams(), GhostingUserObject::validParams(), NearestRadiusLayeredAverage::validParams(), TwoMaterialPropertyInterface::validParams(), DistributedRectilinearMeshGenerator::validParams(), NodalBCBase::validParams(), PropertyReadFile::validParams(), TransientBase::validParams(), FVFluxBC::validParams(), ThreeMaterialPropertyInterface::validParams(), KernelBase::validParams(), MultiAppUserObjectTransfer::validParams(), MultiAppTransfer::validParams(), InterfaceMaterial::validParams(), RadialAverage::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >::validParams(), MortarConsumerInterface::validParams(), SamplerBase::validParams(), MortarConstraintBase::validParams(), Control::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().

1497 {
1498  const auto name = checkForRename(name_in);
1499 
1500  checkParamName(name);
1501  checkConsistentType<T>(name);
1502 
1503  T & result = this->Parameters::set<T>(name);
1504 
1505  if (quiet_mode)
1506  _params[name]._set_by_add_param = true;
1507 
1508  setHelper<T>(name);
1509 
1510  return result;
1511 }
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 87 of file InputParameters.C.

Referenced by applyParameter().

88 {
89  const auto name = checkForRename(name_in);
90 
91  if (!inserted_only)
92  {
93  auto & metadata = _params[name];
100  metadata._set_by_add_param = false;
101 
102  // valid_params don't make sense for MooseEnums
103  if (!have_parameter<MooseEnum>(name) && !have_parameter<MultiMooseEnum>(name))
104  metadata._valid = true;
105  }
106 }
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 206 of file InputParameters.C.

Referenced by addCoupledVar().

208 {
209  auto coupled_vars_it = _new_to_deprecated_coupled_vars.find(new_name);
210  if (coupled_vars_it != _new_to_deprecated_coupled_vars.end())
211  {
212  auto params_it = _params.find(coupled_vars_it->second);
213  if (params_it == _params.end())
214  mooseError("There must have been a mistake in the construction of the new to deprecated "
215  "coupled vars map because the old name ",
216  coupled_vars_it->second,
217  " doesn't exist in the parameters data.");
218 
219  params_it->second._doc_string = doc_string;
220  }
221 }
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 343 of file InputParameters.C.

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

344 {
345  const auto name = checkForRename(name_in);
346 
347  auto it = _params.find(name);
348  if (it == _params.end())
349  mooseError("Unable to set the documentation string (using setDocString) for the \"",
350  name,
351  "\" parameter, the parameter does not exist.");
352  it->second._doc_string = doc;
353 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 363 of file InputParameters.C.

364 {
365  const auto name = checkForRename(name_in);
366  _params[name]._doc_unit = doc_unit;
367 }
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 998 of file InputParameters.C.

Referenced by MooseApp::validParams().

999 {
1000  auto & cl_data = at(checkForRename(name))._cl_data;
1001  if (!cl_data)
1002  mooseError("InputParameters::setGlobalCommandLineParam: The parameter '",
1003  name,
1004  "' is not a command line parameter");
1005  cl_data->global = true;
1006 }
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 1489 of file InputParameters.h.

1490 {
1491 }

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

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

1556 {
1557  mooseAssert(node.type() == hit::NodeType::Field, "Must be a field");
1558  at(param)._hit_node = &node;
1559 }
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 1257 of file InputParameters.h.

1257 { _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 1515 of file InputParameters.h.

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

1518 {
1519  this->set<T>(name) = value;
1520  this->setParameters(extra_input_parameters...);
1521 }
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 1276 of file InputParameters.h.

Referenced by setParameters().

1276 {}

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

Referenced by addParam().

1762 {
1763  l_value = r_value;
1764 }

◆ setParamHelper() [2/17]

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

Definition at line 1400 of file InputParameters.C.

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

◆ setParamHelper() [3/17]

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

Definition at line 1412 of file InputParameters.C.

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

◆ setParamHelper() [4/17]

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

Definition at line 1424 of file InputParameters.C.

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

◆ setParamHelper() [5/17]

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

Definition at line 1436 of file InputParameters.C.

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

◆ setParamHelper() [6/17]

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

Definition at line 1448 of file InputParameters.C.

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

◆ setParamHelper() [7/17]

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

Definition at line 1460 of file InputParameters.C.

1463 {
1464  // Assign the default value so that it appears in the dump
1465  std::ostringstream oss;
1466  oss << r_value;
1467  l_value = oss.str();
1468 }

◆ setParamHelper() [8/17]

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

Definition at line 1472 of file InputParameters.C.

1475 {
1476  // Assign the default value so that it appears in the dump
1477  std::ostringstream oss;
1478  oss << r_value;
1479  l_value = oss.str();
1480 }

◆ setParamHelper() [9/17]

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

Definition at line 1484 of file InputParameters.C.

1487 {
1488  // Assign the default value so that it appears in the dump
1489  std::ostringstream oss;
1490  oss << r_value;
1491  l_value = oss.str();
1492 }

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

Referenced by OutputInterface::validParams().

1515 {
1516  const auto name = checkForRename(name_in);
1517  _params[name]._reserved_values = reserved;
1518 }
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 1586 of file InputParameters.C.

1587 {
1588  const auto name = checkForRename(name_in);
1589  auto it = _params.find(name);
1590  if (it != _params.end())
1591  return it->second._ignore;
1592  mooseError("Parameter ", name, " does not exist");
1593 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 2014 of file InputParameters.h.

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

2015 {
2016  const auto name = checkForRename(name_in);
2017  if (!this->have_parameter<T>(name))
2018  mooseError("Unable to suppress nonexistent parameter: ", name);
2019 
2020  auto & metadata = _params[name];
2021  metadata._required = false;
2022  metadata._is_private = true;
2023  metadata._controllable = false;
2024 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 2294 of file InputParameters.h.

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

2298 {
2299  const auto name = source_params.checkForRename(std::string(name_in));
2300  const auto p_name = new_name.empty() ? name_in : new_name;
2301  if (!source_params.have_parameter<T>(name) && !source_params.hasCoupledValue(name))
2302  mooseError("The '",
2303  name_in,
2304  "' parameter could not be transferred because it does not exist with type '",
2305  MooseUtils::prettyCppType<T>(),
2306  "' in the source parameters");
2307  if (name != name_in)
2308  mooseWarning("The transferred parameter " + name_in + " is deprecated in favor of " + name +
2309  " in the source parameters. The new name should likely be used for the parameter "
2310  "transfer instead.");
2311  const std::string description =
2312  new_description.empty() ? source_params.getDescription(name) : new_description;
2313 
2314  if (source_params.isParamRequired(name))
2315  {
2316  // Check for a variable parameter
2317  if (source_params.hasCoupledValue(name))
2318  addRequiredCoupledVar(p_name, description);
2319  // Enums parameters have a default list of options
2320  else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
2321  addRequiredParam<T>(p_name, source_params.get<T>(name), description);
2322  else if (source_params.isRangeChecked(name))
2323  addRequiredRangeCheckedParam<T>(
2324  p_name, source_params.rangeCheckedFunction(name), description);
2325  else
2326  addRequiredParam<T>(p_name, description);
2327  }
2328  else
2329  {
2330  // Check for a variable parameter
2331  if (source_params.hasCoupledValue(name))
2332  {
2333  if (!source_params.hasDefaultCoupledValue(name))
2334  addCoupledVar(p_name, description);
2335  else if (source_params.numberDefaultCoupledValues(name) == 1)
2336  addCoupledVar(p_name, source_params.defaultCoupledValue(name), description);
2337  else
2338  {
2339  std::vector<Real> coupled_values;
2340  for (const auto i : libMesh::make_range(source_params.numberDefaultCoupledValues(name)))
2341  coupled_values.push_back(source_params.defaultCoupledValue(name, i));
2342  addCoupledVar(p_name, coupled_values, description);
2343  }
2344  }
2345  else if (source_params.isRangeChecked(name))
2346  {
2347  if (source_params.hasDefault(name))
2348  addRangeCheckedParam<T>(p_name,
2349  source_params.get<T>(name),
2350  source_params.rangeCheckedFunction(name),
2351  description);
2352  else
2353  addRangeCheckedParam<T>(p_name, source_params.rangeCheckedFunction(name), description);
2354  }
2355  else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
2356  addParam<T>(p_name, source_params.get<T>(name), description);
2357  else
2358  {
2359  if (source_params.hasDefault(name))
2360  addParam<T>(p_name, source_params.get<T>(name), description);
2361  else
2362  addParam<T>(p_name, description);
2363  }
2364  }
2365 
2366  // Copy other attributes
2367  if (source_params.isPrivate(name))
2368  _params[p_name]._is_private = true;
2369  if (source_params.isControllable(name))
2370  _params[p_name]._controllable = true;
2371 }
std::string name(const ElemQuality q)
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:367
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 863 of file InputParameters.C.

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

864 {
865  const auto name = checkForRename(name_in);
866  if (!_values.count(name))
867  mooseError("Parameter \"", name, "\" not found.\n\n", *this);
868 
869  if (_coupled_vars.find(name) != _coupled_vars.end())
870  return "std::vector<VariableName>";
871  else if (_params.count(name) > 0 && !_params.at(name)._custom_type.empty())
872  return _params.at(name)._custom_type;
873  return _values.at(name)->type();
874 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args) const
Emits an error prefixed with the object information, if available.
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 1642 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().

1644 {
1645  // Try the scalar version first
1646  std::string variable_name = getMooseType(var_param_name);
1647  if (variable_name == "")
1648  {
1649  auto vec = getVecMooseType(var_param_name);
1650 
1651  // Catch the (very unlikely) case where a user specifies
1652  // variable = '' (the empty string)
1653  // in their input file. This could happen if e.g. something goes
1654  // wrong with dollar bracket expression expansion.
1655  if (vec.empty())
1656  mooseError("Error constructing object '",
1657  moose_object_with_var_param_name,
1658  "' while retrieving value for '",
1659  var_param_name,
1660  "' parameter! Did you forget to set '",
1661  var_param_name,
1662  "' or set it to '' (empty string) by accident?");
1663 
1664  // When using vector variables, we are only going to use the first one in the list at the
1665  // interface level...
1666  variable_name = vec[0];
1667  }
1668 
1669  return variable_name;
1670 }
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) const
Emits an error prefixed with the object information, if available.
std::vector< std::string > getVecMooseType(const std::string &name) const

Friends And Related Function Documentation

◆ ActionWarehouse

friend class ActionWarehouse
friend

Definition at line 1484 of file InputParameters.h.

◆ emptyInputParameters

InputParameters emptyInputParameters ( )
friend

Definition at line 31 of file InputParameters.C.

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

◆ InputParameterWarehouse

friend class InputParameterWarehouse
friend

Definition at line 1481 of file InputParameters.h.

◆ Parser

friend class Parser
friend

Definition at line 1482 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 1458 of file InputParameters.h.

Referenced by allowCopy(), 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 1444 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 1435 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 1431 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 1448 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 1477 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 1474 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 1451 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 1461 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 1471 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 1467 of file InputParameters.h.

Referenced by addDeprecatedParam(), checkForRename(), clear(), operator+=(), operator=(), queryDeprecatedParamMessage(), 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 1455 of file InputParameters.h.

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


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