From abc55d3b6341c35b533cf6959c13f0dba9d35292 Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Tue, 16 Mar 2021 11:09:47 +0100 Subject: [PATCH] [MPL] Added createWaterVapourLatentHeat --- .../Enthalpy/CreateWaterVapourLatentHeat.cpp | 34 +++++++++++++++++++ .../Enthalpy/CreateWaterVapourLatentHeat.h | 26 ++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.cpp create mode 100644 MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.h diff --git a/MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.cpp b/MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.cpp new file mode 100644 index 00000000000..3e362469d57 --- /dev/null +++ b/MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.cpp @@ -0,0 +1,34 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * Created on March 16, 2021, 10:13 AM + */ + +#include "CreateWaterVapourLatentHeat.h" + +#include "BaseLib/ConfigTree.h" +#include "MaterialLib/MPL/Property.h" +#include "WaterVapourLatentHeat.h" + +namespace MaterialPropertyLib +{ +std::unique_ptr<Property> createWaterVapourLatentHeat( + BaseLib::ConfigTree const& config) +{ + //! \ogs_file_param{properties__property__type} + config.checkConfigParameter("type", "WaterVapourLatentHeat"); + DBUG("Create WaterVapourLatentHeat medium property"); + + // Second access for storage. + //! \ogs_file_param{properties__property__name} + auto property_name = config.peekConfigParameter<std::string>("name"); + + //! \ogs_file_param_special{properties__property__WaterVapourLatentHeat} + return std::make_unique<WaterVapourLatentHeat>(std::move(property_name)); +} +} // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.h b/MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.h new file mode 100644 index 00000000000..4f38f7ce781 --- /dev/null +++ b/MaterialLib/MPL/Properties/Enthalpy/CreateWaterVapourLatentHeat.h @@ -0,0 +1,26 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + * Created on March 16, 2021, 10:13 AM + */ + +#pragma once + +#include <memory> + +namespace BaseLib +{ +class ConfigTree; +} + +namespace MaterialPropertyLib +{ +class Property; +std::unique_ptr<Property> createWaterVapourLatentHeat( + BaseLib::ConfigTree const& config); +} // namespace MaterialPropertyLib -- GitLab