Skip to content
Snippets Groups Projects
Commit fbad8e85 authored by Jonathan Youett's avatar Jonathan Youett
Browse files

[bugfix] Properly implement integrationOuterNormal for leaf intersections

parent 0f38e693
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -35,12 +35,6 @@ public:
return insideIntersect_.outerNormal(local);
}
//! return outer normal, this should be dependent on local
//! coordinates for higher order boundary
const FieldVector<ctype, dimworld> integrationOuterNormal (const FieldVector<ctype, dim-1>& local) const {
return insideIntersect_.integrationOuterNormal(local);
}
//! return outer normal, this should be dependent on local
//! coordinates for higher order boundary
const FieldVector<ctype, dimworld> unitOuterNormal (const FieldVector<ctype, dim-1>& local) const {
......@@ -198,6 +192,16 @@ public:
return insideIntersect_.type();
}
/** \brief Return outer normal scaled with the integration element. */
const FieldVector<ctype, dimworld> integrationOuterNormal (const FieldVector<ctype, dim-1>& local) const {
if (neighbor() and (outside_.level() > inside_.level())) {
auto normal = outsideIntersect_.integrationOuterNormal(outsideIntersect_.geometry().local(insideIntersect_.geometry().global(local)));
normal *= -1;
return normal;
} else
return insideIntersect_.integrationOuterNormal(local);
}
/*! @brief Return unit outer normal at the center of the intersection geometry */
FieldVector<typename GridImp::ctype, dimworld> centerUnitOuterNormal () const
{
......@@ -396,6 +400,11 @@ public:
return insideIntersect_.centerUnitOuterNormal();
}
/** \brief Return outer normal scaled with the integration element. */
const FieldVector<ctype, dimworld> integrationOuterNormal (const FieldVector<ctype, dim-1>& local) const {
return insideIntersect_.integrationOuterNormal(local);
}
//! intersection of codimension 1 of this neighbor with element where
//! iteration started.
//! Here returned element is in LOCAL coordinates of the element
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment