diff --git a/patches/dune-pdelab/0001-Adds-Qk-for-k-2-for-structured-grids.patch b/patches/dune-pdelab/0001-Adds-Qk-for-k-2-for-structured-grids.patch new file mode 100644 index 0000000000000000000000000000000000000000..b5e482af27a7b7398765c173493d9b252726817a --- /dev/null +++ b/patches/dune-pdelab/0001-Adds-Qk-for-k-2-for-structured-grids.patch @@ -0,0 +1,53 @@ +From cf3cc167d4940d7c4960bc5646816b6cf6a17326 Mon Sep 17 00:00:00 2001 +From: Marcel Koch <marcel.koch@uni-muenster.de> +Date: Mon, 31 Jul 2017 15:45:53 +0200 +Subject: [PATCH] Adds Qk for k>2 for structured grids + +--- + dune/pdelab/finiteelementmap/qkfem.hh | 24 +++++------------------- + 1 file changed, 5 insertions(+), 19 deletions(-) + +diff --git a/dune/pdelab/finiteelementmap/qkfem.hh b/dune/pdelab/finiteelementmap/qkfem.hh +index b4e8d67..435545e 100644 +--- a/dune/pdelab/finiteelementmap/qkfem.hh ++++ b/dune/pdelab/finiteelementmap/qkfem.hh +@@ -35,31 +35,17 @@ namespace Dune { + { + case 1: + return codim == GV::dimension; +- case 2: +- if (GV::dimension != 2 && GV::dimension != 3) +- DUNE_THROW(NotImplemented,"QkLocalFiniteElementMap with k = 2 is only implemented for d = 2,3"); +- return 1; + default: +- DUNE_THROW(NotImplemented,"QkLocalFiniteElementMap is only implemented for k <= 2"); ++ return 1; + } + } + + std::size_t size(GeometryType gt) const + { +- switch (k) +- { +- case 1: +- return gt.isVertex() ? 1 : 0; +- case 2: +- { +- if (GV::dimension != 2 && GV::dimension != 3) +- DUNE_THROW(NotImplemented,"QkLocalFiniteElementMap with k = 2 is only implemented for d = 2,3"); +- // Q1 simply attaches a single DOF to each subentity +- return 1; +- } +- default: +- DUNE_THROW(NotImplemented,"QkLocalFiniteElementMap is only implemented for k <= 2"); +- } ++ std::size_t acc = 1; ++ for(std::size_t i = 0; i < gt.dim(); ++i) ++ acc *= k-1; ++ return acc; + } + + std::size_t maxLocalSize() const +-- +2.7.4 +