DUNE-FEM (unstable)

gridfamily.hh
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4// vi: set et ts=4 sw=2 sts=2:
5#ifndef DUNE_GEOGRID_GRIDFAMILY_HH
6#define DUNE_GEOGRID_GRIDFAMILY_HH
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/geometry.hh>
14#include <dune/grid/geometrygrid/gridview.hh>
15#include <dune/grid/geometrygrid/intersection.hh>
16#include <dune/grid/geometrygrid/intersectioniterator.hh>
17#include <dune/grid/geometrygrid/iterator.hh>
18#include <dune/grid/geometrygrid/idset.hh>
19#include <dune/grid/geometrygrid/indexsets.hh>
20
21namespace Dune
22{
23
27 namespace GeoGrid
28 {
29
30 // ExportParams
31 // ------------
32
33 template< class HG, class CF >
34 class ExportParams
35 {
36 static const bool isCoordFunction = isCoordFunctionInterface< typename CF::Interface >::value;
37 static_assert(isCoordFunction, "Invalid CoordFunction.");
38
39 public:
40 typedef HG HostGrid;
41 typedef CF CoordFunction;
42 };
43
44
45
46 // GridFamily
47 // ----------
48
49 template< class HG, class CF, class Allocator >
50 struct GridFamily
51 {
52 struct Traits
53 {
54 typedef GeometryGrid< HG, CF, Allocator > Grid;
55
56 typedef HG HostGrid;
57 typedef CF CoordFunction;
58
59 typedef typename HostGrid::ctype ctype;
60
61 static const int dimension = HostGrid::dimension;
62 static const int dimensionworld = CoordFunction::dimRange;
63
66
68 < const Grid, GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LeafIntersectionIterator >, GeoGrid::Intersection< const Grid, typename HostGrid::LeafIntersection > >
69 LeafIntersectionIterator;
71 < const Grid, GeoGrid::IntersectionIterator< const Grid, typename HostGrid::LevelIntersectionIterator >, GeoGrid::Intersection< const Grid, typename HostGrid::LevelIntersection > >
72 LevelIntersectionIterator;
73
75 HierarchicIterator;
76
77 template< int codim >
78 struct Codim
79 {
80 typedef Dune::GeoGrid::Geometry< dimension-codim, dimensionworld, const Grid > GeometryImpl;
81 typedef Dune::Geometry< dimension-codim, dimensionworld, const Grid, Dune::GeoGrid::Geometry > Geometry;
82 typedef typename HostGrid::template Codim< codim >::LocalGeometry LocalGeometry;
83
84 typedef GeoGrid::Entity< codim, dimension, const Grid > EntityImpl;
86
88
89 template< PartitionIteratorType pitype >
90 struct Partition
91 {
92 typedef GeoGrid::Iterator< typename HostGrid::LeafGridView, codim, pitype, const Grid > LeafIteratorImp;
94
95 typedef GeoGrid::Iterator< typename HostGrid::LevelGridView, codim, pitype, const Grid > LevelIteratorImp;
97 };
98
99 typedef typename Partition< All_Partition >::LeafIterator LeafIterator;
100 typedef typename Partition< All_Partition >::LevelIterator LevelIterator;
101 };
102
103 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LeafIndexSet > LeafIndexSet;
104 typedef GeoGrid::IndexSet< const Grid, typename HostGrid::Traits::LevelIndexSet > LevelIndexSet;
105
106 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::GlobalIdSet >
107 GlobalIdSet;
108 typedef GeoGrid::IdSet< const Grid, typename HostGrid::Traits::LocalIdSet >
109 LocalIdSet;
110
111 typedef typename HostGrid::Traits::Communication Communication;
112
115 };
116 };
117
118 } // namespace GeoGrid
119
120} // namespace Dune
121
122#endif // #ifndef DUNE_GEOGRID_GRIDFAMILY_HH
interface class for an iterator over grid entities
Definition: entityiterator.hh:32
Store a reference to an entity with a minimal memory footprint.
Definition: entityseed.hh:26
Wrapper class for entities.
Definition: entity.hh:66
Wrapper class for geometries.
Definition: geometry.hh:71
Grid view abstract base class.
Definition: gridview.hh:66
Mesh entities of codimension 0 ("elements") allow to visit all intersections with "neighboring" eleme...
Definition: intersectioniterator.hh:83
Intersection of a mesh entity of codimension 0 ("element") with a "neighboring" element or with the d...
Definition: intersection.hh:164
Different resources needed by all grid implementations.
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 13, 23:29, 2024)