diff --git a/MaterialLib/MPL/CreateProperty.cpp b/MaterialLib/MPL/CreateProperty.cpp index c28569304728a94c15d9d4a042d9f07ea7823f47..94efb907ae7868a7ce9aa633927077ffb3250121 100644 --- a/MaterialLib/MPL/CreateProperty.cpp +++ b/MaterialLib/MPL/CreateProperty.cpp @@ -19,6 +19,7 @@ #include "ParameterLib/Parameter.h" #include "ParameterLib/Utils.h" +#include "Properties/CreateProperties.h" #include "Properties/Properties.h" #include "Component.h" diff --git a/MaterialLib/MPL/Properties/CreateIdealGasLaw.cpp b/MaterialLib/MPL/Properties/CreateIdealGasLaw.cpp new file mode 100644 index 0000000000000000000000000000000000000000..23f9e90fb02ab33bd54070cdbff729f89a590197 --- /dev/null +++ b/MaterialLib/MPL/Properties/CreateIdealGasLaw.cpp @@ -0,0 +1,26 @@ +/** + * \file + * \author Norbert Grunwald + * \date Sep 10, 2019 + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#include "BaseLib/ConfigTree.h" +#include "IdealGasLaw.h" + +namespace MaterialPropertyLib +{ +std::unique_ptr<IdealGasLaw> createIdealGasLaw( + BaseLib::ConfigTree const& config) +{ + config.checkConfigParameter("type", "IdealGasLaw"); + DBUG("Create IdealGasLaw medium property"); + return std::make_unique<IdealGasLaw>(); +} +} // namespace MaterialPropertyLib \ No newline at end of file diff --git a/MaterialLib/MPL/Properties/CreateIdealGasLaw.h b/MaterialLib/MPL/Properties/CreateIdealGasLaw.h new file mode 100644 index 0000000000000000000000000000000000000000..3f1c037b3d7e6437587a7af370623e6189d7e7c8 --- /dev/null +++ b/MaterialLib/MPL/Properties/CreateIdealGasLaw.h @@ -0,0 +1,30 @@ +/** + * \file + * \author Norbert Grunwald + * \date Sep 10, 2019 + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +namespace BaseLib +{ +class ConfigTree; +} + +namespace MaterialPropertyLib +{ +class IdealGasLaw; +} + +namespace MaterialPropertyLib +{ +std::unique_ptr<IdealGasLaw> createIdealGasLaw( + BaseLib::ConfigTree const& config); +} // namespace MaterialPropertyLib \ No newline at end of file diff --git a/MaterialLib/MPL/Properties/CreateProperties.h b/MaterialLib/MPL/Properties/CreateProperties.h new file mode 100644 index 0000000000000000000000000000000000000000..e13780c4607e9e688750cfae123ec732ed8f8383 --- /dev/null +++ b/MaterialLib/MPL/Properties/CreateProperties.h @@ -0,0 +1,15 @@ +/** + * \file + * \author Norbert Grunwald + * \date Sep 10, 2019 + * + * \copyright + * Copyright (c) 2012-2019, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ +#pragma once + +#include "CreateIdealGasLaw.h" diff --git a/MaterialLib/MPL/Properties/IdealGasLaw.h b/MaterialLib/MPL/Properties/IdealGasLaw.h index 69b35cba6556486c9d8495fb79c1ecbac5d55215..6e86069cc734dee32771ff1de5274bb14b599108 100644 --- a/MaterialLib/MPL/Properties/IdealGasLaw.h +++ b/MaterialLib/MPL/Properties/IdealGasLaw.h @@ -71,11 +71,4 @@ private: Component* _component; }; -inline std::unique_ptr<IdealGasLaw> createIdealGasLaw( - BaseLib::ConfigTree const& /*config*/) -{ - DBUG("Create IdealGasLaw medium property"); - return std::make_unique<IdealGasLaw>(); -} - } // namespace MaterialPropertyLib diff --git a/Tests/MaterialLib/TestMPLIdealGasLaw.cpp b/Tests/MaterialLib/TestMPLIdealGasLaw.cpp index bcdeb1d4e0e100552745ef3b66c76f03b25b0146..22e4030d32cd7b7c186f3a6bb30d72fe05734a34 100644 --- a/Tests/MaterialLib/TestMPLIdealGasLaw.cpp +++ b/Tests/MaterialLib/TestMPLIdealGasLaw.cpp @@ -44,7 +44,7 @@ TEST(MaterialPropertyLib, IdealGasLawOfPurePhase) m << " <properties>\n"; m << " <property>\n"; m << " <name>density</name>\n"; - m << " <type>IdealGaslaw</type>\n"; + m << " <type>IdealGasLaw</type>\n"; m << " </property>\n"; m << " <property>\n"; m << " <name>molar_mass</name>\n";