Commit a503f8d1 authored by Dennis Gläser's avatar Dennis Gläser
Browse files

[tpfa][laws] use ipGlobal instead of center

When using the tpfa laws in an mpfa context, scvf.center() gives
the centers of the half faces, thus, a worse tpfa approximation.
We use ipGlobal() here now, so in an mpfa context one would have to
use the standard ipGlobal() which is the facet center. Then, flux
comutation is guaranteed to be of standard tpfa-type. An overhead
remains as it is calculated for each half face.
parent 0b5dd577
......@@ -110,7 +110,7 @@ public:
// and the outside neighbor
if (scvf.boundary() || scvf.numOutsideScvs() > 1)
{
const auto xOutside = scvf.center();
const auto xOutside = scvf.ipGlobal();
const auto gOutside = problem.gravityAtPos(xOutside);
hOutside -= rho*(gOutside*xOutside);
}
......@@ -206,7 +206,7 @@ private:
GlobalPosition Knormal;
K.mv(scvf.unitOuterNormal(), Knormal);
auto distanceVector = scvf.center();
auto distanceVector = scvf.ipGlobal();
distanceVector -= scv.center();
distanceVector /= distanceVector.two_norm2();
......@@ -223,7 +223,7 @@ private:
const Element& element,
const SubControlVolume &scv)
{
auto distanceVector = scvf.center();
auto distanceVector = scvf.ipGlobal();
distanceVector -= scv.center();
distanceVector /= distanceVector.two_norm2();
......
......@@ -178,7 +178,7 @@ private:
GlobalPosition Dnormal;
D.mv(scvf.unitOuterNormal(), Dnormal);
auto distanceVector = scvf.center();
auto distanceVector = scvf.ipGlobal();
distanceVector -= scv.center();
distanceVector /= distanceVector.two_norm2();
......@@ -194,7 +194,7 @@ private:
Scalar D,
const SubControlVolume &scv)
{
auto distanceVector = scvf.center();
auto distanceVector = scvf.ipGlobal();
distanceVector -= scv.center();
distanceVector /= distanceVector.two_norm2();
......
......@@ -159,7 +159,7 @@ private:
GlobalPosition lambdaNormal;
lambda.mv(scvf.unitOuterNormal(), lambdaNormal);
auto distanceVector = scvf.center();
auto distanceVector = scvf.ipGlobal();
distanceVector -= scv.center();
distanceVector /= distanceVector.two_norm2();
......@@ -175,7 +175,7 @@ private:
Scalar lambda,
const SubControlVolume &scv)
{
auto distanceVector = scvf.center();
auto distanceVector = scvf.ipGlobal();
distanceVector -= scv.center();
distanceVector /= distanceVector.two_norm2();
......
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