Skip to content
Snippets Groups Projects
Commit c9cb5608 authored by Marcel Koch's avatar Marcel Koch
Browse files

Adds patch for dune-pdelab

parent 1313757e
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment