dune-grid  2.7.0
albertagrid/gridfamily.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 #ifndef DUNE_ALBERTAGRID_GRIDFAMILTY_HH
4 #define DUNE_ALBERTAGRID_GRIDFAMILTY_HH
5 
11 #include <dune/common/parallel/communication.hh>
12 
18 
22 
23 #if HAVE_ALBERTA
24 
25 namespace Dune
26 {
27 
28  // External Forward Declarations
29  // -----------------------------
30 
31  template< int dim, int dimworld >
32  class AlbertaGrid;
33 
34  template< int codim, int dim, class GridImp >
35  class AlbertaGridEntity;
36 
37  template< int codim, class GridImp >
38  class AlbertaGridEntityPointer;
39 
40  template< int codim, class Grid >
41  class AlbertaGridEntitySeed;
42 
43  template< int mydim, int cdim, class GridImp >
44  class AlbertaGridGeometry;
45 
46  template< int mydim, int cdim, class GridImp >
47  class AlbertaGridGlobalGeometry;
48 
49  template< int dim, int dimworld >
50  class AlbertaGridHierarchicIndexSet;
51 
52  template< class GridImp >
53  class AlbertaGridHierarchicIterator;
54 
55  template< class GridImp >
56  class AlbertaGridLeafIntersection;
57 
58  template< class GridImp >
59  class AlbertaGridLeafIntersectionIterator;
60 
61  template< int dim, int dimworld >
62  class AlbertaGridIdSet;
63 
64  template< int dim, int dimworld >
65  class AlbertaGridIndexSet;
66 
67  template< int codim, PartitionIteratorType pitype, class GridImp >
68  class AlbertaGridLeafIterator;
69 
70  template< int codim, PartitionIteratorType pitype, class GridImp >
71  class AlbertaGridLevelIterator;
72 
73 
74 
75 
76  // AlbertaGridFamily
77  // -----------------
78 
79  template <int dim, int dimworld>
80  struct AlbertaGridFamily
81  {
82  typedef AlbertaGrid< dim, dimworld > GridImp;
83 
84  typedef Alberta::Real ctype;
85 
86  static const int dimension = dim;
87  static const int dimensionworld = dimworld;
88 
89  typedef AlbertaGridIndexSet< dim, dimworld > LevelIndexSetImp;
90  typedef AlbertaGridIndexSet< dim, dimworld > LeafIndexSetImp;
91 
92  typedef AlbertaGridIdSet< dim, dimworld > IdSetImp;
93  typedef unsigned int IdType;
94 
95  struct Traits
96  {
97  typedef GridImp Grid;
98 
102  < const GridImp, AlbertaGridLeafIntersectionIterator< const GridImp >, AlbertaGridLeafIntersection< const GridImp > >
103  LeafIntersectionIterator;
105  < const GridImp, AlbertaGridLeafIntersectionIterator< const GridImp >, AlbertaGridLeafIntersection< const GridImp > >
106  LevelIntersectionIterator;
107 
109 
110  typedef IdType GlobalIdType;
111  typedef IdType LocalIdType;
112 
113  template< int cd >
114  struct Codim
115  {
116  typedef AlbertaGridGlobalGeometry< dim-cd, dimworld, const Grid > GeometryImpl;
117  typedef AlbertaGridGeometry< dim-cd, dim, const Grid > LocalGeometryImpl;
118  typedef Dune::Geometry< dim-cd, dimworld, const Grid, AlbertaGridGlobalGeometry > Geometry;
119  typedef Dune::Geometry< dim-cd, dim, const Grid, LocalGeometryReference > LocalGeometry;
120 
121  typedef AlbertaGridEntity< cd, dim, const GridImp > EntityImpl;
123 
125 
126  template <PartitionIteratorType pitype>
127  struct Partition
128  {
131  };
132 
133  typedef typename Partition< All_Partition >::LevelIterator LevelIterator;
134  typedef typename Partition< All_Partition >::LeafIterator LeafIterator;
135  };
136 
139 
140  typedef IndexSet< GridImp, LevelIndexSetImp, int, std::array< GeometryType, 1 > > LevelIndexSet;
141  typedef IndexSet< GridImp, LeafIndexSetImp, int, std::array< GeometryType, 1 > > LeafIndexSet;
142  typedef AlbertaGridHierarchicIndexSet< dim, dimworld > HierarchicIndexSet;
143  typedef IdSet<GridImp,IdSetImp,IdType> GlobalIdSet;
144  typedef IdSet<GridImp,IdSetImp,IdType> LocalIdSet;
145 
146  typedef Dune::CollectiveCommunication< No_Comm > CollectiveCommunication;
147  };
148  };
149 
150 }
151 
152 #endif // #if HAVE_ALBERTA
153 
154 #endif // #ifndef DUNE_ALBERTAGRID_GRIDFAMILTY_HH
intersectioniterator.hh
geometry.hh
Wrapper and interface classes for element geometries.
intersection.hh
Dune::IntersectionIterator
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: common/grid.hh:345
gridview.hh
Dune::Intersection
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: common/grid.hh:344
geometryreference.hh
Wrapper and interface classes for element geometries.
Dune::Geometry
Wrapper class for geometries.
Definition: common/geometry.hh:66
Dune::EntityIterator
interface class for an iterator over grid entities
Definition: entityiterator.hh:29
entity.hh
Dune::EntitySeed
Store a reference to an entity with a minimal memory footprint.
Definition: common/entityseed.hh:23
Dune::GridView
Grid view abstract base class.
Definition: common/gridview.hh:59
misc.hh
entityiterator.hh
Dune
Include standard header files.
Definition: agrid.hh:58
Dune::Entity
Wrapper class for entities.
Definition: common/entity.hh:63