dune-localfunctions  2.11
pqkfactory.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 // vi: set et ts=4 sw=2 sts=2:
3 // SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
4 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
5 #ifndef DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
6 #define DUNE_LOCALFUNCTIONS_LAGRANGE_PQKFACTORY_HH
7 
8 #include <map>
9 
10 #include <dune/geometry/type.hh>
11 
14 
20 
21 namespace Dune
22 {
23 
28  template<class D, class R, int d, int k>
30  {
32 
34  static LocalFiniteElementVirtualInterface<T>* create(const GeometryType&)
35  {
36  return nullptr;
37  }
38  };
39 
44  template<class D, class R, int k>
46  {
52 
54  static LocalFiniteElementVirtualInterface<T>* create(const GeometryType& gt)
55  {
56  if ((gt.isPrism())and (k==1))
58  if ((gt.isPrism())and (k==2))
60  if ((gt.isPyramid())and (k==1))
62  if ((gt.isPyramid())and (k==2))
64  return nullptr;
65  }
66  };
67 
68 
72  template<class D, class R, int dim, int k>
74  {
80 
81 
83  static FiniteElementType* create(const GeometryType& gt)
84  {
85  if (k==0)
86  return new LocalFiniteElementVirtualImp<P0>(P0(gt));
87 
88  if (gt.isSimplex())
90 
91  if (gt.isCube())
93 
95  }
96  };
97 
98 }
99 
100 #endif
Lagrange finite element for simplices with arbitrary compile-time dimension and polynomial order...
Definition: lagrangesimplex.hh:789
class for wrapping a finite element using the virtual interface
Definition: virtualwrappers.hh:19
LagrangeSimplexLocalFiniteElement< D, R, dim, k > Pk
Definition: pqkfactory.hh:78
Factory to create any kind of Pk/Qk like element wrapped for the virtual interface.
Definition: pqkfactory.hh:73
Lagrange finite element for cubes with arbitrary compile-time dimension and polynomial order...
Definition: lagrangecube.hh:708
LocalFiniteElementVirtualInterface< T > FiniteElementType
Definition: pqkfactory.hh:76
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &gt)
create finite element for given GeometryType
Definition: pqkfactory.hh:54
Lagrange finite element for 3d pyramids with compile-time polynomial order.
Definition: lagrangepyramid.hh:808
Definition: bdfmcube.hh:17
P0LocalFiniteElement< D, R, 3 >::Traits::LocalBasisType::Traits T
Definition: pqkfactory.hh:47
P0LocalFiniteElement< D, R, dim >::Traits::LocalBasisType::Traits T
Definition: pqkfactory.hh:75
P0LocalFiniteElement< D, R, dim > P0
Definition: pqkfactory.hh:77
LagrangeCubeLocalFiniteElement< D, R, dim, k > Qk
Definition: pqkfactory.hh:79
P0LocalFiniteElement< D, R, d >::Traits::LocalBasisType::Traits T
Definition: pqkfactory.hh:31
virtual base class for local finite elements with functions
Definition: virtualinterface.hh:224
static FiniteElementType * create(const GeometryType &gt)
create finite element for given GeometryType
Definition: pqkfactory.hh:83
static LocalFiniteElementVirtualInterface< T > * create(const GeometryType &)
create finite element for given GeometryType
Definition: pqkfactory.hh:34
Factory that only creates dimension specific local finite elements.
Definition: pqkfactory.hh:29
The local p0 finite element on all types of reference elements.
Definition: p0.hh:24
Lagrange finite element for 3d prisms with arbitrary compile-time polynomial order.
Definition: lagrangeprism.hh:648