dune-fem  2.4.1-rc
dunequadratures.hh
Go to the documentation of this file.
1 #ifndef DUNE_FEM_DUNEQUADRATURES_HH
2 #define DUNE_FEM_DUNEQUADRATURES_HH
3 
4 //- Dune includes
5 #include <dune/geometry/type.hh>
6 #include <dune/geometry/quadraturerules.hh>
7 
9 
10 namespace Dune
11 {
12 
13  namespace Fem
14  {
15 
24  template< typename FieldImp, int dim >
26  : public QuadratureImp< FieldImp, dim >
27  {
28  public:
29  typedef FieldImp FieldType;
30 
31  enum { dimension = dim };
32 
33  private:
36 
37  protected:
39 
40  public:
42 
43  protected:
44  typedef QuadratureRule< FieldType, dimension > DuneQuadratureRuleType;
45 
46  //enum { highest_order_cube = CubeQuadratureRule<ct,dim>::highest_order };
47  //enum { highest_order_simplex = SimplexQuadratureRule<ct,dim>::highest_order };
48 
49  enum { highest_order = 44 };
50  //(highest_order_cube < highest_order_simplex) ?
51  // highest_order_cube : highest_order_simplex };
52 
53  protected:
54  const GeometryType elementGeometry_;
55  int order_;
56 
57  public:
64  QuadratureRulesFactory( const GeometryType &geometry,
65  const int order,
66  const size_t id )
67  : BaseType( id ),
68  elementGeometry_( geometry )
69  {
70  // get gauss quadrature
71  const DuneQuadratureRuleType &rule
72  = QuadratureRules< FieldType, dimension >
73  :: rule( geometry, order, QuadratureType :: GaussLegendre );
74 
75  order_ = rule.order();
76  assert( order <= order_ );
77 
78  typedef typename DuneQuadratureRuleType :: iterator IteratorType;
79  const IteratorType endit = rule.end();
80  for( IteratorType it = rule.begin(); it != endit; ++it )
81  addQuadraturePoint( (*it).position(), (*it).weight() );
82  }
83 
86  int order () const
87  {
88  return order_;
89  }
90 
93  GeometryType geometryType () const
94  {
95  return elementGeometry_;
96  }
97 
100  static unsigned int maxOrder ()
101  {
102  return highest_order;
103  }
104  };
105 
106 
107 
108  template< class FieldType, int dim >
110  {
113 
115  };
116 
117  template< class FieldType >
119  {
121 
123  };
124 
125  template< class FieldType >
127  {
129 
131  };
132 
133  template< class FieldType >
135  {
138 
141 
143  };
144 
145  } // namespace Fem
146 
147 } // namespace Dune
148 
149 #endif // #ifndef DUNE_FEM_DUNEQUADRATURES_HH
BaseType::CoordinateType CoordinateType
type of local coordinates
Definition: quadratureimp.hh:191
QuadratureImp< FieldType, dim > IntegrationPointListType
Definition: dunequadratures.hh:114
GeometryType geometryType() const
Definition: dunequadratures.hh:93
QuadratureRulesFactory< FieldType, 1 > LineQuadratureType
Definition: dunequadratures.hh:128
QuadratureRulesFactory< FieldType, 3 > CubeQuadratureType
Definition: dunequadratures.hh:137
void addQuadraturePoint(const CoordinateType &point, const FieldType weight)
Adds a point-weight pair to the quadrature.
Definition: quadratureimp.hh:261
QuadratureRulesFactory< FieldType, 0 > PointQuadratureType
Definition: dunequadratures.hh:120
QuadratureRulesFactory(const GeometryType &geometry, const int order, const size_t id)
constructor filling the list of points and weights
Definition: dunequadratures.hh:64
int order() const
obtain order of the integration point list
Definition: dunequadratures.hh:86
QuadratureImp< FieldType, 3 > IntegrationPointListType
Definition: dunequadratures.hh:142
QuadratureImp< FieldType, 1 > IntegrationPointListType
Definition: dunequadratures.hh:130
Definition: dunequadratures.hh:109
QuadratureRulesFactory< FieldType, 3 > PrismQuadratureType
Definition: dunequadratures.hh:139
Definition: coordinate.hh:4
QuadratureImp< FieldType, 0 > IntegrationPointListType
Definition: dunequadratures.hh:122
QuadratureRulesFactory< FieldType, dim > CubeQuadratureType
Definition: dunequadratures.hh:112
Definition: dunequadratures.hh:49
Definition: dunequadratures.hh:31
int order_
Definition: dunequadratures.hh:55
QuadratureRulesFactory< FieldType, 3 > PyramidQuadratureType
Definition: dunequadratures.hh:140
QuadratureRule< FieldType, dimension > DuneQuadratureRuleType
Definition: dunequadratures.hh:44
BaseType::CoordinateType CoordinateType
Definition: dunequadratures.hh:41
Generic implementation of a Dune quadrature.
Definition: quadratureimp.hh:178
const GeometryType elementGeometry_
Definition: dunequadratures.hh:54
QuadratureRulesFactory< FieldType, 3 > SimplexQuadratureType
Definition: dunequadratures.hh:136
QuadratureRulesFactory< FieldType, dim > SimplexQuadratureType
Definition: dunequadratures.hh:111
quadrature implementation based on the standard DUNE quadratures
Definition: dunequadratures.hh:25
static unsigned int maxOrder()
maximal order of available quadratures
Definition: dunequadratures.hh:100
FieldImp FieldType
Definition: dunequadratures.hh:29