From 8ab0031c5a60106c46de574eb6223613e8081d65 Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Tue, 18 Feb 2020 09:21:59 +0100 Subject: [PATCH] [PL/LiquidFlow] Forward dt to internal methods. Forward dt to assembleMatrixAndVector and computeDarcyVelocity as a preparation for the reorganization to MPL properties. --- .../LiquidFlow/LiquidFlowLocalAssembler-impl.h | 17 +++++++++-------- .../LiquidFlow/LiquidFlowLocalAssembler.h | 4 ++-- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h index 88dda145428..caf3efc49d1 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h +++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h @@ -24,7 +24,7 @@ namespace LiquidFlow template <typename ShapeFunction, typename IntegrationMethod, unsigned GlobalDim> void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: - assemble(double const t, double const /*dt*/, + assemble(double const t, double const dt, std::vector<double> const& local_x, std::vector<double> const& /*local_xdot*/, std::vector<double>& local_M_data, @@ -47,12 +47,14 @@ void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: if (permeability.size() == 1) { // isotropic or 1D problem. assembleMatrixAndVector<IsotropicCalculator>( - material_id, t, local_x, local_M_data, local_K_data, local_b_data); + material_id, t, dt, local_x, local_M_data, local_K_data, + local_b_data); } else { assembleMatrixAndVector<AnisotropicCalculator>( - material_id, t, local_x, local_M_data, local_K_data, local_b_data); + material_id, t, dt, local_x, local_M_data, local_K_data, + local_b_data); } } @@ -102,7 +104,7 @@ template <typename ShapeFunction, typename IntegrationMethod, template <typename LaplacianGravityVelocityCalculator> void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: assembleMatrixAndVector(const int material_id, double const t, - std::vector<double> const& local_x, + double const dt, std::vector<double> const& local_x, std::vector<double>& local_M_data, std::vector<double>& local_K_data, std::vector<double>& local_b_data) @@ -198,12 +200,12 @@ LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: if (permeability.size() == 1) { // isotropic or 1D problem. computeDarcyVelocityLocal<IsotropicCalculator>( - material_id, t, local_x, pos, velocity_cache_vectors); + material_id, t, dt, local_x, pos, velocity_cache_vectors); } else { computeDarcyVelocityLocal<AnisotropicCalculator>( - material_id, t, local_x, pos, velocity_cache_vectors); + material_id, t, dt, local_x, pos, velocity_cache_vectors); } return velocity_cache; } @@ -213,8 +215,7 @@ template <typename ShapeFunction, typename IntegrationMethod, template <typename LaplacianGravityVelocityCalculator> void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: computeDarcyVelocityLocal( - const int material_id, - const double t, + const int material_id, const double t, const double dt, std::vector<double> const& local_x, ParameterLib::SpatialPosition const& pos, MatrixOfVelocityAtIntegrationPoints& darcy_velocity_at_ips) const diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h index 7a16aed174e..2ccb9e956be 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h +++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h @@ -211,6 +211,7 @@ private: template <typename LaplacianGravityVelocityCalculator> void assembleMatrixAndVector(const int material_id, double const t, + double const dt, std::vector<double> const& local_x, std::vector<double>& local_M_data, std::vector<double>& local_K_data, @@ -218,8 +219,7 @@ private: template <typename LaplacianGravityVelocityCalculator> void computeDarcyVelocityLocal( - const int material_id, - const double t, + const int material_id, const double t, const double dt, std::vector<double> const& local_x, ParameterLib::SpatialPosition const& pos, MatrixOfVelocityAtIntegrationPoints& darcy_velocity_at_ips) const; -- GitLab