From 2bcaff45cf2bcf56ca44e9c37a2e187828dd2327 Mon Sep 17 00:00:00 2001 From: Wenqing Wang <wenqing.wang@ufz.de> Date: Wed, 5 Dec 2018 16:03:38 +0100 Subject: [PATCH] [Process] added members to check element deactivation --- ProcessLib/Process.cpp | 9 +++++++++ ProcessLib/Process.h | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ProcessLib/Process.cpp b/ProcessLib/Process.cpp index d9107b04979..34b533e3ab2 100644 --- a/ProcessLib/Process.cpp +++ b/ProcessLib/Process.cpp @@ -190,6 +190,15 @@ MathLib::MatrixSpecifications Process::getMatrixSpecifications( &l.getGhostIndices(), &_sparsity_pattern}; } +void Process::checkElementDeactivation(double const time, const int process_id) +{ + auto const& variables_per_process = getProcessVariables(process_id); + for (auto const& variable : variables_per_process) + { + variable.get().checkElementDeactivation(time); + } +} + void Process::preAssemble(const double t, GlobalVector const& x) { preAssembleConcreteProcess(t, x); diff --git a/ProcessLib/Process.h b/ProcessLib/Process.h index 496f136889e..8d6984e5bd3 100644 --- a/ProcessLib/Process.h +++ b/ProcessLib/Process.h @@ -90,6 +90,8 @@ public: _coupled_solutions = coupled_solutions; } + void checkElementDeactivation(double const time, const int process_id); + bool isMonolithicSchemeUsed() const { return _use_monolithic_scheme; } virtual void setCoupledTermForTheStaggeredSchemeToLocalAssemblers() {} void preAssemble(const double t, GlobalVector const& x) override final; @@ -284,7 +286,7 @@ protected: GlobalSparsityPattern _sparsity_pattern; -private: +protected: /// Variables used by this process. For the monolithic scheme or a /// single process, the size of the outer vector is one. For the /// staggered scheme, the size of the outer vector is the number of the @@ -292,7 +294,6 @@ private: std::vector<std::vector<std::reference_wrapper<ProcessVariable>>> _process_variables; -protected: /// Vector for boundary conditions. For the monolithic scheme or a /// single process, the size of the vector is one. For the staggered /// scheme, the size of vector is the number of the coupled processes. -- GitLab