From 5e7bd146e3639d700bd24e97185ee614221b746f Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Fri, 19 Mar 2021 17:27:07 +0100 Subject: [PATCH] [MPL] Added createGeneralWaterVapourLatentHeat --- .../CreateGeneralWaterVapourLatentHeat.cpp | 35 +++++++++++++++++++ .../CreateGeneralWaterVapourLatentHeat.h | 26 ++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.cpp create mode 100644 MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.h diff --git a/MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.cpp b/MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.cpp new file mode 100644 index 00000000000..23f007a400e --- /dev/null +++ b/MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.cpp @@ -0,0 +1,35 @@ +/** + * \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 19, 2021, 11:51 AM + */ + +#include "CreateGeneralWaterVapourLatentHeat.h" + +#include "BaseLib/ConfigTree.h" +#include "GeneralWaterVapourLatentHeat.h" +#include "MaterialLib/MPL/Property.h" + +namespace MaterialPropertyLib +{ +std::unique_ptr<Property> createGeneralWaterVapourLatentHeat( + BaseLib::ConfigTree const& config) +{ + //! \ogs_file_param{properties__property__type} + config.checkConfigParameter("type", "GeneralWaterVapourLatentHeat"); + DBUG("Create GeneralWaterVapourLatentHeat phase 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__GeneralWaterVapourLatentHeat} + return std::make_unique<GeneralWaterVapourLatentHeat>( + std::move(property_name)); +} +} // namespace MaterialPropertyLib diff --git a/MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.h b/MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.h new file mode 100644 index 00000000000..bc85416ca24 --- /dev/null +++ b/MaterialLib/MPL/Properties/Enthalpy/CreateGeneralWaterVapourLatentHeat.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 19, 2021, 11:51 AM + */ + +#pragma once + +#include <memory> + +namespace BaseLib +{ +class ConfigTree; +} + +namespace MaterialPropertyLib +{ +class Property; +std::unique_ptr<Property> createGeneralWaterVapourLatentHeat( + BaseLib::ConfigTree const& config); +} // namespace MaterialPropertyLib -- GitLab