From ef10e57ca294a287ab8c1aaea5d5ee7f5100e291 Mon Sep 17 00:00:00 2001 From: Dmitri Naumov <dmitri.naumov@ufz.de> Date: Wed, 18 Sep 2019 19:15:17 +0200 Subject: [PATCH] [PL] Remove _process_data.t from other proceses. Updating for the changed postTimestep* interface. --- ProcessLib/HydroMechanics/HydroMechanicsFEM.h | 4 +++- ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp | 5 ++--- ProcessLib/HydroMechanics/HydroMechanicsProcessData.h | 1 - ProcessLib/RichardsMechanics/RichardsMechanicsFEM.h | 5 +++-- .../RichardsMechanics/RichardsMechanicsProcess.cpp | 1 - .../RichardsMechanics/RichardsMechanicsProcessData.h | 1 - .../SmallDeformationNonlocalFEM.h | 3 ++- .../SmallDeformationNonlocalProcess.cpp | 9 ++++----- .../SmallDeformationNonlocalProcessData.h | 1 - .../ThermoHydroMechanics/ThermoHydroMechanicsFEM.h | 5 +++-- .../ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp | 5 ++--- .../ThermoHydroMechanicsProcessData.h | 1 - .../ThermoMechanicalPhaseFieldFEM.h | 4 ++-- .../ThermoMechanicalPhaseFieldProcess.cpp | 9 ++++----- .../ThermoMechanicalPhaseFieldProcessData.h | 1 - ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h | 3 ++- ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp | 5 ++--- ProcessLib/ThermoMechanics/ThermoMechanicsProcessData.h | 1 - 18 files changed, 29 insertions(+), 35 deletions(-) diff --git a/ProcessLib/HydroMechanics/HydroMechanicsFEM.h b/ProcessLib/HydroMechanics/HydroMechanicsFEM.h index c6369d6de62..77a82993e16 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsFEM.h +++ b/ProcessLib/HydroMechanics/HydroMechanicsFEM.h @@ -167,7 +167,9 @@ public: } } - void postTimestepConcrete(std::vector<double> const& /*local_x*/) override + void postTimestepConcrete(std::vector<double> const& /*local_x*/, + double const /*t*/, + double const /*dt*/) override { unsigned const n_integration_points = _integration_method.getNumberOfPoints(); diff --git a/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp b/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp index e58fac62b59..859dd79af3f 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp +++ b/ProcessLib/HydroMechanics/HydroMechanicsProcess.cpp @@ -374,7 +374,6 @@ void HydroMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( DBUG("PreTimestep HydroMechanicsProcess."); _process_data.dt = dt; - _process_data.t = t; if (hasMechanicalProcess(process_id)) { @@ -389,14 +388,14 @@ void HydroMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( template <int DisplacementDim> void HydroMechanicsProcess<DisplacementDim>::postTimestepConcreteProcess( - GlobalVector const& x, const double /*t*/, const double /*delta_t*/, + GlobalVector const& x, double const t, double const dt, const int process_id) { DBUG("PostTimestep HydroMechanicsProcess."); ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; GlobalExecutor::executeSelectedMemberOnDereferenced( &LocalAssemblerInterface::postTimestep, _local_assemblers, - pv.getActiveElementIDs(), getDOFTable(process_id), x); + pv.getActiveElementIDs(), getDOFTable(process_id), x, t, dt); } template <int DisplacementDim> diff --git a/ProcessLib/HydroMechanics/HydroMechanicsProcessData.h b/ProcessLib/HydroMechanics/HydroMechanicsProcessData.h index 7fb0981690c..a3d17717ffb 100644 --- a/ProcessLib/HydroMechanics/HydroMechanicsProcessData.h +++ b/ProcessLib/HydroMechanics/HydroMechanicsProcessData.h @@ -121,7 +121,6 @@ struct HydroMechanicsProcessData MeshLib::PropertyVector<double>* pressure_interpolated = nullptr; double dt = std::numeric_limits<double>::quiet_NaN(); - double t = std::numeric_limits<double>::quiet_NaN(); EIGEN_MAKE_ALIGNED_OPERATOR_NEW; }; diff --git a/ProcessLib/RichardsMechanics/RichardsMechanicsFEM.h b/ProcessLib/RichardsMechanics/RichardsMechanicsFEM.h index f1e21ea5ce1..cefde3add4b 100644 --- a/ProcessLib/RichardsMechanics/RichardsMechanicsFEM.h +++ b/ProcessLib/RichardsMechanics/RichardsMechanicsFEM.h @@ -120,8 +120,9 @@ public: } } - void postTimestepConcrete(std::vector<double> const& /*local_x*/ - ) override + void postTimestepConcrete(std::vector<double> const& /*local_x*/, + double const /*t*/, + double const /*dt*/) override { unsigned const n_integration_points = _integration_method.getNumberOfPoints(); diff --git a/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp b/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp index 2282ae73127..723db312462 100644 --- a/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp +++ b/ProcessLib/RichardsMechanics/RichardsMechanicsProcess.cpp @@ -335,7 +335,6 @@ void RichardsMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( DBUG("PreTimestep RichardsMechanicsProcess."); _process_data.dt = dt; - _process_data.t = t; if (hasMechanicalProcess(process_id)) { diff --git a/ProcessLib/RichardsMechanics/RichardsMechanicsProcessData.h b/ProcessLib/RichardsMechanics/RichardsMechanicsProcessData.h index d7bf29b6a59..ca116cd9560 100644 --- a/ProcessLib/RichardsMechanics/RichardsMechanicsProcessData.h +++ b/ProcessLib/RichardsMechanics/RichardsMechanicsProcessData.h @@ -74,7 +74,6 @@ struct RichardsMechanicsProcessData MeshLib::PropertyVector<double>* pressure_interpolated = nullptr; double dt = std::numeric_limits<double>::quiet_NaN(); - double t = std::numeric_limits<double>::quiet_NaN(); EIGEN_MAKE_ALIGNED_OPERATOR_NEW; }; diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h index e47f5f4ff65..47127350126 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalFEM.h @@ -524,7 +524,8 @@ public: } } - void postTimestepConcrete(std::vector<double> const& /*local_x*/) override + void postTimestepConcrete(std::vector<double> const& /*local_x*/, + double const /*t*/, double const /*dt*/) override { unsigned const n_integration_points = _integration_method.getNumberOfPoints(); diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp index e5c027ab595..94afb7f694f 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcess.cpp @@ -296,21 +296,20 @@ void SmallDeformationNonlocalProcess<DisplacementDim>:: template <int DisplacementDim> void SmallDeformationNonlocalProcess< DisplacementDim>::preTimestepConcreteProcess(GlobalVector const& /*x*/, - double const t, + double const /*t*/, double const dt, int const /*process_id*/) { DBUG("PreTimestep SmallDeformationNonlocalProcess."); _process_data.dt = dt; - _process_data.t = t; } template <int DisplacementDim> void SmallDeformationNonlocalProcess< DisplacementDim>::postTimestepConcreteProcess(GlobalVector const& x, - double const /*t*/, - double const /*dt*/, + double const t, + double const dt, int const process_id) { DBUG("PostTimestep SmallDeformationNonlocalProcess."); @@ -319,7 +318,7 @@ void SmallDeformationNonlocalProcess< GlobalExecutor::executeSelectedMemberOnDereferenced( &LocalAssemblerInterface::postTimestep, _local_assemblers, - pv.getActiveElementIDs(), *_local_to_global_index_map, x); + pv.getActiveElementIDs(), *_local_to_global_index_map, x, t, dt); } template <int DisplacementDim> diff --git a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h index 814072e2205..f40af4a5abd 100644 --- a/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h +++ b/ProcessLib/SmallDeformationNonlocal/SmallDeformationNonlocalProcessData.h @@ -52,7 +52,6 @@ struct SmallDeformationNonlocalProcessData double crack_volume = 0.0; double dt = std::numeric_limits<double>::quiet_NaN(); - double t = std::numeric_limits<double>::quiet_NaN(); EIGEN_MAKE_ALIGNED_OPERATOR_NEW; }; diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h index eb66005fdcd..d2bbd56f3b0 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsFEM.h @@ -105,8 +105,9 @@ public: } } - void postTimestepConcrete(std::vector<double> const& /*local_x*/ - ) override + void postTimestepConcrete(std::vector<double> const& /*local_x*/, + double const /*t*/, + double const /*dt*/) override { unsigned const n_integration_points = _integration_method.getNumberOfPoints(); diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp index 823ab71831a..51fb7f3d484 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcess.cpp @@ -339,7 +339,6 @@ void ThermoHydroMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( DBUG("PreTimestep ThermoHydroMechanicsProcess."); _process_data.dt = dt; - _process_data.t = t; if (hasMechanicalProcess(process_id)) { @@ -351,13 +350,13 @@ void ThermoHydroMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( template <int DisplacementDim> void ThermoHydroMechanicsProcess<DisplacementDim>::postTimestepConcreteProcess( - GlobalVector const& x, const double /*t*/, const double /*delta_t*/, + GlobalVector const& x, double const t, double const dt, const int process_id) { DBUG("PostTimestep ThermoHydroMechanicsProcess."); GlobalExecutor::executeMemberOnDereferenced( &LocalAssemblerInterface::postTimestep, _local_assemblers, - getDOFTable(process_id), x); + getDOFTable(process_id), x, t, dt); } template <int DisplacementDim> diff --git a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h index cab217a599a..05d1445e5bb 100644 --- a/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h +++ b/ProcessLib/ThermoHydroMechanics/ThermoHydroMechanicsProcessData.h @@ -52,7 +52,6 @@ struct ThermoHydroMechanicsProcessData Eigen::Matrix<double, DisplacementDim, 1> const specific_body_force; double dt = std::numeric_limits<double>::quiet_NaN(); - double t = std::numeric_limits<double>::quiet_NaN(); MeshLib::PropertyVector<double>* pressure_interpolated = nullptr; MeshLib::PropertyVector<double>* temperature_interpolated = nullptr; diff --git a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldFEM.h b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldFEM.h index 99ca36ae23d..014e509b4b5 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldFEM.h +++ b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldFEM.h @@ -232,8 +232,8 @@ public: } } - void postTimestepConcrete(std::vector<double> const& /*local_x*/ - ) override + void postTimestepConcrete(std::vector<double> const& /*local_x*/, + double const /*t*/, double const /*dt*/) override { unsigned const n_integration_points = _integration_method.getNumberOfPoints(); diff --git a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp index 9b5e2597aab..78e477a54fc 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp +++ b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcess.cpp @@ -272,7 +272,6 @@ void ThermoMechanicalPhaseFieldProcess< DBUG("PreTimestep ThermoMechanicalPhaseFieldProcess."); _process_data.dt = dt; - _process_data.t = t; if (process_id != _mechanics_related_process_id) { @@ -290,8 +289,8 @@ void ThermoMechanicalPhaseFieldProcess< template <int DisplacementDim> void ThermoMechanicalPhaseFieldProcess< DisplacementDim>::postTimestepConcreteProcess(GlobalVector const& x, - double const /*t*/, - double const /*dt*/, + double const t, + double const dt, int const process_id) { DBUG("PostTimestep ThermoMechanicalPhaseFieldProcess."); @@ -300,8 +299,8 @@ void ThermoMechanicalPhaseFieldProcess< GlobalExecutor::executeSelectedMemberOnDereferenced( &ThermoMechanicalPhaseFieldLocalAssemblerInterface::postTimestep, - _local_assemblers, pv.getActiveElementIDs(), getDOFTable(process_id), - x); + _local_assemblers, pv.getActiveElementIDs(), getDOFTable(process_id), x, + t, dt); } template <int DisplacementDim> diff --git a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcessData.h b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcessData.h index c94504d92cd..0ed6d454c94 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcessData.h +++ b/ProcessLib/ThermoMechanicalPhaseField/ThermoMechanicalPhaseFieldProcessData.h @@ -52,7 +52,6 @@ struct ThermoMechanicalPhaseFieldProcessData std::numeric_limits<double>::quiet_NaN(); double dt = std::numeric_limits<double>::quiet_NaN(); - double t = std::numeric_limits<double>::quiet_NaN(); }; } // namespace ThermoMechanicalPhaseField diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h b/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h index 9dd1fa8e4dd..02b1524c13b 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsFEM.h @@ -177,7 +177,8 @@ public: } } - void postTimestepConcrete(std::vector<double> const& /*local_x*/) override + void postTimestepConcrete(std::vector<double> const& /*local_x*/, + double const /*t*/, double const /*dt*/) override { unsigned const n_integration_points = _integration_method.getNumberOfPoints(); diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp index 2a19a11f21f..0ef2dd16327 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsProcess.cpp @@ -395,7 +395,6 @@ void ThermoMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( DBUG("PreTimestep ThermoMechanicsProcess."); _process_data.dt = dt; - _process_data.t = t; ProcessLib::ProcessVariable const& pv = getProcessVariables(process_id)[0]; @@ -427,7 +426,7 @@ void ThermoMechanicsProcess<DisplacementDim>::preTimestepConcreteProcess( template <int DisplacementDim> void ThermoMechanicsProcess<DisplacementDim>::postTimestepConcreteProcess( - GlobalVector const& x, const double /*t*/, const double /*delta_t*/, + GlobalVector const& x, double const t, double const dt, int const process_id) { if (process_id != _process_data.mechanics_process_id) @@ -442,7 +441,7 @@ void ThermoMechanicsProcess<DisplacementDim>::postTimestepConcreteProcess( GlobalExecutor::executeSelectedMemberOnDereferenced( &ThermoMechanicsLocalAssemblerInterface::postTimestep, _local_assemblers, pv.getActiveElementIDs(), - *_local_to_global_index_map, x); + *_local_to_global_index_map, x, t, dt); } template <int DisplacementDim> diff --git a/ProcessLib/ThermoMechanics/ThermoMechanicsProcessData.h b/ProcessLib/ThermoMechanics/ThermoMechanicsProcessData.h index 65e9aa1f6fb..4f20938b945 100644 --- a/ProcessLib/ThermoMechanics/ThermoMechanicsProcessData.h +++ b/ProcessLib/ThermoMechanics/ThermoMechanicsProcessData.h @@ -57,7 +57,6 @@ struct ThermoMechanicsProcessData int const heat_conduction_process_id; double dt = std::numeric_limits<double>::quiet_NaN(); - double t = std::numeric_limits<double>::quiet_NaN(); EIGEN_MAKE_ALIGNED_OPERATOR_NEW; }; -- GitLab