PersistentContainer.hpp
Go to the documentation of this file.
1#ifndef DUNE_CPGRID_PERSISTENTCONTAINER_HH
2#define DUNE_CPGRID_PERSISTENTCONTAINER_HH
3
4#include <dune/common/version.hh>
5
6#include <dune/grid/utility/persistentcontainer.hh>
7#include <opm/grid/CpGrid.hpp>
8
9#include <dune/grid/utility/persistentcontainervector.hh>
10
11namespace Dune
12{
13 // PersistentContainer for CpGrid
14 // -------------------------------
15 template< class Data >
16 class PersistentContainer< CpGrid, Data >
17 : public PersistentContainerVector< CpGrid,
18 typename CpGrid::Traits::LeafIndexSet,
19 std::vector<Data> >
20 {
21 public:
23 typedef typename std::vector<Data>::allocator_type Allocator;
24
25 private:
26 typedef PersistentContainerVector< GridType, typename GridType::Traits::LeafIndexSet, std::vector<Data> > BaseType;
27
28 public:
31 PersistentContainer ( const GridType &grid, const int codim, const Data& data = Data(), const Allocator &allocator = Allocator() )
32 : BaseType( grid.leafIndexSet(), codim, data, allocator )
33 {}
34 };
35
36} // end namespace Dune
37
38#endif // end DUNE_CPGRID_PERSISTENTCONTAINER_HH
DataHandle & data
Definition: CpGridData.hpp:1085
[ provides Dune::Grid ]
Definition: CpGrid.hpp:238
PersistentContainer(const GridType &grid, const int codim, const Data &data=Data(), const Allocator &allocator=Allocator())
Definition: PersistentContainer.hpp:31
CpGrid GridType
Definition: PersistentContainer.hpp:22
std::vector< Data >::allocator_type Allocator
Definition: PersistentContainer.hpp:23
The namespace Dune is the main namespace for all Dune code.
Definition: common/CartesianIndexMapper.hpp:10