dune-fem 2.12-git
Loading...
Searching...
No Matches
pointmapper.hh
Go to the documentation of this file.
1#ifndef DUNE_FEM_POINTMAPPER_HH
2#define DUNE_FEM_POINTMAPPER_HH
3
4//- system includes
5#include <vector>
6
7//- Dune includes
10#include <dune/common/hash.hh>
11
12namespace Dune
13{
14
15 namespace Fem
16 {
17
19 {
20 QuadratureKey ( const GeometryType &geoType, const size_t id )
21 : id_( ((topologyId( geoType ) >> 1) << 16) + id )
22 {
23 assert( id < (1 << 16) );
24 }
25
26 bool operator< ( const QuadratureKey &other ) const
27 {
28 return (id_ < other.id_);
29 }
30
31 bool operator> ( const QuadratureKey &other ) const
32 {
33 return (id_ > other.id_);
34 }
35
36 bool operator== ( const QuadratureKey &other ) const
37 {
38 return (id_ == other.id_);
39 }
40
42 {
43 return out << "(topologyId " << ((key.id_ >> 16) << 1) << ", quadId " << (key.id_ & ((1u << 16)-1)) << ")";
44 }
45
46 inline friend std::size_t hash_value(const QuadratureKey& arg)
47 {
48 std::size_t seed = 0;
50 return seed;
51 }
52
53 protected:
54 static unsigned int topologyId ( const GeometryType &type )
55 {
56 return type.id();
57 }
58
59 const size_t id_;
60 };
61
62
63
64 template <class ct, int dim>
82
83 } // namespace Fem
84
85} // namespace Dune
86
88
89#endif // #ifndef DUNE_FEM_POINTMAPPER_HH
int id()
void seed(const Vertex &vertex)
#define DUNE_DEFINE_HASH(template_args, type)
#define DUNE_HASH_TYPE(...)
#define DUNE_HASH_TEMPLATE_ARGS(...)
void hash_combine(std::size_t &seed, const T &arg)
constexpr unsigned int id() const
Definition pointmapper.hh:19
QuadratureKey(const GeometryType &geoType, const size_t id)
Definition pointmapper.hh:20
friend std::size_t hash_value(const QuadratureKey &arg)
Definition pointmapper.hh:46
bool operator>(const QuadratureKey &other) const
Definition pointmapper.hh:31
static unsigned int topologyId(const GeometryType &type)
Definition pointmapper.hh:54
friend std::ostream & operator<<(std::ostream &out, const QuadratureKey &key)
Definition pointmapper.hh:41
bool operator<(const QuadratureKey &other) const
Definition pointmapper.hh:26
const size_t id_
Definition pointmapper.hh:59
bool operator==(const QuadratureKey &other) const
Definition pointmapper.hh:36
Definition pointmapper.hh:65
std::vector< MapperType > MapperVectorType
Definition pointmapper.hh:73
QuadratureType::CoordinateType PointType
extracted types from integration point list
Definition pointmapper.hh:69
std::pair< MapperType, MapperType > MapperPairType
Definition pointmapper.hh:72
IntegrationPointListImp< ct, dim > QuadratureType
type of integration point list implementation, fix type here
Definition pointmapper.hh:67
std::vector< size_t > MapperType
Definition pointmapper.hh:71
@ twistOffset_
Definition pointmapper.hh:79
QuadratureKey QuadratureKeyType
Definition pointmapper.hh:75
std::vector< PointType > PointVectorType
Definition pointmapper.hh:70
Generic implementation of an IntegrationPointList.
Definition quadratureimp.hh:33
FieldVector< FieldType, dim > CoordinateType
type of local coordinates
Definition quadratureimp.hh:46