Dune Core Modules (2.3.1)

gridfamily.hh
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_GEOGRID_GRIDFAMILY_HH
4#define DUNE_GEOGRID_GRIDFAMILY_HH
5
7
9#include <dune/grid/geometrygrid/capabilities.hh>
10#include <dune/grid/geometrygrid/declaration.hh>
11#include <dune/grid/geometrygrid/entity.hh>
12#include <dune/grid/geometrygrid/entityseed.hh>
13#include <dune/grid/geometrygrid/entitypointer.hh>
14#include <dune/grid/geometrygrid/geometry.hh>
15#include <dune/grid/geometrygrid/gridview.hh>
16#include <dune/grid/geometrygrid/intersection.hh>
17#include <dune/grid/geometrygrid/intersectioniterator.hh>
18#include <dune/grid/geometrygrid/iterator.hh>
19#include <dune/grid/geometrygrid/idset.hh>
20#include <dune/grid/geometrygrid/indexsets.hh>
21
22namespace Dune
23{
24
28 namespace GeoGrid
29 {
30
31 // ExportParams
32 // ------------
33
34 template< class HG, class CF >
35 class ExportParams
36 {
37 static const bool isCoordFunction = isCoordFunctionInterface< typename CF::Interface >::value;
38 dune_static_assert( isCoordFunction, "Invalid CoordFunction." );
39
40 public:
41 typedef HG HostGrid;
42 typedef CF CoordFunction;
43 };
44
45
46
47 // GridFamily
48 // ----------
49
50 template< class HG, class CF, class Allocator >
51 struct GridFamily
52 {
53 struct Traits
54 {
55 typedef GeometryGrid< HG, CF, Allocator > Grid;
56
57 typedef HG HostGrid;
58 typedef CF CoordFunction;
59
60 typedef typename HostGrid::ctype ctype;
61
62 static const int dimension = HostGrid::dimension;
63 static const int dimensionworld = CoordFunction::dimRange;
64
67
69 < const Grid, GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LeafIntersectionIterator >, GeoGrid::Intersection< const Grid, typename HostGrid::LeafIntersection > >
70 LeafIntersectionIterator;
72 < const Grid, GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LevelIntersectionIterator >, GeoGrid::Intersection< const Grid, typename HostGrid::LevelIntersection > >
73 LevelIntersectionIterator;
74
76 HierarchicIterator;
77
78 template< int codim >
79 struct Codim
80 {
81 typedef Dune::GeoGrid::Geometry< dimension-codim, dimensionworld, const Grid > GeometryImpl;
82 typedef Dune::Geometry< dimension-codim, dimensionworld, const Grid, Dune::GeoGrid::Geometry > Geometry;
83 typedef typename HostGrid::template Codim< codim >::LocalGeometry LocalGeometry;
84
85 typedef GeoGrid::EntityPointerTraits< codim, const Grid > EntityPointerTraits;
86 typedef GeoGrid::EntityPointer< EntityPointerTraits > EntityPointerImpl;
88 typedef typename EntityPointerTraits::Entity Entity;
89
91
92 template< PartitionIteratorType pitype >
93 struct Partition
94 {
95 typedef GeoGrid::IteratorTraits< typename HostGrid::LeafGridView, codim, pitype, const Grid > LeafIteratorTraits;
97
98 typedef GeoGrid::IteratorTraits< typename HostGrid::LevelGridView, codim, pitype, const Grid > LevelIteratorTraits;
100 };
101
102 typedef typename Partition< All_Partition >::LeafIterator LeafIterator;
103 typedef typename Partition< All_Partition >::LevelIterator LevelIterator;
104 };
105
106 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LeafIndexSet > LeafIndexSet;
107 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LevelIndexSet > LevelIndexSet;
108
109 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::GlobalIdSet >
110 GlobalIdSet;
111 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::LocalIdSet >
112 LocalIdSet;
113
114 typedef typename HostGrid::Traits::CollectiveCommunication CollectiveCommunication;
115
116 template< PartitionIteratorType pitype >
117 struct Partition
118 {
120 LeafGridView;
122 LevelGridView;
123 };
124 };
125 };
126
127 } // namespace GeoGrid
128
129} // namespace Dune
130
131#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH
interface class for an iterator over grid entities
Definition: entityiterator.hh:37
Wrapper class for pointers to entities.
Definition: entitypointer.hh:92
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:24
Wrapper class for geometries.
Definition: geometry.hh:102
Grid view abstract base class.
Definition: gridview.hh:57
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: intersectioniterator.hh:83
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: intersection.hh:161
Different resources needed by all grid implementations.
#define dune_static_assert(COND, MSG)
Helper template so that compilation fails if condition is not true.
Definition: static_assert.hh:79
Dune namespace.
Definition: alignment.hh:14
Fallback implementation of the C++0x static_assert feature.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)