Dune Core Modules (2.6.0)

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