From ca22b1d931dc05751d4da4417d8661eac824671e Mon Sep 17 00:00:00 2001 From: DennisGlaeser <dennis.glaeser@iws.uni-stuttgart.de> Date: Wed, 2 Jan 2019 14:59:40 +0100 Subject: [PATCH] [md][box][localassembler] apply Dirichlet Bcs in residual Multidomain with the box scheme did not work with the absolute residual criterion since the computed residuals were wrong (Dirichlet constraints were not incorporated). --- dumux/multidomain/subdomainboxlocalassembler.hh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dumux/multidomain/subdomainboxlocalassembler.hh b/dumux/multidomain/subdomainboxlocalassembler.hh index 8ee2f9a860..3aa4e51dc9 100644 --- a/dumux/multidomain/subdomainboxlocalassembler.hh +++ b/dumux/multidomain/subdomainboxlocalassembler.hh @@ -187,6 +187,16 @@ public: const auto residual = this->evalLocalResidual(); for (const auto& scv : scvs(this->fvGeometry())) res[scv.dofIndex()] += residual[scv.localDofIndex()]; + + auto applyDirichlet = [&] (const auto& scvI, + const auto& dirichletValues, + const auto eqIdx, + const auto pvIdx) + { + res[scvI.dofIndex()][eqIdx] = this->curElemVolVars()[scvI].priVars()[pvIdx] - dirichletValues[pvIdx]; + }; + + this->asImp_().evalDirichletBoundaries(applyDirichlet); } /*! -- GitLab