1 #ifndef DUNE_FEM_GRIDPART_TEST_PERSISTENTINDEXSET_HH 2 #define DUNE_FEM_GRIDPART_TEST_PERSISTENTINDEXSET_HH 21 template<
class Traits >
23 template<
class Traits >
47 namespace Capabilities
55 template< class IndexSet, bool value = std::is_base_of< PersistentIndexSetInterface, IndexSet >::type::value >
56 struct __isPersistentIndexSet;
58 template<
class IndexSet >
59 struct __isPersistentIndexSet< IndexSet, true >
61 static const bool v =
true;
69 template<
class IndexSet >
70 struct __isPersistentIndexSet< IndexSet, false >
72 static const bool v =
false;
80 #endif // #ifndef DOXYGEN 89 template<
class IndexSet >
91 :
public __isPersistentIndexSet< IndexSet >
94 typedef __isPersistentIndexSet< IndexSet > BaseType;
98 static const bool v = BaseType::v;
103 return BaseType::map( indexSet );
109 template<
class IndexSet >
114 #endif // #ifndef DOXYGEN 128 template<
class Traits,
template<
class >
class Base >
130 :
public Base< Traits >,
133 typedef Base< Traits > BaseType;
136 using BaseType::impl;
145 dofManager_( DofManagerType::instance( grid ) ),
148 dofManager_.addIndexSet( impl() );
152 using BaseType::read;
153 using BaseType::write;
157 dofManager_.removeIndexSet( impl() );
163 if( needsBackupRestore() )
170 if( needsBackupRestore() )
181 bool needsBackupRestore ()
const {
return counter_ > 0; }
196 template<
class Traits >
213 template<
class Traits >
229 #endif // #ifndef DUNE_FEM_GRIDPART_TEST_PERSISTENTINDEXSET_HH Definition: persistentindexset.hh:24
PersistentConsecutiveIndexSet(const typename BaseType::GridType &grid)
Definition: persistentindexset.hh:203
void addBackupRestore() overridefinal
please doc me
Definition: persistentindexset.hh:175
virtual void removeBackupRestore()=0
please doc me
DofManagerType & dofManager_
Definition: persistentindexset.hh:185
~PersistentIndexSet()
Definition: persistentindexset.hh:155
static RestoreStreamType & restoreStream()
Definition: persistencemanager.hh:338
void restore()
please doc me
Definition: persistentindexset.hh:168
DofManager< GridType > DofManagerType
dof manager type
Definition: persistentindexset.hh:141
Definition: datacollector.hh:45
please doc me
Definition: persistentindexset.hh:129
void backup() const
please doc me
Definition: persistentindexset.hh:161
virtual ~PersistentIndexSetInterface()
Definition: persistentindexset.hh:36
const GridType & grid_
Definition: persistentindexset.hh:184
static BackupStreamType & backupStream()
Definition: persistencemanager.hh:333
Definition: coordinate.hh:4
virtual void addBackupRestore()=0
please doc me
Definition: persistentindexset.hh:22
capability for persistent index sets
Definition: persistentindexset.hh:90
Traits::GridType GridType
grid type
Definition: persistentindexset.hh:139
void removeBackupRestore() overridefinal
please doc me
Definition: persistentindexset.hh:178
PersistentAdaptiveIndexSet(const typename BaseType::GridType &grid)
Definition: persistentindexset.hh:220
PersistentIndexSet(const GridType &grid)
Definition: persistentindexset.hh:143
static constexpr PersistentIndexSetInterface * map(IndexSet &indexSet) noexcept
please doc me
Definition: persistentindexset.hh:101
virtual base class for persistent index sets
Definition: persistentindexset.hh:34