Commit 9098621f authored by Happel, Lea's avatar Happel, Lea Committed by Praetorius, Simon
Browse files

Changed the checkInside Method

parent 113b86d1
......@@ -42,6 +42,8 @@ public:
/// \brief Type of the grid element the LocalFunction can be bound to
using Element = typename EntitySet::Element;
using Grid = typename GV::Grid;
using Geometry = typename Element::Geometry;
template <class ES, class LF>
class CoarsenedLocalFunction
......@@ -108,10 +110,14 @@ public:
if (childs_.empty())
return localFct_(x);
// calculate checkInsideTolerance
typename Grid::ctype const checkInsideTolerance = std::sqrt(std::numeric_limits<typename Grid::ctype>::epsilon());
for (auto const& child : childs_) {
auto refElem = referenceElement(*;
auto local = child.local(x);
if (refElem.checkInside(local)) {
auto refTypeId = refElem.type().id();
bool isInside = Dune::Geo::Impl::checkInside(refTypeId, Geometry::mydimension, local, checkInsideTolerance);
if (isInside) {
return localFct_(local);
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