From 93c860c43fa649a3744b0433ade107462aa3da90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@mi.fu-berlin.de> Date: Wed, 7 Jun 2023 08:53:03 +0200 Subject: [PATCH] fix --- dune/fufem-forms/unaryoperators.hh | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/dune/fufem-forms/unaryoperators.hh b/dune/fufem-forms/unaryoperators.hh index 22ec4fc..444383a 100644 --- a/dune/fufem-forms/unaryoperators.hh +++ b/dune/fufem-forms/unaryoperators.hh @@ -138,11 +138,9 @@ namespace Dune::Fufem::Forms { }; else if constexpr(Node::isPower and Node::ChildType::isLeaf) return [&](const auto& i) { - using Field = typename LeafNode::FiniteElement::Traits::LocalBasisType::Traits::RangeFieldType; - static constexpr auto components = Node::degree(); + auto result = Range(0); auto componentIndex = i / leafNode_->size(); auto shapeFunctionIndex = i % leafNode_->size(); - auto result = Dune::FieldVector<Field,components>(0); result[componentIndex] = values[shapeFunctionIndex]; return result; }; @@ -230,8 +228,8 @@ namespace Dune::Fufem::Forms { return Dune::MetaType<LeafFEJacobian>(); else if constexpr(Node::isPower and Node::ChildType::isLeaf) { - static constexpr auto components = Node::degree(); - static constexpr auto dimension = LeafNode::FiniteElement::Traits::LocalBasisType::Traits::dimDomain; + constexpr auto components = Node::degree(); + constexpr auto dimension = LeafNode::FiniteElement::Traits::LocalBasisType::Traits::dimDomain; return Dune::MetaType<Dune::FieldMatrix<LeafFERangeField,components,dimension>>(); } } @@ -304,12 +302,9 @@ namespace Dune::Fufem::Forms { }; else if constexpr(Node::isPower and Node::ChildType::isLeaf) return [&](const auto& i) { - using F = typename LeafNode::FiniteElement::Traits::LocalBasisType::Traits::RangeFieldType; - static constexpr auto components = Node::degree(); - static constexpr auto dimension = LeafNode::FiniteElement::Traits::LocalBasisType::Traits::dimDomain; + auto result = Range(0); auto componentIndex = i / leafNode_->size(); auto shapeFunctionIndex = i % leafNode_->size(); - auto result = Dune::FieldMatrix<F,components,dimension>(0); result[componentIndex] = globalJacobians[shapeFunctionIndex][0]; return result; }; -- GitLab