diff --git a/ProcessLib/Utils/InitShapeMatrices.h b/ProcessLib/Utils/InitShapeMatrices.h index 10228ee919e3c62954ded87d2e28cb27ab0c17f6..773188972bbb5770a8e984a0ae984f5da6f3e5ee 100644 --- a/ProcessLib/Utils/InitShapeMatrices.h +++ b/ProcessLib/Utils/InitShapeMatrices.h @@ -60,4 +60,17 @@ double interpolateXCoordinate( return fe.interpolateZerothCoordinate(N); } +template <typename ShapeFunction, typename ShapeMatricesType> +std::array<double, 3> interpolateCoordinates( + MeshLib::Element const& e, + typename ShapeMatricesType::ShapeMatrices::ShapeType const& N) +{ + using FemType = NumLib::TemplateIsoparametric< + ShapeFunction, ShapeMatricesType>; + + FemType fe(*static_cast<const typename ShapeFunction::MeshElement*>(&e)); + + return fe.interpolateCoordinates(N); +} + } // namespace ProcessLib