www.mooseframework.org
Classes | Public Member Functions | 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...
 
struct  Metadata
 

Public Member Functions

 InputParameters (const InputParameters &rhs)
 
 InputParameters (const Parameters &rhs)
 
virtual ~InputParameters ()=default
 
virtual void clear () override
 
void addClassDescription (const std::string &doc_string)
 This method adds a description of the class that will be displayed in the input file syntax dump. More...
 
std::string getClassDescription () const
 Returns the class description. More...
 
virtual void set_attributes (const std::string &name, bool inserted_only) override
 Override from libMesh to set user-defined attributes on our parameter. More...
 
bool attemptPrintDeprecated (const std::string &name)
 Prints the deprecated parameter message, assuming we have the right flags set. More...
 
template<typename T >
void setHelper (const std::string &name)
 This functions is called in set as a 'callback' to avoid code duplication. More...
 
template<typename T >
T & set (const std::string &name, bool quiet_mode=false)
 Returns a writable reference to the named parameters. More...
 
template<typename T , typename... Ts>
void setParameters (const std::string &name, const T &value, Ts... extra_input_parameters)
 Given a series of parameters names and values, sets each name to the corresponding value. More...
 
template<typename T , typename UP_T >
void rangeCheck (const std::string &full_name, const std::string &short_name, InputParameters::Parameter< T > *param, std::ostream &oss=Moose::out)
 Runs a range on the supplied parameter if it exists and throws an error if that check fails. More...
 
template<typename T , typename UP_T >
void rangeCheck (const std::string &full_name, const std::string &short_name, InputParameters::Parameter< std::vector< T >> *param, std::ostream &oss=Moose::out)
 
template<typename T >
getCheckedPointerParam (const std::string &name, const std::string &error_string="") const
 Verifies that the requested parameter exists and is not NULL and returns it to the caller. More...
 
template<typename T >
void addRequiredParam (const std::string &name, const std::string &doc_string)
 This method adds a parameter and documentation string to the InputParameters object that will be extracted from the input file. More...
 
template<typename T >
void addRequiredParam (const std::string &name, const T &moose_enum, const std::string &doc_string)
 This version of addRequiredParam is here for a consistent use with MooseEnums. More...
 
