Skip to content
Snippets Groups Projects
Commit f03d50e7 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[mpfa][elemvolvars] only make boundary vol vars on dirichlet boundaries

parent 50d41802
No related branches found
No related tags found
Loading
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#define DUMUX_DISCRETIZATION_CCMPFA_ELEMENT_VOLUMEVARIABLES_HH #define DUMUX_DISCRETIZATION_CCMPFA_ELEMENT_VOLUMEVARIABLES_HH
#include <dumux/implicit/properties.hh> #include <dumux/implicit/properties.hh>
#include "facetypes.hh"
namespace Dumux namespace Dumux
{ {
...@@ -171,16 +172,20 @@ public: ...@@ -171,16 +172,20 @@ public:
if (!scvf.boundary()) if (!scvf.boundary())
continue; continue;
// boundary volume variables // only proceed if we are on a dirichlet boundary
VolumeVariables dirichletVolVars; if (MpfaHelper::getMpfaFaceType(problem, element, scvf) == MpfaFaceTypes::dirichlet)
const auto dirichletPriVars = problem.dirichlet(element, scvf); {
dirichletVolVars.update(dirichletPriVars, problem, element, scvI); // boundary volume variables
volumeVariables_.emplace_back(std::move(dirichletVolVars)); VolumeVariables dirichletVolVars;
const auto dirichletPriVars = problem.dirichlet(element, scvf);
// boundary vol var index dirichletVolVars.update(dirichletPriVars, problem, element, scvI);
auto bVolVarIdx = scvf.outsideScvIdx(); volumeVariables_.emplace_back(std::move(dirichletVolVars));
volVarIndices_.push_back(bVolVarIdx);
finishedBoundaries.push_back(bVolVarIdx); // boundary vol var index
auto bVolVarIdx = scvf.outsideScvIdx();
volVarIndices_.push_back(bVolVarIdx);
finishedBoundaries.push_back(bVolVarIdx);
}
} }
} }
...@@ -202,19 +207,23 @@ public: ...@@ -202,19 +207,23 @@ public:
// that means we are on a not yet handled boundary scvf // that means we are on a not yet handled boundary scvf
auto insideScvIdx = ivScvf.insideScvIdx(); auto insideScvIdx = ivScvf.insideScvIdx();
auto&& ivScv = fvGeometry.scv(insideScvIdx);
auto ivElement = globalFvGeometry.element(insideScvIdx); auto ivElement = globalFvGeometry.element(insideScvIdx);
// boundary volume variables // only proceed if we are on a dirichlet boundary
VolumeVariables dirichletVolVars; if (MpfaHelper::getMpfaFaceType(problem, ivElement, ivScvf) == MpfaFaceTypes::dirichlet)
const auto dirichletPriVars = problem.dirichlet(ivElement, ivScvf); {
dirichletVolVars.update(dirichletPriVars, problem, ivElement, ivScv); // boundary volume variables
volumeVariables_.emplace_back(std::move(dirichletVolVars)); VolumeVariables dirichletVolVars;
auto&& ivScv = fvGeometry.scv(insideScvIdx);
// boundary vol var index const auto dirichletPriVars = problem.dirichlet(ivElement, ivScvf);
auto bVolVarIdx = ivScvf.outsideScvIdx(); dirichletVolVars.update(dirichletPriVars, problem, ivElement, ivScv);
volVarIndices_.push_back(bVolVarIdx); volumeVariables_.emplace_back(std::move(dirichletVolVars));
finishedBoundaries.push_back(bVolVarIdx);
// boundary vol var index
auto bVolVarIdx = ivScvf.outsideScvIdx();
volVarIndices_.push_back(bVolVarIdx);
finishedBoundaries.push_back(bVolVarIdx);
}
} }
} }
......
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