Dune Core Modules (2.3.1)

persistentcontainer.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_ALU_PERSISTENTCONTAINER_HH
4#define DUNE_ALU_PERSISTENTCONTAINER_HH
5
6#include <dune/grid/utility/persistentcontainer.hh>
7
8#if HAVE_ALUGRID
10#include <dune/grid/utility/persistentcontainervector.hh>
11
12namespace Dune
13{
14
15 // ALUGridPersistentContainer
16 // --------------------------
17
18 template< class G, class T >
19 class ALUGridPersistentContainer
20 : public PersistentContainerVector< G, typename G::HierarchicIndexSet, std::vector< T > >
21 {
22 typedef PersistentContainerVector< G, typename G::HierarchicIndexSet, std::vector< T > > Base;
23
24 public:
25 typedef typename Base::Grid Grid;
26 typedef typename Base::Value Value;
27
28 ALUGridPersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
29 : Base( grid.hierarchicIndexSet(), codim, value )
30 {}
31 };
32
33
34 // PersistentContainer for ALUGrid
35 // -------------------------------
36
37 template< int dim, int dimworld, class T >
38 class PersistentContainer< ALUConformGrid< dim, dimworld >, T >
39 : public ALUGridPersistentContainer< ALUConformGrid< dim, dimworld >, T >
40 {
41 typedef ALUGridPersistentContainer< ALUConformGrid< dim, dimworld >, T > Base;
42
43 public:
44 typedef typename Base::Grid Grid;
45 typedef typename Base::Value Value;
46
47 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
48 : Base( grid, codim, value )
49 {}
50 };
51
52 template< int dim, int dimworld, class T >
53 class PersistentContainer< ALUCubeGrid< dim, dimworld >, T >
54 : public ALUGridPersistentContainer< ALUCubeGrid< dim, dimworld >, T >
55 {
56 typedef ALUGridPersistentContainer< ALUCubeGrid< dim, dimworld >, T > Base;
57
58 public:
59 typedef typename Base::Grid Grid;
60 typedef typename Base::Value Value;
61
62 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
63 : Base( grid, codim, value )
64 {}
65 };
66
67 template< int dim, int dimworld, class T >
68 class PersistentContainer< ALUSimplexGrid< dim, dimworld >, T >
69 : public ALUGridPersistentContainer< ALUSimplexGrid< dim, dimworld >, T >
70 {
71 typedef ALUGridPersistentContainer< ALUSimplexGrid< dim, dimworld >, T > Base;
72
73 public:
74 typedef typename Base::Grid Grid;
75 typedef typename Base::Value Value;
76
77 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
78 : Base( grid, codim, value )
79 {}
80 };
81
82 template< int dim, int dimworld, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm, class T >
83 class PersistentContainer< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, T >
84 : public ALUGridPersistentContainer< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, T >
85 {
86 typedef ALUGridPersistentContainer< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, T > Base;
87
88 public:
89 typedef typename Base::Grid Grid;
90 typedef typename Base::Value Value;
91
92 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
93 : Base( grid, codim, value )
94 {}
95 };
96
97 template< int dim, int dimworld, ALU2DSPACE ElementType elType, class T >
98 class PersistentContainer< ALU2dGrid< dim, dimworld, elType >, T >
99 : public ALUGridPersistentContainer< ALU2dGrid< dim, dimworld, elType >, T >
100 {
101 typedef ALUGridPersistentContainer< ALU2dGrid< dim, dimworld, elType >, T > Base;
102
103 public:
104 typedef typename Base::Grid Grid;
105 typedef typename Base::Value Value;
106
107 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
108 : Base( grid, codim, value )
109 {}
110 };
111
112 template< ALU3dGridElementType elType, class Comm, class T >
113 class PersistentContainer< ALU3dGrid< elType, Comm >, T >
114 : public ALUGridPersistentContainer< ALU3dGrid< elType, Comm >, T >
115 {
116 typedef ALUGridPersistentContainer< ALU3dGrid< elType, Comm >, T > Base;
117
118 public:
119 typedef typename Base::Grid Grid;
120 typedef typename Base::Value Value;
121
122 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
123 : Base( grid, codim, value )
124 {}
125 };
126
127} // namespace Dune
128
129#endif // #if HAVE_ALUGRID
130
131#endif // #ifndef DUNE_ALU_PERSISTENTCONTAINER_HH
Provides base classes for ALUGrid.
Dune namespace.
Definition: alignment.hh:14
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 12, 23:30, 2024)