1#ifndef DUNE_FEM_GRIDPART_TEST_PERSISTENTINDEXSET_HH
2#define DUNE_FEM_GRIDPART_TEST_PERSISTENTINDEXSET_HH
7#include <dune/fem/gridpart/common/indexset.hh>
8#include <dune/fem/io/file/persistencemanager.hh>
9#include <dune/fem/io/streams/streams.hh>
10#include <dune/fem/space/common/dofmanager.hh>
21 template<
class Traits >
22 class PersistentConsecutiveIndexSet;
23 template<
class Traits >
24 class PersistentAdaptiveIndexSet;
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;
74 static constexpr PersistentIndexSetInterface* map (
IndexSet & )
noexcept
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 >
110 struct isPersistentIndexSet< const
IndexSet >
111 :
public isPersistentIndexSet< IndexSet >
128 template<
class Traits,
template<
class >
class Base >
130 :
public Base< Traits >,
133 typedef Base< Traits > BaseType;
136 using BaseType::impl;
152 using BaseType::read;
153 using BaseType::write;
163 if( needsBackupRestore() )
164 write( PersistenceManager::backupStream() );
170 if( needsBackupRestore() )
171 read( PersistenceManager::restoreStream() );
181 bool needsBackupRestore ()
const {
return counter_ > 0; }
184 const GridType &grid_;
196 template<
class Traits >
197 class PersistentConsecutiveIndexSet
198 :
public PersistentIndexSet< Traits, ConsecutiveIndexSet >
213 template<
class Traits >
214 class PersistentAdaptiveIndexSet
215 :
public PersistentIndexSet< Traits, AdaptiveIndexSet >
Definition: dofmanager.hh:786
interface documentation for (grid part) index sets
Definition: indexset.hh:123
please doc me
Definition: persistentindexset.hh:132
Traits::GridType GridType
grid type
Definition: persistentindexset.hh:139
void backup() const
please doc me
Definition: persistentindexset.hh:161
void restore()
please doc me
Definition: persistentindexset.hh:168
void removeBackupRestore() override final
please doc me
Definition: persistentindexset.hh:178
void addBackupRestore() override final
please doc me
Definition: persistentindexset.hh:175
DofManager< GridType > DofManagerType
dof manager type
Definition: persistentindexset.hh:141
Index Set Interface base class.
Definition: indexidset.hh:78
void removeIndexSet(const IndexSetType &iset)
removed index set from dof manager's list of index sets
Definition: dofmanager.hh:1331
void addIndexSet(const IndexSetType &iset)
add index set to dof manager's list of index sets
Definition: dofmanager.hh:1296
Dune namespace.
Definition: alignedallocator.hh:13
capability for persistent index sets
Definition: persistentindexset.hh:92
static constexpr PersistentIndexSetInterface * map(IndexSet &indexSet) noexcept
please doc me
Definition: persistentindexset.hh:101
static const bool v
please doc me
Definition: persistentindexset.hh:98
virtual base class for persistent index sets
Definition: persistentindexset.hh:35
virtual void addBackupRestore()=0
please doc me
virtual void removeBackupRestore()=0
please doc me