27 std::string
const& parameter_name,
28 std::vector<std::unique_ptr<ParameterBase>>
const& parameters);
41 template <
typename ParameterDataType>
43 std::string
const& parameter_name,
44 std::vector<std::unique_ptr<ParameterBase>>
const& parameters,
45 int const num_components,
MeshLib::Mesh const*
const mesh =
nullptr)
50 if (parameter_ptr ==
nullptr)
56 auto*
const parameter =
60 OGS_FATAL(
"The read parameter `{:s}' is of incompatible type.",
64 if (num_components != 0 &&
65 parameter->getNumberOfGlobalComponents() != num_components)
68 "The read parameter `{:s}' has the wrong number of components "
69 "({:d} instead of {:d}).",
70 parameter_name, parameter->getNumberOfGlobalComponents(),
80 "The found parameter is not suitable for the use on the "
81 "required mesh.\n{:s}",
101 template <
typename ParameterDataType>
103 std::string
const& parameter_name,
104 std::vector<std::unique_ptr<ParameterBase>>
const& parameters,
105 int const num_components,
MeshLib::Mesh const*
const mesh =
nullptr)
107 auto* parameter = findParameterOptional<ParameterDataType>(
108 parameter_name, parameters, num_components, mesh);
113 "Could not find parameter `{:s}' in the provided parameters list.",
133 template <
typename ParameterDataType>
136 std::vector<std::unique_ptr<ParameterBase>>
const& parameters,
137 int const num_components,
MeshLib::Mesh const*
const mesh =
nullptr)
143 return findParameter<ParameterDataType>(
name, parameters, num_components,
162 template <
typename ParameterDataType>
165 std::vector<std::unique_ptr<ParameterBase>>
const& parameters,
166 int const num_components,
MeshLib::Mesh const*
const mesh =
nullptr)
177 return &findParameter<ParameterDataType>(*
name, parameters, num_components,
std::optional< T > getConfigParameterOptional(std::string const ¶m) const
T getConfigParameter(std::string const ¶m) const
std::optional< std::string > isDefinedOnSameMesh(ParameterBase const ¶meter, MeshLib::Mesh const &mesh)
Parameter< ParameterDataType > * findParameterOptional(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase >> const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Parameter< ParameterDataType > * findOptionalTagParameter(BaseLib::ConfigTree const &process_config, std::string const &tag, std::vector< std::unique_ptr< ParameterBase >> const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
Parameter< ParameterDataType > & findParameter(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase >> const ¶meters, int const num_components, MeshLib::Mesh const *const mesh=nullptr)
ParameterBase * findParameterByName(std::string const ¶meter_name, std::vector< std::unique_ptr< ParameterBase >> const ¶meters)