1 #ifndef DUNE_FEM_DOFMANAGER_HH
2 #define DUNE_FEM_DOFMANAGER_HH
8 #include <dune/common/exceptions.hh>
9 #include <dune/common/stdstreams.hh>
10 #include <dune/common/version.hh>
13 #include <dune/alugrid/common/interfaces.hh>
27 #include <dune/grid/common/datahandleif.hh>
29 #include <dune/alugrid/common/ldbhandleif.hh>
44 template <
class Gr
idType>
class DofManager;
45 template <
class DofManagerImp>
class DofManagerFactory;
69 template<
class IndexSet >
71 :
setPtr_( getIdentifier( iset ) ),
102 template<
class IndexSet >
105 return (getIdentifier( iset ) ==
setPtr_);
109 template<
class IndexSet >
116 template <
class IndexSetType,
class EntityType>
class RemoveIndicesFromSet;
117 template <
class IndexSetType,
class EntityType>
class InsertIndicesToSet;
119 template <
class IndexSetType,
class EntityType>
122 public LocalInlinePlus < ManagedIndexSet<IndexSetType,EntityType> , EntityType >
147 ,
indexSet_ (const_cast<IndexSetType &> (iset))
153 this->
setPtr_ = (
void *) &indexSet_;
244 virtual void resize (
const bool enlargeOnly ) = 0;
269 template <
class Gr
idImp,
class MapperType ,
class DofArrayType>
304 DofArrayType& array )
346 if(
mapper().consecutive() )
348 const int nSize =
size() + (needed *
mapper().maxNumDofs());
355 assert( !
mapper().consecutive() );
365 const int nSize =
mapper().size();
371 const int oldSize =
array_.size();
379 const int numBlocks =
mapper().numBlocks();
380 for(
int block = 0; block < numBlocks; ++block )
386 if(
mapper().consecutive () )
389 const int holes =
mapper().numberOfHoles( block );
390 for(
int i = 0; i < holes; ++i )
392 const int oldIndex =
mapper().oldIndex( i, block );
393 const int newIndex =
mapper().newIndex( i, block );
395 assert( newIndex < nSize );
397 array_.copyContent( newIndex, oldIndex );
435 void resize ( std::false_type,
const bool enlargeOnly )
441 const int newSize =
mapper().size();
442 const int oldSize =
array_.size();
444 if( enlargeOnly && newSize < oldSize ) return ;
446 if( newSize != oldSize )
451 void resize ( std::true_type,
const bool enlargeOnly )
455 const int oldSize =
array_.size();
458 const int nSize =
mapper().size();
462 if( enlargeOnly && nSize <= oldSize ) return ;
465 if( nSize == oldSize ) return ;
474 const int numBlocks =
mapper().numBlocks();
477 int upperBound = oldSize ;
480 assert(
mapper().offSet( 0 ) == 0 );
481 assert(
mapper().oldOffSet( 0 ) == 0 );
484 for(
int block = numBlocks-1; block >= 1; --block )
487 const int newOffSet =
mapper().offSet( block );
488 const int oldOffSet =
mapper().oldOffSet( block );
491 assert( newOffSet >= oldOffSet );
494 if( newOffSet > oldOffSet )
497 const int blockSize = upperBound - oldOffSet;
499 array_.memMoveBackward( blockSize, oldOffSet, newOffSet );
502 upperBound = oldOffSet;
516 const int oldOffSet =
mapper().oldOffSet( block );
519 const int newOffSet =
mapper().offSet( block );
522 assert( newOffSet <= oldOffSet );
525 if( newOffSet < oldOffSet )
528 const int numBlocks =
mapper().numBlocks();
532 = (block == numBlocks - 1) ? oldSize :
mapper().oldOffSet( block + 1 );
533 const int blockSize = upperBound - oldOffSet;
536 array_.memMoveForward( blockSize, oldOffSet, newOffSet );
542 template <
class Gr
idImp,
class MapperType ,
class DofArrayType>
551 const MapperType&
mapper )
559 template<
class DofStorageType,
class Gr
idType,
class MapperType >
560 static inline std::pair< DofStorageInterface* , DofStorageType* >
562 const MapperType& mapper,
563 const DofStorageType * = 0 )
567 DofStorageType > ManagedDofStorageType;
569 ManagedDofStorageType* mds =
new ManagedDofStorageType( grid, mapper );
573 return std::pair< DofStorageInterface* , DofStorageType* >
574 ( mds , & mds->getArray () );
585 template <
class IndexSetType,
class EntityType>
587 :
public LocalInlinePlus < RemoveIndicesFromSet<IndexSetType,EntityType> , EntityType >
591 IndexSetType & indexSet_;
598 inline void apply ( EntityType & entity )
600 indexSet_.removeEntity( entity );
604 template <
class IndexSetType,
class EntityType>
606 :
public LocalInlinePlus < InsertIndicesToSet< IndexSetType, EntityType > , EntityType >
610 IndexSetType & indexSet_;
617 inline void apply ( EntityType & entity )
619 indexSet_.insertEntity( entity );
623 template <
class MemObjectType>
625 :
public LocalInlinePlus < ResizeMemoryObjects < MemObjectType > , int >
629 MemObjectType & memobj_;
635 : memobj_(org.memobj_)
639 inline void apply (
int& enlargeOnly )
641 memobj_.resize(
bool(enlargeOnly) );
646 template <
class MemObjectType>
648 :
public LocalInlinePlus < ReserveMemoryObjects < MemObjectType > , int >
652 MemObjectType & memobj_;
659 inline void apply (
int & chunkSize )
661 memobj_.reserve( chunkSize );
669 template <
class DofManagerType ,
class RestrictPro
longIndexSetType,
bool doResize >
672 RestrictProlongTraits<
673 IndexSetRestrictProlong<DofManagerType,RestrictProlongIndexSetType,doResize>, double > >
675 DofManagerType & dm_;
677 RestrictProlongIndexSetType & insert_;
678 RestrictProlongIndexSetType & remove_;
682 : dm_(dm) , insert_( is ), remove_( rm ) {}
685 template <
class EntityType>
689 insert_.apply( father );
691 remove_.apply( son );
700 template <
class EntityType>
705 template <
class EntityType>
709 remove_.apply( father );
711 insert_.apply( son );
728 template <
class EntityType>
731 template <
class EntityType>
754 template<
class Gr
id >
756 #if HAVE_DUNE_ALUGRID
758 public LoadBalanceHandleWithReserveAndCompress,
761 public CommDataHandleIF< DofManager< Grid >, char >
783 typedef typename GridType :: template Codim< 0 > :: Entity
ElementType ;
786 typedef std::list< ManagedDofStorageInterface* > ListType;
788 typedef std::list< ManagedIndexSetInterface * > IndexListType;
794 IndexListType indexList_;
819 const int defaultChunkSize_;
846 double memoryFactor_;
849 const bool clearResizedArrays_;
856 defaultChunkSize_( 128 ),
858 indexSetRestrictProlong_( *this, insertIndices_ , removeIndices_ ),
859 indexSetRestrictProlongNoResize_( *this, insertIndices_ , removeIndices_ ),
861 memoryFactor_(
Parameter :: getValidValue(
"fem.dofmanager.memoryfactor", double( 1.1 ),
862 [] ( double value ) {
return value >= 1.0; } ) ),
866 if(
std::abs( memoryFactor_ - 1.1 ) > 1e-12 )
868 std::cout <<
"Created DofManager with memory factor " << memoryFactor_ <<
"." << std::endl;
898 template <
class IndexSetType>
899 inline void addIndexSet (
const IndexSetType &iset );
908 template <
class IndexSetType>
915 template <
class ManagedDofStorageImp>
922 template <
class ManagedDofStorageImp>
932 return indexSetRestrictProlong_;
940 return indexSetRestrictProlongNoResize_;
946 return ! insertIndices_.
empty();
953 for(
auto memObjectPtr : memList_)
954 used += memObjectPtr->usedMemorySize();
970 int localChunkSize =
std::max(nsize, defaultChunkSize_ );
971 assert( localChunkSize > 0 );
974 reserveMemObjs_.
apply ( localChunkSize );
988 for(
auto indexSetPtr : indexList_)
989 indexSetPtr->resize();
997 insertIndices_.
apply( element );
1006 removeIndices_.
apply( element );
1012 int enlargeOnly = 0;
1014 resizeMemObjs_.
apply ( enlargeOnly );
1020 int enlargeOnly = 1;
1022 resizeMemObjs_.
apply ( enlargeOnly );
1034 assert( sequence_ == grid_.comm().max( sequence_ ) );
1047 for(
auto indexSetPtr : indexList_)
1050 indexSetPtr->compress();
1054 for(
auto memObjectPtr : memList_)
1061 memObjectPtr->dofCompress ( clearResizedArrays_ );
1069 int wasChangedCounter = int( wasChanged );
1070 return bool( grid_.comm().max( wasChangedCounter ) );
1074 template <
class DataCollType>
1083 dataInliner_.
clear();
1087 template <
class DataCollType>
1096 dataXtractor_.
clear();
1106 return ( codim == 0 );
1116 template <
class Entity>
1119 DUNE_THROW(NotImplemented,
"DofManager::size should not be called!");
1126 dataInliner_.
apply(str, element);
1132 template <
class MessageBuffer,
class Entity>
1133 void gather( MessageBuffer& str,
const Entity& entity )
const
1135 DUNE_THROW(NotImplemented,
"DofManager::gather( entity ) with codim > 0 not implemented");
1146 dataXtractor_.
apply(str, element);
1150 template <
class MessageBuffer,
class Entity>
1151 void scatter ( MessageBuffer & str,
const Entity& entity,
size_t )
1153 DUNE_THROW(NotImplemented,
"DofManager::scatter( entity ) with codim > 0 not implemented");
1163 for(
auto indexSetPtr : indexList_)
1164 indexSetPtr->backup();
1170 for(
auto indexSetPtr : indexList_)
1171 indexSetPtr->restore();
1188 template <
class OutStream >
1191 for(
auto indexSetPtr : indexList_)
1192 indexSetPtr->write(
out );
1199 template <
class InStream >
1202 for(
auto indexSetPtr : indexList_)
1203 indexSetPtr->read(
in );
1219 return DofManagerFactoryType :: instance( grid );
1229 template <
class Gr
idType>
1230 inline DofManager<GridType>::~DofManager ()
1232 if(memList_.size() > 0)
1234 while( memList_.rbegin() != memList_.rend())
1236 DofStorageInterface * mobj = (* memList_.rbegin() );
1237 dverb <<
"Removing '" << mobj <<
"' from DofManager!\n";
1238 memList_.pop_back();
1242 if(indexList_.size() > 0)
1245 std::cerr <<
"ERROR: Not all index sets have been removed from DofManager yet!" << std::endl;
1247 while ( indexList_.rbegin() != indexList_.rend())
1249 ManagedIndexSetInterface* iobj = (* indexList_.rbegin() );
1250 indexList_.pop_back();
1251 if(iobj)
delete iobj;
1256 template <
class Gr
idType>
1257 template <
class IndexSetType>
1261 assert( Fem :: ThreadManager:: singleThreadMode() );
1264 ManagedIndexSetType * indexSet = 0;
1267 auto endit = indexList_.rend();
1268 for(
auto it = indexList_.rbegin(); it != endit; ++it )
1271 if( set->
equals( iset ) )
1275 indexSet =
static_cast< ManagedIndexSetType *
>( set );
1282 indexSet =
new ManagedIndexSetType ( iset, indexSets_ , insertIndices_ , removeIndices_ );
1287 template <
class Gr
idType>
1288 template <
class IndexSetType>
1291 assert( Fem :: ThreadManager:: singleThreadMode() );
1294 auto endit = indexList_.rend();
1295 for(
auto it = indexList_.rbegin(); it != endit; ++it )
1298 if( set->
equals( iset ) )
1305 auto fit = it.base();
1306 indexList_.erase( --fit );
1315 DUNE_THROW(InvalidStateException,
"Could not remove index from DofManager set!");
1318 template <
class Gr
idType>
1319 template <
class ManagedDofStorageImp>
1326 memList_.push_front( obj );
1329 resizeMemObjs_ += dofStorage.resizeMemoryObject();
1332 reserveMemObjs_ += dofStorage.reserveMemoryObject();
1336 template <
class Gr
idType>
1337 template <
class ManagedDofStorageImp>
1341 auto obj = &dofStorage;
1344 auto endit = memList_.end();
1345 for(
auto it = memList_.begin();it != endit ; ++it)
1350 memList_.erase( it );
1353 resizeMemObjs_.remove( dofStorage.resizeMemoryObject() );
1354 reserveMemObjs_.remove( dofStorage.reserveMemoryObject() );
1371 template<
class DofManagerImp >
1406 const std :: string &filename,
1420 const std :: string &filename,
virtual void backup() const =0
:: backup
IdentifierType setPtr_
Definition: dofmanager.hh:65
DofManagerType & dm_
Definition: dofmanager.hh:281
RemoveIndicesFromSet(IndexSetType &iset)
Definition: dofmanager.hh:595
bool removeReference()
decrease reference counter and return true if zero reached
Definition: dofmanager.hh:97
void resizeAndMoveToRear()
Definition: dofmanager.hh:508
virtual bool compress()=0
compress of index set
GridObjectStreamTraits< GridType >::InStreamType XtractStreamImplType
Definition: dofmanager.hh:772
void restrictLocal(const EntityType &father, const EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition: dofmanager.hh:686
DofManager(const ThisType &)=delete
void scatter(MessageBuffer &str, const Entity &entity, size_t)
unpacks all data of this entity from message buffer
Definition: dofmanager.hh:1151
void enlargeMemory()
resize the MemObject if necessary
Definition: dofmanager.hh:1018
LocalIndexSetObjectsType & indexSetList_
Definition: dofmanager.hh:133
ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > ThisType
Definition: dofmanager.hh:276
void resize()
wrap resize of index set
Definition: dofmanager.hh:175
DataCollectorInterface< GridType, InlineStreamType > DataInlinerType
Definition: dofmanager.hh:781
size_t usedMemorySize() const
return used memory size of all MemObjects in bytes.
Definition: dofmanager.hh:950
ResizeMemoryObjects< ThisType > ResizeMemoryObjectType
Definition: dofmanager.hh:289
ResizeMemoryObjectType resizeMemObj_
Definition: dofmanager.hh:291
size_t usedMemorySize() const
return used memory size
Definition: dofmanager.hh:414
void addDataXtractor(DataCollType &d)
add data handler for data xtracting to dof manager
Definition: dofmanager.hh:1088
void enableDofCompression()
enable dof compression for this MemObject
Definition: dofmanager.hh:420
DofManager< GridImp > DofManagerType
Definition: dofmanager.hh:278
virtual void write(StandardOutStream &out) const
new write method
Definition: dofmanager.hh:202
void resize()
Resize index sets and memory due to what the mapper has as new size.
Definition: dofmanager.hh:986
LocalIndexSetObjectsType & removeList_
Definition: dofmanager.hh:135
virtual void backup() const
:: backup
Definition: dofmanager.hh:187
int size() const
return size of underlying array
Definition: dofmanager.hh:334
void restore()
:: restore
Definition: dofmanager.hh:1168
void reserveMemory(int nsize, bool dummy=false)
reserve memory for at least nsize elements, dummy is needed for dune-grid ALUGrid version
Definition: dofmanager.hh:968
DofArrayType & getArray()
return reference to array for DiscreteFunction
Definition: dofmanager.hh:426
bool compress()
wrap compress of index set
Definition: dofmanager.hh:181
ManagedDofStorageImplementation(const ManagedDofStorageImplementation &)=delete
ResizeMemoryObjects(MemObjectType &mo)
Definition: dofmanager.hh:633
void resize(std::false_type, const bool enlargeOnly)
Definition: dofmanager.hh:435
virtual void read(StandardInStream &out)=0
void removeIndexSet(const IndexSetType &iset)
removed index set from dof manager's list of index sets
Definition: dofmanager.hh:1289
virtual void restore()=0
:: restore
void prolongLocal(const EntityType &father, const EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition: dofmanager.hh:706
void resizeMemory()
resize the MemObject if necessary
Definition: dofmanager.hh:1010
void insertEntity(ConstElementType &element)
Inserts entity to all index sets added to dof manager.
Definition: dofmanager.hh:994
IndexSetType & indexSet_
Definition: dofmanager.hh:127
static void deleteDofManager(DofManagerType &dm)
delete the dof manager that belong to the given grid
Definition: dofmanager.hh:1433
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, true > NewIndexSetRestrictProlongType
Definition: dofmanager.hh:826
ReserveMemoryObjects(MemObjectType &mo)
Definition: dofmanager.hh:656
size_t size(const Entity &) const
for convenience
Definition: dofmanager.hh:1117
DataCollectorInterface< GridType, XtractStreamType > DataXtractorType
Definition: dofmanager.hh:780
const void * IdentifierType
Definition: dofmanager.hh:63
ReserveMemoryObjects< ThisType > ReserveMemoryObjectType
Definition: dofmanager.hh:290
void apply(int &chunkSize)
Definition: dofmanager.hh:659
GridType ::template Codim< 0 >::Entity ElementType
Definition: dofmanager.hh:783
void moveToFront(const int oldSize, const int block)
move block to front again
Definition: dofmanager.hh:513
void apply(int &enlargeOnly)
Definition: dofmanager.hh:639
double memoryFactor() const
return factor to over estimate new memory allocation
Definition: dofmanager.hh:878
void prolongLocal(EntityType &father, EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition: dofmanager.hh:732
static bool writeDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
writes DofManager of corresponding grid, when DofManager exists
Definition: dofmanager.hh:1405
ManagedDofStorageImplementation(const GridImp &grid, const MapperType &mapper, DofArrayType &array)
Constructor of ManagedDofStorageImplementation, only to call from derived classes.
Definition: dofmanager.hh:302
virtual void resize(const bool enlargeOnly)=0
resize memory
virtual ~ManagedDofStorageInterface()=default
destructor
IndexSetRestrictProlongNoResizeType & indexSetRestrictProlongNoResize()
returns the index set restriction and prolongation operator
Definition: dofmanager.hh:936
Grid GridType
type of Grid this DofManager belongs to
Definition: dofmanager.hh:770
void resize(std::true_type, const bool enlargeOnly)
Definition: dofmanager.hh:451
void resize(const bool enlargeOnly)
resize the memory with the new size
Definition: dofmanager.hh:337
ManagedIndexSetInterface BaseType
type of base class
Definition: dofmanager.hh:139
DofArrayType & array_
Definition: dofmanager.hh:287
virtual void dofCompress(const bool clearResizedArrays)=0
static std::pair< DofStorageInterface *, DofStorageType * > allocateManagedDofStorage(const GridType &grid, const MapperType &mapper, const DofStorageType *=0)
default implementation for creating a managed dof storage
Definition: dofmanager.hh:561
DofStorageInterface()=default
do not allow to create explicit instances
void gather(InlineStreamType &str, ConstElementType &element) const
packs all data attached to this entity
Definition: dofmanager.hh:1124
~ManagedIndexSet()
desctructor
Definition: dofmanager.hh:164
ManagedDofStorageInterface()=default
do not allow to create explicit instances
MapperType & mapper() const
Definition: dofmanager.hh:429
virtual void read(StandardInStream &in)
new write method
Definition: dofmanager.hh:199
void dofCompress(const bool clearResizedArrays)
copy the dof from the rear section of the vector to the holes
Definition: dofmanager.hh:362
ManagedIndexSet(const IndexSetType &iset, LocalIndexSetObjectsType &indexSetList, LocalIndexSetObjectsType &insertList, LocalIndexSetObjectsType &removeList)
Constructor of MemObject, only to call from DofManager.
Definition: dofmanager.hh:142
virtual void reserve(int newSize)=0
resize memory
void read(InStream &in)
read all index sets from a given stream
Definition: dofmanager.hh:1200
void apply(EntityType &entity)
apply wraps the insertEntity method of the index set
Definition: dofmanager.hh:617
MessageBufferIF< InlineStreamImplType > InlineStreamType
Definition: dofmanager.hh:777
static ThisType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition: dofmanager.hh:1216
RemoveIndicesFromSet< IndexSetType, EntityType > removeIdxObj_
Definition: dofmanager.hh:131
void addDofStorage(ManagedDofStorageImp &dofStorage)
add a managed dof storage to the dof manager.
Definition: dofmanager.hh:1320
void compress()
Compress all data that is hold by this dofmanager.
Definition: dofmanager.hh:1041
NewIndexSetRestrictProlongType & indexSetRestrictProlong()
returns the index set restriction and prolongation operator
Definition: dofmanager.hh:926
virtual ~ManagedIndexSetInterface()=default
void incrementSequenceNumber()
increase the DofManagers internal sequence number
Definition: dofmanager.hh:1028
void restrictLocal(EntityType &father, EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition: dofmanager.hh:729
static bool readDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
reads DofManager of corresponding grid, when DofManager exists
Definition: dofmanager.hh:1419
GridObjectStreamTraits< GridType >::OutStreamType InlineStreamImplType
Definition: dofmanager.hh:773
void addReference()
increase reference counter
Definition: dofmanager.hh:94
MessageBufferIF< XtractStreamImplType > XtractStreamType
Definition: dofmanager.hh:776
ResizeMemoryObjects(const ResizeMemoryObjects &org)
Definition: dofmanager.hh:634
virtual void write(StandardOutStream &out) const =0
new read/write methods using binary streams
void apply(EntityType &entity)
apply wraps the removeEntity Method of the index set
Definition: dofmanager.hh:598
void removeEntity(ConstElementType &element)
Removes entity from all index sets added to dof manager.
Definition: dofmanager.hh:1004
EmptyIndexSetRestrictProlong IndexSetRestrictProlongType
Definition: dofmanager.hh:831
void write(OutStream &out) const
write all index sets to a given stream
Definition: dofmanager.hh:1189
void removeDofStorage(ManagedDofStorageImp &dofStorage)
remove a managed dof storage from the dof manager.
Definition: dofmanager.hh:1338
void gather(MessageBuffer &str, const Entity &entity) const
Definition: dofmanager.hh:1133
EmptyIndexSetRestrictProlong()
Definition: dofmanager.hh:726
static DofManagerType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition: dofmanager.hh:1395
DofManagerImp DofManagerType
Definition: dofmanager.hh:1377
void restrictFinalize(const EntityType &father) const
Definition: dofmanager.hh:701
void clearDataXtractors()
clear data xtractor list
Definition: dofmanager.hh:1094
bool contains(const int dim, const int codim) const
the dof manager only transfers element data during load balancing
Definition: dofmanager.hh:1104
void reserve(const int needed)
reserve memory for what is comming
Definition: dofmanager.hh:343
virtual void restore()
:: restore
Definition: dofmanager.hh:193
void resizeForRestrict()
resize memory before data restriction during grid adaptation is done.
Definition: dofmanager.hh:961
bool equals(const IndexSet &iset) const
Definition: dofmanager.hh:103
virtual void enableDofCompression()
enable dof compression for dof storage (default is empty)
Definition: dofmanager.hh:223
DofArrayType myArray_
Definition: dofmanager.hh:547
DofManagerType ::GridType GridType
Definition: dofmanager.hh:1378
ReserveMemoryObjectType reserveMemObj_
Definition: dofmanager.hh:292
void clearDataInliners()
clear data inliner list
Definition: dofmanager.hh:1081
MapperType & mapper_
Definition: dofmanager.hh:284
bool notifyGlobalChange(const bool wasChanged) const
communicate new sequence number
Definition: dofmanager.hh:1066
IndexSetRestrictProlong(DofManagerType &dm, RestrictProlongIndexSetType &is, RestrictProlongIndexSetType &rm)
Definition: dofmanager.hh:681
bool fixedSize(const int dim, const int codim) const
fixed size is false
Definition: dofmanager.hh:1110
void backup() const
:: backup
Definition: dofmanager.hh:1161
void addDataInliner(DataCollType &d)
add data handler for data inlining to dof manager
Definition: dofmanager.hh:1075
ReserveMemoryObjectType & reserveMemoryObject()
return object that calls reserve of this memory object
Definition: dofmanager.hh:331
void scatter(XtractStreamType &str, ConstElementType &element, size_t)
unpacks all data attached of this entity from message buffer
Definition: dofmanager.hh:1139
ManagedDofStorage(const GridImp &grid, const MapperType &mapper)
Constructor of ManagedDofStorage.
Definition: dofmanager.hh:550
LocalIndexSetObjectsType & insertList_
Definition: dofmanager.hh:134
ManagedIndexSetInterface(const IndexSet &iset)
Definition: dofmanager.hh:70
ResizeMemoryObjectType & resizeMemoryObject()
return object that calls resize of this memory object
Definition: dofmanager.hh:328
size_t referenceCounter_
Definition: dofmanager.hh:67
bool dataCompressionEnabled_
Definition: dofmanager.hh:295
bool hasIndexSets() const
if dofmanagers list is not empty return true
Definition: dofmanager.hh:944
virtual size_t usedMemorySize() const =0
return size of mem used by MemObject
virtual void resize()=0
resize of index set
virtual int size() const =0
size of space, i.e. mapper.size()
InsertIndicesToSet< IndexSetType, EntityType > insertIdxObj_
Definition: dofmanager.hh:130
InsertIndicesToSet(IndexSetType &iset)
Definition: dofmanager.hh:614
~ManagedDofStorageImplementation()
destructor deleting MemObject from resize and reserve List
Definition: dofmanager.hh:320
void addIndexSet(const IndexSetType &iset)
add index set to dof manager's list of index sets
Definition: dofmanager.hh:1259
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, false > IndexSetRestrictProlongNoResizeType
Definition: dofmanager.hh:828
virtual ~DofStorageInterface()=default
destructor
int sequence() const
return number of sequence, if dofmanagers memory was changed by calling some method like resize,...
Definition: dofmanager.hh:981
Definition: bindguard.hh:11
Double abs(const Double &a)
Definition: double.hh:871
static constexpr T max(T a)
Definition: utility.hh:77
interface documentation for (grid part) index sets
Definition: common/indexset.hh:104
specialize with true if index set implements the interface for consecutive index sets
Definition: common/indexset.hh:42
Container for User Specified Parameters.
Definition: io/parameter.hh:191
static bool verbose()
obtain the cached value for fem.verbose
Definition: io/parameter.hh:445
static T getValue(const std::string &key)
get a mandatory parameter from the container
Definition: io/parameter.hh:333
output stream writing into a given std::ostream
Definition: standardstreams.hh:61
input stream reading from a given std::istream
Definition: standardstreams.hh:196
Definition: gridobjectstreams.hh:18
Definition: dofmanager.hh:762
Definition: datacollector.hh:232
void apply(ParamType &p) const
for all pointer to local operators call the func pointer
Definition: datacollector.hh:163
bool empty() const
Definition: datacollector.hh:224
void remove(const OpType &op)
Definition: datacollector.hh:203
virtual void clear()
clear object list
Definition: datacollector.hh:379
virtual void apply(ObjectStreamType &str, const EntityType &entity) const
Definition: datacollector.hh:289
Singleton provider for the DofManager.
Definition: dofmanager.hh:1373
Definition: dofmanager.hh:59
Definition: dofmanager.hh:588
Definition: dofmanager.hh:607
Definition: dofmanager.hh:123
Interface class for a dof storage object to be stored in discrete functions.
Definition: dofmanager.hh:213
Interface class for a dof storage object that can be managed (resized and compressed) by the DofManag...
Definition: dofmanager.hh:234
Definition: dofmanager.hh:626
Definition: dofmanager.hh:649
Definition: dofmanager.hh:271
Definition: dofmanager.hh:544
Definition: dofmanager.hh:674
Definition: dofmanager.hh:724
Definition: dofmanager.hh:736
Interface class defining the local behaviour of the restrict/prolong operation (using BN)
Definition: restrictprolonginterface.hh:39
void initialize()
initialize restrict prolong object (if necessary) before adaptation takes place
Definition: restrictprolonginterface.hh:51
Definition: space/mapper/capabilities.hh:22
Definition: singletonlist.hh:25
Singleton list for key/object pairs.
Definition: singletonlist.hh:53
static void removeObject(const ObjectType &object)
Definition: singletonlist.hh:120
static ValueType getObjFromList(const KeyType &key)
Definition: singletonlist.hh:140
static auto getObject(const KeyType &key, Args &&... args) -> std::enable_if_t< std::is_same< decltype(FactoryType::createObject(key, std::forward< Args >(args)...)), ObjectType * >::value, ObjectType & >
Definition: singletonlist.hh:94