dune-fem  2.4.1-rc
cornerpointset.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_CORNERPOINTSET_HH
2 #define DUNE_FEM_CORNERPOINTSET_HH
3 
4 #include <dune/geometry/genericgeometry/referencedomain.hh>
5 
7 
8 namespace Dune
9 {
10 
11  namespace Fem
12  {
13 
14  // Internal Forward Declarations
15  // -----------------------------
16 
17  template< class GridPart >
19 
20  template< class ct, class Topology >
22 
23 
24 
25  // CornerPointSetTraits
26  // --------------------
27 
28  template< class GridPart >
30  {
31  template< class ct, int dim >
32  struct PointListTraits;
33 
34  public:
38  };
39 
40 
41 
42  // CornerPointSetTraits::PointListTraits
43  // -------------------------------------
44 
45  template< class GridPart >
46  template< class ct, int dim >
47  class CornerPointSetTraits< GridPart >::PointListTraits
48  {
49  static const int pdim = (dim > 0 ? dim : 1);
50 
51  public:
53 
58 
59  typedef SimplexQuadratureType PointQuadratureType;
60  typedef SimplexQuadratureType LineQuadratureType;
61  };
62 
63 
64 
65  // CornerPointSet
66  // --------------
67 
68  template< class GridPart >
69  class CornerPointSet
70  : public CachingPointList< GridPart, 0, CornerPointSetTraits< GridPart > >
71  {
73 
74  public:
75  CornerPointSet ( const GeometryType &type )
76  : BaseType( type, 1 )
77  {}
78 
79  CornerPointSet ( const typename GridPart::template Codim< 0 >::EntityType &entity )
80  : BaseType( entity.type(), 1 )
81  {}
82  };
83 
84 
85 
86  // CornerPointList
87  // ---------------
88 
89  template< class ct, class Topology >
90  class CornerPointList
91  : public IntegrationPointListImp< ct, Topology::dimension >
92  {
94 
95  typedef GenericGeometry::ReferenceDomain< Topology > ReferenceDomain;
96 
97  public:
99 
100  explicit CornerPointList ( const size_t id );
101  CornerPointList ( const GeometryType &type, const int order, const size_t id );
102 
103  int order () const { return 1; }
104 
105  static unsigned int maxOrder () { return 1; }
106 
107  GeometryType geometryType () const { return GeometryType( Topology() ); }
108 
109  protected:
110  using BaseType::addIntegrationPoint;
111 
112  private:
113  void initialize ();
114  };
115 
116 
117 
118  // Implementation of CornerPointList
119  // ---------------------------------
120 
121  template< class ct, class Topology >
123  : BaseType( id )
124  {
125  initialize();
126  }
127 
128 
129  template< class ct, class Topology >
131  ::CornerPointList ( const GeometryType &type, const int order, const size_t id )
132  : BaseType( id )
133  {
134  initialize();
135  }
136 
137 
138  template< class ct, class Topology >
140  {
141  for( unsigned int i = 0; i < ReferenceDomain::numCorners; ++i )
142  {
143  CoordinateType pt;
144  ReferenceDomain::corner( i, pt );
145  addIntegrationPoint( pt );
146  }
147  }
148 
149  } //namespace Fem
150 
151 } //namespace Dune
152 
153 #endif // #ifndef DUNE_FEM_CORNERPOINTSET_HH
FieldVector< FieldType, dim > CoordinateType
type of local coordinates
Definition: quadratureimp.hh:43
integration point list supporting base function caching
Definition: cachingpointlist.hh:74
actual interface class for integration point lists
Definition: quadrature.hh:118
Definition: cornerpointset.hh:21
CornerPointSet(const typename GridPart::template Codim< 0 >::EntityType &entity)
Definition: cornerpointset.hh:79
CornerPointList(const size_t id)
Definition: cornerpointset.hh:122
void addIntegrationPoint(const CoordinateType &point)
Adds an integration point to the list.
Definition: quadratureimp.hh:159
Definition: coordinate.hh:4
BaseType::CoordinateType CoordinateType
Definition: cornerpointset.hh:98
IntegrationPointListType::CoordinateType CoordinateType
Definition: cornerpointset.hh:37
IntegrationPointList< typename GridPart::ctype, GridPart::dimension, PointListTraits > IntegrationPointListType
Definition: cornerpointset.hh:32
CornerPointSet(const GeometryType &type)
Definition: cornerpointset.hh:75
static unsigned int maxOrder()
Definition: cornerpointset.hh:105
Definition: cornerpointset.hh:29
int order() const
obtain order of the integration point list
Definition: cornerpointset.hh:103
GeometryType geometryType() const
obtain GeometryType for this integration point list
Definition: cornerpointset.hh:107
Definition: cornerpointset.hh:18
IntegrationPointListType::CoordinateType CoordinateType
type of coordinate
Definition: quadrature.hh:138