Dune Core Modules (2.4.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
8#include <dune/grid/geometrygrid/capabilities.hh>
9#include <dune/grid/geometrygrid/declaration.hh>
10#include <dune/grid/geometrygrid/entity.hh>
11#include <dune/grid/geometrygrid/entityseed.hh>
12#include <dune/grid/geometrygrid/geometry.hh>
13#include <dune/grid/geometrygrid/gridview.hh>
14#include <dune/grid/geometrygrid/intersection.hh>
15#include <dune/grid/geometrygrid/intersectioniterator.hh>
16#include <dune/grid/geometrygrid/iterator.hh>
17#include <dune/grid/geometrygrid/idset.hh>
18#include <dune/grid/geometrygrid/indexsets.hh>
19
20namespace Dune
21{
22
26 namespace GeoGrid
27 {
28
29 // ExportParams
30 // ------------
31
32 template< class HG, class CF >
33 class ExportParams
34 {
35 static const bool isCoordFunction = isCoordFunctionInterface< typename CF::Interface >::value;
36 static_assert(isCoordFunction, "Invalid CoordFunction.");
37
38 public:
39 typedef HG HostGrid;
40 typedef CF CoordFunction;
41 };
42
43
44
45 // GridFamily
46 // ----------
47
48 template< class HG, class CF, class Allocator >
49 struct GridFamily
50 {
51 struct Traits
52 {
53 typedef GeometryGrid< HG, CF, Allocator > Grid;
54
55 typedef HG HostGrid;
56 typedef CF CoordFunction;
57
58 typedef typename HostGrid::ctype ctype;
59
60 static const int dimension = HostGrid::dimension;
61 static const int dimensionworld = CoordFunction::dimRange;
62
65
67 < const Grid, GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LeafIntersectionIterator >, GeoGrid::Intersection< const Grid, typename HostGrid::LeafIntersection > >
68 LeafIntersectionIterator;
70 < const Grid, GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LevelIntersectionIterator >, GeoGrid::Intersection< const Grid, typename HostGrid::LevelIntersection > >
71 LevelIntersectionIterator;
72
74 HierarchicIterator;
75
76 template< int codim >
77 struct Codim
78 {
79 typedef Dune::GeoGrid::Geometry< dimension-codim, dimensionworld, const Grid > GeometryImpl;
80 typedef Dune::Geometry< dimension-codim, dimensionworld, const Grid, Dune::GeoGrid::Geometry > Geometry;
81 typedef typename HostGrid::template Codim< codim >::LocalGeometry LocalGeometry;
82
83 typedef GeoGrid::Entity< codim, dimension, const Grid > EntityImpl;
85
87
89
90 template< PartitionIteratorType pitype >
91 struct Partition
92 {
93 typedef GeoGrid::Iterator< typename HostGrid::LeafGridView, codim, pitype, const Grid > LeafIteratorImp;
95
96 typedef GeoGrid::Iterator< typename HostGrid::LevelGridView, codim, pitype, const Grid > LevelIteratorImp;
98 };
99
100 typedef typename Partition< All_Partition >::LeafIterator LeafIterator;
101 typedef typename Partition< All_Partition >::LevelIterator LevelIterator;
102 };
103
104 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LeafIndexSet > LeafIndexSet;
105 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LevelIndexSet > LevelIndexSet;
106
107 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::GlobalIdSet >
108 GlobalIdSet;
109 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::LocalIdSet >
110 LocalIdSet;
111
112 typedef typename HostGrid::Traits::CollectiveCommunication CollectiveCommunication;
113
114 template< PartitionIteratorType pitype >
115 struct Partition
116 {
118 LeafGridView;
120 LevelGridView;
121 };
122 };
123 };
124
125 } // namespace GeoGrid
126
127} // namespace Dune
128
129#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:113
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:24
Wrapper class for entities.
Definition: entity.hh:62
Wrapper class for geometries.
Definition: geometry.hh:66
Grid view abstract base class.
Definition: gridview.hh:59
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: intersectioniterator.hh:84
Intersection of a mesh entities of codimension 0 ("elements") with a "neighboring" element or with th...
Definition: intersection.hh:161
Wrapper and interface class for a static iterator (EntityPointer)
Different resources needed by all grid implementations.
Dune namespace.
Definition: alignment.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 22, 23:33, 2024)