template<typename T >
void addParam (const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
 Enable support for initializer lists as default arguments for container type. More...
 
template<typename T >
void addRequiredCustomTypeParam (const std::string &name, const std::string &custom_type, const std::string &doc_string)
 These methods add an option parameter and with a customer type to the InputParameters object. More...
 
template<typename T >
void addCustomTypeParam (const std::string &name, const T &value, const std::string &custom_type, const std::string &doc_string)
 
template<typename T >
void addCustomTypeParam (const std::string &name, const std::string &custom_type, const std::string &doc_string)
 
template<typename T >
void addDeprecatedCustomTypeParam (const std::string &name, const std::string &custom_type, const std::string &doc_string, const std::string &deprecation_msg)
 
template<typename T >
void addPrivateParam (const std::string &name, const T &value)
 These method add a parameter to the InputParameters object which can be retrieved like any other parameter. More...
 
template<typename T >
void addPrivateParam (const std::string &name)
 
template<typename T >
void addRequiredCommandLineParam (const std::string &name, const std::string &syntax, const std::string &doc_string)
 Add parameters for retrieval from the command line. More...
 
template<typename T >
void addCommandLineParam (const std::string &name, const std::string &syntax, const std::string &doc_string)
 
template<typename T >
void addCommandLineParam (const std::string &name, const std::string &syntax, const T &value, const std::string &doc_string)
 
template<typename T >
void 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
 
const std::vector< std::string > & getCommandLineSyntax (const std::string &name) const
 
CommandLineMetadata::ArgumentType getCommandLineArgumentType (const std::string &name) const
 
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...
 
std::string getGroupName (const std::string &param_name) const
 This method retrieves the group name for the passed parameter name if one exists. More...
 
template<typename T >
void suppressParameter (const std::string &name)
 This method suppresses an inherited parameter so that it isn't required or valid in the derived class. More...
 
template<typename T >
void makeParamRequired (const std::string &name)
 Changes the parameter to be required. More...
 
template<typename T >
void makeParamNotRequired (const std::string &name)
 Changes the parameter to not be required. More...
 
void addCoupledVar (const std::string &name, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
void addDeprecatedCoupledVar (const std::string &old_name, const std::string &new_name, const std::string &removal_date="")
 This method adds a deprecated coupled variable name pair. More...
 
void addCoupledVar (const std::string &name, const Real value, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
void addCoupledVar (const std::string &name, const std::vector< Real > &value, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
std::string getMooseType (const std::string &name) const
 Utility functions for retrieving one of the MooseTypes variables into the common "string" base class. More...
 
std::vector< std::string > getVecMooseType (const std::string &name) const
 
void addRequiredCoupledVar (const std::string &name, const std::string &doc_string)
 This method adds a coupled variable name pair. More...
 
std::string getDocString (const std::string &name) const
 Returns the documentation string for the specified parameter name. More...
 
void setDocString (const std::string &name, const std::string &doc)
 Set the doc string of a parameter. More...
 
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...
 
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...
 
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, std::vector< std::string > exclude=std::vector< std::string >())
 Method for applying common parameters. More...
 
void applySpecificParameters (const InputParameters &common, const std::vector< std::string > &include, bool allow_private=false)
 Method for applying common parameters. More...
 
void applyParameter (const InputParameters &common, const std::string &common_name, bool allow_private=false)
 Apply values from a single parameter in common, to a single parameter stored in this object. More...
 
void applyCoupledVar (const InputParameters &common, const std::string &var_name)
 Apply properties of a single coupled variable in common, to a single coupled variable stored in this object. More...
 
bool paramSetByUser (const std::string &name) const
 Deprecated method. More...
 
bool isParamSetByUser (const std::string &name) const
 Method returns true if the parameter was by the user. More...
 
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 errorPrefix (const std::string &param) const
 generate error message prefix with parameter name and location (if available) More...
 
std::string & rawParamVal (const std::string &param)
 Get/set a string representing the raw, unmodified token text for the given param. More...
 
const 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...
 
template<>
void addRequiredParam (const std::string &name, const MooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addRequiredParam (const std::string &name, const MultiMooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addDeprecatedParam (const std::string &name, const std::string &doc_string, const std::string &deprecation_message)
 
template<>
void addDeprecatedParam (const std::string &name, const std::string &doc_string, const std::string &deprecation_message)
 
template<>
const MooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MooseEnum *, const MooseObject *moose_object)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name, const InputParameters &pars, const MultiMooseEnum *, const MooseObject *moose_object)
 
template<>
void addRequiredParam (const std::string &name, const MooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addRequiredParam (const std::string &name, const MultiMooseEnum &moose_enum, const std::string &doc_string)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addParam (const std::string &, const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addPrivateParam (const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
void addDeprecatedParam (const std::string &, const std::string &, const std::string &)
 
template<>
const MooseEnumgetParamHelper (const std::string &name_in, const InputParameters &pars, const MooseEnum *, const MooseObject *)
 
template<>
const MultiMooseEnumgetParamHelper (const std::string &name_in, const InputParameters &pars, const MultiMooseEnum *, const MooseObject *)
 
template<typename T , typename S >
void addParam (const std::string &name, const S &value, const std::string &doc_string)
 These methods add an option parameter and a documentation string to the InputParameters object. More...
 
template<typename T >
void addParam (const std::string &name, const std::string &doc_string)
 
template<typename T >
void addRequiredRangeCheckedParam (const std::string &name, const std::string &parsed_function, const std::string &doc_string)
 These methods add an range checked parameters. More...
 
template<typename T >
void addRangeCheckedParam (const std::string &name, const T &value, const std::string &parsed_function, const std::string &doc_string)
 
template<typename T >
void addRangeCheckedParam (const std::string &name, const std::string &parsed_function, const std::string &doc_string)
 
void addCoupledVarWithAutoBuild (const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
 These methods add a coupled variable name pair. More...
 
void addRequiredCoupledVarWithAutoBuild (const std::string &name, const std::string &base_name, const std::string &num_name, const std::string &doc_string)
 
void collapseSyntaxNesting (bool collapse)
 Mutators for controlling whether or not the outermost level of syntax will be collapsed when printed. More...
 
bool collapseSyntaxNesting () const
 
void mooseObjectSyntaxVisibility (bool visibility)
 Mutators for controlling whether or not the outermost level of syntax will be collapsed when printed. More...
 
bool mooseObjectSyntaxVisibility () const
 
InputParametersoperator= (const InputParameters &rhs)
 
InputParametersoperator+= (const InputParameters &rhs)
 
std::string & blockLocation ()
 Get/set a string representing the location (i.e. More...
 
const std::string & blockLocation () const
 
std::string & blockFullpath ()
 Get/set a string representing the full HIT parameter path from the input file (e.g. More...
 
const std::string & blockFullpath () const
 
const std::string & inputLocation (const std::string &param) const
 Get/set a string representing the location in the input text the parameter originated from (i.e. More...
 
std::string & inputLocation (const std::string &param)
 
const std::string & paramFullpath (const std::string &param) const
 Get/set a string representing the full HIT parameter path from the input file (e.g. More...
 
std::string & paramFullpath (const std::string &param)
 

Static Public Member Functions

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

Private Member Functions

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

Static Private Member Functions

static void callMooseErrorHelper (const MooseObject &object, const std::string &error)
 

Private Attributes

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

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

Constructor & Destructor Documentation

◆ InputParameters() [1/3]

InputParameters::InputParameters ( const InputParameters rhs)

Definition at line 43 of file InputParameters.C.

44  : Parameters(), _show_deprecated_message(true), _allow_copy(true)
45 {
46  *this = rhs;
47 }
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 49 of file InputParameters.C.

51 {
52  _params.clear();
54  _collapse_nesting = false;
56 }
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 34 of file InputParameters.C.

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

Member Function Documentation

◆ addClassDescription()

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

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

Definition at line 76 of file InputParameters.C.

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

77 {
78  _class_description = doc_string;
79 }
std::string _class_description
The class description for the owning object.

◆ addCommandLineParam() [1/2]

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

Definition at line 1607 of file InputParameters.h.

Referenced by MooseApp::addAppParam(), Moose::addMainCommandLineParams(), and MooseApp::validParams().

1610 {
1611  addParam<T>(name, doc_string);
1612  addCommandLineParamHelper<T>(name, syntax);
1613 }
std::string name(const ElemQuality q)

◆ addCommandLineParam() [2/2]

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

Definition at line 1617 of file InputParameters.h.

1621 {
1622  addParam<T>(name, value, doc_string);
1623  addCommandLineParamHelper<T>(name, syntax);
1624 }
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 
)
private

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

Definition at line 1480 of file InputParameters.h.

1481 {
1482  auto & cl_data = at(name)._cl_data;
1483  cl_data = CommandLineMetadata();
1484  MooseUtils::tokenize(syntax, cl_data->syntax, 1, " \t\n\v\f\r");
1485  if constexpr (std::is_same_v<T, bool>)
1486  cl_data->argument_type = CommandLineMetadata::ArgumentType::NONE;
1487  else if constexpr (std::is_same_v<T, MooseEnum>)
1488  cl_data->argument_type = CommandLineMetadata::ArgumentType::REQUIRED;
1489  else
1490  cl_data->argument_type = CommandLineMetadata::ArgumentType::OPTIONAL;
1491 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:779
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)

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

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

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

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

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

Referenced by addRequiredCoupledVarWithAutoBuild().

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

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

1540 {
1541  addParam<T>(name, value, doc_string);
1542  _params[name]._custom_type = custom_type;
1543 }
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 1547 of file InputParameters.h.

1550 {
1551  addParam<T>(name, doc_string);
1552  _params[name]._custom_type = custom_type;
1553 }
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 259 of file InputParameters.C.

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

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

1561 {
1562  _show_deprecated_message = false;
1563  addParam<T>(name, doc_string);
1564  auto & metadata = _params[name];
1565  metadata._custom_type = custom_type;
1566 
1567  metadata._deprecation_message = deprecation_message;
1568  _show_deprecated_message = true;
1569 }
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 1698 of file InputParameters.h.

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

1702 {
1703  _show_deprecated_message = false;
1704  addParam<T>(name, value, doc_string);
1705 
1706  _params[name]._deprecation_message = deprecation_message;
1707  _show_deprecated_message = true;
1708 }
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.

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

1715 {
1716  _show_deprecated_message = false;
1717  addParam<T>(name, doc_string);
1718 
1719  _params[name]._deprecation_message = deprecation_message;
1720  _show_deprecated_message = true;
1721 }
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() [3/6]

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

Definition at line 1078 of file InputParameters.C.

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

◆ addDeprecatedParam() [4/6]

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

Definition at line 1088 of file InputParameters.C.

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

◆ addDeprecatedParam() [5/6]

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

◆ addDeprecatedParam() [6/6]

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

◆ addParam() [1/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 option parameter and a documentation string to the InputParameters object.

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

Definition at line 1436 of file InputParameters.h.

Referenced by addDeprecatedCoupledVar(), ConstantReporter::addReporterTypeParams(), MultiAppTransfer::addSkipCoordCollapsingParam(), AdvancedOutput::addValidParams(), Moose::commonAdaptivityParams(), Moose::PetscSupport::getPetscValidParams(), Moose::SlepcSupport::getSlepcEigenProblemValidParams(), FVDiffusionInterface::validParams(), FVOneVarDiffusionInterface::validParams(), ArrayVariableComponent::validParams(), ValueRangeMarker::validParams(), ValueThresholdMarker::validParams(), ConstantVectorPostprocessor::validParams(), FileMesh::validParams(), TiledMesh::validParams(), ArrayVarReductionAux::validParams(), InversePowerMethod::validParams(), NonlinearEigen::validParams(), ADRobinBC::validParams(), ADVectorRobinBC::validParams(), CopyNodalVarsAction::validParams(), ArrayNeumannBC::validParams(), ArrayHFEMDirichletBC::validParams(), PenaltyDirichletNodalKernel::validParams(), ArrayPenaltyDirichletBC::validParams(), ArrayVacuumBC::validParams(), CreateExecutionerAction::validParams(), ElementIntegerAux::validParams(), HFEMDirichletBC::validParams(), FVFunctorTimeKernel::validParams(), FVMatAdvection::validParams(), FVReaction::validParams(), NumElems::validParams(), NumRelationshipManagers::validParams(), NumVars::validParams(), PerfGraphData::validParams(), Residual::validParams(), VectorPostprocessorReductionValue::validParams(), EqualValueBoundaryConstraint::validParams(), ArrayTimeDerivative::validParams(), ElementStatistics::validParams(), NodalStatistics::validParams(), MassEigenKernel::validParams(), DynamicObjectRegistrationAction::validParams(), ReadExecutorParamsAction::validParams(), TimeDerivative::validParams(), VectorTimeDerivative::validParams(), ErrorFractionMarker::validParams(), ErrorToleranceMarker::validParams(), DerivativeSumMaterialTempl< is_ad >::validParams(), ThresholdElementSubdomainModifier::validParams(), CreateProblemAction::validParams(), JSONOutput::validParams(), AddFieldSplitAction::validParams(), ExtremeValueBase< SideVariablePostprocessor >::validParams(), ExtraIDIntegralReporter::validParams(), CoefReactionTempl< is_ad >::validParams(), ActivateElementsByPath::validParams(), ActivateElementsCoupled::validParams(), CSVReaderVectorPostprocessor::validParams(), Eigenvalues::validParams(), FEProblemSolve::validParams(), SetupMeshAction::validParams(), UniqueExtraIDMeshGenerator::validParams(), GapValueAux::validParams(), MooseObjectAction::validParams(), TimeExtremeValue::validParams(), AdaptivityAction::validParams(), ActivateElementsUserObjectBase::validParams(), PenetrationAux::validParams(), ElementQualityChecker::validParams(), ElementSubdomainModifier::validParams(), ProjectionAux::validParams(), ConditionalEnableControl::validParams(), SetupDebugAction::validParams(), SecondTimeDerivativeAux::validParams(), SidesetInfoVectorPostprocessor::validParams(), TimeDerivativeAux::validParams(), ArrayDGDiffusion::validParams(), AnnularMesh::validParams(), GeneratedMesh::validParams(), SpiralAnnularMesh::validParams(), RinglebMesh::validParams(), AddMetaDataGenerator::validParams(), BlockDeletionGenerator::validParams(), BreakBoundaryOnSubdomainGenerator::validParams(), BreakMeshByBlockGeneratorBase::validParams(), CoarsenBlockGenerator::validParams(), ElementGenerator::validParams(), ExtraNodesetGenerator::validParams(), FileMeshGenerator::validParams(), FillBetweenCurvesGenerator::validParams(), FillBetweenPointVectorsGenerator::validParams(), FillBetweenSidesetsGenerator::validParams(), AdvectiveFluxAux::validParams(), LowerDBlockFromSidesetGenerator::validParams(), ConstantFunction::validParams(), MoveNodeGenerator::validParams(), PiecewiseConstant::validParams(), PlaneIDMeshGenerator::validParams(), RefineBlockGenerator::validParams(), RefineSidesetGenerator::validParams(), RenameBlockGenerator::validParams(), RenameBoundaryGenerator::validParams(), RinglebMeshGenerator::validParams(), SideSetsFromNormalsGenerator::validParams(), SmoothMeshGenerator::validParams(), SphereMeshGenerator::validParams(), SpiralAnnularMeshGenerator::validParams(), ConstantAux::validParams(), SubdomainPerElementGenerator::validParams(), TiledMeshGenerator::validParams(), CoupledForceNodalKernel::validParams(), LowerBoundNodalKernel::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), ReactionNodalKernel::validParams(), UpperBoundNodalKernel::validParams(), DeprecatedBlockAction::validParams(), DirichletBCBase::validParams(), FVCoupledForce::validParams(), FunctorDirichletBC::validParams(), FunctorNeumannBC::validParams(), ElementExtremeFunctorValueTempl< is_ad >::validParams(), ConstantPostprocessor::validParams(), InterfaceDiffusion::validParams(), ScalarVariable::validParams(), ScalePostprocessor::validParams(), TimeIntegratedPostprocessor::validParams(), SingleMatrixPreconditioner::validParams(), RestartableDataReporter::validParams(), NullScalarKernel::validParams(), BoundsBase::validParams(), CoefTimeDerivative::validParams(), DivField::validParams(), TimeIntervalTimes::validParams(), GradField::validParams(), FunctionDiffusion::validParams(), MultiAppCloneReporterTransfer::validParams(), MultiAppReporterTransfer::validParams(), NullKernel::validParams(), ElemSideNeighborLayersTester::validParams(), GeometrySphere::validParams(), BoundaryMarker::validParams(), PIDTransientControl::validParams(), MultiAppConservativeTransfer::validParams(), SpatialAverageBase::validParams(), SpatialUserObjectVectorPostprocessor::validParams(), MaterialFunctorConverterTempl< T >::validParams(), ParsedMaterialBase::validParams(), ADDGAdvection::validParams(), ConcentricCircleMesh::validParams(), MaxIncrement::validParams(), ImageMesh::validParams(), MeshGeneratorMesh::validParams(), SetupResidualDebugAction::validParams(), FunctorBinnedValuesDivision::validParams(), ArrayParsedAux::validParams(), AnnularMeshGenerator::validParams(), VariableGradientComponent::validParams(), BreakMeshByBlockGenerator::validParams(), VectorPostprocessorVisualizationAux::validParams(), CartesianMeshGenerator::validParams(), VectorVariableComponentAux::validParams(), ConcentricCircleMeshGenerator::validParams(), CutMeshByPlaneGenerator::validParams(), GeneratedMeshGenerator::validParams(), MeshDiagnosticsGenerator::validParams(), MeshRepairGenerator::validParams(), ParsedSubdomainMeshGenerator::validParams(), PatchMeshGenerator::validParams(), PolyLineMeshGenerator::validParams(), PiecewiseLinear::validParams(), SideSetExtruderGenerator::validParams(), DivergenceAuxTempl< is_ad >::validParams(), SideSetsBetweenSubdomainsGenerator::validParams(), SplineFunction::validParams(), FunctorADConverterTempl< T >::validParams(), FunctorSmootherTempl< T >::validParams(), TransformGenerator::validParams(), Receiver::validParams(), FVBoundaryScalarLagrangeMultiplierConstraint::validParams(), Console::validParams(), ControlOutput::validParams(), GMVOutput::validParams(), FunctorAux::validParams(), PerfGraphOutput::validParams(), FVAnisotropicDiffusion::validParams(), Tecplot::validParams(), VTKOutput::validParams(), DiffusionCG::validParams(), DiffusionFV::validParams(), FVMassMatrix::validParams(), MultiAppPositions::validParams(), TransformedPositions::validParams(), MatchedValueBCTempl< is_ad >::validParams(), ChangeOverFixedPointPostprocessor::validParams(), ChangeOverTimePostprocessor::validParams(), FVScalarLagrangeMultiplierConstraint::validParams(), GhostingAux::validParams(), InterfaceValueUserObjectAux::validParams(), NumNonlinearIterations::validParams(), ParsedPostprocessor::validParams(), MaterialRealTensorValueAux::validParams(), PseudoTimestep::validParams(), MaterialRealDenseMatrixAux::validParams(), PenaltyInterfaceDiffusionTempl< T, is_ad >::validParams(), MaterialStdVectorAuxTempl< is_ad >::validParams(), FiniteDifferencePreconditioner::validParams(), ADConservativeAdvection::validParams(), MaterialStdVectorRealGradientAux::validParams(), IterationInfo::validParams(), ParsedODEKernel::validParams(), ActuallyExplicitEuler::validParams(), NewmarkBeta::validParams(), CSVFileTimes::validParams(), Times::validParams(), ConservativeAdvection::validParams(), FunctionDT::validParams(), PostprocessorDT::validParams(), TimeSequenceStepperBase::validParams(), EqualValueConstraint::validParams(), ReactionTempl< is_ad >::validParams(), ParsedAux::validParams(), NodalConstraint::validParams(), GeometryBase::validParams(), InterfaceValueUserObject::validParams(), ParsedVectorAux::validParams(), QuadraturePointMarker::validParams(), InterfaceQpMaterialPropertyBaseUserObject< Real >::validParams(), TiedValueConstraint::validParams(), BoundingValueElementDamper::validParams(), ScalarTagMatrixAux::validParams(), LeastSquaresFit::validParams(), MaterialVectorPostprocessor::validParams(), PositionsFunctorValueSampler::validParams(), ScalarTagVectorAux::validParams(), BoundingValueNodalDamper::validParams(), WorkBalance::validParams(), CoupledForceTempl< is_ad >::validParams(), FunctorTimes::validParams(), TagMatrixAux::validParams(), CartesianGridDivision::validParams(), CylindricalGridDivision::validParams(), SphericalGridDivision::validParams(), AdvancedExtruderGenerator::validParams(), VariableTimeIntegrationAux::validParams(), BreakMeshByElementGenerator::validParams(), CircularBoundaryCorrectionGenerator::validParams(), CombinerGenerator::validParams(), BicubicSplineFunction::validParams(), CompositeFunction::validParams(), ImageMeshGenerator::validParams(), MeshExtruderGenerator::validParams(), ParsedCurveGenerator::validParams(), ADFunctionDirichletBC::validParams(), SideSetsFromBoundingBoxGenerator::validParams(), ADVectorFunctionDirichletBC::validParams(), ADVectorFunctionNeumannBC::validParams(), StackGenerator::validParams(), StitchBoundaryMeshGenerator::validParams(), StitchedMeshGenerator::validParams(), CreateDisplacedProblemAction::validParams(), ParsedFunctorMaterialTempl< is_ad >::validParams(), VectorMagnitudeFunctorMaterialTempl< is_ad >::validParams(), FullSolveMultiApp::validParams(), FVNeumannBC::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), MaterialStdVectorAuxBaseTempl< Real, is_ad >::validParams(), FunctionGradientNeumannBC::validParams(), MultiAppShapeEvaluationTransfer::validParams(), FunctorVectorElementalAuxTempl< is_ad >::validParams(), ElementGroupCentroidPositions::validParams(), Positions::validParams(), NeumannBCTempl< is_ad >::validParams(), FunctionSideIntegral::validParams(), MemoryUsage::validParams(), VectorCurlPenaltyDirichletBC::validParams(), VectorDivPenaltyDirichletBC::validParams(), VectorFunctionDirichletBC::validParams(), MaterialDerivativeTestAction::validParams(), ReferenceResidualProblem::validParams(), VectorPenaltyDirichletBC::validParams(), ADMatCoupledForce::validParams(), ADMatReaction::validParams(), MeshDivisionAux::validParams(), ScalarKernelBase::validParams(), VariableValueVolumeHistogram::validParams(), CoupledTiedValueConstraint::validParams(), SetAdaptivityOptionsAction::validParams(), EqualValueEmbeddedConstraint::validParams(), NormalizationAux::validParams(), Constraint::validParams(), VectorFunctionReaction::validParams(), SolutionTimeAdaptiveDT::validParams(), MultiAppVariableValueSamplePostprocessorTransfer::validParams(), CoupledValueFunctionMaterialTempl< is_ad >::validParams(), VectorMemoryUsage::validParams(), LeastSquaresFitHistory::validParams(), PointVariableSamplerBase::validParams(), FVOrthogonalDiffusion::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), SetupQuadratureAction::validParams(), MultiAppPostprocessorInterpolationTransfer::validParams(), MaterialAuxBaseTempl< RealVectorValue, is_ad >::validParams(), CreateApplicationBlockAction::validParams(), CoarsenedPiecewiseLinear::validParams(), OrientedSubdomainBoundingBoxGenerator::validParams(), ParsedNodeTransformGenerator::validParams(), PiecewiseLinearFromVectorPostprocessor::validParams(), PiecewiseTabularBase::validParams(), GenericFunctorMaterialTempl< is_ad >::validParams(), GenericVectorFunctorMaterialTempl< is_ad >::validParams(), XYDelaunayGenerator::validParams(), XYMeshLineCutter::validParams(), FVFunctorNeumannBC::validParams(), CSV::validParams(), DOFMapOutput::validParams(), FileOutput::validParams(), Gnuplot::validParams(), SolutionHistory::validParams(), SingleRankPartitioner::validParams(), GenericFunctorGradientMaterialTempl< is_ad >::validParams(), DisplayGhostingAction::validParams(), GreaterThanLessThanPostprocessor::validParams(), MatCoupledForce::validParams(), MaterialPropertyValueTempl< is_ad >::validParams(), MultiAppPostprocessorTransfer::validParams(), PointwiseRenormalizeVector::validParams(), PointSamplerBase::validParams(), ADPiecewiseLinearInterpolationMaterial::validParams(), NodalScalarKernel::validParams(), RandomPartitioner::validParams(), ReporterPointSource::validParams(), FixedPointSolve::validParams(), FVBodyForce::validParams(), ElementDeletionGeneratorBase::validParams(), ADConservativeAdvectionBC::validParams(), ParsedGenerateSideset::validParams(), MaterialADConverterTempl< T >::validParams(), LinearNodalConstraint::validParams(), FVFunctionNeumannBC::validParams(), ElementUOAux::validParams(), NumDOFs::validParams(), IntegratedBCBase::validParams(), ElementIntegralFunctorPostprocessorTempl< is_ad >::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), EigenProblem::validParams(), VectorNeumannBC::validParams(), FunctionValuePostprocessor::validParams(), ADKernelSUPGTempl< T >::validParams(), TagAuxBase< AuxKernel >::validParams(), ElementVectorL2Error::validParams(), ElemElemConstraint::validParams(), VectorBodyForce::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), MortarNodalAuxKernelTempl< ComputeValueType >::validParams(), SolutionAux::validParams(), DiffusionPhysicsBase::validParams(), SolutionScalarAux::validParams(), PetscExternalPartitioner::validParams(), MultiAppDofCopyTransfer::validParams(), SideSetsAroundSubdomainGenerator::validParams(), DerivativeKernelInterface< T >::validParams(), TimePeriod::validParams(), TimeStepper::validParams(), TransfiniteMeshGenerator::validParams(), FindValueOnLine::validParams(), PostprocessorNeumannBC::validParams(), InterfaceQpUserObjectBase::validParams(), ElementIntegralArrayVariablePostprocessor::validParams(), BoundingBoxIC::validParams(), MatReaction::validParams(), LibtorchControlValuePostprocessor::validParams(), StitchedMesh::validParams(), ADMortarScalarBase::validParams(), ElementVariablesDifferenceMax::validParams(), CSVTimeSequenceStepper::validParams(), FVOrthogonalBoundaryDiffusion::validParams(), TransientMultiApp::validParams(), CoupledVarNeumannBCTempl< false >::validParams(), FieldSplitPreconditioner::validParams(), KernelScalarBase::validParams(), SideIntegralFunctorPostprocessorTempl< is_ad >::validParams(), ElementSideNeighborLayers::validParams(), EigenKernel::validParams(), MultiAppProjectionTransfer::validParams(), ADKernelScalarBase::validParams(), MortarScalarBase::validParams(), PhysicsBase::validParams(), LibmeshPartitioner::validParams(), DGDiffusion::validParams(), MeshInfo::validParams(), ADDirichletBCBase::validParams(), Exodus::validParams(), MooseParsedVectorFunction::validParams(), ADMatDiffusionBase< Real >::validParams(), PiecewiseMulticonstant::validParams(), ADDGDiffusion::validParams(), PNGOutput::validParams(), FVDiffusion::validParams(), VariableResidualNormsDebugOutput::validParams(), MultiAppNearestNodeTransfer::validParams(), VacuumBC::validParams(), InterfaceIntegralVariableValuePostprocessor::validParams(), LinearCombinationPostprocessor::validParams(), PiecewiseMultilinear::validParams(), BodyForceTempl< is_ad >::validParams(), CommonOutputAction::validParams(), LibtorchNeuralNetControl::validParams(), Split::validParams(), ExplicitTimeIntegrator::validParams(), ParsedElementDeletionGenerator::validParams(), PatternedMeshGenerator::validParams(), AddPeriodicBCAction::validParams(), AdamsPredictor::validParams(), SubdomainBoundingBoxGenerator::validParams(), MaterialRealVectorValueAuxTempl< is_ad >::validParams(), NodalVariableValue::validParams(), NodalPatchRecovery::validParams(), FunctionIC::validParams(), EigenExecutionerBase::validParams(), InterfaceDiffusiveFluxIntegralTempl< is_ad >::validParams(), SetupInterface::validParams(), DistributedRectilinearMeshGenerator::validParams(), GhostingUserObject::validParams(), RelationshipManager::validParams(), SinNeumannBC::validParams(), FVFunctionIC::validParams(), MatDiffusionBase< Real >::validParams(), NodalNormalsPreprocessor::validParams(), PiecewiseMultiInterpolation::validParams(), ADDirichletBCBaseTempl< Real >::validParams(), SideAdvectiveFluxIntegralTempl< is_ad >::validParams(), MooseParsedGradFunction::validParams(), Axisymmetric2D3DSolutionFunction::validParams(), Damper::validParams(), SideDiffusiveFluxIntegralTempl< is_ad, Real >::validParams(), BoundingBoxNodeSetGenerator::validParams(), NodalBCBase::validParams(), VectorConstantIC::validParams(), SideSetsGeneratorBase::validParams(), PropertyReadFile::validParams(), AddNodalNormalsAction::validParams(), VectorFunctionIC::validParams(), ComparisonPostprocessor::validParams(), TableOutput::validParams(), GenericFunctionMaterialTempl< is_ad >::validParams(), InterfaceKernelBase::validParams(), Predictor::validParams(), GenericFunctionVectorMaterialTempl< is_ad >::validParams(), MultiAppUserObjectTransfer::validParams(), DGFunctionDiffusionDirichletBC::validParams(), MultiAppGeometricInterpolationTransfer::validParams(), ProjectedStatefulMaterialStorageAction::validParams(), ADNodalBCTempl< RealVectorValue, ADDirichletBCBase >::validParams(), PatternedMesh::validParams(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::validParams(), DiracKernelBase::validParams(), GridPartitioner::validParams(), AB2PredictorCorrector::validParams(), SolutionUserObject::validParams(), PenaltyPeriodicSegmentalConstraint::validParams(), ElementIndicator::validParams(), ADPenaltyPeriodicSegmentalConstraint::validParams(), MultiAppTransfer::validParams(), FVKernel::validParams(), NodalUserObject::validParams(), IterationAdaptiveDT::validParams(), TransientInterface::validParams(), NodalKernelBase::validParams(), Transient::validParams(), BoundaryCondition::validParams(), VariableCondensationPreconditioner::validParams(), VectorPostprocessor::validParams(), FunctionMaterialBase< is_ad >::validParams(), Steady::validParams(), FileRangeBuilder::validParams(), Material::validParams(), ADPenaltyDirichletBC::validParams(), Indicator::validParams(), NodeFaceConstraint::validParams(), PenaltyDirichletBC::validParams(), FVFluxKernel::validParams(), MoosePreconditioner::validParams(), RandomInterface::validParams(), InternalSideIndicator::validParams(), Eigenvalue::validParams(), LayeredBase::validParams(), MooseObject::validParams(), RandomIC::validParams(), MultiAppGeneralFieldTransfer::validParams(), TaggingInterface::validParams(), MortarConsumerInterface::validParams(), DerivativeParsedMaterialHelperTempl< is_ad >::validParams(), OversampleOutput::validParams(), RandomICBase::validParams(), MooseVariableBase::validParams(), AuxScalarKernel::validParams(), Terminator::validParams(), PetscOutput::validParams(), ShapeUserObject< SideUserObject >::validParams(), MooseParsedFunctionBase::validParams(), BoundaryRestrictable::validParams(), Transfer::validParams(), DGKernelBase::validParams(), OutputInterface::validParams(), Control::validParams(), NestedSolveTempl< is_ad >::validParams(), MeshGenerator::validParams(), Action::validParams(), ScalarInitialCondition::validParams(), MortarConstraintBase::validParams(), PiecewiseBilinear::validParams(), Executioner::validParams(), DomainUserObject::validParams(), AStableDirk4::validParams(), Output::validParams(), MeshBaseImageSampler::validParams(), UserObject::validParams(), FunctionParserUtils< false >::validParams(), Sampler::validParams(), ImageSampler::validParams(), InitialConditionBase::validParams(), ParsedMaterialHelper< is_ad >::validParams(), Checkpoint::validParams(), FVBoundaryCondition::validParams(), FVInterfaceKernel::validParams(), Moose::Builder::validParams(), BlockRestrictable::validParams(), MaterialPropertyInterface::validParams(), AuxKernelTempl< Real >::validParams(), TopResidualDebugOutput::validParams(), SubProblem::validParams(), MaterialBase::validParams(), MooseApp::validParams(), MooseMesh::validParams(), MultiApp::validParams(), Executor::validParams(), and FEProblemBase::validParams().

1437 {
1438  checkParamName(name);
1439  checkConsistentType<T>(name);
1440 
1441  T & l_value = InputParameters::set<T>(name);
1442  auto & metadata = _params[name];
1443  if (std::is_same_v<T, MooseFunctorName>)
1444  metadata._doc_string = appendFunctorDescription(doc_string);
1445  else
1446  metadata._doc_string = doc_string;
1447 
1448  // Set the parameter now
1449  setParamHelper(name, l_value, value);
1450 
1451  /* Indicate the default value, as set via addParam, is being used. The parameter is removed from
1452  the list whenever
1453  it changes, see set_attributes */
1454  metadata._set_by_add_param = true;
1455 }
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 appendFunctorDescription(const std::string &doc_string) const
Appends description of what a functor is to a doc string.
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 1459 of file InputParameters.h.

1460 {
1461  checkParamName(name);
1462  checkConsistentType<T>(name);
1463 
1464  InputParameters::insert<T>(name);
1465  if (std::is_same_v<T, MooseFunctorName>)
1466  _params[name]._doc_string = appendFunctorDescription(doc_string);
1467  else
1468  _params[name]._doc_string = doc_string;
1469 }
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 appendFunctorDescription(const std::string &doc_string) const
Appends description of what a functor is to a doc string.
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 186 of file InputParameters.h.

189  {
190  addParam<T>(name, T{value}, doc_string);
191  }
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 1035 of file InputParameters.C.

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

◆ addParam() [5/7]

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

Definition at line 1044 of file InputParameters.C.

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

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

Referenced by MultiAppTransfer::addSkipCoordCollapsingParam(), AdvancedOutput::addValidParams(), Moose::PetscSupport::getPetscValidParams(), Moose::SlepcSupport::getSlepcEigenProblemValidParams(), CopyNodalVarsAction::validParams(), NodalPatchRecoveryBase::validParams(), DerivativeSumMaterialTempl< is_ad >::validParams(), MooseObjectAction::validParams(), SetupMeshAction::validParams(), GeneratedMesh::validParams(), MaterialStdVectorAuxTempl< is_ad >::validParams(), MultiAppConservativeTransfer::validParams(), Times::validParams(), Console::validParams(), GMVOutput::validParams(), Tecplot::validParams(), VTKOutput::validParams(), DiffusionFV::validParams(), AdvancedExtruderGenerator::validParams(), SetAdaptivityOptionsAction::validParams(), Constraint::validParams(), Positions::validParams(), ScalarKernelBase::validParams(), LeastSquaresFitHistory::validParams(), PiecewiseTabularBase::validParams(), CSV::validParams(), FileOutput::validParams(), FixedPointSolve::validParams(), IntegratedBCBase::validParams(), TransfiniteMeshGenerator::validParams(), DiffusionPhysicsBase::validParams(), TransientMultiApp::validParams(), Exodus::validParams(), PhysicsBase::validParams(), NodalPatchRecovery::validParams(), Postprocessor::validParams(), EigenExecutionerBase::validParams(), NodalBCBase::validParams(), InterfaceKernelBase::validParams(), TableOutput::validParams(), DiracKernelBase::validParams(), NearestPointBase< LayeredSideDiffusiveFluxAverage, SideIntegralVariableUserObject >::validParams(), SolutionUserObject::validParams(), FVKernel::validParams(), TransientInterface::validParams(), NodalKernelBase::validParams(), Transient::validParams(), BoundaryCondition::validParams(), RadialAverage::validParams(), VectorPostprocessor::validParams(), Material::validParams(), Indicator::validParams(), RandomInterface::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryTempl< T, is_ad >::validParams(), FVFluxKernel::validParams(), LayeredBase::validParams(), Eigenvalue::validParams(), MultiAppGeneralFieldTransfer::validParams(), TaggingInterface::validParams(), OversampleOutput::validParams(), MooseObject::validParams(), AuxScalarKernel::validParams(), MooseVariableBase::validParams(), ShapeUserObject< SideUserObject >::validParams(), PetscOutput::validParams(), DGKernelBase::validParams(), OutputInterface::validParams(), MeshGenerator::validParams(), Executioner::validParams(), Output::validParams(), UserObject::validParams(), MeshBaseImageSampler::validParams(), FunctionParserUtils< false >::validParams(), ImageSampler::validParams(), InitialConditionBase::validParams(), FVBoundaryCondition::validParams(), FVInterfaceKernel::validParams(), AuxKernelTempl< Real >::validParams(), SubProblem::validParams(), MultiApp::validParams(), and FEProblemBase::validParams().

777 {
778  std::vector<std::string> elements;
779  MooseUtils::tokenize(space_delim_names, elements, 1, " \t\n\v\f\r"); // tokenize on whitespace
780 
781  // Since we don't require types (templates) for this method, we need
782  // to get a raw list of parameter names to compare against.
783  std::set<std::string> param_names;
784  for (const auto & it : *this)
785  param_names.insert(it.first);
786 
787  for (const auto & param_name : elements)
788  if (_params.count(param_name) > 0)
789  _params[param_name]._group = group_name;
790  else
791  mooseError("Unable to find a parameter with name: ",
792  param_name,
793  " when adding to group ",
794  group_name,
795  '.');
796 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:779
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 1584 of file InputParameters.h.

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

1585 {
1586  checkParamName(name);
1587  checkConsistentType<T>(name);
1588 
1589  InputParameters::set<T>(name) = value;
1590  auto & metadata = _params[name];
1591  metadata._is_private = true;
1592  metadata._set_by_add_param = true;
1593 }
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 1573 of file InputParameters.h.

1574 {
1575  checkParamName(name);
1576  checkConsistentType<T>(name);
1577 
1578  InputParameters::insert<T>(name);
1579  _params[name]._is_private = true;
1580 }
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 1062 of file InputParameters.C.

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

◆ addPrivateParam() [4/6]

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

Definition at line 1070 of file InputParameters.C.

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

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

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

1509 {
1510  addParam<T>(name, value, doc_string);
1511  _params[name]._range_function = parsed_function;
1512 }
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 1516 of file InputParameters.h.

1519 {
1520  addParam<T>(name, doc_string);
1521  _params[name]._range_function = parsed_function;
1522 }
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 487 of file InputParameters.C.

Referenced by NodalPatchRecoveryBase::validParams(), ProjectionAux::validParams(), ElemSideNeighborLayersTester::validParams(), ElemSideNeighborLayersGeomTester::validParams(), FVFunctorDirichletBCTempl< is_ad >::validParams(), ProjectedStatefulMaterialNodalPatchRecoveryBase::validParams(), GMVOutput::validParams(), Tecplot::validParams(), FunctorElementalGradientAuxTempl< is_ad >::validParams(), MultiAppProjectionTransfer::validParams(), Exodus::validParams(), DistributedRectilinearMeshGenerator::validParams(), InterfaceKernelBase::validParams(), InternalSideUserObject::validParams(), InterfaceUserObjectBase::validParams(), FVKernel::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().

491 {
492  _buildable_rm_types.emplace_back(name, rm_type, input_parameter_callback);
493 }
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 1597 of file InputParameters.h.

1600 {
1601  addRequiredParam<T>(name, doc_string);
1602  addCommandLineParamHelper<T>(name, syntax);
1603 }
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 313 of file InputParameters.C.

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

314 {
315  addRequiredParam<std::vector<VariableName>>(name, doc_string);
316  _coupled_vars.insert(name);
317 }
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 302 of file InputParameters.C.

306 {
307  addRequiredParam<std::vector<VariableName>>(name, doc_string);
308 
309  addCoupledVarWithAutoBuild(name, base_name, num_name, doc_string);
310 }
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 1526 of file InputParameters.h.

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

1529 {
1530  addRequiredParam<T>(name, doc_string);
1531  _params[name]._custom_type = custom_type;
1532 }
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 1410 of file InputParameters.h.

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

1411 {
1412  checkParamName(name);
1413  checkConsistentType<T>(name);
1414 
1415  InputParameters::insert<T>(name);
1416  auto & metadata = _params[name];
1417  metadata._required = true;
1418  if (std::is_same_v<T, MooseFunctorName>)
1419  metadata._doc_string = appendFunctorDescription(doc_string);
1420  else
1421  metadata._doc_string = doc_string;
1422 }
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 appendFunctorDescription(const std::string &doc_string) const
Appends description of what a functor is to a doc string.
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 1426 of file InputParameters.h.

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

◆ addRequiredParam() [3/6]

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

Definition at line 996 of file InputParameters.C.

999 {
1000  InputParameters::set<MooseEnum>(name) = moose_enum; // valid parameter is set by set_attributes
1001  auto & metadata = _params[name];
1002  metadata._required = true;
1003  metadata._doc_string = doc_string;
1004 }
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 1008 of file InputParameters.C.

1011 {
1012  InputParameters::set<MultiMooseEnum>(name) =
1013  moose_enum; // valid parameter is set by set_attributes
1014  auto & metadata = _params[name];
1015  metadata._required = true;
1016  metadata._doc_string = doc_string;
1017 }
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 1111 of file InputParameters.h.

Referenced by ActionWarehouse::printInputFile().

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

◆ appendFunctorDescription()

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

Referenced by addParam(), and addRequiredParam().

1109 {
1110  return MooseUtils::trim(doc_string, ". ") +
1111  ". A functor is any of the following: a variable, a functor material property, a "
1112  "function, a post-processor, or a number.";
1113 }
std::string trim(const std::string &str, const std::string &white_space=" \\\)
Standard scripting language trim function.
Definition: MooseUtils.C:214

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

Referenced by applyParameters(), and applySpecificParameters().

895 {
896  // Disable the display of deprecated message when applying common parameters, this avoids a dump
897  // of messages
898  _show_deprecated_message = false;
899 
900  // If the local parameters has a coupled variable, populate it with the value from the common
901  // parameters, if the common parameters has the coupled variable too
902  if (hasCoupledValue(var_name))
903  {
904  if (common.hasDefaultCoupledValue(var_name))
905  {
906  // prepare a vector of default coupled values
907  std::vector<Real> defaults(common.numberDefaultCoupledValues(var_name));
908  for (unsigned int j = 0; j < common.numberDefaultCoupledValues(var_name); ++j)
909  defaults[j] = common.defaultCoupledValue(var_name, j);
910  addCoupledVar(var_name, defaults, common.getDocString(var_name));
911  }
912  else if (common.hasCoupledValue(var_name))
913  addCoupledVar(var_name, common.getDocString(var_name));
914  }
915 
916  // Enable deprecated message printing
918 }
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 
)

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

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

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

Definition at line 921 of file InputParameters.C.

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

924 {
925  // Disable the display of deprecated message when applying common parameters, this avoids a dump
926  // of messages
927  _show_deprecated_message = false;
928 
929  const auto local_name = checkForRename(common_name);
930 
931  // Extract the properties from the local parameter for the current common parameter name
932  const bool local_exist = _values.find(local_name) != _values.end();
933  const bool local_set = _params.count(local_name) > 0 && !_params[local_name]._set_by_add_param;
934  const bool local_priv = allow_private ? false : isPrivate(local_name);
935  const bool local_valid = isParamValid(local_name);
936 
937  // Extract the properties from the common parameter
938  const bool common_exist = common._values.find(common_name) != common._values.end();
939  const bool common_priv = allow_private ? false : common.isPrivate(common_name);
940  const bool common_valid = common.isParamValid(common_name);
941 
942  /* In order to apply a common parameter 4 statements must be satisfied
943  * (1) A local parameter must exist with the same name as the common parameter
944  * (2) Common parameter must be valid and exist
945  * (3) Local parameter must be invalid OR not have been set from its default
946  * (4) Both cannot be private
947  */
948  if (local_exist && common_exist && common_valid && (!local_valid || !local_set) &&
949  (!common_priv || !local_priv))
950  {
951  remove(local_name);
952  _values[local_name] = common._values.find(common_name)->second->clone();
953  set_attributes(local_name, false);
954  _params[local_name]._set_by_add_param =
955  libmesh_map_find(common._params, common_name)._set_by_add_param;
956  }
957 
958  // Enable deprecated message printing
960 }
bool isPrivate(const std::string &name) const
Returns a Boolean indicating whether the specified parameter is private or not.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.
virtual void set_attributes(const std::string &name, bool inserted_only) override
Override from libMesh to set user-defined attributes on our parameter.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ applyParameters()

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

Method for applying common parameters.

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

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

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

See also
CommonOutputAction AddOutputAction

Definition at line 827 of file InputParameters.C.

Referenced by FEProblemBase::addOutput(), and ProjectedStatefulMaterialStorageAction::processProperty().

829 {
830  // Loop through the common parameters
831  for (const auto & it : common)
832  {
833  // Common parameter name
834  const std::string & common_name = it.first;
835  // Continue to next parameter, if the current is in list of excluded parameters
836  if (std::find(exclude.begin(), exclude.end(), common_name) != exclude.end())
837  continue;
838 
839  applyParameter(common, common_name);
840  }
841 
842  // Loop through the coupled variables
843  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
844  it != common.coupledVarsEnd();
845  ++it)
846  {
847  // Variable name
848  const std::string var_name = *it;
849 
850  // Continue to next variable, if the current is in list of excluded parameters
851  if (std::find(exclude.begin(), exclude.end(), var_name) != exclude.end())
852  continue;
853 
854  applyCoupledVar(common, var_name);
855  }
856 }
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)
Apply values from a single parameter in common, to a single parameter stored in this object...

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

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

862 {
863  // Loop through the common parameters
864  for (const auto & it : common)
865  {
866 
867  // Common parameter name
868  const std::string & common_name = it.first;
869 
870  // Continue to next parameter, if the current is not in list of included parameters
871  if (std::find(include.begin(), include.end(), common_name) == include.end())
872  continue;
873 
874  applyParameter(common, common_name, allow_private);
875  }
876 
877  // Loop through the coupled variables
878  for (std::set<std::string>::const_iterator it = common.coupledVarsBegin();
879  it != common.coupledVarsEnd();
880  ++it)
881  {
882  // Variable name
883  const std::string var_name = *it;
884 
885  // Continue to next variable, if the current is not in list of included parameters
886  if (std::find(include.begin(), include.end(), var_name) == include.end())
887  continue;
888 
889  applyCoupledVar(common, var_name);
890  }
891 }
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)
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 405 of file InputParameters.C.

Referenced by ActionWarehouse::buildBuildableActions().

406 {
407  for (const auto & it : *this)
408  if (isParamRequired(it.first) && !isParamValid(it.first))
409  return false;
410  return true;
411 }
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 1087 of file InputParameters.h.

Referenced by addCommandLineParamHelper(), getCommandLineMetadata(), getControllableExecuteOnTypes(), inputLocation(), isCommandLineParameter(), and paramFullpath().

1088  {
1089  const auto param = checkForRename(param_name);
1090  if (_params.count(param) == 0)
1091  mooseError("param '", param, "' not present in InputParams");
1092  return _params[param];
1093  }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 1094 of file InputParameters.h.

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

◆ attemptPrintDeprecated()

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

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

Definition at line 104 of file InputParameters.C.

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

◆ blockFullpath() [1/2]

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

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

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

Definition at line 858 of file InputParameters.h.

Referenced by AddFVICAction::act(), AddICAction::act(), AddAuxKernelAction::act(), checkParams(), MooseBaseParameterInterface::getRenamedParam(), MooseApp::getRenamedParam(), MooseObjectAction::MooseObjectAction(), and Moose::Builder::walkRaw().

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

◆ blockFullpath() [2/2]

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

Definition at line 859 of file InputParameters.h.

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

◆ blockLocation() [1/2]

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

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

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

Definition at line 849 of file InputParameters.h.

Referenced by checkParams(), and Moose::Builder::walkRaw().

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

◆ blockLocation() [2/2]

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

Definition at line 850 of file InputParameters.h.

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

◆ callMooseErrorHelper()

void InputParameters::callMooseErrorHelper ( const MooseObject object,
const std::string &  error 
)
staticprivate

Definition at line 1454 of file InputParameters.C.

Referenced by getParamHelper().

1455 {
1456  object.mooseError(error);
1457 }

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

1629 {
1630  const auto name = checkForRename(name_in);
1631 
1632  // If we don't currently have the Parameter, can't be any inconsistency
1633  InputParameters::const_iterator it = _values.find(name);
1634  if (it == _values.end())
1635  return;
1636 
1637  // Now, if we already have the Parameter, but it doesn't have the
1638  // right type, throw an error.
1639  if (!this->Parameters::have_parameter<T>(name))
1640  mooseError("Attempting to set parameter \"",
1641  name,
1642  "\" with type (",
1643  demangle(typeid(T).name()),
1644  ")\nbut the parameter already exists as type (",
1645  it->second->type(),
1646  ")");
1647 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::string demangle(const char *name)
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

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

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

1433 {
1434  if (auto it = _old_to_new_name_and_dep.find(name); it != _old_to_new_name_and_dep.end())
1435  return it->second.first;
1436  else
1437  return name;
1438 }
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 1252 of file InputParameters.C.

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

1253 {
1254  const static pcrecpp::RE valid("[\\w:/]+");
1255  if (!valid.FullMatch(name))
1256  mooseError("Invalid parameter name: '", name, "'");
1257 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 553 of file InputParameters.C.

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

554 {
555  std::string parampath = blockFullpath() != "" ? blockFullpath() : parsing_syntax;
556  std::ostringstream oss;
557  // Required parameters
558  for (const auto & it : *this)
559  {
560  const auto param_name = checkForRename(it.first);
561  if (!isParamValid(param_name) && isParamRequired(param_name))
562  {
563  // check if an old, deprecated name exists for this parameter that may be specified
564  auto oit = _new_to_deprecated_coupled_vars.find(param_name);
565  if (oit != _new_to_deprecated_coupled_vars.end() && isParamValid(oit->second))
566  continue;
567 
568  oss << blockLocation() << ": missing required parameter '" << parampath + "/" + param_name
569  << "'\n";
570  oss << "\tDoc String: \"" + getDocString(param_name) + "\"" << std::endl;
571  }
572  }
573 
574  // Range checked parameters
575  for (const auto & it : *this)
576  {
577  std::string long_name(parampath + "/" + it.first);
578 
579  dynamicCastRangeCheck(Real, Real, long_name, it.first, it.second, oss);
580  dynamicCastRangeCheck(int, long, long_name, it.first, it.second, oss);
581  dynamicCastRangeCheck(long, long, long_name, it.first, it.second, oss);
582  dynamicCastRangeCheck(unsigned int, long, long_name, it.first, it.second, oss);
583  }
584 
585  // Controllable parameters
586  for (const auto & param_name : getControllableParameters())
587  {
588  if (isPrivate(param_name))
589  oss << inputLocation(param_name) << ": private parameter '" << paramFullpath(param_name)
590  << "' marked controllable";
591 
592  checkMooseType(NonlinearVariableName, param_name);
593  checkMooseType(AuxVariableName, param_name);
594  checkMooseType(VariableName, param_name);
595  checkMooseType(BoundaryName, param_name);
596  checkMooseType(SubdomainName, param_name);
597  checkMooseType(PostprocessorName, param_name);
598  checkMooseType(VectorPostprocessorName, param_name);
599  checkMooseType(UserObjectName, param_name);
600  checkMooseType(MaterialPropertyName, param_name);
601  }
602 
603  if (!oss.str().empty())
604  mooseError(oss.str());
605 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
bool isPrivate(const std::string &name) const
Returns a Boolean indicating whether the specified parameter is private or not.
std::string getDocString(const std::string &name) const
Returns the documentation string for the specified parameter name.
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
std::string & blockFullpath()
Get/set a string representing the full HIT parameter path from the input file (e.g.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
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 & blockLocation()
Get/set a string representing the location (i.e.
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ clear()

void InputParameters::clear ( )
overridevirtual

Definition at line 59 of file InputParameters.C.

60 {
61  Parameters::clear();
62  _params.clear();
63  _coupled_vars.clear();
65  _collapse_nesting = false;
68  _allow_copy = true;
69  _block_fullpath = "";
70  _block_location = "";
72  _new_to_old_names.clear();
73 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
bool _allow_copy
A flag for toggling the error message in the copy constructor.
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.
bool _show_deprecated_message
Flag for disabling deprecated parameters message, this is used by applyParameters to avoid dumping me...
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
std::set< std::string > _coupled_vars
The coupled variables set.
bool _moose_object_syntax_visibility
This parameter hides derived MOOSE object types from appearing in syntax dumps.
std::map< std::string, Metadata > _params
The actual parameter data.
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 581 of file InputParameters.h.

Referenced by ElemSideNeighborLayersGeomTester::validParams().

581 { _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 510 of file InputParameters.C.

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

511 {
512  _collapse_nesting = collapse;
513 }
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.

◆ collapseSyntaxNesting() [2/2]

bool InputParameters::collapseSyntaxNesting ( ) const

Definition at line 516 of file InputParameters.C.

517 {
518  return _collapse_nesting;
519 }
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.

◆ coupledVarsBegin()

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

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

Definition at line 636 of file InputParameters.h.

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

637  {
638  return _coupled_vars.begin();
639  }
std::set< std::string > _coupled_vars
The coupled variables set.

◆ coupledVarsEnd()

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

Definition at line 640 of file InputParameters.h.

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

641  {
642  return _coupled_vars.end();
643  }
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 421 of file InputParameters.C.

Referenced by GenericConstant2DArray::validParams(), PenaltyDirichletNodalKernel::validParams(), GenericConstantArray::validParams(), GenericConstantVectorMaterialTempl< is_ad >::validParams(), ConstantScalarAux::validParams(), ConstantFunction::validParams(), ConstantPostprocessor::validParams(), ConstantAux::validParams(), ReactionTempl< is_ad >::validParams(), ConstantPointSource::validParams(), DirichletBC::validParams(), NeumannBCTempl< is_ad >::validParams(), ADDirichletBC::validParams(), VectorDirichletBC::validParams(), ArrayDirichletBC::validParams(), VectorConstantPointSource::validParams(), PiecewiseTabularBase::validParams(), PiecewiseLinearInterpolationMaterial::validParams(), ConstantRate::validParams(), FunctionValuePostprocessor::validParams(), FVBodyForce::validParams(), VectorBodyForce::validParams(), TimeStepper::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(), FVBoundaryCondition::validParams(), FVInterfaceKernel::validParams(), AuxKernelTempl< Real >::validParams(), MultiApp::validParams(), and FEProblemBase::validParams().

423 {
424  std::vector<std::string> names;
425  MooseUtils::tokenize<std::string>(input_names, names, 1, " ");
426  for (auto & name_in : names)
427  {
428  const auto name = checkForRename(name_in);
429  auto map_iter = _params.find(name);
430  if (map_iter != _params.end()) // error is handled by checkParams method
431  {
432  map_iter->second._controllable = true;
433  map_iter->second._controllable_flags = execute_flags;
434  }
435  else
436  mooseError("The input parameter '",
437  name,
438  "' does not exist, thus cannot be marked as controllable.");
439  }
440 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 658 of file InputParameters.C.

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

659 {
660  auto value_it = _params.find(coupling_name);
661 
662  if (value_it == _params.end() || !value_it->second._have_coupled_default)
663  mooseError("Attempted to retrieve default value for coupled variable '",
664  coupling_name,
665  "' when none was provided. \n\nThere are three reasons why this may have "
666  "occurred:\n 1. The other version of params.addCoupledVar() should be used in order "
667  "to provide a default value. \n 2. This should have been a required coupled "
668  "variable added with params.addRequiredCoupledVar() \n 3. The call to get the "
669  "coupled value should have been properly guarded with isCoupled()\n");
670 
671  return value_it->second._coupled_default.at(i);
672 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 650 of file InputParameters.C.

651 {
652  _params[coupling_name]._coupled_default.resize(i + 1);
653  _params[coupling_name]._coupled_default[i] = value;
654  _params[coupling_name]._have_coupled_default = true;
655 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
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 
)

Definition at line 1424 of file InputParameters.C.

Referenced by DerivativeSumMaterialTempl< is_ad >::validParams(), ParsedAux::validParams(), ParsedMaterialBase::validParams(), ParsedODEKernel::validParams(), MaterialDerivativeTestKernelBase< Real >::validParams(), and CompositeTensorBase< T, U >::validParams().

1427 {
1428  renameCoupledVarInternal(old_name, new_name, "", removal_date);
1429 }
void renameCoupledVarInternal(const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)

◆ deprecateParam()

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

Definition at line 1416 of file InputParameters.C.

Referenced by ParsedAux::validParams(), ParsedODEKernel::validParams(), PicardSolve::validParams(), CommonOutputAction::validParams(), and Output::validParams().

1419 {
1420  renameParamInternal(old_name, new_name, "", removal_date);
1421 }
void renameParamInternal(const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)

◆ errorPrefix()

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

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

Definition at line 1308 of file InputParameters.C.

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

1309 {
1310  auto prefix = param + ":";
1311  if (!inputLocation(param).empty())
1312  prefix = inputLocation(param) + ": (" + paramFullpath(param) + ")";
1313  return prefix;
1314 }
const std::string & inputLocation(const std::string &param) const
Get/set a string representing the location in the input text the parameter originated from (i...
const std::string & paramFullpath(const std::string &param) const
Get/set a string representing the full HIT parameter path from the input file (e.g.

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

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

1857 {
1858  const auto param1 = checkForRename(param1_in);
1859  const auto param2 = checkForRename(param2_in);
1860 
1861  const auto & v1 = get<V1>(param1);
1862  const auto & v2 = get<V2>(param2);
1863 
1864  auto controllable = getControllableParameters();
1865  if (controllable.count(param1) || controllable.count(param2))
1866  mooseError(errorPrefix(param1),
1867  " and/or ",
1868  errorPrefix(param2) +
1869  " are controllable parameters and cannot be retireved using "
1870  "the MooseObject::getParam/InputParameters::get methods for pairs");
1871 
1872  if (v1.size() != v2.size())
1873  mooseError("Vector parameters ",
1874  errorPrefix(param1),
1875  "(size: ",
1876  v1.size(),
1877  ") and " + errorPrefix(param2),
1878  "(size: ",
1879  v2.size(),
1880  ") are of different lengths \n");
1881 
1882  std::vector<std::pair<R1, R2>> parameter_pairs;
1883  auto i1 = v1.begin();
1884  auto i2 = v2.begin();
1885  for (; i1 != v1.end() && i2 != v2.end(); ++i1, ++i2)
1886  parameter_pairs.emplace_back(std::make_pair(*i1, *i2));
1887  return parameter_pairs;
1888 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::string errorPrefix(const std::string &param) const
generate error message prefix with parameter name and location (if available)
std::set< std::string > getControllableParameters() const
Return list of controllable parameters.

◆ get() [2/2]

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

A wrapper around the Parameters base class method.

Checks for parameter rename before calling the base class method

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

Definition at line 1905 of file InputParameters.h.

1906 {
1907  const auto name = checkForRename(std::string(name_in));
1908 
1909  return Parameters::get<T>(name);
1910 }
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 686 of file InputParameters.C.

687 {
688  std::map<std::string, std::pair<std::string, std::string>> abv;
689  for (auto it = _params.begin(); it != _params.end(); ++it)
690  {
691  if (!it->second._autobuild_vecs.first.empty())
692  abv[it->first] = it->second._autobuild_vecs;
693  }
694  return abv;
695 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getBuildableRelationshipManagerTypes()

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

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

Definition at line 504 of file InputParameters.C.

Referenced by Action::addRelationshipManagers().

505 {
506  return _buildable_rm_types;
507 }
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 496 of file InputParameters.C.

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

497 {
498  return _buildable_types;
499 }
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 1394 of file InputParameters.h.

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

1396 {
1397  const auto name = checkForRename(name_in);
1398 
1399  T param = this->get<T>(name);
1400 
1401  // Note: You will receive a compile error on this line if you attempt to pass a non-pointer
1402  // template type to this method
1403  if (param == NULL)
1404  mooseError("Parameter ", name, " is NULL.\n", error_string);
1405  return this->get<T>(name);
1406 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 133 of file InputParameters.C.

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

134 {
135  return _class_description;
136 }
std::string _class_description
The class description for the owning object.

◆ getCommandLineArgumentType()

InputParameters::CommandLineMetadata::ArgumentType InputParameters::getCommandLineArgumentType ( const std::string &  name) const
Returns
The command line argument type for the parameter name

Definition at line 811 of file InputParameters.C.

812 {
814 }
ArgumentType argument_type
The type of argument.
const CommandLineMetadata & getCommandLineMetadata(const std::string &name) const

◆ getCommandLineMetadata()

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

Definition at line 1260 of file InputParameters.C.

Referenced by getCommandLineArgumentType(), and getCommandLineSyntax().

1261 {
1262  const auto & cl_data = at(checkForRename(name))._cl_data;
1263  if (!cl_data)
1264  mooseError("The parameter '", name, "' is not a command line parameter.");
1265  return *cl_data;
1266 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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)

◆ getCommandLineSyntax()

const std::vector< std::string > & InputParameters::getCommandLineSyntax ( const std::string &  name) const
Returns
The command line syntax for the parameter name

Definition at line 805 of file InputParameters.C.

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

806 {
807  return getCommandLineMetadata(name).syntax;
808 }
std::vector< std::string > syntax
The syntax for the parameter (i.e., ["-t", "--timing"])
const CommandLineMetadata & getCommandLineMetadata(const std::string &name) const

◆ getControllableExecuteOnTypes()

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

Return the allowed execute flags for a controllable parameter.

Definition at line 450 of file InputParameters.C.

451 {
452  const auto name = checkForRename(name_in);
453  return at(name)._controllable_flags;
454 }
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 1298 of file InputParameters.C.

Referenced by checkParams(), and get().

1299 {
1300  std::set<std::string> controllable;
1301  for (auto it = _params.begin(); it != _params.end(); ++it)
1302  if (it->second._controllable)
1303  controllable.emplace(it->first);
1304  return controllable;
1305 }
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 648 of file InputParameters.h.

648 { 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 985 of file InputParameters.C.

Referenced by transferParam().

986 {
987  const auto name = checkForRename(name_in);
988  auto it = _params.find(name);
989  if (it == _params.end())
990  mooseError("No parameter exists with the name ", name);
991  return it->second._doc_string;
992 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 320 of file InputParameters.C.

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

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

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

818 {
819  const auto param_name = checkForRename(param_name_in);
820  auto it = _params.find(param_name);
821  if (it != _params.end())
822  return it->second._group;
823  return std::string();
824 }
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 1279 of file InputParameters.C.

1280 {
1281  std::set<std::string> names;
1282  for (auto it = _params.begin(); it != _params.end(); ++it)
1283  if (it->second._group == group)
1284  names.emplace(it->first);
1285  return names;
1286 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getMooseType()

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

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

Scalar and Vector versions are supplied

Definition at line 712 of file InputParameters.C.

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

713 {
714  const auto name = checkForRename(name_in);
715  std::string var;
716 
717  if (have_parameter<VariableName>(name))
718  var = get<VariableName>(name);
719  else if (have_parameter<NonlinearVariableName>(name))
720  var = get<NonlinearVariableName>(name);
721  else if (have_parameter<AuxVariableName>(name))
722  var = get<AuxVariableName>(name);
723  else if (have_parameter<PostprocessorName>(name))
724  var = get<PostprocessorName>(name);
725  else if (have_parameter<VectorPostprocessorName>(name))
726  var = get<VectorPostprocessorName>(name);
727  else if (have_parameter<FunctionName>(name))
728  var = get<FunctionName>(name);
729  else if (have_parameter<UserObjectName>(name))
730  var = get<UserObjectName>(name);
731  else if (have_parameter<MaterialPropertyName>(name))
732  var = get<MaterialPropertyName>(name);
733  else if (have_parameter<std::string>(name))
734  var = get<std::string>(name);
735 
736  return var;
737 }
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 653 of file InputParameters.h.

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

◆ getParametersList()

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

Definition at line 1289 of file InputParameters.C.

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

1290 {
1291  std::set<std::string> param_set;
1292  for (auto it = _params.begin(); it != _params.end(); ++it)
1293  param_set.emplace(it->first);
1294  return param_set;
1295 }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ getParamHelper() [1/5]

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

Definition at line 1817 of file InputParameters.h.

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

1821 {
1822  const auto name = pars.checkForRename(name_in);
1823 
1824  if (!pars.isParamValid(name))
1825  {
1826  std::stringstream err;
1827  err << "The parameter \"" << name << "\" is being retrieved before being set.";
1828  if (moose_object)
1829  callMooseErrorHelper(*moose_object, err.str());
1830  else
1831  mooseError(err.str());
1832  }
1833 
1834  return pars.get<T>(name);
1835 }
std::string name(const ElemQuality q)
OStreamProxy err
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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.
static void callMooseErrorHelper(const MooseObject &object, const std::string &error)
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,
const MooseEnum ,
const MooseObject  
)

Definition at line 1213 of file InputParameters.C.

1217 {
1218  const auto name = pars.checkForRename(name_in);
1219  return pars.get<MooseEnum>(name);
1220 }
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:31
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ getParamHelper() [3/5]

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

Definition at line 1224 of file InputParameters.C.

1228 {
1229  const auto name = pars.checkForRename(name_in);
1230  return pars.get<MultiMooseEnum>(name);
1231 }
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 It sho...

◆ getParamHelper() [4/5]

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

◆ getParamHelper() [5/5]

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

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

Referenced by AttribSystem::initFrom().

472 {
473  mooseAssert(have_parameter<std::string>("_moose_warehouse_system_name"),
474  "SystemAttributeName is not available! Call 'registerSystemAttributeName' (usually "
475  "in the validParams function) before you try accessing it!");
476  return Parameters::get<std::string>("_moose_warehouse_system_name");
477 }

◆ getVecMooseType()

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

Definition at line 740 of file InputParameters.C.

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

741 {
742  const auto name = checkForRename(name_in);
743  std::vector<std::string> svars;
744 
745  if (have_parameter<std::vector<VariableName>>(name))
746  {
747  std::vector<VariableName> vars = get<std::vector<VariableName>>(name);
748  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
749  }
750  else if (have_parameter<std::vector<NonlinearVariableName>>(name))
751  {
752  std::vector<NonlinearVariableName> vars = get<std::vector<NonlinearVariableName>>(name);
753  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
754  }
755  else if (have_parameter<std::vector<AuxVariableName>>(name))
756  {
757  std::vector<AuxVariableName> vars = get<std::vector<AuxVariableName>>(name);
758  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
759  }
760  else if (have_parameter<std::vector<MaterialPropertyName>>(name))
761  {
762  std::vector<MaterialPropertyName> vars = get<std::vector<MaterialPropertyName>>(name);
763  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
764  }
765  else if (have_parameter<std::vector<std::string>>(name))
766  {
767  std::vector<std::string> vars = get<std::vector<std::string>>(name);
768  std::copy(vars.begin(), vars.end(), std::back_inserter(svars));
769  }
770 
771  return svars;
772 }
std::string name(const ElemQuality q)
bool have_parameter(std::string_view name) const
A wrapper around the Parameters base class method.
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.

◆ hasCoupledValue()

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

Return whether or not the coupled variable exists.

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

Definition at line 637 of file InputParameters.C.

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

638 {
639  return _coupled_vars.find(coupling_name) != _coupled_vars.end();
640 }
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 622 of file InputParameters.C.

Referenced by transferParam().

623 {
624  const auto name = checkForRename(param_name);
625  if (hasDefaultCoupledValue(name))
626  return true;
627  // If it has a default, it's already valid
628  else if (isParamSetByAddParam(name))
629  return true;
630  else if (isParamValid(name))
631  mooseError("No way to know if the parameter", param_name, "has a default");
632  else
633  return false;
634 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 643 of file InputParameters.C.

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

644 {
645  return _params.count(coupling_name) > 0 && _params.at(coupling_name)._have_coupled_default &&
646  _coupled_vars.count(coupling_name) > 0;
647 }
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

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

Referenced by ActionWarehouse::addActionBlock(), FEProblemBase::addAuxKernel(), FEProblemBase::addAuxScalarKernel(), FEProblemBase::addBoundaryCondition(), FEProblemBase::addConstraint(), FEProblemBase::addDGKernel(), FEProblemBase::addDiracKernel(), FunctorMaterial::addFunctorPropertyByBlocks(), FEProblemBase::addIndicator(), FEProblemBase::addInterfaceKernel(), MooseEigenSystem::addKernel(), FEProblemBase::addKernel(), FEProblemBase::addMarker(), FEProblemBase::addMaterialHelper(), FEProblemBase::addMultiApp(), FEProblemBase::addNodalKernel(), FEProblemBase::addObjectParamsHelper(), FEProblemBase::addScalarKernel(), FEProblemBase::addTransfer(), MooseServer::addValuesToList(), Moose::Builder::buildFullTree(), Moose::Builder::buildJsonSyntaxTree(), Coupleable::checkVar(), MaterialBase::declareADProperty(), MaterialBase::declareProperty(), FunctorInterface::deduceFunctorName(), MooseServer::getActionParameters(), MooseServer::getCompletionItemKind(), MaterialBase::getGenericZeroMaterialProperty(), MooseServer::getHoverDisplayText(), MaterialPropertyInterface::getMaterialPropertyName(), MooseServer::getObjectParameters(), getVecMooseType(), AdvancedOutput::initExecutionTypes(), AttribDisplaced::initFrom(), isParamValid(), MooseApp::MooseApp(), OutputOnWarehouse::OutputOnWarehouse(), DumpObjectsProblem::stringifyParameters(), transferParam(), BlockRestrictable::validParams(), and Moose::Builder::walkRaw().

1915 {
1916  const auto name = checkForRename(std::string(name_in));
1917 
1918  return Parameters::have_parameter<T>(name);
1919 }
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 1665 of file InputParameters.h.

Referenced by AddElementalFieldAction::validParams().

1666 {
1667  const auto name = checkForRename(name_in);
1668  suppressParameter<T>(name);
1669  _params[name]._ignore = true;
1670 }
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() [1/2]

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

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

filename,linenum) for the given param.

Definition at line 867 of file InputParameters.h.

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

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

◆ inputLocation() [2/2]

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

Definition at line 871 of file InputParameters.h.

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

◆ isCommandLineParameter()

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

Definition at line 799 of file InputParameters.C.

800 {
801  return at(checkForRename(name))._cl_data.has_value();
802 }
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 443 of file InputParameters.C.

Referenced by transferParam().

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

399 {
400  const auto name = checkForRename(name_in);
401  return _params.count(name) > 0 && !_params.at(name)._deprecation_message.empty();
402 }
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 352 of file InputParameters.C.

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

353 {
354  const auto name = checkForRename(name_in);
355  return _params.count(name) > 0 && _params.at(name)._required;
356 }
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 391 of file InputParameters.C.

Referenced by MultiApp::createApp(), hasDefault(), MooseApp::MooseApp(), PicardSolve::PicardSolve(), and Transient::Transient().

392 {
393  const auto name = checkForRename(name_in);
394  return _params.count(name) > 0 && _params.at(name)._set_by_add_param;
395 }
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 by the user.

Parameters
nameThe parameter name

Definition at line 971 of file InputParameters.C.

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

972 {
973  const auto name = checkForRename(name_in);
974  if (!isParamValid(name))
975  // if the parameter is invalid, it is for sure not set by the user
976  return false;
977  else
978  // If the parameters is not located in the list, then it was set by the user
979  // If the parameter is private, and present in global params, it is ignored, therefore not set
980  return _params.count(name) > 0 && !_params.at(name)._set_by_add_param &&
981  !_params.at(name)._is_private;
982 }
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.
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 368 of file InputParameters.C.

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

369 {
370  const auto name = checkForRename(name_in);
371  if (have_parameter<MooseEnum>(name))
372  return get<MooseEnum>(name).isValid();
373  else if (have_parameter<std::vector<MooseEnum>>(name))
374  {
375  for (auto it = get<std::vector<MooseEnum>>(name).begin();
376  it != get<std::vector<MooseEnum>>(name).end();
377  ++it)
378  if (!it->isValid())
379  return false;
380  return true;
381  }
382  else if (have_parameter<MultiMooseEnum>(name))
383  return get<MultiMooseEnum>(name).isValid();
384  else if (have_parameter<ExecFlagEnum>(name))
385  return get<ExecFlagEnum>(name).isValid();
386  else
387  return _params.count(name) > 0 && _params.at(name)._valid;
388 }
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 414 of file InputParameters.C.

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

415 {
416  const auto name = checkForRename(name_in);
417  return _params.count(name) > 0 && _params.at(name)._is_private;
418 }
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 608 of file InputParameters.C.

Referenced by transferParam().

609 {
610  const auto name = checkForRename(param_name);
611  return !_params.find(name)->second._range_function.empty();
612 }
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 1894 of file InputParameters.h.

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

1895 {
1896  const auto name = checkForRename(name_in);
1897 
1898  if (!_params.count(name))
1899  mooseError("Parameter \"", name, "\" is not valid.");
1900  return have_parameter<T>(name);
1901 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 1686 of file InputParameters.h.

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

1687 {
1688  const auto name = checkForRename(name_in);
1689 
1690  if (!this->have_parameter<T>(name))
1691  mooseError("Unable to un-require nonexistent parameter: ", name);
1692 
1693  _params[name]._required = false;
1694 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 359 of file InputParameters.C.

360 {
361  const auto name = checkForRename(name_in);
362 
363  if (_params.count(name))
364  _params[name]._required = false;
365 }
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 1674 of file InputParameters.h.

1675 {
1676  const auto name = checkForRename(name_in);
1677 
1678  if (!this->have_parameter<T>(name))
1679  mooseError("Unable to require nonexistent parameter: ", name);
1680 
1681  _params[name]._required = true;
1682 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::string checkForRename(const std::string &name) const
Checks whether the provided name is a renamed parameter name.
std::map< std::string, Metadata > _params
The actual parameter data.

◆ markControlled()

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

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

◆ mooseObjectSyntaxVisibility() [1/2]

void InputParameters::mooseObjectSyntaxVisibility ( bool  visibility)

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

Definition at line 522 of file InputParameters.C.

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

523 {
524  _moose_object_syntax_visibility = visibility;
525 }
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 528 of file InputParameters.C.

529 {
531 }
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 675 of file InputParameters.C.

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

676 {
677  auto value_it = _params.find(coupling_name);
678  if (value_it == _params.end())
679  mooseError("Attempted to retrieve default value for coupled variable '",
680  coupling_name,
681  "' when none was provided.");
682  return value_it->second._coupled_default.size();
683 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::map< std::string, Metadata > _params
The actual parameter data.

◆ operator+=()

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

Definition at line 176 of file InputParameters.C.

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

140 {
141  // An error to help minimize the segmentation faults that occure when MooseObjects do not have the
142  // correct constructor
143  if (!rhs._allow_copy)
144  {
145  const std::string & name =
146  rhs.get<std::string>("_object_name"); // If _allow_parameter_copy is set then so is name
147  // (see InputParameterWarehouse::addInputParameters)
148  mooseError("Copying of the InputParameters object for the ",
149  name,
150  " object 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  " MyObject::MyObject(const InputParameters & parameters);");
154  }
155 
157 
158  _params = rhs._params;
159 
166  _allow_copy = rhs._allow_copy;
171 
172  return *this;
173 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
std::string name(const ElemQuality q)
bool _allow_copy
A flag for toggling the error message in the copy constructor.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
Combine two vector parameters into a single vector of pairs.
std::string _block_location
original location of input block (i.e. filename,linenum) - used for nice error messages.
std::unordered_map< std::string, std::string > _new_to_deprecated_coupled_vars
A map from deprecated coupled variable names to the new blessed name.
std::string _block_fullpath
full HIT path of the block from the input file - used for nice error messages.
bool _collapse_nesting
This parameter collapses one level of nesting in the syntax blocks.
infix_ostream_iterator< T, charT, traits > & operator=(T const &item)
Definition: InfixIterator.h:46
std::set< std::string > _coupled_vars
The coupled variables set.
std::vector< std::tuple< std::string, Moose::RelationshipManagerType, Moose::RelationshipManagerInputParameterCallback > > _buildable_rm_types
The RelationshipManagers that this object may either build or require.
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 1441 of file InputParameters.C.

1442 {
1443  mooseAssert(_values.find(param_name) != _values.end(),
1444  "The parameter we are searching for aliases for should exist in our parameter map");
1445  std::vector<std::string> aliases = {param_name};
1446 
1447  for (const auto & pr : as_range(_new_to_old_names.equal_range(param_name)))
1448  aliases.push_back(pr.second);
1449 
1450  return aliases;
1451 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
SimpleRange< IndexType > as_range(const std::pair< IndexType, IndexType > &p)

◆ paramFullpath() [1/2]

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

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

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

Definition at line 879 of file InputParameters.h.

Referenced by checkParams(), and errorPrefix().

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

◆ paramFullpath() [2/2]

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

Definition at line 883 of file InputParameters.h.

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

◆ paramSetByUser()

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

Deprecated method.

Use isParamSetByUser() instead.

Definition at line 964 of file InputParameters.C.

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

◆ rangeCheck() [1/2]

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

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

Returns
Boolean indicating whether range check exists

Definition at line 1352 of file InputParameters.h.

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

1356 {
1357  mooseAssert(param, "Parameter is NULL");
1358 
1359  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1360  return;
1361 
1362  // Parse the expression
1364  if (fp.Parse(_params[short_name]._range_function, short_name) != -1) // -1 for success
1365  {
1366  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1367  return;
1368  }
1369 
1370  // ensure range-checked input file parameter comparison functions
1371  // do absolute floating point comparisons instead of using a default epsilon.
1372  auto tmp_eps = fp.epsilon();
1373  fp.setEpsilon(0);
1374  // We require a non-const value for the implicit upscaling of the parameter type
1375  std::vector<UP_T> value(1, param->set());
1376  UP_T result = fp.Eval(&value[0]);
1377  fp.setEpsilon(tmp_eps);
1378 
1379  if (fp.EvalError())
1380  {
1381  oss << "Error evaluating expression: " << _params[short_name]._range_function
1382  << "\nPerhaps you used the wrong variable name?\n";
1383  return;
1384  }
1385 
1386  if (!result)
1387  oss << "Range check failed for parameter " << full_name
1388  << "\n\tExpression: " << _params[short_name]._range_function << "\n\tValue: " << value[0]
1389  << '\n';
1390 }
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
std::map< std::string, Metadata > _params
The actual parameter data.
bool isParamValid(const std::string &name) const
This method returns parameters that have been initialized in one fashion or another, i.e.

◆ rangeCheck() [2/2]

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

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

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

Definition at line 1239 of file InputParameters.h.

1243 {
1244  mooseAssert(param, "Parameter is NULL");
1245 
1246  if (!isParamValid(short_name) || _params[short_name]._range_function.empty())
1247  return;
1248 
1261  std::vector<std::string> vars;
1262  if (fp.ParseAndDeduceVariables(_params[short_name]._range_function, vars) != -1) // -1 for success
1263  {
1264  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1265  return;
1266  }
1267 
1268  // Fparser parameter buffer
1269  std::vector<UP_T> parbuf(vars.size());
1270 
1271  // parameter vector
1272  const std::vector<T> & value = param->set();
1273 
1274  // iterate over all vector values (maybe ;)
1275  bool need_to_iterate = false;
1276  unsigned int i = 0;
1277  do
1278  {
1279  // set parameters
1280  for (unsigned int j = 0; j < vars.size(); j++)
1281  {
1282  if (vars[j] == short_name)
1283  {
1284  if (value.size() == 0)
1285  {
1286  oss << "Range checking empty vector: " << _params[short_name]._range_function << '\n';
1287  return;
1288  }
1289 
1290  parbuf[j] = value[i];
1291  need_to_iterate = true;
1292  }
1293  else if (vars[j] == short_name + "_size")
1294  parbuf[j] = value.size();
1295  else
1296  {
1297  if (vars[j].substr(0, short_name.size() + 1) != short_name + "_")
1298  {
1299  oss << "Error parsing expression: " << _params[short_name]._range_function << '\n';
1300  return;
1301  }
1302  std::istringstream iss(vars[j]);
1303  iss.seekg(short_name.size() + 1);
1304 
1305  size_t index;
1306  if (iss >> index && iss.eof())
1307  {
1308  if (index >= value.size())
1309  {
1310  oss << "Error parsing expression: " << _params[short_name]._range_function
1311  << "\nOut of range variable " << vars[j] << '\n';
1312  return;
1313  }
1314  parbuf[j] = value[index];
1315  }
1316  else
1317  {
1318  oss << "Error parsing expression: " << _params[short_name]._range_function
1319  << "\nInvalid variable " << vars[j] << '\n';
1320  return;
1321  }
1322  }
1323  }
1324 
1325  // ensure range-checked input file parameter comparison functions
1326  // do absolute floating point comparisons instead of using a default epsilon.
1327  auto tmp_eps = fp.epsilon();
1328  fp.setEpsilon(0);
1329  UP_T result = fp.Eval(&parbuf[0]);
1330  fp.setEpsilon(tmp_eps);
1331 
1332  // test function using the parameters determined above
1333  if (fp.EvalError())
1334  {
1335  oss << "Error evaluating expression: " << _params[short_name]._range_function << '\n';
1336  return;
1337  }
1338 
1339  if (!result)
1340  {
1341  oss << "Range check failed for parameter " << full_name
1342  << "\n\tExpression: " << _params[short_name]._range_function << "\n";
1343  if (need_to_iterate)
1344  oss << "\t Component: " << i << '\n';
1345  }
1346 
1347  } while (need_to_iterate && ++i < value.size());
1348 }
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 615 of file InputParameters.C.

Referenced by transferParam().

616 {
617  const auto name = checkForRename(param_name);
618  return _params.at(name)._range_function;
619 }
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() [1/2]

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

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

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

Definition at line 893 of file InputParameters.h.

Referenced by Moose::Builder::setFilePathParam(), and Moose::Builder::setVectorFilePathParam().

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

◆ rawParamVal() [2/2]

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

Definition at line 894 of file InputParameters.h.

895  {
896  return _params.at(param)._raw_val;
897  }
std::map< std::string, Metadata > _params
The actual parameter data.

◆ registerBase()

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

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

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

Definition at line 457 of file InputParameters.C.

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

458 {
459  InputParameters::set<std::string>("_moose_base") = value;
460  _params["_moose_base"]._is_private = true;
461 }
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 480 of file InputParameters.C.

481 {
482  _buildable_types.clear();
483  MooseUtils::tokenize(names, _buildable_types, 1, " \t\n\v\f\r"); // tokenize on whitespace
484 }
void tokenize(const std::string &str, std::vector< T > &elements, unsigned int min_len=1, const std::string &delims="/")
This function will split the passed in string on a set of delimiters appending the substrings to the ...
Definition: MooseUtils.h:779
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 464 of file InputParameters.C.

Referenced by Distribution::validParams(), FVDirichletBCBase::validParams(), TimeStepper::validParams(), FVFluxBC::validParams(), FVElementalKernel::validParams(), FVFluxKernel::validParams(), UserObject::validParams(), Sampler::validParams(), and FVInterfaceKernel::validParams().

465 {
466  InputParameters::set<std::string>("_moose_warehouse_system_name") = value;
467  _params["_moose_warehouse_system_name"]._is_private = true;
468 }
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 1408 of file InputParameters.C.

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

1411 {
1412  renameCoupledVarInternal(old_name, new_name, new_docstring, "");
1413 }
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 1382 of file InputParameters.C.

Referenced by deprecateCoupledVar(), and renameCoupledVar().

1386 {
1387  auto coupled_vars_it = _coupled_vars.find(old_name);
1388  if (coupled_vars_it == _coupled_vars.end())
1389  mooseError("Requested to rename coupled variable '",
1390  old_name,
1391  "' but that coupled variable name doesn't exist in the parameters object.");
1392 
1393  _coupled_vars.insert(new_name);
1394  _coupled_vars.erase(coupled_vars_it);
1395 
1396  renameParamInternal(old_name, new_name, docstring, removal_date);
1397 }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
void renameParamInternal(const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)
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 1400 of file InputParameters.C.

Referenced by MassMatrix::validParams().

1403 {
1404  renameParamInternal(old_name, new_name, new_docstring, "");
1405 }
void renameParamInternal(const std::string &old_name, const std::string &new_name, const std::string &docstring, const std::string &removal_date)

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

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

1352 {
1353  auto params_it = _params.find(old_name);
1354  if (params_it == _params.end())
1355  mooseError("Requested to rename parameter '",
1356  old_name,
1357  "' but that parameter name doesn't exist in the parameters object.");
1358 
1359  auto new_metadata = std::move(params_it->second);
1360  if (!docstring.empty())
1361  new_metadata._doc_string = docstring;
1362  else
1363  new_metadata._doc_string = params_it->second._doc_string;
1364  _params.emplace(new_name, std::move(new_metadata));
1365  _params.erase(params_it);
1366 
1367  auto values_it = _values.find(old_name);
1368  auto new_value = std::move(values_it->second);
1369  _values.emplace(new_name, std::move(new_value));
1370  _values.erase(values_it);
1371 
1372  std::string deprecation_message;
1373  if (!removal_date.empty())
1374  deprecation_message = "'" + old_name + "' has been deprecated and will be removed on " +
1375  removal_date + ". Please use '" + new_name + "' instead.";
1376 
1377  _old_to_new_name_and_dep.emplace(old_name, std::make_pair(new_name, deprecation_message));
1378  _new_to_old_names.emplace(new_name, old_name);
1379 }
std::multimap< std::string, std::string > _new_to_old_names
A map from derived-class/blessed parameter names to associated base-class/deprecated parameter names...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 1242 of file InputParameters.C.

1243 {
1244  const auto name = checkForRename(name_in);
1245  auto it = _params.find(name);
1246  if (it == _params.end())
1247  return std::set<std::string>();
1248  return it->second._reserved_values;
1249 }
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 1210 of file InputParameters.h.

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

1211 {
1212  const auto name = checkForRename(name_in);
1213 
1214  checkParamName(name);
1215  checkConsistentType<T>(name);
1216 
1217  T & result = this->Parameters::set<T>(name);
1218 
1219  if (quiet_mode)
1220  _params[name]._set_by_add_param = true;
1221 
1222  setHelper<T>(name);
1223 
1224  return result;
1225 }
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.

Definition at line 82 of file InputParameters.C.

Referenced by applyParameter().

83 {
84  const auto name = checkForRename(name_in);
85 
86  if (!inserted_only)
87  {
88  auto & metadata = _params[name];
95  metadata._set_by_add_param = false;
96 
97  // valid_params don't make sense for MooseEnums
98  if (!have_parameter<MooseEnum>(name) && !have_parameter<MultiMooseEnum>(name))
99  metadata._valid = true;
100  }
101 }
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 202 of file InputParameters.C.

Referenced by addCoupledVar().

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

◆ setDocString()

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

Set the doc string of a parameter.

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

Definition at line 339 of file InputParameters.C.

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

340 {
341  const auto name = checkForRename(name_in);
342 
343  auto it = _params.find(name);
344  if (it == _params.end())
345  mooseError("Unable to set the documentation string (using setDocString) for the \"",
346  name,
347  "\" parameter, the parameter does not exist.");
348  it->second._doc_string = doc;
349 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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.

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

1204 {
1205 }

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

Referenced by AutoCheckpointAction::act(), and MeshGenerator::addMeshSubgenerator().

1232 {
1233  this->set<T>(name) = value;
1234  this->setParameters(extra_input_parameters...);
1235 }
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 1017 of file InputParameters.h.

Referenced by setParameters().

1017 {}

◆ setParamHelper() [1/17]

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

Definition at line 1117 of file InputParameters.C.

1120 {
1121  // Assign the default value so that it appears in the dump
1122  std::ostringstream oss;
1123  oss << r_value;
1124  l_value = oss.str();
1125 }

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

Referenced by addParam().

1474 {
1475  l_value = r_value;
1476 }

◆ setParamHelper() [3/17]

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

Definition at line 1129 of file InputParameters.C.

1132 {
1133  // Assign the default value so that it appears in the dump
1134  std::ostringstream oss;
1135  oss << r_value;
1136  l_value = oss.str();
1137 }

◆ setParamHelper() [4/17]

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

Definition at line 1141 of file InputParameters.C.

1144 {
1145  // Assign the default value so that it appears in the dump
1146  std::ostringstream oss;
1147  oss << r_value;
1148  l_value = oss.str();
1149 }

◆ setParamHelper() [5/17]

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

Definition at line 1153 of file InputParameters.C.

1156 {
1157  // Assign the default value so that it appears in the dump
1158  std::ostringstream oss;
1159  oss << r_value;
1160  l_value = oss.str();
1161 }

◆ setParamHelper() [6/17]

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

Definition at line 1165 of file InputParameters.C.

1168 {
1169  // Assign the default value so that it appears in the dump
1170  std::ostringstream oss;
1171  oss << r_value;
1172  l_value = oss.str();
1173 }

◆ setParamHelper() [7/17]

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

Definition at line 1177 of file InputParameters.C.

1180 {
1181  // Assign the default value so that it appears in the dump
1182  std::ostringstream oss;
1183  oss << r_value;
1184  l_value = oss.str();
1185 }

◆ setParamHelper() [8/17]

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

Definition at line 1189 of file InputParameters.C.

1192 {
1193  // Assign the default value so that it appears in the dump
1194  std::ostringstream oss;
1195  oss << r_value;
1196  l_value = oss.str();
1197 }

◆ setParamHelper() [9/17]

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

Definition at line 1201 of file InputParameters.C.

1204 {
1205  // Assign the default value so that it appears in the dump
1206  std::ostringstream oss;
1207  oss << r_value;
1208  l_value = oss.str();
1209 }

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

Referenced by OutputInterface::validParams().

1236 {
1237  const auto name = checkForRename(name_in);
1238  _params[name]._reserved_values = reserved;
1239 }
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 1269 of file InputParameters.C.

1270 {
1271  const auto name = checkForRename(name_in);
1272  auto it = _params.find(name);
1273  if (it != _params.end())
1274  return it->second._ignore;
1275  mooseError("Parameter ", name, " does not exist");
1276 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 1651 of file InputParameters.h.

Referenced by ExternalProblem::validParams(), DiscreteElementUserObject::validParams(), ElementSubdomainModifier::validParams(), CSVReaderVectorPostprocessor::validParams(), MultiAppCloneReporterTransfer::validParams(), MassMatrix::validParams(), FVMassMatrix::validParams(), DiffusionFV::validParams(), PseudoTimestep::validParams(), CentroidMultiApp::validParams(), QuadraturePointMultiApp::validParams(), AccumulateReporter::validParams(), MultiAppGeneralFieldShapeEvaluationTransfer::validParams(), ElementHCurlSemiError::validParams(), ElementHDivSemiError::validParams(), CSV::validParams(), MultiAppGeneralFieldUserObjectTransfer::validParams(), ReporterPointSource::validParams(), MortarNodalAuxKernelTempl< ComputeValueType >::validParams(), MultiAppGeneralFieldNearestLocationTransfer::validParams(), VariableResidualNormsDebugOutput::validParams(), NearestRadiusLayeredAverage::validParams(), MultiAppUserObjectTransfer::validParams(), and Marker::validParams().

1652 {
1653  const auto name = checkForRename(name_in);
1654  if (!this->have_parameter<T>(name))
1655  mooseError("Unable to suppress nonexistent parameter: ", name);
1656 
1657  auto & metadata = _params[name];
1658  metadata._required = false;
1659  metadata._is_private = true;
1660  metadata._controllable = false;
1661 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 1923 of file InputParameters.h.

Referenced by DiffusionCG::validParams().

1927 {
1928  const auto name = source_params.checkForRename(std::string(name_in));
1929  const auto p_name = new_name.empty() ? name_in : new_name;
1930  if (!source_params.have_parameter<T>(name) && !source_params.hasCoupledValue(name))
1931  mooseError("The '",
1932  name_in,
1933  "' parameter could not be transferred because it does not exist with type '",
1934  MooseUtils::prettyCppType<T>(),
1935  "' in the source parameters");
1936  if (name != name_in)
1937  mooseWarning("The transferred parameter " + name_in + " is deprecated in favor of " + name +
1938  " in the source parameters. The new name should likely be used for the parameter "
1939  "transfer instead.");
1940  const std::string description =
1941  new_description.empty() ? source_params.getDescription(name) : new_description;
1942 
1943  if (source_params.isParamRequired(name))
1944  {
1945  // Check for a variable parameter
1946  if (source_params.hasCoupledValue(name))
1947  addRequiredCoupledVar(p_name, description);
1948  // Enums parameters have a default list of options
1949  else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
1950  addRequiredParam<T>(p_name, source_params.get<T>(name), description);
1951  else if (source_params.isRangeChecked(name))
1952  addRequiredRangeCheckedParam<T>(
1953  p_name, source_params.rangeCheckedFunction(name), description);
1954  else
1955  addRequiredParam<T>(p_name, description);
1956  }
1957  else
1958  {
1959  // Check for a variable parameter
1960  if (source_params.hasCoupledValue(name))
1961  {
1962  if (!source_params.hasDefaultCoupledValue(name))
1963  addCoupledVar(p_name, description);
1964  else if (source_params.numberDefaultCoupledValues(name) == 1)
1965  addCoupledVar(p_name, source_params.defaultCoupledValue(name), description);
1966  else
1967  {
1968  std::vector<Real> coupled_values;
1969  for (const auto i : make_range(source_params.numberDefaultCoupledValues(name)))
1970  coupled_values.push_back(source_params.defaultCoupledValue(name, i));
1971  addCoupledVar(p_name, coupled_values, description);
1972  }
1973  }
1974  else if (source_params.isRangeChecked(name))
1975  {
1976  if (source_params.hasDefault(name))
1977  addRangeCheckedParam<T>(p_name,
1978  source_params.get<T>(name),
1979  source_params.rangeCheckedFunction(name),
1980  description);
1981  else
1982  addRangeCheckedParam<T>(p_name, source_params.rangeCheckedFunction(name), description);
1983  }
1984  else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
1985  addParam<T>(p_name, source_params.get<T>(name), description);
1986  else
1987  {
1988  if (source_params.hasDefault(name))
1989  addParam<T>(p_name, source_params.get<T>(name), description);
1990  else
1991  addParam<T>(p_name, description);
1992  }
1993  }
1994 
1995  // Copy other attributes
1996  if (source_params.isPrivate(name))
1997  _params[p_name]._is_private = true;
1998  if (source_params.isControllable(name))
1999  _params[p_name]._controllable = true;
2000 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
Definition: MooseError.h:296
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 698 of file InputParameters.C.

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

699 {
700  const auto name = checkForRename(name_in);
701  if (!_values.count(name))
702  mooseError("Parameter \"", name, "\" not found.\n\n", *this);
703 
704  if (_coupled_vars.find(name) != _coupled_vars.end())
705  return "std::vector<VariableName>";
706  else if (_params.count(name) > 0 && !_params.at(name)._custom_type.empty())
707  return _params.at(name)._custom_type;
708  return _values.at(name)->type();
709 }
std::string name(const ElemQuality q)
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
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 1317 of file InputParameters.C.

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

1319 {
1320  // Try the scalar version first
1321  std::string variable_name = getMooseType(var_param_name);
1322  if (variable_name == "")
1323  {
1324  auto vec = getVecMooseType(var_param_name);
1325 
1326  // Catch the (very unlikely) case where a user specifies
1327  // variable = '' (the empty string)
1328  // in their input file. This could happen if e.g. something goes
1329  // wrong with dollar bracket expression expansion.
1330  if (vec.empty())
1331  mooseError("Error constructing object '",
1332  moose_object_with_var_param_name,
1333  "' while retrieving value for '",
1334  var_param_name,
1335  "' parameter! Did you forget to set '",
1336  var_param_name,
1337  "' or set it to '' (empty string) by accident?");
1338 
1339  // When using vector variables, we are only going to use the first one in the list at the
1340  // interface level...
1341  variable_name = vec[0];
1342  }
1343 
1344  return variable_name;
1345 }
std::string getMooseType(const std::string &name) const
Utility functions for retrieving one of the MooseTypes variables into the common "string" base class...
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:284
std::vector< std::string > getVecMooseType(const std::string &name) const

Friends And Related Function Documentation

◆ ActionWarehouse

friend class ActionWarehouse
friend

Definition at line 1198 of file InputParameters.h.

◆ emptyInputParameters

InputParameters emptyInputParameters ( )
friend

Definition at line 28 of file InputParameters.C.

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

◆ InputParameterWarehouse

friend class InputParameterWarehouse
friend

Definition at line 1195 of file InputParameters.h.

◆ Parser

friend class Parser
friend

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

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

◆ _block_fullpath

std::string InputParameters::_block_fullpath
private

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

Definition at line 1140 of file InputParameters.h.

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

◆ _block_location

std::string InputParameters::_block_location
private

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

Definition at line 1137 of file InputParameters.h.

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

◆ _buildable_rm_types

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

The RelationshipManagers that this object may either build or require.

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

Definition at line 1164 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 1155 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 1151 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 1168 of file InputParameters.h.

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

◆ _coupled_vars

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

◆ _moose_object_syntax_visibility

bool InputParameters::_moose_object_syntax_visibility
private

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

Definition at line 1171 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 1181 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 1191 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 1187 of file InputParameters.h.

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

◆ _params

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

◆ _show_deprecated_message

bool InputParameters::_show_deprecated_message
private

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

Definition at line 1175 of file InputParameters.h.

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


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