dune-grid
2.3beta2
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
grid
geometrygrid
geometrygrid/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_GEOGRID_GRIDFAMILY_HH
4
#define DUNE_GEOGRID_GRIDFAMILY_HH
5
6
#include <dune/common/static_assert.hh>
7
8
#include <
dune/grid/common/grid.hh
>
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
22
namespace
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
65
typedef
Dune::Intersection< const Grid, GeoGrid::Intersection< const Grid, typename HostGrid::LeafIntersection >
>
LeafIntersection
;
66
typedef
Dune::Intersection< const Grid, GeoGrid::Intersection< const Grid, typename HostGrid::LevelIntersection >
>
LevelIntersection
;
67
68
typedef
Dune::IntersectionIterator
69
<
const
Grid
,
GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LeafIntersectionIterator >
,
GeoGrid::Intersection< const Grid, typename HostGrid::LeafIntersection >
>
70
LeafIntersectionIterator
;
71
typedef
Dune::IntersectionIterator
72
<
const
Grid
,
GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LevelIntersectionIterator >
,
GeoGrid::Intersection< const Grid, typename HostGrid::LevelIntersection >
>
73
LevelIntersectionIterator
;
74
75
typedef
Dune::EntityIterator< 0, const Grid, GeoGrid::HierarchicIterator< const Grid >
>
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
;
87
typedef
Dune::EntityPointer< const Grid, EntityPointerImpl >
EntityPointer
;
88
typedef
typename
EntityPointerTraits::Entity
Entity
;
89
90
typedef
Dune::EntitySeed< const Grid, GeoGrid::EntitySeed< codim, const Grid >
>
EntitySeed
;
91
92
template
< PartitionIteratorType pitype >
93
struct
Partition
94
{
95
typedef
GeoGrid::IteratorTraits< typename HostGrid::LeafGridView, codim, pitype, const Grid >
LeafIteratorTraits
;
96
typedef
Dune::EntityIterator< codim, const Grid, GeoGrid::Iterator< LeafIteratorTraits >
>
LeafIterator
;
97
98
typedef
GeoGrid::IteratorTraits< typename HostGrid::LevelGridView, codim, pitype, const Grid >
LevelIteratorTraits
;
99
typedef
Dune::EntityIterator< codim, const Grid, GeoGrid::Iterator< LevelIteratorTraits >
>
LevelIterator
;
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
{
119
typedef
Dune::GridView< GeoGrid::GridViewTraits< typename HostGrid::LeafGridView, CoordFunction, Allocator, pitype >
>
120
LeafGridView
;
121
typedef
Dune::GridView< GeoGrid::GridViewTraits< typename HostGrid::LevelGridView, CoordFunction, Allocator, pitype >
>
122
LevelGridView
;
123
};
124
};
125
};
126
127
}
// namespace GeoGrid
128
129
}
// namespace Dune
130
131
#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH
Generated on Mon Feb 10 2014 21:12:32 for dune-grid by
1.8.1.2