diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/Base.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/Base.h index 60d229558fe9fca170c7be472a9d23b88bcc394a..10a8ffc179aca6860aab1e6ffa47e28be079ffda 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/Base.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/Base.h @@ -13,6 +13,7 @@ #include "MaterialLib/MPL/Medium.h" #include "MathLib/KelvinVector.h" #include "ParameterLib/SpatialPosition.h" +#include "ProcessLib/Reflection/ReflectionData.h" namespace ProcessLib::ThermoRichardsMechanics { @@ -116,6 +117,13 @@ struct StrainData { // TODO Move initialization to the local assembler. KelvinVector<DisplacementDim> eps = KVzero<DisplacementDim>(); + + static auto reflect() + { + using Self = StrainData<DisplacementDim>; + + return ProcessLib::Reflection::reflectWithName("epsilon", &Self::eps); + } }; } // namespace ProcessLib::ThermoRichardsMechanics diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/DarcyLaw.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/DarcyLaw.h index 74508febd7f33b641add3116b440d6ee21589d7f..1fc24f14182eafb0ef1034f51f1d7d1a955b062f 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/DarcyLaw.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/DarcyLaw.h @@ -11,7 +11,6 @@ #pragma once #include "LiquidDensity.h" -#include "LiquidViscosity.h" #include "Permeability.h" #include "ThermoOsmosis.h" @@ -21,6 +20,14 @@ template <int DisplacementDim> struct DarcyLawData { Eigen::Vector<double, DisplacementDim> v_darcy; + + static auto reflect() + { + using Self = DarcyLawData<DisplacementDim>; + + return ProcessLib::Reflection::reflectWithName("velocity", + &Self::v_darcy); + } }; template <int DisplacementDim> diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidDensity.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidDensity.h index c4de0275b4bdee8d0f073aa57cf2d411074f93e2..9ca326252dba2d2ac459802ca3346367890e419e 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidDensity.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidDensity.h @@ -19,6 +19,12 @@ struct LiquidDensityData double rho_LR; double drho_LR_dp; double drho_LR_dT; + + static auto reflect() + { + return ProcessLib::Reflection::reflectWithName( + "liquid_density", &LiquidDensityData::rho_LR); + } }; template <int DisplacementDim> diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidViscosity.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidViscosity.h index 2f60ad5aaf7a1a6241dc0762dc5388560942c494..6ccdcd370ac95548118a175fa6e2ea0737153291 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidViscosity.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/LiquidViscosity.h @@ -10,13 +10,19 @@ #pragma once -#include "Porosity.h" +#include "ProcessLib/ThermoRichardsMechanics/Constitutive/Base.h" namespace ProcessLib::ThermoRichardsMechanics { struct LiquidViscosityData { double viscosity; + + static auto reflect() + { + return ProcessLib::Reflection::reflectWithName( + "viscosity", &LiquidViscosityData::viscosity); + } }; template <int DisplacementDim> diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/Porosity.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/Porosity.h index 22af0a1ccba8f68a371bb5c93dc31a8f26af37b1..7bafb13b290f185e1137eb8b106046d33bee9b55 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/Porosity.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/Porosity.h @@ -11,7 +11,6 @@ #pragma once #include "Bishops.h" -#include "MathLib/KelvinVector.h" #include "Saturation.h" #include "SolidCompressibility.h" @@ -20,6 +19,12 @@ namespace ProcessLib::ThermoRichardsMechanics struct PorosityData { double phi; + + static auto reflect() + { + return ProcessLib::Reflection::reflectWithName("porosity", + &PorosityData::phi); + } }; struct TransportPorosityData @@ -28,8 +33,8 @@ struct TransportPorosityData static auto reflect() { - return std::make_tuple( - ReflectionData{"transport_porosity", &TransportPorosityData::phi}); + return ProcessLib::Reflection::reflectWithName( + "transport_porosity", &TransportPorosityData::phi); } }; diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/Saturation.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/Saturation.h index eb1c1229a9b72649cae70226555d2b525f31e42b..589c87ecb4cc417c28b8669d8a6b688ea9c7fb45 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/Saturation.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/Saturation.h @@ -17,6 +17,12 @@ namespace ProcessLib::ThermoRichardsMechanics struct SaturationData { double S_L; + + static auto reflect() + { + return ProcessLib::Reflection::reflectWithName("saturation", + &SaturationData::S_L); + } }; struct SaturationDataDeriv diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidDensity.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidDensity.h index 4ea8bedb59f72f7014af5c5ba04c2f934ccdd181..fb13c344fa11b36143bcba33171881c159705d4f 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidDensity.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidDensity.h @@ -19,6 +19,12 @@ struct SolidDensityData { double rho_SR; double dry_density_solid; + + static auto reflect() + { + return ProcessLib::Reflection::reflectWithName( + "dry_density_solid", &SolidDensityData::dry_density_solid); + } }; template <int DisplacementDim> diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidMechanics.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidMechanics.h index 3def597ab16aba9fba969076280c2ddf463eb608..ec591359a8b72c10606a7dd359f4f8ad090a5d20 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidMechanics.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/SolidMechanics.h @@ -25,6 +25,15 @@ struct SolidMechanicsDataStateful // TODO it seems fragile that some data have to be initialized that way. KelvinVector<DisplacementDim> sigma_eff = KVzero<DisplacementDim>(); KelvinVector<DisplacementDim> eps_m = KVzero<DisplacementDim>(); + + static auto reflect() + { + using Self = SolidMechanicsDataStateful<DisplacementDim>; + + // TODO add eps_m? + return ProcessLib::Reflection::reflectWithName("sigma", + &Self::sigma_eff); + } }; template <int DisplacementDim> diff --git a/ProcessLib/ThermoRichardsMechanics/Constitutive/Swelling.h b/ProcessLib/ThermoRichardsMechanics/Constitutive/Swelling.h index b3a14ad19160fccac81194e450d06f75c98b2a20..54091d39898e7329a46e1322bbf4c384924035b3 100644 --- a/ProcessLib/ThermoRichardsMechanics/Constitutive/Swelling.h +++ b/ProcessLib/ThermoRichardsMechanics/Constitutive/Swelling.h @@ -20,6 +20,14 @@ template <int DisplacementDim> struct SwellingDataStateful { KelvinVector<DisplacementDim> sigma_sw = KVzero<DisplacementDim>(); + + static auto reflect() + { + using Self = SwellingDataStateful<DisplacementDim>; + + return ProcessLib::Reflection::reflectWithName("swelling_stress", + &Self::sigma_sw); + } }; template <int DisplacementDim> diff --git a/ProcessLib/ThermoRichardsMechanics/ConstitutiveSetting.h b/ProcessLib/ThermoRichardsMechanics/ConstitutiveSetting.h index 3148811324fb5d795fab9989285210dfb7f2e848..2df2974fdbaea1d4fa505a0833f13f7c2a1ef3c0 100644 --- a/ProcessLib/ThermoRichardsMechanics/ConstitutiveSetting.h +++ b/ProcessLib/ThermoRichardsMechanics/ConstitutiveSetting.h @@ -30,6 +30,7 @@ namespace ProcessLib::ThermoRichardsMechanics { + /// Data whose state must be tracked by the TRM process. template <int DisplacementDim> struct StatefulData @@ -40,6 +41,19 @@ struct StatefulData StrainData<DisplacementDim> eps_data; SwellingDataStateful<DisplacementDim> swelling_data; SolidMechanicsDataStateful<DisplacementDim> s_mech_data; + + static auto reflect() + { + using Self = StatefulData<DisplacementDim>; + + return ProcessLib::Reflection::reflectWithoutName( + &Self::S_L_data, + &Self::poro_data, + &Self::transport_poro_data, + &Self::eps_data, + &Self::swelling_data, + &Self::s_mech_data); + } }; /// Data that is needed for output purposes, but not directly for the assembly. @@ -50,6 +64,16 @@ struct OutputData LiquidDensityData rho_L_data; LiquidViscosityData mu_L_data; SolidDensityData rho_S_data; + + static auto reflect() + { + using Self = OutputData<DisplacementDim>; + + return ProcessLib::Reflection::reflectWithoutName(&Self::darcy_data, + &Self::rho_L_data, + &Self::mu_L_data, + &Self::rho_S_data); + } }; /// Data that is needed for the equation system assembly.