Commit 58800152 authored by Dennis Gläser's avatar Dennis Gläser Committed by Timo Koch
Browse files

[implicit] only update boundary volvars on pure Dirichlet boundaries

When complex boundary handling is inactive, we only use the boundary
volume variables on pure Dirichlet boundaries. Thus, updating becomes
obsolete.
parent 0e051b5b
......@@ -71,23 +71,9 @@ protected:
PrimaryVariables computeFlux_(const SubControlVolumeFace &scvf)
{
if (!scvf.boundary() /*TODO: || GET_PROP_VALUE(TypeTag, BoundaryReconstruction)*/)
{
return this->asImp_().computeFlux(scvf);
}
else
{
if (!constantBC)
{
// update corresponding boundary volume variables before flux calculation
const auto insideScvIdx = scvf.insideScvIdx();
const auto& insideScv = this->problem_().model().fvGeometries().subControlVolume(insideScvIdx);
const auto dirichletPriVars = this->problem_().dirichlet(this->element_(), scvf);
this->model_().curVolVars_(scvf.outsideScvIdx()).update(dirichletPriVars, this->problem_(), this->element_(), insideScv);
}
return this->asImp_().evalBoundary_(scvf);
}
}
PrimaryVariables evalBoundary_(const SubControlVolumeFace &scvf)
......@@ -229,6 +215,15 @@ protected:
// temporary vector to store the Dirichlet boundary fluxes
PrimaryVariables flux(0);
if (!constantBC)
{
// update corresponding boundary volume variables before flux calculation
const auto insideScvIdx = scvf.insideScvIdx();
const auto& insideScv = this->problem_().model().fvGeometries().subControlVolume(insideScvIdx);
const auto dirichletPriVars = this->problem_().dirichlet(this->element_(), scvf);
this->model_().curVolVars_(scvf.outsideScvIdx()).update(dirichletPriVars, this->problem_(), this->element_(), insideScv);
}
auto dirichletFlux = this->asImp_().computeFlux(scvf);
// add fluxes to the residual
......
......@@ -70,9 +70,15 @@ public:
{
for (auto&& scvFace : problem.model().fvGeometries(element).scvfs())
{
// if we are not on a boundary, skip the rest
if (!scvFace.boundary())
continue;
// When complex boundary handling is inactive, we only use BC vol vars on pure Dirichlet boundaries
auto bcTypes = problem.boundaryTypes(element, scvFace);
if (/*TODO !GET_PROP_VALUE(TypeTag, BoundaryReconstruction) && */!(bcTypes.hasDirichlet() && !bcTypes.hasNeumann()))
continue;
const auto insideScvIdx = scvFace.insideScvIdx();
const auto& insideScv = problem.model().fvGeometries().subControlVolume(insideScvIdx);
const auto dirichletPriVars = problem.dirichlet(element, scvFace);
......
Supports Markdown
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