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 >
126 static const bool isConsecutive =
149 ,
indexSet_ (const_cast<IndexSetType &> (iset))
154 this->
setPtr_ = (
void *) &indexSet_;
156 if constexpr ( isConsecutive )
166 if constexpr ( isConsecutive )
243 virtual void resize (
const bool enlargeOnly ) = 0;
268 template <
class Gr
idImp,
class MapperType ,
class DofArrayType>
275 typedef ManagedDofStorageImplementation <GridImp, MapperType , DofArrayType>
ThisType;
303 DofArrayType& array )
345 if(
mapper().consecutive() )
347 const int nSize =
size() + (needed *
mapper().maxNumDofs());
354 assert( !
mapper().consecutive() );
364 const int nSize =
mapper().size();
370 const int oldSize =
array_.size();
378 const int numBlocks =
mapper().numBlocks();
379 for(
int block = 0; block < numBlocks; ++block )
385 if(
mapper().consecutive () )
388 const int holes =
mapper().numberOfHoles( block );
389 for(
int i = 0; i < holes; ++i )
391 const int oldIndex =
mapper().oldIndex( i, block );
392 const int newIndex =
mapper().newIndex( i, block );
394 assert( newIndex < nSize );
396 array_.copyContent( newIndex, oldIndex );
434 void resize ( std::false_type,
const bool enlargeOnly )
440 const int newSize =
mapper().size();
441 const int oldSize =
array_.size();
443 if( enlargeOnly && newSize < oldSize ) return ;
445 if( newSize != oldSize )
450 void resize ( std::true_type,
const bool enlargeOnly )
454 const int oldSize =
array_.size();
457 const int nSize =
mapper().size();
461 if( enlargeOnly && nSize <= oldSize ) return ;
464 if( nSize == oldSize ) return ;
473 const int numBlocks =
mapper().numBlocks();
476 int upperBound = oldSize ;
479 assert(
mapper().offSet( 0 ) == 0 );
480 assert(
mapper().oldOffSet( 0 ) == 0 );
483 for(
int block = numBlocks-1; block >= 1; --block )
486 const int newOffSet =
mapper().offSet( block );
487 const int oldOffSet =
mapper().oldOffSet( block );
490 assert( newOffSet >= oldOffSet );
493 if( newOffSet > oldOffSet )
496 const int blockSize = upperBound - oldOffSet;
498 array_.memMoveBackward( blockSize, oldOffSet, newOffSet );
501 upperBound = oldOffSet;
515 const int oldOffSet =
mapper().oldOffSet( block );
518 const int newOffSet =
mapper().offSet( block );
521 assert( newOffSet <= oldOffSet );
524 if( newOffSet < oldOffSet )
527 const int numBlocks =
mapper().numBlocks();
531 = (block == numBlocks - 1) ? oldSize :
mapper().oldOffSet( block + 1 );
532 const int blockSize = upperBound - oldOffSet;
535 array_.memMoveForward( blockSize, oldOffSet, newOffSet );
541 template <
class Gr
idImp,
class MapperType ,
class DofArrayType>
550 const MapperType&
mapper )
558 template<
class DofStorageType,
class Gr
idType,
class MapperType >
559 static inline std::pair< DofStorageInterface* , DofStorageType* >
561 const MapperType& mapper,
562 const DofStorageType * = 0 )
566 DofStorageType > ManagedDofStorageType;
568 ManagedDofStorageType* mds =
new ManagedDofStorageType( grid, mapper );
572 return std::pair< DofStorageInterface* , DofStorageType* >
573 ( mds , & mds->getArray () );
584 template <
class IndexSetType,
class EntityType>
586 :
public LocalInlinePlus < RemoveIndicesFromSet<IndexSetType,EntityType> , EntityType >
590 IndexSetType & indexSet_;
597 inline void apply ( EntityType & entity )
599 indexSet_.removeEntity( entity );
603 template <
class IndexSetType,
class EntityType>
605 :
public LocalInlinePlus < InsertIndicesToSet< IndexSetType, EntityType > , EntityType >
609 IndexSetType & indexSet_;
616 inline void apply ( EntityType & entity )
618 indexSet_.insertEntity( entity );
622 template <
class MemObjectType>
624 :
public LocalInlinePlus < ResizeMemoryObjects < MemObjectType > , int >
628 MemObjectType & memobj_;
634 : memobj_(org.memobj_)
638 inline void apply (
int& enlargeOnly )
640 memobj_.resize(
bool(enlargeOnly) );
645 template <
class MemObjectType>
647 :
public LocalInlinePlus < ReserveMemoryObjects < MemObjectType > , int >
651 MemObjectType & memobj_;
658 inline void apply (
int & chunkSize )
660 memobj_.reserve( chunkSize );
668 template <
class DofManagerType ,
class RestrictPro
longIndexSetType,
bool doResize >
671 RestrictProlongTraits<
672 IndexSetRestrictProlong<DofManagerType,RestrictProlongIndexSetType,doResize>, double > >
674 DofManagerType & dm_;
676 RestrictProlongIndexSetType & insert_;
677 RestrictProlongIndexSetType & remove_;
681 : dm_(dm) , insert_( is ), remove_( rm ) {}
684 template <
class EntityType>
688 insert_.apply( father );
690 remove_.apply( son );
699 template <
class EntityType>
704 template <
class EntityType>
708 remove_.apply( father );
710 insert_.apply( son );
727 template <
class EntityType>
730 template <
class EntityType>
753 template<
class Gr
id >
757 public LoadBalanceHandleWithReserveAndCompress,
760 public CommDataHandleIF< DofManager< Grid >, char >
782 typedef typename GridType :: template Codim< 0 > :: Entity
ElementType ;
785 typedef std::list< ManagedDofStorageInterface* > ListType;
787 typedef std::list< ManagedIndexSetInterface * > IndexListType;
793 IndexListType indexList_;
816 const int defaultChunkSize_;
843 double memoryFactor_;
846 const bool clearResizedArrays_;
853 defaultChunkSize_( 128 ),
855 indexSetRestrictProlong_( *this, insertIndices_ , removeIndices_ ),
856 indexSetRestrictProlongNoResize_( *this, insertIndices_ , removeIndices_ ),
858 memoryFactor_(
Parameter :: getValidValue(
"fem.dofmanager.memoryfactor", double( 1.1 ),
859 [] ( double value ) {
return value >= 1.0; } ) ),
860 clearResizedArrays_( Parameter :: getValue(
"fem.dofmanager.clearresizedarrays",
bool(
true ) ) )
863 if(
std::abs( memoryFactor_ - 1.1 ) > 1e-12 )
865 std::cout <<
"Created DofManager with memory factor " << memoryFactor_ <<
"." << std::endl;
895 template <
class IndexSetType>
896 inline void addIndexSet (
const IndexSetType &iset );
905 template <
class IndexSetType>
912 template <
class ManagedDofStorageImp>
919 template <
class ManagedDofStorageImp>
929 return indexSetRestrictProlong_;
937 return indexSetRestrictProlongNoResize_;
943 return ! insertIndices_.
empty();
950 for(
auto memObjectPtr : memList_)
951 used += memObjectPtr->usedMemorySize();
967 int localChunkSize =
std::max(nsize, defaultChunkSize_ );
968 assert( localChunkSize > 0 );
971 reserveMemObjs_.
apply ( localChunkSize );
985 for(
auto indexSetPtr : indexList_)
986 indexSetPtr->resize();
994 insertIndices_.
apply( element );
1003 removeIndices_.
apply( element );
1009 int enlargeOnly = 0;
1011 resizeMemObjs_.
apply ( enlargeOnly );
1017 int enlargeOnly = 1;
1019 resizeMemObjs_.
apply ( enlargeOnly );
1031 assert( sequence_ == grid_.comm().max( sequence_ ) );
1044 for(
auto indexSetPtr : indexList_)
1047 indexSetPtr->compress();
1051 for(
auto memObjectPtr : memList_)
1058 memObjectPtr->dofCompress ( clearResizedArrays_ );
1066 int wasChangedCounter = int( wasChanged );
1067 return bool( grid_.comm().max( wasChangedCounter ) );
1071 template <
class DataCollType>
1080 dataInliner_.
clear();
1084 template <
class DataCollType>
1093 dataXtractor_.
clear();
1103 return ( codim == 0 );
1113 template <
class Entity>
1116 DUNE_THROW(NotImplemented,
"DofManager::size should not be called!");
1123 dataInliner_.
apply(str, element);
1129 template <
class MessageBuffer,
class Entity>
1130 void gather( MessageBuffer& str,
const Entity& entity )
const
1132 DUNE_THROW(NotImplemented,
"DofManager::gather( entity ) with codim > 0 not implemented");
1143 dataXtractor_.
apply(str, element);
1147 template <
class MessageBuffer,
class Entity>
1148 void scatter ( MessageBuffer & str,
const Entity& entity,
size_t )
1150 DUNE_THROW(NotImplemented,
"DofManager::scatter( entity ) with codim > 0 not implemented");
1160 for(
auto indexSetPtr : indexList_)
1161 indexSetPtr->backup();
1167 for(
auto indexSetPtr : indexList_)
1168 indexSetPtr->restore();
1185 template <
class OutStream >
1188 for(
auto indexSetPtr : indexList_)
1189 indexSetPtr->write(
out );
1196 template <
class InStream >
1199 for(
auto indexSetPtr : indexList_)
1200 indexSetPtr->read(
in );
1216 return DofManagerFactoryType :: instance( grid );
1226 template <
class Gr
idType>
1227 inline DofManager<GridType>::~DofManager ()
1229 if(memList_.size() > 0)
1231 while( memList_.rbegin() != memList_.rend())
1233 DofStorageInterface * mobj = (* memList_.rbegin() );
1234 dverb <<
"Removing '" << mobj <<
"' from DofManager!\n";
1235 memList_.pop_back();
1239 if(indexList_.size() > 0)
1242 std::cerr <<
"ERROR: Not all index sets have been removed from DofManager yet!" << std::endl;
1244 while ( indexList_.rbegin() != indexList_.rend())
1246 ManagedIndexSetInterface* iobj = (* indexList_.rbegin() );
1247 indexList_.pop_back();
1248 if(iobj)
delete iobj;
1253 template <
class Gr
idType>
1254 template <
class IndexSetType>
1259 if( ! Fem :: MPIManager :: singleThreadMode() )
1261 assert( Fem :: MPIManager :: singleThreadMode() );
1262 DUNE_THROW(InvalidStateException,
"DofManager::addIndexSet: only call in single thread mode!");
1266 ManagedIndexSetType * indexSet = 0;
1269 auto endit = indexList_.rend();
1270 for(
auto it = indexList_.rbegin(); it != endit; ++it )
1273 if( set->
equals( iset ) )
1277 indexSet =
static_cast< ManagedIndexSetType *
>( set );
1284 indexSet =
new ManagedIndexSetType ( iset, insertIndices_ , removeIndices_ );
1289 template <
class Gr
idType>
1290 template <
class IndexSetType>
1294 if( ! Fem :: MPIManager :: singleThreadMode() )
1296 assert( Fem :: MPIManager :: singleThreadMode() );
1297 DUNE_THROW(InvalidStateException,
"DofManager::removeIndexSet: only call in single thread mode!");
1301 auto endit = indexList_.rend();
1302 for(
auto it = indexList_.rbegin(); it != endit; ++it )
1305 if( set->
equals( iset ) )
1312 auto fit = it.base();
1313 indexList_.erase( --fit );
1322 DUNE_THROW(InvalidStateException,
"Could not remove index from DofManager set!");
1325 template <
class Gr
idType>
1326 template <
class ManagedDofStorageImp>
1333 memList_.push_front( obj );
1336 resizeMemObjs_ += dofStorage.resizeMemoryObject();
1339 reserveMemObjs_ += dofStorage.reserveMemoryObject();
1343 template <
class Gr
idType>
1344 template <
class ManagedDofStorageImp>
1348 auto obj = &dofStorage;
1351 auto endit = memList_.end();
1352 for(
auto it = memList_.begin();it != endit ; ++it)
1357 memList_.erase( it );
1360 resizeMemObjs_.remove( dofStorage.resizeMemoryObject() );
1361 reserveMemObjs_.remove( dofStorage.reserveMemoryObject() );
1378 template<
class DofManagerImp >
1406 return DMProviderType :: getObject( &grid );
1413 const std :: string &filename,
1427 const std :: string &filename,
1442 DMProviderType :: removeObject( &dm );
1449 return (DMProviderType :: getObjFromList( &grid )).first;
virtual void backup() const =0
:: backup
IdentifierType setPtr_
Definition: dofmanager.hh:65
DofManagerType & dm_
Definition: dofmanager.hh:280
RemoveIndicesFromSet(IndexSetType &iset)
Definition: dofmanager.hh:594
bool removeReference()
decrease reference counter and return true if zero reached
Definition: dofmanager.hh:97
void resizeAndMoveToRear()
Definition: dofmanager.hh:507
virtual bool compress()=0
compress of index set
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:685
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:1148
void enlargeMemory()
resize the MemObject if necessary
Definition: dofmanager.hh:1015
ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > ThisType
Definition: dofmanager.hh:275
void resize()
wrap resize of index set
Definition: dofmanager.hh:174
DataCollectorInterface< GridType, InlineStreamType > DataInlinerType
Definition: dofmanager.hh:780
size_t usedMemorySize() const
return used memory size of all MemObjects in bytes.
Definition: dofmanager.hh:947
IndexSetRestrictProlongNoResizeType & indexSetRestrictProlongNoResize()
returns the index set restriction and prolongation operator
Definition: dofmanager.hh:933
static DofManagerType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition: dofmanager.hh:1402
ResizeMemoryObjects< ThisType > ResizeMemoryObjectType
Definition: dofmanager.hh:288
ResizeMemoryObjectType resizeMemObj_
Definition: dofmanager.hh:290
size_t usedMemorySize() const
return used memory size
Definition: dofmanager.hh:413
void addDataXtractor(DataCollType &d)
add data handler for data xtracting to dof manager
Definition: dofmanager.hh:1085
void enableDofCompression()
enable dof compression for this MemObject
Definition: dofmanager.hh:419
DofManager< GridImp > DofManagerType
Definition: dofmanager.hh:277
virtual void write(StandardOutStream &out) const
new write method
Definition: dofmanager.hh:201
void resize()
Resize index sets and memory due to what the mapper has as new size.
Definition: dofmanager.hh:983
LocalIndexSetObjectsType & removeList_
Definition: dofmanager.hh:138
virtual void backup() const
:: backup
Definition: dofmanager.hh:186
int size() const
return size of underlying array
Definition: dofmanager.hh:333
void restore()
:: restore
Definition: dofmanager.hh:1165
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:965
GridObjectStreamTraits< GridType >::OutStreamType InlineStreamImplType
Definition: dofmanager.hh:772
bool compress()
wrap compress of index set
Definition: dofmanager.hh:180
ManagedDofStorageImplementation(const ManagedDofStorageImplementation &)=delete
ResizeMemoryObjects(MemObjectType &mo)
Definition: dofmanager.hh:632
void resize(std::false_type, const bool enlargeOnly)
Definition: dofmanager.hh:434
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:1291
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:705
void resizeMemory()
resize the MemObject if necessary
Definition: dofmanager.hh:1007
void insertEntity(ConstElementType &element)
Inserts entity to all index sets added to dof manager.
Definition: dofmanager.hh:991
IndexSetType & indexSet_
Definition: dofmanager.hh:131
static void deleteDofManager(DofManagerType &dm)
delete the dof manager that belong to the given grid
Definition: dofmanager.hh:1440
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, true > NewIndexSetRestrictProlongType
Definition: dofmanager.hh:823
ReserveMemoryObjects(MemObjectType &mo)
Definition: dofmanager.hh:655
DofManagerType::GridType GridType
Definition: dofmanager.hh:1385
size_t size(const Entity &) const
for convenience
Definition: dofmanager.hh:1114
DataCollectorInterface< GridType, XtractStreamType > DataXtractorType
Definition: dofmanager.hh:779
const void * IdentifierType
Definition: dofmanager.hh:63
ReserveMemoryObjects< ThisType > ReserveMemoryObjectType
Definition: dofmanager.hh:289
void apply(int &chunkSize)
Definition: dofmanager.hh:658
void moveToFront(const int oldSize, const int block)
move block to front again
Definition: dofmanager.hh:512
void apply(int &enlargeOnly)
Definition: dofmanager.hh:638
double memoryFactor() const
return factor to over estimate new memory allocation
Definition: dofmanager.hh:875
void prolongLocal(EntityType &father, EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition: dofmanager.hh:731
ResizeMemoryObjectType & resizeMemoryObject()
return object that calls resize of this memory object
Definition: dofmanager.hh:327
static bool writeDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
writes DofManager of corresponding grid, when DofManager exists
Definition: dofmanager.hh:1412
ManagedDofStorageImplementation(const GridImp &grid, const MapperType &mapper, DofArrayType &array)
Constructor of ManagedDofStorageImplementation, only to call from derived classes.
Definition: dofmanager.hh:301
NewIndexSetRestrictProlongType & indexSetRestrictProlong()
returns the index set restriction and prolongation operator
Definition: dofmanager.hh:923
virtual void resize(const bool enlargeOnly)=0
resize memory
virtual ~ManagedDofStorageInterface()=default
destructor
Grid GridType
type of Grid this DofManager belongs to
Definition: dofmanager.hh:769
void resize(std::true_type, const bool enlargeOnly)
Definition: dofmanager.hh:450
void resize(const bool enlargeOnly)
resize the memory with the new size
Definition: dofmanager.hh:336
ManagedIndexSetInterface BaseType
type of base class
Definition: dofmanager.hh:142
DofArrayType & array_
Definition: dofmanager.hh:286
virtual void dofCompress(const bool clearResizedArrays)=0
DofStorageInterface()=default
do not allow to create explicit instances
ReserveMemoryObjectType & reserveMemoryObject()
return object that calls reserve of this memory object
Definition: dofmanager.hh:330
void gather(InlineStreamType &str, ConstElementType &element) const
packs all data attached to this entity
Definition: dofmanager.hh:1121
~ManagedIndexSet()
destructor
Definition: dofmanager.hh:164
MapperType & mapper() const
Definition: dofmanager.hh:428
ManagedDofStorageInterface()=default
do not allow to create explicit instances
DofArrayType & getArray()
return reference to array for DiscreteFunction
Definition: dofmanager.hh:425
virtual void read(StandardInStream &in)
new write method
Definition: dofmanager.hh:198
void dofCompress(const bool clearResizedArrays)
copy the dof from the rear section of the vector to the holes
Definition: dofmanager.hh:361
virtual void reserve(int newSize)=0
resize memory
void read(InStream &in)
read all index sets from a given stream
Definition: dofmanager.hh:1197
void apply(EntityType &entity)
apply wraps the insertEntity method of the index set
Definition: dofmanager.hh:616
static ThisType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition: dofmanager.hh:1213
MessageBufferIF< InlineStreamImplType > InlineStreamType
Definition: dofmanager.hh:776
RemoveIndicesFromSet< IndexSetType, EntityType > removeIdxObj_
Definition: dofmanager.hh:135
void addDofStorage(ManagedDofStorageImp &dofStorage)
add a managed dof storage to the dof manager.
Definition: dofmanager.hh:1327
void compress()
Compress all data that is hold by this dofmanager.
Definition: dofmanager.hh:1038
virtual ~ManagedIndexSetInterface()=default
void incrementSequenceNumber()
increase the DofManagers internal sequence number
Definition: dofmanager.hh:1025
void restrictLocal(EntityType &father, EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition: dofmanager.hh:728
static bool readDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
reads DofManager of corresponding grid, when DofManager exists
Definition: dofmanager.hh:1426
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:560
void addReference()
increase reference counter
Definition: dofmanager.hh:94
MessageBufferIF< XtractStreamImplType > XtractStreamType
Definition: dofmanager.hh:775
ResizeMemoryObjects(const ResizeMemoryObjects &org)
Definition: dofmanager.hh:633
GridObjectStreamTraits< GridType >::InStreamType XtractStreamImplType
Definition: dofmanager.hh:771
ManagedIndexSet(const IndexSetType &iset, LocalIndexSetObjectsType &insertList, LocalIndexSetObjectsType &removeList)
Constructor of MemObject, only to call from DofManager.
Definition: dofmanager.hh:145
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:597
void removeEntity(ConstElementType &element)
Removes entity from all index sets added to dof manager.
Definition: dofmanager.hh:1001
EmptyIndexSetRestrictProlong IndexSetRestrictProlongType
Definition: dofmanager.hh:828
void write(OutStream &out) const
write all index sets to a given stream
Definition: dofmanager.hh:1186
void removeDofStorage(ManagedDofStorageImp &dofStorage)
remove a managed dof storage from the dof manager.
Definition: dofmanager.hh:1345
void gather(MessageBuffer &str, const Entity &entity) const
Definition: dofmanager.hh:1130
EmptyIndexSetRestrictProlong()
Definition: dofmanager.hh:725
GridType::template Codim< 0 >::Entity ElementType
Definition: dofmanager.hh:782
DofManagerImp DofManagerType
Definition: dofmanager.hh:1384
void restrictFinalize(const EntityType &father) const
Definition: dofmanager.hh:700
void clearDataXtractors()
clear data xtractor list
Definition: dofmanager.hh:1091
bool contains(const int dim, const int codim) const
the dof manager only transfers element data during load balancing
Definition: dofmanager.hh:1101
void reserve(const int needed)
reserve memory for what is comming
Definition: dofmanager.hh:342
virtual void restore()
:: restore
Definition: dofmanager.hh:192
void resizeForRestrict()
resize memory before data restriction during grid adaptation is done.
Definition: dofmanager.hh:958
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:222
DofArrayType myArray_
Definition: dofmanager.hh:546
ReserveMemoryObjectType reserveMemObj_
Definition: dofmanager.hh:291
void clearDataInliners()
clear data inliner list
Definition: dofmanager.hh:1078
MapperType & mapper_
Definition: dofmanager.hh:283
bool notifyGlobalChange(const bool wasChanged) const
communicate new sequence number
Definition: dofmanager.hh:1063
IndexSetRestrictProlong(DofManagerType &dm, RestrictProlongIndexSetType &is, RestrictProlongIndexSetType &rm)
Definition: dofmanager.hh:680
bool fixedSize(const int dim, const int codim) const
fixed size is false
Definition: dofmanager.hh:1107
void backup() const
:: backup
Definition: dofmanager.hh:1158
void addDataInliner(DataCollType &d)
add data handler for data inlining to dof manager
Definition: dofmanager.hh:1072
void scatter(XtractStreamType &str, ConstElementType &element, size_t)
unpacks all data attached of this entity from message buffer
Definition: dofmanager.hh:1136
ManagedDofStorage(const GridImp &grid, const MapperType &mapper)
Constructor of ManagedDofStorage.
Definition: dofmanager.hh:549
LocalIndexSetObjectsType & insertList_
Definition: dofmanager.hh:137
ManagedIndexSetInterface(const IndexSet &iset)
Definition: dofmanager.hh:70
size_t referenceCounter_
Definition: dofmanager.hh:67
bool dataCompressionEnabled_
Definition: dofmanager.hh:294
bool hasIndexSets() const
if dofmanagers list is not empty return true
Definition: dofmanager.hh:941
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:134
InsertIndicesToSet(IndexSetType &iset)
Definition: dofmanager.hh:613
~ManagedDofStorageImplementation()
destructor deleting MemObject from resize and reserve List
Definition: dofmanager.hh:319
void addIndexSet(const IndexSetType &iset)
add index set to dof manager's list of index sets
Definition: dofmanager.hh:1256
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, false > IndexSetRestrictProlongNoResizeType
Definition: dofmanager.hh:825
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:978
Dune::Fem::Double abs(const Dune::Fem::Double &a)
Definition: double.hh:942
double max(const Dune::Fem::Double &v, const double p)
Definition: double.hh:965
Definition: bindguard.hh:11
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
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:761
Definition: datacollector.hh:232
Definition: datacollector.hh:83
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
Definition: datacollector.hh:262
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:1380
Definition: dofmanager.hh:59
Definition: dofmanager.hh:587
Definition: dofmanager.hh:606
Definition: dofmanager.hh:123
Interface class for a dof storage object to be stored in discrete functions.
Definition: dofmanager.hh:212
Interface class for a dof storage object that can be managed (resized and compressed) by the DofManag...
Definition: dofmanager.hh:233
Definition: dofmanager.hh:625
Definition: dofmanager.hh:648
Definition: dofmanager.hh:270
Definition: dofmanager.hh:543
Definition: dofmanager.hh:673
Definition: dofmanager.hh:723
Definition: dofmanager.hh:735
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