Commit fab32419 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

change order in normalGradient approximation

parent 55354792
......@@ -328,7 +328,7 @@ public:
// construct a local finite-element type of the given order on the element
using LFE = LagrangeLocalFiniteElement<EquidistantPointSet,mydimension,ctype,ctype>;
using LocalBasisTraits = typename LFE::Traits::LocalBasisType::Traits;
LFE localFE{type(), order};
LFE localFE{type(), order > 1u ? order-1u : 1u};
if (nCoefficients_.empty()) {
// create local discrete function of normal vectors by interpolation of the geometry normal
......@@ -338,7 +338,7 @@ public:
// Interpolated normal vector evaluated at local coordinate
thread_local std::vector<typename LocalBasisTraits::RangeType> nShapeValues;
localFE_.localBasis().evaluateFunction(local, nShapeValues);
localFE.localBasis().evaluateFunction(local, nShapeValues);
GlobalCoordinate nh(0);
for (std::size_t j = 0; j < nShapeValues.size(); ++j)
nh.axpy(nShapeValues[j], nCoefficients_[j]);
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