Dune Core Modules (2.5.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
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
88 template< PartitionIteratorType pitype >
89 struct Partition
90 {
91 typedef GeoGrid::Iterator< typename HostGrid::LeafGridView, codim, pitype, const Grid > LeafIteratorImp;
93
94 typedef GeoGrid::Iterator< typename HostGrid::LevelGridView, codim, pitype, const Grid > LevelIteratorImp;
96 };
97
98 typedef typename Partition< All_Partition >::LeafIterator LeafIterator;
99 typedef typename Partition< All_Partition >::LevelIterator LevelIterator;
100 };
101
102 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LeafIndexSet > LeafIndexSet;
103 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LevelIndexSet > LevelIndexSet;
104
105 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::GlobalIdSet >
106 GlobalIdSet;
107 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::LocalIdSet >
108 LocalIdSet;
109
110 typedef typename HostGrid::Traits::CollectiveCommunication CollectiveCommunication;
111
114 };
115 };
116
117 } // namespace GeoGrid
118
119} // namespace Dune
120
121#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH
interface class for an iterator over grid entities
Definition: entityiterator.hh:37
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:24
Wrapper class for entities.
Definition: entity.hh:65
Wrapper class for geometries.
Definition: geometry.hh:66
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
Wrapper and interface class for a static iterator (EntityPointer)
Different resources needed by all grid implementations.
Dune namespace.
Definition: alignment.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)