From c087601c5f3bf763fad5682c4d68f8846ac1ffe1 Mon Sep 17 00:00:00 2001 From: Simon Praetorius <simon.praetorius@tu-dresden.de> Date: Tue, 18 Aug 2020 12:13:16 +0200 Subject: [PATCH] make an explicit cast to field type for shape-function values to allow float128 ctype grids. Note: the problem is that the runtime-order lagrange finite-elements do not support different range-type than double internally. --- dune/vtk/gridcreators/lagrangegridcreator.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dune/vtk/gridcreators/lagrangegridcreator.hh b/dune/vtk/gridcreators/lagrangegridcreator.hh index 4f18378..99634dc 100644 --- a/dune/vtk/gridcreators/lagrangegridcreator.hh +++ b/dune/vtk/gridcreators/lagrangegridcreator.hh @@ -324,9 +324,11 @@ namespace Dune localBasis.evaluateFunction(x, shapeValues_); assert(shapeValues_.size() == localNodes_.size()); + using field_type = typename LocalBasisTraits::RangeType::field_type; + GlobalCoordinate out(0); for (std::size_t i = 0; i < shapeValues_.size(); ++i) - out.axpy(shapeValues_[i], localNodes_[i]); + out.axpy(field_type(shapeValues_[i]), localNodes_[i]); return out; } -- GitLab