21 #include "libmesh/parameters.h" 23 #ifdef LIBMESH_HAVE_FPARSER 24 #include "libmesh/fparser.hh" 33 #include <unordered_map> 39 #include <gtest/gtest.h> 74 virtual void clear()
override;
138 template <
typename T>
142 std::is_same_v<T, std::string> || std::is_same_v<T, std::vector<std::string>> ||
143 std::is_same_v<T, Real> || std::is_same_v<T, unsigned int> || std::is_same_v<T, int> ||
144 std::is_same_v<T, bool> || std::is_same_v<T, MooseEnum>;
161 virtual void set_attributes(
const std::string & name,
bool inserted_only)
override;
167 template <
typename T>
168 void setHelper(
const std::string & name);
185 template <
typename T>
186 T &
set(
const std::string &
name,
bool quiet_mode =
false);
199 template <
typename T,
typename... Ts>
200 void setParameters(
const std::string & name,
const T & value, Ts... extra_input_parameters);
206 template <
typename T,
typename UP_T>
207 void rangeCheck(
const std::string & full_name,
208 const std::string & short_name,
209 InputParameters::Parameter<T> * param,
210 std::ostream & oss = Moose::out);
211 template <
typename T,
typename UP_T>
212 void rangeCheck(
const std::string & full_name,
213 const std::string & short_name,
214 InputParameters::Parameter<std::vector<T>> * param,
215 std::ostream & oss = Moose::out);
221 template <
typename T>
229 template <
typename T>
230 void addRequiredParam(
const std::string & name,
const std::string & doc_string);
236 template <
typename T>
238 addRequiredParam(
const std::string & name,
const T & moose_enum,
const std::string & doc_string);
247 template <
typename T,
typename S>
248 void addParam(
const std::string & name,
const S & value,
const std::string & doc_string);
249 template <
typename T>
250 void addParam(
const std::string & name,
const std::string & doc_string);
256 template <
typename T>
258 const std::initializer_list<typename T::value_type> & value,
259 const std::string & doc_string)
270 template <
typename T>
272 const std::string & parsed_function,
273 const std::string & doc_string);
274 template <
typename T>
277 const std::string & parsed_function,
278 const std::string & doc_string);
279 template <
typename T>
281 const std::string & parsed_function,
282 const std::string & doc_string);
290 template <
typename T>
292 const std::string & custom_type,
293 const std::string & doc_string);
294 template <
typename T>
297 const std::string & custom_type,
298 const std::string & doc_string);
299 template <
typename T>
301 const std::string & custom_type,
302 const std::string & doc_string);
303 template <
typename T>
305 const std::string & custom_type,
306 const std::string & doc_string,
307 const std::string & deprecation_msg);
315 template <
typename T>
317 template <
typename T>
329 template <
typename T>
331 const std::string & syntax,
332 const std::string & doc_string);
333 template <
typename T>
335 const std::string & syntax,
336 const std::string & doc_string);
337 template <
typename T>
339 const std::string & syntax,
341 const std::string & doc_string);
342 template <
typename T>
344 const std::string & syntax,
345 const std::initializer_list<typename T::value_type> & value,
346 const std::string & doc_string)
348 addCommandLineParam<T>(
name, syntax, T{
value}, doc_string);
368 template <
typename T>
370 const std::string & syntax,
372 const std::string & doc_string);
388 template <
typename T>
391 const std::string & doc_string,
392 const std::string & deprecation_message);
394 template <
typename T>
396 const std::string & doc_string,
397 const std::string & deprecation_message);
408 template <
typename T>
421 std::optional<InputParameters::CommandLineMetadata>
437 FRIEND_TEST(InputParametersTest, commandLineParamSetNotCLParam);
451 const std::string &
getDescription(
const std::string & name)
const;
471 std::string
getGroupName(
const std::string & param_name)
const;
479 template <
typename T>
486 template <
typename T>
493 template <
typename T>
501 void addCoupledVar(
const std::string & name,
const std::string & doc_string);
511 const std::string & new_name,
512 const std::string & removal_date =
"");
522 void addCoupledVar(
const std::string & name,
const Real value,
const std::string & doc_string);
533 const std::vector<Real> & value,
534 const std::string & doc_string);
555 const std::string & base_name,
556 const std::string & num_name,
557 const std::string & doc_string);
559 const std::string & base_name,
560 const std::string & num_name,
561 const std::string & doc_string);
569 std::string
getMooseType(
const std::string & name)
const;
570 std::vector<std::string>
getVecMooseType(
const std::string & name)
const;
586 std::string
getDocString(
const std::string & name)
const;
595 void setDocString(
const std::string & name,
const std::string & doc);
600 std::string
getDocUnit(
const std::string & name)
const;
608 void setDocUnit(
const std::string & name,
const std::string & doc_unit);
648 std::string
type(
const std::string & name)
const;
653 bool isPrivate(
const std::string & name)
const;
685 std::optional<std::string>
getBase()
const;
730 const std::string & name,
747 const std::vector<std::tuple<std::string,
774 using Parameters::operator=;
775 using Parameters::operator+=;
786 void checkParams(
const std::string & parsing_syntax);
795 void finalize(
const std::string & parsing_syntax);
810 std::filesystem::path
811 getFileBase(
const std::optional<std::string> & param_name = std::optional<std::string>())
const;
846 bool hasDefault(
const std::string & param_name)
const;
884 void defaultCoupledValue(
const std::string & coupling_name, Real value,
unsigned int i = 0);
910 const std::vector<std::string> & exclude = {},
911 const bool allow_private =
false);
931 const std::vector<std::string> & include,
932 bool allow_private =
false);
947 const std::string & common_name,
948 bool allow_private =
false,
949 bool override_default =
false);
988 template <
typename T>
998 template <
typename R1,
1000 typename V1 =
typename std::conditional<std::is_same<R1, MooseEnumItem>::value,
1003 typename V2 =
typename std::conditional<std::is_same<R2, MooseEnumItem>::value,
1006 std::vector<std::pair<R1, R2>>
get(
const std::string & param1,
const std::string & param2)
const;
1027 void setReservedValues(
const std::string & name,
const std::set<std::string> & reserved);
1033 std::set<std::string>
reservedValues(
const std::string & name)
const;
1050 const hit::Node *
getHitNode(
const std::string & param)
const;
1056 void setHitNode(
const std::string & param,
const hit::Node & node,
const SetParamHitNodeKey);
1071 std::string
errorPrefix(
const std::string & param)
const;
1077 std::string
rawParamVal(
const std::string & param)
const;
1083 template <
typename T>
1095 template <
typename T>
1096 bool isType(
const std::string & name)
const;
1104 std::string
varName(
const std::string & var_param_name,
1105 const std::string & moose_object_with_var_param_name)
const;
1115 const std::string & new_name,
1116 const std::string & new_docstring);
1125 const std::string & new_name,
1126 const std::string & new_docstring);
1129 const std::string & new_name,
1130 const std::string & removal_date);
1133 const std::string & new_name,
1134 const std::string & removal_date);
1150 template <
typename T>
1151 const T &
get(std::string_view
name)
const;
1161 template <
typename T>
1171 template <
typename T>
1173 const std::string & name,
1174 const std::string & new_name =
"",
1175 const std::string & new_description =
"");
1189 std::vector<std::string>
paramAliases(
const std::string & param_name)
const;
1224 template <
typename T>
1230 template <
typename T>
1239 const std::string & new_name,
1241 const std::string & removal_date);
1244 const std::string & new_name,
1246 const std::string & removal_date);
1299 if (
_params.count(param) == 0)
1300 mooseError(
"param '", param,
"' not present in InputParams");
1306 if (
_params.count(param) == 0)
1307 mooseError(
"param '", param,
"' not present in InputParams");
1331 template <
typename T,
typename S>
1332 void setParamHelper(
const std::string & name, T & l_value,
const S & r_value);
1342 template <
typename T>
1344 const std::string & syntax,
1345 const bool required,
1346 const bool value_required);
1373 std::vector<std::tuple<std::string,
1419 template <
typename T>
1426 template <
typename T>
1433 checkConsistentType<T>(
name);
1435 T & result = this->Parameters::set<T>(
name);
1445 template <
typename T,
typename... Ts>
1449 Ts... extra_input_parameters)
1455 template <
typename T,
typename UP_T>
1458 const std::string & short_name,
1459 InputParameters::Parameter<std::vector<T>> * param,
1462 mooseAssert(param,
"Parameter is NULL");
1479 std::vector<std::string>
vars;
1480 if (fp.ParseAndDeduceVariables(
_params[short_name]._range_function,
vars) != -1)
1482 oss <<
"Error parsing expression: " <<
_params[short_name]._range_function <<
'\n';
1487 std::vector<UP_T> parbuf(
vars.size());
1490 const std::vector<T> &
value = param->set();
1493 bool need_to_iterate =
false;
1498 for (
unsigned int j = 0; j <
vars.size(); j++)
1500 if (
vars[j] == short_name)
1502 if (
value.size() == 0)
1504 oss <<
"Range checking empty vector: " <<
_params[short_name]._range_function <<
'\n';
1508 parbuf[j] =
value[i];
1509 need_to_iterate =
true;
1511 else if (
vars[j] == short_name +
"_size")
1512 parbuf[j] =
value.size();
1515 if (
vars[j].substr(0, short_name.size() + 1) != short_name +
"_")
1517 oss <<
"Error parsing expression: " <<
_params[short_name]._range_function <<
'\n';
1520 std::istringstream iss(
vars[j]);
1521 iss.seekg(short_name.size() + 1);
1524 if (iss >> index && iss.eof())
1526 if (index >=
value.size())
1528 oss <<
"Error parsing expression: " <<
_params[short_name]._range_function
1529 <<
"\nOut of range variable " <<
vars[j] <<
'\n';
1532 parbuf[j] =
value[index];
1536 oss <<
"Error parsing expression: " <<
_params[short_name]._range_function
1537 <<
"\nInvalid variable " <<
vars[j] <<
'\n';
1545 auto tmp_eps = fp.epsilon();
1547 UP_T result = fp.Eval(&parbuf[0]);
1548 fp.setEpsilon(tmp_eps);
1553 oss <<
"Error evaluating expression: " <<
_params[short_name]._range_function <<
'\n';
1559 oss <<
"Range check failed for parameter " << full_name
1560 <<
"\n\tExpression: " <<
_params[short_name]._range_function <<
"\n";
1561 if (need_to_iterate)
1562 oss <<
"\t Component: " << i <<
'\n';
1565 }
while (need_to_iterate && ++i <
value.size());
1568 template <
typename T,
typename UP_T>
1571 const std::string & short_name,
1572 InputParameters::Parameter<T> * param,
1575 mooseAssert(param,
"Parameter is NULL");
1582 if (fp.Parse(
_params[short_name]._range_function, short_name) != -1)
1584 oss <<
"Error parsing expression: " <<
_params[short_name]._range_function <<
'\n';
1590 auto tmp_eps = fp.epsilon();
1593 std::vector<UP_T>
value(1, param->set());
1594 UP_T result = fp.Eval(&
value[0]);
1595 fp.setEpsilon(tmp_eps);
1599 oss <<
"Error evaluating expression: " <<
_params[short_name]._range_function
1600 <<
"\nPerhaps you used the wrong variable name?\n";
1605 oss <<
"Range check failed for parameter " << full_name
1606 <<
"\n\tExpression: " <<
_params[short_name]._range_function <<
"\n\tValue: " <<
value[0]
1610 template <
typename T>
1613 const std::string & error_string)
const 1617 T param = this->get<T>(
name);
1623 return this->get<T>(
name);
1626 template <
typename T>
1631 checkConsistentType<T>(
name);
1633 InputParameters::insert<T>(
name);
1635 metadata._required =
true;
1636 if constexpr (isFunctorNameType<T>())
1637 metadata._doc_string = appendFunctorDescription<T>(doc_string);
1639 metadata._doc_string = doc_string;
1642 template <
typename T>
1646 const std::string & )
1648 mooseError(
"You cannot call addRequiredParam and supply a default value for this type, please " 1649 "use addParam instead");
1652 template <
typename T,
typename S>
1657 checkConsistentType<T>(
name);
1659 T & l_value = InputParameters::set<T>(
name);
1661 if constexpr (isFunctorNameType<T>())
1662 metadata._doc_string = appendFunctorDescription<T>(doc_string);
1664 metadata._doc_string = doc_string;
1672 metadata._set_by_add_param =
true;
1675 template <
typename T>
1680 checkConsistentType<T>(
name);
1682 InputParameters::insert<T>(
name);
1683 if constexpr (isFunctorNameType<T>())
1684 _params[
name]._doc_string = appendFunctorDescription<T>(doc_string);
1689 template <
typename T,
typename S>
1696 template <
typename T>
1699 const std::string &
syntax,
1700 const bool required,
1701 const bool value_required)
1704 "This type is not a supported command line parameter type. See " 1705 "CommandLine::populateCommandLineParams to add it as a supported type.");
1711 std::vector<std::string> syntax_split;
1716 mooseAssert(cl_data->syntax.size(),
"Empty token");
1720 for (
const auto & val : syntax_split)
1721 if (val.rfind(
"-", 0) == 0)
1723 if (!std::regex_search(val, std::regex(
"^\\-+[a-zA-Z]")))
1726 "' for the command line parameter '",
1728 "' is invalid. It must begin with an alphabetical character.");
1730 cl_data->switches.push_back(val);
1734 cl_data->required = required;
1735 cl_data->global =
false;
1738 if constexpr (std::is_same_v<T, bool>)
1740 (
void)value_required;
1744 else if constexpr (std::is_same_v<T, MooseEnum>)
1746 (
void)value_required;
1747 cl_data->argument_type = CommandLineMetadata::ArgumentType::REQUIRED;
1750 else if (value_required)
1751 cl_data->argument_type = CommandLineMetadata::ArgumentType::REQUIRED;
1754 cl_data->argument_type = CommandLineMetadata::ArgumentType::OPTIONAL;
1757 template <
typename T>
1760 const std::string & parsed_function,
1761 const std::string & doc_string)
1763 addRequiredParam<T>(
name, doc_string);
1767 template <
typename T>
1771 const std::string & parsed_function,
1772 const std::string & doc_string)
1778 template <
typename T>
1781 const std::string & parsed_function,
1782 const std::string & doc_string)
1784 addParam<T>(
name, doc_string);
1788 template <
typename T>
1791 const std::string & custom_type,
1792 const std::string & doc_string)
1794 addRequiredParam<T>(
name, doc_string);
1798 template <
typename T>
1802 const std::string & custom_type,
1803 const std::string & doc_string)
1809 template <
typename T>
1812 const std::string & custom_type,
1813 const std::string & doc_string)
1815 addParam<T>(
name, doc_string);
1819 template <
typename T>
1822 const std::string & custom_type,
1823 const std::string & doc_string,
1824 const std::string & deprecation_message)
1827 addParam<T>(
name, doc_string);
1829 metadata._custom_type = custom_type;
1831 metadata._deprecation_message = deprecation_message;
1835 template <
typename T>
1840 checkConsistentType<T>(
name);
1842 InputParameters::insert<T>(
name);
1846 template <
typename T>
1851 checkConsistentType<T>(
name);
1855 metadata._is_private =
true;
1856 metadata._set_by_add_param =
true;
1859 template <
typename T>
1862 const std::string &
syntax,
1863 const std::string & doc_string)
1865 static_assert(!std::is_same_v<T, bool>,
"Cannot be used for a bool");
1867 addRequiredParam<T>(
name, doc_string);
1868 addCommandLineParamHelper<T>(
name,
syntax,
true,
true);
1871 template <
typename T>
1874 const std::string &
syntax,
1875 const std::string & doc_string)
1877 static_assert(!std::is_same_v<T, MooseEnum>,
1878 "addCommandLineParam() without a value cannot be used with a MooseEnum because a " 1879 "MooseEnum requires initialization");
1881 auto constexpr is_bool = std::is_same_v<T, bool>;
1882 if constexpr (is_bool)
1883 addParam<T>(
name,
false, doc_string);
1885 addParam<T>(
name, doc_string);
1887 addCommandLineParamHelper<T>(
1891 template <
typename T>
1894 const std::string &
syntax,
1896 const std::string & doc_string)
1898 if constexpr (std::is_same_v<T, bool>)
1899 mooseAssert(!
value,
"Default for bool must be false");
1902 addCommandLineParamHelper<T>(
name,
syntax,
false,
true);
1905 template <
typename T>
1908 const std::string &
syntax,
1910 const std::string & doc_string)
1912 mooseAssert(
name ==
"mesh_only" ||
name ==
"recover" ||
name ==
"run",
1913 "Not supported for new parameters");
1914 static_assert(!std::is_same_v<T, bool>,
"Cannot be used for a bool (does not take a value)");
1916 addCommandLineParamHelper<T>(
name,
syntax,
false,
false);
1919 template <
typename T>
1932 if (!this->Parameters::have_parameter<T>(
name))
1937 ")\nbut the parameter already exists as type (",
1942 template <
typename T>
1947 if (!this->have_parameter<T>(
name))
1951 metadata._required =
false;
1952 metadata._is_private =
true;
1953 metadata._controllable =
false;
1956 template <
typename T>
1961 suppressParameter<T>(
name);
1965 template <
typename T>
1971 if (!this->have_parameter<T>(
name))
1977 template <
typename T>
1983 if (!this->have_parameter<T>(
name))
1984 mooseError(
"Unable to un-require nonexistent parameter: ",
name);
1989 template <
typename T>
1993 const std::string & doc_string,
1994 const std::string & deprecation_message)
1998 "Attempting to deprecate via addDeprecatedParam the parameter, '" 1999 <<
name <<
"', already deprecated via deprecateParam or renamed via renameParam");
2002 _params[
name]._deprecation_message = deprecation_message;
2006 template <
typename T>
2009 const std::string & doc_string,
2010 const std::string & deprecation_message)
2014 "Attempting to deprecate via addDeprecatedParam the parameter, '" 2015 <<
name <<
"', already deprecated via deprecateParam or renamed via renameParam");
2016 addParam<T>(
name, doc_string);
2018 _params[
name]._deprecation_message = deprecation_message;
2024 void InputParameters::addRequiredParam<MooseEnum>(
const std::string &
name,
2026 const std::string & doc_string);
2029 void InputParameters::addRequiredParam<MultiMooseEnum>(
const std::string &
name,
2031 const std::string & doc_string);
2034 void InputParameters::addRequiredParam<std::vector<MooseEnum>>(
2035 const std::string &
name,
2036 const std::vector<MooseEnum> & moose_enums,
2037 const std::string & doc_string);
2040 void InputParameters::addRequiredParam<std::vector<MultiMooseEnum>>(
2041 const std::string &
name,
2042 const std::vector<MultiMooseEnum> & moose_enums,
2043 const std::string & doc_string);
2046 void InputParameters::addParam<MooseEnum>(
const std::string & ,
2047 const std::string & );
2050 void InputParameters::addParam<MultiMooseEnum>(
const std::string & ,
2051 const std::string & );
2054 void InputParameters::addParam<std::vector<MooseEnum>>(
const std::string & ,
2055 const std::string & );
2058 void InputParameters::addParam<std::vector<MultiMooseEnum>>(
const std::string & ,
2059 const std::string & );
2063 InputParameters::addRequiredParam<std::vector<MultiMooseEnum>>(
const std::string & ,
2064 const std::string & );
2067 void InputParameters::addPrivateParam<MooseEnum>(
const std::string & );
2070 void InputParameters::addPrivateParam<MultiMooseEnum>(
const std::string & );
2073 void InputParameters::addDeprecatedParam<MooseEnum>(
const std::string & ,
2074 const std::string & ,
2075 const std::string & );
2079 InputParameters::addDeprecatedParam<MultiMooseEnum>(
const std::string & ,
2080 const std::string & ,
2081 const std::string & );
2084 void InputParameters::addDeprecatedParam<std::vector<MooseEnum>>(
2085 const std::string & ,
2086 const std::string & ,
2087 const std::string & );
2091 void InputParameters::setParamHelper<PostprocessorName, Real>(
const std::string &
name,
2092 PostprocessorName & l_value,
2093 const Real & r_value);
2096 void InputParameters::setParamHelper<PostprocessorName, int>(
const std::string &
name,
2097 PostprocessorName & l_value,
2098 const int & r_value);
2101 void InputParameters::setParamHelper<FunctionName, Real>(
const std::string & ,
2102 FunctionName & l_value,
2103 const Real & r_value);
2106 void InputParameters::setParamHelper<FunctionName, int>(
const std::string & ,
2107 FunctionName & l_value,
2108 const int & r_value);
2111 void InputParameters::setParamHelper<MaterialPropertyName, Real>(
const std::string & ,
2112 MaterialPropertyName & l_value,
2113 const Real & r_value);
2116 void InputParameters::setParamHelper<MaterialPropertyName, int>(
const std::string & ,
2117 MaterialPropertyName & l_value,
2118 const int & r_value);
2121 void InputParameters::setParamHelper<MooseFunctorName, Real>(
const std::string & ,
2122 MooseFunctorName & l_value,
2123 const Real & r_value);
2126 void InputParameters::setParamHelper<MooseFunctorName, int>(
const std::string & ,
2127 MooseFunctorName & l_value,
2128 const int & r_value);
2131 template <
typename T>
2142 std::stringstream
err;
2143 err <<
"The parameter \"" <<
name <<
"\" is being retrieved before being set.";
2158 InputParameters::getParamHelper<MooseEnum>(
const std::string &
name,
2165 InputParameters::getParamHelper<MultiMooseEnum>(
const std::string &
name,
2170 template <
typename R1,
typename R2,
typename V1,
typename V2>
2171 std::vector<std::pair<R1, R2>>
2177 const auto & v1 = get<V1>(param1);
2178 const auto & v2 = get<V2>(param2);
2181 if (controllable.count(param1) || controllable.count(param2))
2185 " are controllable parameters and cannot be retireved using " 2186 "the MooseObject::getParam/InputParameters::get methods for pairs");
2188 if (v1.size() != v2.size())
2196 ") are of different lengths \n");
2198 std::vector<std::pair<R1, R2>> parameter_pairs;
2199 auto i1 = v1.begin();
2200 auto i2 = v2.begin();
2201 for (; i1 != v1.end() && i2 != v2.end(); ++i1, ++i2)
2202 parameter_pairs.emplace_back(std::make_pair(*i1, *i2));
2203 return parameter_pairs;
2208 template <
typename T>
2216 return have_parameter<T>(
name);
2219 template <
typename T>
2225 return Parameters::get<T>(
name);
2228 template <
typename T>
2234 return Parameters::have_parameter<T>(
name);
2237 template <
typename T>
2240 const std::string & name_in,
2241 const std::string & new_name,
2242 const std::string & new_description)
2245 const auto p_name = new_name.empty() ? name_in : new_name;
2249 "' parameter could not be transferred because it does not exist with type '",
2250 MooseUtils::prettyCppType<T>(),
2251 "' in the source parameters");
2252 if (
name != name_in)
2253 mooseWarning(
"The transferred parameter " + name_in +
" is deprecated in favor of " +
name +
2254 " in the source parameters. The new name should likely be used for the parameter " 2255 "transfer instead.");
2256 const std::string description =
2265 else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
2266 addRequiredParam<T>(p_name, source_params.
get<T>(
name), description);
2268 addRequiredRangeCheckedParam<T>(
2271 addRequiredParam<T>(p_name, description);
2284 std::vector<Real> coupled_values;
2293 addRangeCheckedParam<T>(p_name,
2300 else if constexpr (std::is_same_v<MooseEnum, T> || std::is_same_v<MultiMooseEnum, T>)
2301 addParam<T>(p_name, source_params.
get<T>(
name), description);
2305 addParam<T>(p_name, source_params.
get<T>(
name), description);
2307 addParam<T>(p_name, description);
2313 _params[p_name]._is_private =
true;
2315 _params[p_name]._controllable =
true;
2322 template <
typename T>
2331 template <
typename T>
2335 return std::is_same_v<T, MFEMScalarCoefficientName> ||
2336 std::is_same_v<T, MFEMVectorCoefficientName>;
2339 template <
typename T,
typename A>
2348 template <
typename T>
2352 return std::is_same_v<T, MooseFunctorName>
2354 || std::is_same_v<T, MFEMScalarCoefficientName>
2359 template <
typename T,
typename A>
2366 template <
typename T>
2371 return std::is_same_v<T, MFEMVectorCoefficientName>;
2377 template <
typename T,
typename A>
2384 template <
typename T>
2393 template <
typename T>
2400 template <
typename T>
2404 auto numeric_value_type = []()
2407 Moose::internal::getNullptrExample<T>()))
2410 Moose::internal::getNullptrExample<T>()))
2411 return "numeric vector value (enclosed in curly braces)";
2414 mooseAssert(
false,
"We control instantiations of this method");
2419 return MooseUtils::trim(doc_string,
". ") +
". A functor is any of the following: a variable, " +
2427 " material property, a function, a postprocessor or a " + numeric_value_type() +
".";
std::string name(const ElemQuality q)
constexpr bool isVectorFunctorNameTypeHelper(T *)
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 ...
RelationshipManagerType
Main types of Relationship Managers.
Base class for everything in MOOSE with a name and a type.
constexpr bool isMFEMFunctorNameTypeHelper(T *)
Generic factory class for build all sorts of objects.
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
void mooseWarning(Args &&... args)
Emit a warning message with the given stringified, concatenated args.
T * get(const std::unique_ptr< T > &u)
The MooseUtils::get() specializations are used to support making forwards-compatible code changes fro...
Class that hold the whole problem being solved.
Storage for action instances.
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
This class wraps provides and tracks access to command line parameters.
Real value(unsigned n, unsigned alpha, unsigned beta, Real x)
Every object that can be built by the factory should be derived from this class.
std::function< void(const InputParameters &, InputParameters &)> RelationshipManagerInputParameterCallback
The type for the callback to set RelationshipManager parameters.
Specialized factory for generic Action System objects.
std::string trim(const std::string &str, const std::string &white_space=" \\\)
Standard scripting language trim function.
std::string docstring(const std::string &desc)
Augment docstring if NEML2 is not enabled.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type It sho...
std::string demangle(const char *name)
constexpr bool isFunctorNameTypeHelper(T *ex)
constexpr bool isScalarFunctorNameTypeHelper(T *)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void add_command_line_name(const std::string &name)
constexpr T * getNullptrExample()
IntRange< T > make_range(T beg, T end)
class infix_ostream_iterator if void
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type...
Parses MOOSE input using HIT/WASP.
map_type::const_iterator const_iterator
std::string stringJoin(const std::vector< std::string > &values, const std::string &separator=" ")
Concatenates value into a single string separated by separator.
Class for parsing input files.
ExecFlagEnum execute_flags
Storage for the registered execute flags.