38 if (property_type ==
"Constant")
40 std::vector<double>
const values =
44 switch (values.size())
50 return std::make_unique<Constant>(property_value);
56 return std::make_unique<Constant>(property_value);
62 Vector{values[0], values[1], values[2]};
63 return std::make_unique<Constant>(property_value);
70 values[3], values[4], values[5]};
71 return std::make_unique<Constant>(property_value);
77 values[0], values[1], values[2], values[3], values[4],
78 values[5], values[6], values[7], values[8]};
79 return std::make_unique<Constant>(property_value);
85 "Creation of a constant property with %i components is not " 92 return std::make_unique<Constant>(property_value);
110 OGS_FATAL(
"The specified component property type '%s' was not recognized",
111 property_type.c_str());
118 boost::optional<BaseLib::ConfigTree>
const& config)
126 auto const& property_configs = config->getConfigSubtreeList(
"property");
127 if (property_configs.empty())
132 auto properties = std::make_unique<PropertyArray>();
134 for (
auto property_config : property_configs)
137 auto const property_name =
139 property_config.getConfigParameter<std::string>(
"name");
std::unique_ptr< PropertyArray > createProperties(boost::optional< BaseLib::ConfigTree > const &config)
boost::variant< double, Pair, Vector, SymmTensor, Tensor, std::string > PropertyDataType
T getConfigParameter(std::string const ¶m) const
std::unique_ptr< MaterialPropertyLib::Property > createProperty(BaseLib::ConfigTree const &config)
std::array< double, 6 > SymmTensor
PropertyType convertStringToProperty(std::string const &inString)
std::array< double, 2 > Pair
#define OGS_FATAL(fmt,...)
std::array< double, 3 > Vector
std::array< double, 9 > Tensor