persistentcontainer.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=2 sw=2 sts=2:
3#ifndef DUNE_POLYHEDRALGRID_PERSISTENTCONTAINER_HH
4#define DUNE_POLYHEDRALGRID_PERSISTENTCONTAINER_HH
5
6#include <dune/common/version.hh>
7
8#include <dune/grid/utility/persistentcontainer.hh>
10
11#include <dune/grid/utility/persistentcontainervector.hh>
12
13namespace Dune
14{
15 // PersistentContainer for CpGrid
16 // -------------------------------
17 template< int dim, int dimworld, class Data >
18 class PersistentContainer< PolyhedralGrid< dim, dimworld >, Data >
19 : public PersistentContainerVector< PolyhedralGrid< dim, dimworld >,
20 typename PolyhedralGrid< dim, dimworld >::Traits::LeafIndexSet,
21 std::vector<Data> >
22 {
23 public:
25 typedef typename std::vector<Data>::allocator_type Allocator;
26
27 private:
28 typedef PersistentContainerVector< GridType, typename GridType::Traits::LeafIndexSet, std::vector<Data> > BaseType;
29
30 public:
33 PersistentContainer ( const GridType &grid, const int codim, const Data& data = Data(), const Allocator &allocator = Allocator() )
34 : BaseType( grid.leafIndexSet(), codim, data, allocator )
35 {}
36 };
37
38} // end namespace Dune
39
40#endif
DataHandle & data
Definition: CpGridData.hpp:1085
std::vector< Data >::allocator_type Allocator
Definition: persistentcontainer.hh:25
PolyhedralGrid< dim, dimworld > GridType
Definition: persistentcontainer.hh:24
PersistentContainer(const GridType &grid, const int codim, const Data &data=Data(), const Allocator &allocator=Allocator())
Definition: persistentcontainer.hh:33
identical grid wrapper
Definition: grid.hh:159
The namespace Dune is the main namespace for all Dune code.
Definition: common/CartesianIndexMapper.hpp:10