Skip to content
Snippets Groups Projects
Commit 91f8f0b0 authored by Bernd Flemisch's avatar Bernd Flemisch
Browse files

implicit cell-centered: mixed Dirichlet/Neumann conditions need a special...

implicit cell-centered: mixed Dirichlet/Neumann conditions need a special treatment. Until something better is found, the Dirichlet part of the mixed conditions is set in a strong way.

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10709 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 1d04c3ed
No related branches found
No related tags found
No related merge requests found
...@@ -204,15 +204,33 @@ protected: ...@@ -204,15 +204,33 @@ protected:
Valgrind::SetUndefined(values); Valgrind::SetUndefined(values);
unsigned bfIdx = isIt->indexInInside(); unsigned bfIdx = isIt->indexInInside();
this->asImp_().computeFlux(values, bfIdx, true);
values *= this->curVolVars_(0).extrusionFactor(); // check for mixed Dirichlet/Neumann conditions
if (bcTypes.hasNeumann())
// add fluxes to the residual
Valgrind::CheckDefined(values);
for (int eqIdx = 0; eqIdx < numEq; ++eqIdx)
{ {
if (bcTypes.isDirichlet(eqIdx)) this->problem_().dirichlet(values, *isIt);
this->residual_[0][eqIdx] += values[eqIdx]; Valgrind::CheckDefined(values);
// set Dirichlet conditions in a strong sense
for (int eqIdx = 0; eqIdx < numEq; ++eqIdx)
{
if (bcTypes.isDirichlet(eqIdx))
this->residual_[0][eqIdx]
= this->curPriVar_(0, eqIdx) - values[eqIdx];
}
}
else // pure Dirichlet conditions
{
this->asImp_().computeFlux(values, bfIdx, true);
values *= this->curVolVars_(0).extrusionFactor();
// add fluxes to the residual
Valgrind::CheckDefined(values);
for (int eqIdx = 0; eqIdx < numEq; ++eqIdx)
{
if (bcTypes.isDirichlet(eqIdx))
this->residual_[0][eqIdx] += values[eqIdx];
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment