diff --git a/ProcessLib/TH2M/CreateTH2MProcess.cpp b/ProcessLib/TH2M/CreateTH2MProcess.cpp index 3f069daf824b4865438bd9e17661d88c078f1867..159c44bf51becba72fe5649cc647c745c7df7664 100644 --- a/ProcessLib/TH2M/CreateTH2MProcess.cpp +++ b/ProcessLib/TH2M/CreateTH2MProcess.cpp @@ -27,7 +27,7 @@ namespace ProcessLib { namespace TH2M { -std::unique_ptr<PhaseTransitionModels> createPhaseTransitionModel( +std::unique_ptr<PhaseTransitionModel> createPhaseTransitionModel( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) { // the approach here is that the number of phase components determines the diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.cpp b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.cpp index e1f629df75f2dd71cf75dda9b5dd1772e4efa7c0..b2c048fa462c546fca181b58ccca8283dbc00e04 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.cpp +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.cpp @@ -15,7 +15,7 @@ namespace TH2M { PhaseTransitionDissolution::PhaseTransitionDissolution( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) - : PhaseTransitionModels(media) + : PhaseTransitionModel(media) { DBUG("Create PhaseTransitionDissolution constitutive model."); } diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.h b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.h index 0e4021c876b92aff1d0d2ceb9025988acb2bfe61..32af7def7d37c94de0948e6f26d125047f8871b1 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.h +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionDissolution.h @@ -12,7 +12,7 @@ #include <map> #include "MaterialLib/MPL/Medium.h" -#include "PhaseTransitionModels.h" +#include "PhaseTransitionModel.h" namespace ProcessLib { @@ -21,7 +21,7 @@ namespace TH2M /// Dissolution only: Amounts of the gas phase can be dissolved into the liquid /// phase. This is realized by defining two components in the liqid phase but /// only one (or zero) components in the gas phase. -struct PhaseTransitionDissolution : PhaseTransitionModels +struct PhaseTransitionDissolution : PhaseTransitionModel { explicit PhaseTransitionDissolution( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.cpp b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.cpp index cd5124f5c1526ceaa4d16f49d5b325dcf712c7fa..baa544c8cd453a2b1ff7fae58e2f2678268c4615 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.cpp +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.cpp @@ -74,7 +74,7 @@ namespace TH2M { PhaseTransitionEvaporation::PhaseTransitionEvaporation( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) - : PhaseTransitionModels(media), + : PhaseTransitionModel(media), n_components_gas_{numberOfGasComponents(media)}, gas_phase_vapour_component_index_{findVapourComponentIndex(media)}, // dry air component is complement of vapour component index diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.h b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.h index 22d30c9c82a5d7735909b349a349299ff782395b..b350817df08d4958c26689606d14f1e6ed23d77e 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.h +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionEvaporation.h @@ -12,13 +12,13 @@ #include <map> #include "MaterialLib/MPL/Medium.h" -#include "PhaseTransitionModels.h" +#include "PhaseTransitionModel.h" namespace ProcessLib { namespace TH2M { -struct PhaseTransitionEvaporation : PhaseTransitionModels +struct PhaseTransitionEvaporation : PhaseTransitionModel { explicit PhaseTransitionEvaporation( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.cpp b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.cpp index d4e1d4ed3bed84080537fa33aefcd1df27995a3e..9029da1b577b70b727006bb22cb4ef6058d76843 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.cpp +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.cpp @@ -17,7 +17,7 @@ namespace TH2M { PhaseTransitionFull::PhaseTransitionFull( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) - : PhaseTransitionModels(media) + : PhaseTransitionModel(media) { DBUG("Create PhaseTransitionFull constitutive model."); } diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.h b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.h index 70551d114d6b6e60b32d002f01c6032e1c98ff52..705e7e50543df34fe3867d911e156bf37349f1cf 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.h +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionFull.h @@ -12,7 +12,7 @@ #include <map> #include "MaterialLib/MPL/Medium.h" -#include "PhaseTransitionModels.h" +#include "PhaseTransitionModel.h" namespace ProcessLib { @@ -22,7 +22,7 @@ namespace TH2M /// an equilibrium and water evaporates into the gas phase according to Dalton's /// law. This is realized by defining two components in each gas and liquid /// phase. -struct PhaseTransitionFull : PhaseTransitionModels +struct PhaseTransitionFull : PhaseTransitionModel { explicit PhaseTransitionFull( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionModels.h b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionModel.h similarity index 96% rename from ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionModels.h rename to ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionModel.h index 930e7ab1d1898b74ded9bf67ae86a6a2533a2a37..07ddeaf253d00417df09d5746d981741c487456e 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionModels.h +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionModel.h @@ -5,7 +5,6 @@ * Distributed under a Modified BSD License. * See accompanying file LICENSE.txt or * http://www.opengeosys.org/project/license - * */ #pragma once @@ -18,9 +17,9 @@ namespace ProcessLib { namespace TH2M { -struct PhaseTransitionModels +struct PhaseTransitionModel { - explicit PhaseTransitionModels( + explicit PhaseTransitionModel( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) { @@ -43,7 +42,7 @@ struct PhaseTransitionModels } } - virtual ~PhaseTransitionModels() = default; + virtual ~PhaseTransitionModel() = default; virtual void computeConstitutiveVariables( const MaterialPropertyLib::Medium* medium, diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.cpp b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.cpp index ec425c500012619a6a67b5d0745ee8694ad08e4e..e046096906dfde0b573727caec34c53eb99200bd 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.cpp +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.cpp @@ -17,7 +17,7 @@ namespace TH2M { PhaseTransitionNone::PhaseTransitionNone( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& media) - : PhaseTransitionModels(media) + : PhaseTransitionModel(media) { DBUG("Create PhaseTransitionNone constitutive model."); diff --git a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.h b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.h index 2c3709155160daf8542c6184de89627c10c5c761..67950101e7950994a708cde148843c3f629307ca 100644 --- a/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.h +++ b/ProcessLib/TH2M/PhaseTransitionModels/PhaseTransitionNone.h @@ -12,13 +12,13 @@ #include <map> #include "MaterialLib/MPL/Medium.h" -#include "PhaseTransitionModels.h" +#include "PhaseTransitionModel.h" namespace ProcessLib { namespace TH2M { -struct PhaseTransitionNone : PhaseTransitionModels +struct PhaseTransitionNone : PhaseTransitionModel { explicit PhaseTransitionNone( std::map<int, std::shared_ptr<MaterialPropertyLib::Medium>> const& diff --git a/ProcessLib/TH2M/TH2MProcessData.h b/ProcessLib/TH2M/TH2MProcessData.h index 21222506a84ee68c7e0cbbe17fdef9ceaa2cb764..d7ae91b5c404a6297f8720d93e42c8efef5706ce 100644 --- a/ProcessLib/TH2M/TH2MProcessData.h +++ b/ProcessLib/TH2M/TH2MProcessData.h @@ -19,7 +19,7 @@ #include "PhaseTransitionModels/PhaseTransitionDissolution.h" #include "PhaseTransitionModels/PhaseTransitionEvaporation.h" #include "PhaseTransitionModels/PhaseTransitionFull.h" -#include "PhaseTransitionModels/PhaseTransitionModels.h" +#include "PhaseTransitionModels/PhaseTransitionModel.h" #include "PhaseTransitionModels/PhaseTransitionNone.h" namespace MaterialLib @@ -48,7 +48,7 @@ struct TH2MProcessData MaterialLib::Solids::MechanicsBase<DisplacementDim>>> solid_materials; - std::unique_ptr<PhaseTransitionModels> phase_transition_model_ = nullptr; + std::unique_ptr<PhaseTransitionModel> phase_transition_model_ = nullptr; ParameterLib::Parameter<double> const& reference_temperature; diff --git a/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionEvaporation.cpp b/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionEvaporation.cpp index cc3bd4b7247d8b480a1d5f5f715db476cd6a7038..7bbcb87f18f270237eb8cb4356fb7a87a1177253 100644 --- a/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionEvaporation.cpp +++ b/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionEvaporation.cpp @@ -112,7 +112,7 @@ TEST(ProcessLib, TH2MPhaseTransitionEvaporation) double const time = std::numeric_limits<double>::quiet_NaN(); double const dt = std::numeric_limits<double>::quiet_NaN(); - std::unique_ptr<ProcessLib::TH2M::PhaseTransitionModels> ptm = + auto ptm = std::make_unique<ProcessLib::TH2M::PhaseTransitionEvaporation>(media); double const pGR = 1000000.; diff --git a/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionNone.cpp b/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionNone.cpp index 3445040f2e2556aae34a251f3280999cca5d54c9..e54bf1d8680b92d76c1006500649d3b3dc1c216e 100644 --- a/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionNone.cpp +++ b/Tests/ProcessLib/TH2M/TestTH2MPhaseTransitionNone.cpp @@ -84,8 +84,7 @@ TEST(ProcessLib, TH2MPhaseTransitionNone) double const time = std::numeric_limits<double>::quiet_NaN(); double const dt = std::numeric_limits<double>::quiet_NaN(); - std::unique_ptr<ProcessLib::TH2M::PhaseTransitionModels> ptm = - std::make_unique<ProcessLib::TH2M::PhaseTransitionNone>(media); + auto ptm = std::make_unique<ProcessLib::TH2M::PhaseTransitionNone>(media); double const pGR = 1000000.; double const pCap = 1000000.;