From b909c58fce4567c33f2f1c704ddbd79afc7d3e38 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Tue, 16 Nov 2021 11:01:54 +0100 Subject: [PATCH] [md][fcsubdomainlocalassember] Revise incorporation of Dirichlet BCs (cherry picked from commit 3b56a4b8f284d2bc89a806d081ff70139b9c7df7) --- dumux/multidomain/subdomainfclocalassembler.hh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/dumux/multidomain/subdomainfclocalassembler.hh b/dumux/multidomain/subdomainfclocalassembler.hh index c7648a1b95..dee0c4fa07 100644 --- a/dumux/multidomain/subdomainfclocalassembler.hh +++ b/dumux/multidomain/subdomainfclocalassembler.hh @@ -388,10 +388,13 @@ public: // For other dofs, add the contribution of the partial derivative. for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) { - if (bcTypes.isCouplingDirichlet(eqIdx)) - A[scv.dofIndex()][globalJ][eqIdx][pvIdx] = partialDerivs[scv.localDofIndex()][eqIdx]; - else if (bcTypes.isDirichlet(eqIdx)) - A[scv.dofIndex()][globalJ][eqIdx][pvIdx] = 0.0; + for (int pvIdx = 0; pvIdx < GridView::dimension; ++pvIdx) + { + if (bcTypes.isCouplingDirichlet(pvIdx) && pvIdx == scv.dofAxis()) // TODO? + A[scv.dofIndex()][globalJ][eqIdx][eqIdx] = partialDerivs[scv.localDofIndex()][eqIdx]; + else if (bcTypes.isDirichlet(pvIdx) && pvIdx == scv.dofAxis()) + A[scv.dofIndex()][globalJ][eqIdx][eqIdx] = 0.0; + } } } } -- GitLab