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

[mpfao-fps][localscv] minor changes

parent dea0b6a0
......@@ -62,18 +62,16 @@ public:
const Element& element,
const FVElementGeometry& fvGeometry,
const LocalScvSeed& scvSeed)
: seed_(scvSeed)
: seedPtr_(&scvSeed)
{
auto eg = element.geometry();
// the geometry helper that will give us the scv corners
GeometryHelper geomHelper(eg);
GeometryHelper geomHelper(element.geometry());
// extract the vertex index from the first scvf
auto vIdxGlobal = fvGeometry.scvf(scvSeed.globalScvfIndices()[0]).vertexIndex();
// find local index of the vertex in the element
unsigned int vIdxLocal = -1;
int vIdxLocal = -1;
for (unsigned int localIdx = 0; localIdx < element.subEntities(dim); ++localIdx)
{
if (problem.vertexMapper().subIndex(element, localIdx, dim) == vIdxGlobal)
......@@ -117,7 +115,6 @@ public:
return *this;
}
GlobalIndexType globalIndex() const
{ return scvSeed_().globalIndex(); }
......@@ -143,10 +140,9 @@ public:
private:
const LocalScvSeed& scvSeed_() const
{ return seed_; }
{ return *seedPtr_; }
const LocalScvSeed& seed_;
// Work around the fact that geometry is not default constructible
const LocalScvSeed* seedPtr_;
Optional<Geometry> geometry_;
};
} // end namespace
......
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