Skip to content
Snippets Groups Projects
Commit e203e24f authored by wenqing's avatar wenqing
Browse files

[MPL] Further changes for passing the geometry dimension to createProperty

parent 6ff13d10
No related branches found
No related tags found
No related merge requests found
......@@ -486,7 +486,8 @@ void ProjectData::parseMedia(
_media[id] =
(id == material_ids[0])
? MaterialPropertyLib::createMedium(
medium_config, _parameters,
_mesh_vec[0]->getDimension(), medium_config,
_parameters,
_local_coordinate_system ? &*_local_coordinate_system
: nullptr,
_curves)
......
......@@ -22,7 +22,8 @@
namespace Tests
{
std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml)
std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml,
int const geometry_dimension)
{
auto const ptree = Tests::readXml(xml.c_str());
BaseLib::ConfigTree conf(ptree, "", BaseLib::ConfigTree::onerror,
......@@ -33,7 +34,8 @@ std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml)
std::unique_ptr<MathLib::PiecewiseLinearInterpolation>>
curves;
return MPL::createMedium(config, parameters, nullptr, curves);
return MPL::createMedium(geometry_dimension, config, parameters, nullptr,
curves);
}
std::unique_ptr<MaterialPropertyLib::Property> createTestProperty(
......
......@@ -32,7 +32,8 @@ class Property;
namespace Tests
{
std::unique_ptr<MPL::Medium> createTestMaterial(std::string const& xml);
std::unique_ptr<MPL::Medium> createTestMaterial(
std::string const& xml, int const geometry_dimension = 1);
std::unique_ptr<MaterialPropertyLib::Property> createTestProperty(
const char xml[],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment