Commit ca22b1d9 authored by Dennis Gläser's avatar Dennis Gläser

[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).
parent 52969af9
...@@ -187,6 +187,16 @@ public: ...@@ -187,6 +187,16 @@ public:
const auto residual = this->evalLocalResidual(); const auto residual = this->evalLocalResidual();
for (const auto& scv : scvs(this->fvGeometry())) for (const auto& scv : scvs(this->fvGeometry()))
res[scv.dofIndex()] += residual[scv.localDofIndex()]; 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);
} }
/*! /*!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment