From 2a82f9534325e8632243936ed09f22e4c2baa49d Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt Date: Thu, 13 Jan 2022 11:34:34 +0100 Subject: [PATCH] [md][localassembler] Fix Dirichlet conditions (cherry picked from commit 995ed67388616623251516d2c97303fc1693fe31) --- dumux/multidomain/subdomainfclocalassembler.hh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dumux/multidomain/subdomainfclocalassembler.hh b/dumux/multidomain/subdomainfclocalassembler.hh index dee0c4fa07..da4f5fdfe5 100644 --- a/dumux/multidomain/subdomainfclocalassembler.hh +++ b/dumux/multidomain/subdomainfclocalassembler.hh @@ -388,12 +388,12 @@ public: // For other dofs, add the contribution of the partial derivative. for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) { - for (int pvIdx = 0; pvIdx < GridView::dimension; ++pvIdx) + for (int pvIdx = 0; pvIdx < JacobianBlock::block_type::cols; ++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; + if (bcTypes.isCouplingDirichlet(eqIdx)) + A[scv.dofIndex()][globalJ][eqIdx][pvIdx] = partialDerivs[scv.localDofIndex()][pvIdx]; + else if (bcTypes.isDirichlet(eqIdx)) + A[scv.dofIndex()][globalJ][eqIdx][pvIdx] = 0.0; } } } -- GitLab