* MappingQ. The only difference in behavior is that this function
* will never throw an ExcTransformationFailed() exception. If the
* transformation fails for `real_points[i]`, the returned `unit_points[i]`
- * contains std::numeric_limits<double>::infinity() as the first entry.
+ * contains std::numeric_limits<double>::lowest() as the first component
+ * of the point, marking this one point as invalid.
*/
virtual void
transform_points_real_to_unit_cell(
const unsigned int newton_iteration_limit = 20;
Point<dim, Number> invalid_point;
- invalid_point[0] = std::numeric_limits<double>::infinity();
+ invalid_point[0] = std::numeric_limits<double>::lowest();
bool tried_project_to_unit_cell = false;
unsigned int newton_iteration = 0;
}
catch (typename Mapping<dim>::ExcTransformationFailed &)
{
+ // If the transformation for this one point failed, mark it
+ // as invalid as described in the documentation.
unit_points[i] = Point<dim>();
- unit_points[i][0] = std::numeric_limits<double>::infinity();
+ unit_points[i][0] = std::numeric_limits<double>::lowest();
}
}
}
// statement may throw an exception, which we simply pass up to the caller
const Point<dim> p_unit =
this->transform_real_to_unit_cell_internal(cell, p, initial_p_unit);
- AssertThrow(numbers::is_finite(p_unit[0]),
+ AssertThrow(p_unit[0] != std::numeric_limits<double>::lowest(),
(typename Mapping<dim, spacedim>::ExcTransformationFailed()));
return p_unit;
}
// determinants) from other SIMD lanes. Repeat the computation in this
// unlikely case with scalar arguments.
for (unsigned int j = 0; j < n_lanes && i + j < n_points; ++j)
- if (numbers::is_finite(unit_point[0][j]))
+ if (unit_point[0][j] != std::numeric_limits<double>::lowest())
for (unsigned int d = 0; d < dim; ++d)
unit_points[i + j][d] = unit_point[d][j];
else