From d129140ec4245935d2d6fad079ca0c6025fa9fe6 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Tue, 6 Nov 2012 19:24:26 +0000 Subject: [PATCH] Bugfix: simplex elements were hardcoded [[Imported from SVN: r8974]] --- dune/gfe/geodesicfefunctionadaptor.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dune/gfe/geodesicfefunctionadaptor.hh b/dune/gfe/geodesicfefunctionadaptor.hh index ad9aea35..8ac3bc08 100644 --- a/dune/gfe/geodesicfefunctionadaptor.hh +++ b/dune/gfe/geodesicfefunctionadaptor.hh @@ -59,9 +59,10 @@ static void geodesicFEFunctionAdaptor(GridType& grid, std::vector<TargetSpace>& for (; eIt!=eEndIt; ++eIt) { // Set up a local gfe function on the father element - std::vector<TargetSpace> coefficients(dim+1); + size_t nFatherDofs = eIt->father()->template count<dim>(); + std::vector<TargetSpace> coefficients(nFatherDofs); - for (int i=0; i<eIt->father()->template count<dim>(); i++) + for (int i=0; i<nFatherDofs; i++) coefficients[i] = dofMap.find(idSet.subId(*eIt->father(),i,dim))->second; typedef typename P1NodalBasis<typename GridType::LeafGridView>::LocalFiniteElement LocalFiniteElement; -- GitLab