Commit 0c31245a authored by Kilian Lackhove's avatar Kilian Lackhove

Interpolator: always clamp Lcoords

parent 95a8fe10
......@@ -352,6 +352,15 @@ void Interpolator::Interpolate(
int elmtid = m_expInField[0]->GetExpIndex(Scoords, Lcoords,
NekConstants::kGeomFactorsTol);
// we use kGeomFactorsTol as tolerance, while StdPhysEvaluate has
// kNekZeroTol hardcoded, so we need to limit Lcoords to not produce
// a ton of warnings
for(int j = 0; j < nInDim; ++j)
{
Lcoords[j] = std::max(Lcoords[j], -1.0);
Lcoords[j] = std::min(Lcoords[j], 1.0);
}
if (elmtid >= 0)
{
int offset = m_expInField[0]->GetPhys_Offset(elmtid);
......
Markdown is supported
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