Dune Core Modules (2.9.0)

persistentcontainer.hh
1#ifndef DUNE_ALU_PERSISTENTCONTAINER_HH
2#define DUNE_ALU_PERSISTENTCONTAINER_HH
3
4#include <dune/grid/utility/persistentcontainer.hh>
5#include <dune/grid/utility/persistentcontainervector.hh>
6
7#include <dune/alugrid/grid.hh>
8
9namespace Dune
10{
11
12 // ALUGridPersistentContainer
13 // --------------------------
14
15 template< class G, class T >
16 class ALUGridPersistentContainer
17 : public PersistentContainerVector< G, typename G::HierarchicIndexSet, std::vector< T > >
18 {
19 typedef PersistentContainerVector< G, typename G::HierarchicIndexSet, std::vector< T > > Base;
20
21 public:
22 typedef typename Base::Grid Grid;
23 typedef typename Base::Value Value;
24
26 typedef typename Base::Grid GridType;
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, ALUGridElementType eltype, ALUGridRefinementType refinementtype, class Comm, class T >
38 class PersistentContainer< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, T >
39 : public ALUGridPersistentContainer< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, T >
40 {
41 typedef ALUGridPersistentContainer< ALUGrid< dim, dimworld, eltype, refinementtype, Comm >, T > Base;
42
43 public:
44 typedef typename Base::Grid Grid;
45 typedef typename Base::Value Value;
46
48 typedef typename Base::Grid GridType;
49
50 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
51 : Base( grid, codim, value )
52 {}
53 };
54
55 template< int dim, int dimworld, ALU3dGridElementType elType, class Comm, class T >
56 class PersistentContainer< ALU3dGrid< dim, dimworld, elType, Comm >, T >
57 : public ALUGridPersistentContainer< ALU3dGrid< dim, dimworld, elType, Comm >, T >
58 {
59 typedef ALUGridPersistentContainer< ALU3dGrid< dim, dimworld, elType, Comm >, T > Base;
60
61 public:
62 typedef typename Base::Grid Grid;
63 typedef typename Base::Value Value;
64
66 typedef typename Base::Grid GridType;
67
68 PersistentContainer ( const Grid &grid, int codim, const Value &value = Value() )
69 : Base( grid, codim, value )
70 {}
71 };
72
73} // namespace Dune
74
75#endif // #ifndef DUNE_ALU_PERSISTENTCONTAINER_HH
Dune namespace.
Definition: alignedallocator.hh:13
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)