DUNE-FEM (unstable)

quadrature.hh
1#ifndef DUNE_FEM_QUADRATURE_GEOMETRIC_QUADRATURE_HH
2#define DUNE_FEM_QUADRATURE_GEOMETRIC_QUADRATURE_HH
3
4#include <cstddef>
5
8
10
11#include <dune/fem/quadrature/quadrature.hh>
12
13namespace Dune
14{
15
16 namespace Fem
17 {
18
19 // GeometricQuadrature
20 // -------------------
21
22 template< class Field, int mydim, int dim, class Implementation >
23 class GeometricQuadrature
24 {
25 using ThisType = GeometricQuadrature< Field, mydim, dim, Implementation >;
26
27 public:
29 using FieldType = Field;
30
32 static const int mydimension = mydim;
34 static const int dimension = dim;
35
37 using CoordinateType = Dune::FieldVector< FieldType, dimension >;
39 using LocalCoordinateType = Dune::FieldVector< FieldType, mydimension >;
40
42 using QuadraturePointWrapperType = Dune::Fem::QuadraturePointWrapper< Implementation >;
43
44 protected:
45#ifndef DOXYGEN
46 GeometricQuadrature () = default;
47#endif // #ifndef DOXYGEN
48
49 public:
55 GeometricQuadrature ( const ThisType & ) = default;
56
58 GeometricQuadrature ( ThisType && ) = default;
59
61 GeometricQuadrature &operator= ( const ThisType & ) = default;
62
64 GeometricQuadrature &operator= ( ThisType && ) = default;
65
73 Dune::GeometryType type () const
74 {
75 CHECK_INTERFACE_IMPLEMENTATION( impl().type() );
76 return impl().type();
77 }
78
80 int order () const
81 {
82 CHECK_INTERFACE_IMPLEMENTATION( impl().order() );
83 return impl().order();
84 }
85
93 std::size_t nop () const
94 {
95 CHECK_INTERFACE_IMPLEMENTATION( impl().nop() );
96 return impl().nop();
97 }
98
100 const CoordinateType &point ( std::size_t i ) const
101 {
102 CHECK_INTERFACE_IMPLEMENTATION( impl().point( i ) );
103 return impl().point( i );
104 }
105
107 const LocalCoordinateType &localPoint ( std::size_t i ) const
108 {
109 CHECK_INTERFACE_IMPLEMENTATION( impl().localPoint( i ) );
110 return impl().localPoint( i );
111 }
112
114 FieldType weight ( std::size_t i ) const
115 {
116 CHECK_INTERFACE_IMPLEMENTATION( impl().weight( i ) );
117 return impl().weight( i );
118 }
119
127 const QuadraturePointWrapperType operator[] ( std::size_t i ) const
128 {
129 return QuadraturePointWrapperType( impl(), i );
130 }
131
134 protected:
135 const Implementation &impl () const
136 {
137 return static_cast< const Implementation & >( *this );
138 }
139 };
140
141 } // namespace Fem
142
143} // namespace Dune
144
145#endif // #ifndef DUNE_FEM_QUADRATURE_GEOMETRIC_QUADRATURE_HH
Provides check for implementation of interface methods when using static polymorphism,...
wrapper for a (Quadrature,int) pair
Definition: quadrature.hh:42
vector space out of a tensor product of fields.
Definition: fvector.hh:91
Unique label for each type of entities that can occur in DUNE grids.
Definition: type.hh:114
Implements a vector constructed from a given type representing a field and a compile-time given size.
Dune namespace.
Definition: alignedallocator.hh:13
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)