From 8b694e4042bee720289c7d678a1ff2fc824b3979 Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Thu, 29 Sep 2016 17:38:01 +0200 Subject: [PATCH] [PCS] Set velocity calculation outside of the linearization --- ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h | 9 +++++++++ ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h | 2 ++ ProcessLib/LocalAssemblerInterface.cpp | 7 +++++++ ProcessLib/LocalAssemblerInterface.h | 2 ++ 4 files changed, 20 insertions(+) diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h index 34c42024fdb..388d69d93b9 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h +++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler-impl.h @@ -150,6 +150,15 @@ void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: fac * rho_g * sm.dNdx.transpose() * perm.col(gravitational_axis_id); } } + +template <typename ShapeFunction, typename IntegrationMethod, + unsigned GlobalDim> +void LiquidFlowLocalAssembler<ShapeFunction, IntegrationMethod, GlobalDim>:: + computeSecondaryVariable(std::vector<double> const& local_x) +{ + (void) local_x; +} + } // end of namespace } // end of namespace diff --git a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h index 6b34deaa09d..39a20ecf653 100644 --- a/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h +++ b/ProcessLib/LiquidFlow/LiquidFlowLocalAssembler.h @@ -85,6 +85,8 @@ public: std::vector<double>& local_K_data, std::vector<double>& local_b_data) override; + void computeSecondaryVariable(std::vector<double> const& local_x) override; + Eigen::Map<const Eigen::RowVectorXd> getShapeMatrix( const unsigned integration_point) const override { diff --git a/ProcessLib/LocalAssemblerInterface.cpp b/ProcessLib/LocalAssemblerInterface.cpp index 5e572b76b05..6ce33e70073 100644 --- a/ProcessLib/LocalAssemblerInterface.cpp +++ b/ProcessLib/LocalAssemblerInterface.cpp @@ -26,6 +26,13 @@ void LocalAssemblerInterface::assembleWithJacobian( "assembler."); } +void LocalAssemblerInterface::computeSecondaryVariable(std::vector<double> const& /*local_x*/) +{ + OGS_FATAL( + "computeSecondaryVariable(...) function is not implemented in the local " + "assembler."); +} + void LocalAssemblerInterface::preTimestep( std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const& dof_table, GlobalVector const& x, diff --git a/ProcessLib/LocalAssemblerInterface.h b/ProcessLib/LocalAssemblerInterface.h index fc0520fd000..83084e12bea 100644 --- a/ProcessLib/LocalAssemblerInterface.h +++ b/ProcessLib/LocalAssemblerInterface.h @@ -45,6 +45,8 @@ public: std::vector<double>& local_b_data, std::vector<double>& local_Jac_data); + virtual void computeSecondaryVariable(std::vector<double> const& local_x); + virtual void preTimestep(std::size_t const mesh_item_id, NumLib::LocalToGlobalIndexMap const& dof_table, GlobalVector const& x, double const t, -- GitLab