Dune Core Modules (2.4.2)

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, 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
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, ALU2DSPACE ElementType elType, class T >
53 class PersistentContainer< ALU2dGrid< dim, dimworld, elType >, T >
54 : public ALUGridPersistentContainer< ALU2dGrid< dim, dimworld, elType >, T >
55 {
56 typedef ALUGridPersistentContainer< ALU2dGrid< dim, dimworld, elType >, 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< ALU3dGridElementType elType, class Comm, class T >
68 class PersistentContainer< ALU3dGrid< elType, Comm >, T >
69 : public ALUGridPersistentContainer< ALU3dGrid< elType, Comm >, T >
70 {
71 typedef ALUGridPersistentContainer< ALU3dGrid< elType, Comm >, 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} // namespace Dune
83
84#endif // #if HAVE_ALUGRID
85
86#endif // #ifndef DUNE_ALU_PERSISTENTCONTAINER_HH
Provides base classes for ALUGrid.
Dune namespace.
Definition: alignment.hh:10
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)