|
dune-fem 2.12-git
|
Loading...
Searching...
No Matches
dofmanager.hh
Go to the documentation of this file.
346 resize( std::integral_constant< bool, Capabilities::isAdaptiveDofMapper< MapperType >::v >(), enlargeOnly );
560 class ManagedDofStorage : public ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >
642 : public LocalInlinePlus < ResizeMemoryObjects < MemObjectType > , typename MemObjectType::SizeType >
667 : public LocalInlinePlus < ReserveMemoryObjects < MemObjectType > , typename MemObjectType::SizeType >
702 IndexSetRestrictProlong ( DofManagerType & dm , RestrictProlongIndexSetType & is, RestrictProlongIndexSetType & rm )
707 inline void restrictLocal ( const EntityType & father, const EntityType & son , bool initialize ) const
727 inline void prolongLocal ( const EntityType & father, const EntityType & son , bool initialize ) const
744 public RestrictProlongInterface< RestrictProlongTraits< EmptyIndexSetRestrictProlong, double > >
886 clearResizedArrays_( Parameter :: getValue("fem.dofmanager.clearresizedarrays", bool( true ) ) )
1337 DUNE_THROW(InvalidStateException,"DofManager::removeIndexSet: only call in single thread mode!");
size_type dim() const
#define DUNE_THROW(E,...)
RemoveIndicesFromSet(IndexSetType &iset)
Definition dofmanager.hh:612
bool removeReference()
decrease reference counter and return true if zero reached
Definition dofmanager.hh:97
void resizeAndMoveToRear()
Definition dofmanager.hh:518
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:707
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:1183
void enlargeMemory()
resize the MemObject if necessary
Definition dofmanager.hh:1045
ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > ThisType
Definition dofmanager.hh:283
DataCollectorInterface< GridType, InlineStreamType > DataInlinerType
Definition dofmanager.hh:805
size_t usedMemorySize() const
return used memory size of all MemObjects in bytes.
Definition dofmanager.hh:975
IndexSetRestrictProlongNoResizeType & indexSetRestrictProlongNoResize()
returns the index set restriction and prolongation operator
Definition dofmanager.hh:961
static DofManagerType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition dofmanager.hh:1442
ResizeMemoryObjects< ThisType > ResizeMemoryObjectType
Definition dofmanager.hh:296
ResizeMemoryObjectType resizeMemObj_
Definition dofmanager.hh:298
void addDataXtractor(DataCollType &d)
add data handler for data xtracting to dof manager
Definition dofmanager.hh:1115
DofManager< GridImp > DofManagerType
Definition dofmanager.hh:285
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:1012
LocalIndexSetObjectsType & removeList_
Definition dofmanager.hh:138
void enableDofCompression() override
enable dof compression for this MemObject
Definition dofmanager.hh:430
GridObjectStreamTraits< GridType >::OutStreamType InlineStreamImplType
Definition dofmanager.hh:797
bool compress()
wrap compress of index set
Definition dofmanager.hh:180
ManagedDofStorageImplementation(const ManagedDofStorageImplementation &)=delete
ResizeMemoryObjects(MemObjectType &mo)
Definition dofmanager.hh:652
void resize(std::false_type, const bool enlargeOnly)
Definition dofmanager.hh:445
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:1331
void dofCompress(const bool clearResizedArrays) override
copy the dof from the rear section of the vector to the holes
Definition dofmanager.hh:369
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:727
void resizeMemory()
resize the MemObject if necessary
Definition dofmanager.hh:1037
void insertEntity(ConstElementType &element)
Inserts entity to all index sets added to dof manager.
Definition dofmanager.hh:1020
static void deleteDofManager(DofManagerType &dm)
delete the dof manager that belong to the given grid
Definition dofmanager.hh:1480
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, true > NewIndexSetRestrictProlongType
Definition dofmanager.hh:849
SizeType size() const override
return size of underlying array
Definition dofmanager.hh:341
ReserveMemoryObjects(MemObjectType &mo)
Definition dofmanager.hh:677
DofManagerType::GridType GridType
Definition dofmanager.hh:1425
size_t size(const Entity &) const
for convenience
Definition dofmanager.hh:1144
DataCollectorInterface< GridType, XtractStreamType > DataXtractorType
Definition dofmanager.hh:804
MemObjectType::SizeType SizeType
Definition dofmanager.hh:674
const void * IdentifierType
Definition dofmanager.hh:63
void resize(const bool enlargeOnly) override
resize the memory with the new size
Definition dofmanager.hh:344
ReserveMemoryObjects< ThisType > ReserveMemoryObjectType
Definition dofmanager.hh:297
LocalInterface< SizeType > MemObjectCheckType
Definition dofmanager.hh:243
double memoryFactor() const
return factor to over estimate new memory allocation
Definition dofmanager.hh:903
void prolongLocal(EntityType &father, EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition dofmanager.hh:753
ResizeMemoryObjectType & resizeMemoryObject()
return object that calls resize of this memory object
Definition dofmanager.hh:335
static bool writeDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
writes DofManager of corresponding grid, when DofManager exists
Definition dofmanager.hh:1452
ManagedDofStorageImplementation(const GridImp &grid, const MapperType &mapper, DofArrayType &array)
Constructor of ManagedDofStorageImplementation, only to call from derived classes.
Definition dofmanager.hh:309
NewIndexSetRestrictProlongType & indexSetRestrictProlong()
returns the index set restriction and prolongation operator
Definition dofmanager.hh:951
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:794
void resize(std::true_type, const bool enlargeOnly)
Definition dofmanager.hh:461
ManagedIndexSetInterface BaseType
type of base class
Definition dofmanager.hh:142
void moveToFront(const SizeType oldSize, const int block)
move block to front again
Definition dofmanager.hh:523
DofStorageInterface::SizeType SizeType
Definition dofmanager.hh:241
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:338
void gather(InlineStreamType &str, ConstElementType &element) const
packs all data attached to this entity
Definition dofmanager.hh:1151
~ManagedIndexSet()
destructor
Definition dofmanager.hh:164
MapperType & mapper() const
Definition dofmanager.hh:439
ManagedDofStorageInterface()=default
do not allow to create explicit instances
DofArrayType & getArray()
return reference to array for DiscreteFunction
Definition dofmanager.hh:436
virtual void read(StandardInStream &in)
new write method
Definition dofmanager.hh:198
void read(InStream &in)
read all index sets from a given stream
Definition dofmanager.hh:1235
void apply(EntityType &entity)
apply wraps the insertEntity method of the index set
Definition dofmanager.hh:634
static ThisType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition dofmanager.hh:1251
MessageBufferIF< InlineStreamImplType > InlineStreamType
Definition dofmanager.hh:801
RemoveIndicesFromSet< IndexSetType, EntityType > removeIdxObj_
Definition dofmanager.hh:135
ManagedDofStorageInterface::SizeType SizeType
Definition dofmanager.hh:278
void addDofStorage(ManagedDofStorageImp &dofStorage)
add a managed dof storage to the dof manager.
Definition dofmanager.hh:1367
void compress()
Compress all data that is hold by this dofmanager.
Definition dofmanager.hh:1068
virtual ~ManagedIndexSetInterface()=default
void incrementSequenceNumber()
increase the DofManagers internal sequence number
Definition dofmanager.hh:1055
size_t usedMemorySize() const override
return used memory size
Definition dofmanager.hh:424
void restrictLocal(EntityType &father, EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition dofmanager.hh:750
void removeEntity(ConstElementType &element) const
Removes entity from all index sets added to dof manager.
Definition dofmanager.hh:1030
void reserveMemory(std::size_t nsize, bool dummy=false)
reserve memory for at least nsize elements, dummy is needed for dune-grid ALUGrid version
Definition dofmanager.hh:993
static bool readDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
reads DofManager of corresponding grid, when DofManager exists
Definition dofmanager.hh:1466
void reserve(const SizeType needed) override
reserve memory for what is coming
Definition dofmanager.hh:350
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:578
void addReference()
increase reference counter
Definition dofmanager.hh:94
virtual SizeType size() const =0
size of space, i.e. mapper.size()
MessageBufferIF< XtractStreamImplType > XtractStreamType
Definition dofmanager.hh:800
MemObjectType::SizeType SizeType
Definition dofmanager.hh:649
ResizeMemoryObjects(const ResizeMemoryObjects &org)
Definition dofmanager.hh:653
GridObjectStreamTraits< GridType >::InStreamType XtractStreamImplType
Definition dofmanager.hh:796
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:615
EmptyIndexSetRestrictProlong IndexSetRestrictProlongType
Definition dofmanager.hh:854
void write(OutStream &out) const
write all index sets to a given stream
Definition dofmanager.hh:1224
void removeDofStorage(ManagedDofStorageImp &dofStorage)
remove a managed dof storage from the dof manager.
Definition dofmanager.hh:1385
void gather(MessageBuffer &str, const Entity &entity) const
Definition dofmanager.hh:1162
EmptyIndexSetRestrictProlong()
Definition dofmanager.hh:747
GridType::template Codim< 0 >::Entity ElementType
Definition dofmanager.hh:807
DofManagerImp DofManagerType
Definition dofmanager.hh:1424
void restrictFinalize(const EntityType &father) const
Definition dofmanager.hh:722
void clearDataXtractors()
clear data xtractor list
Definition dofmanager.hh:1121
bool contains(const int dim, const int codim) const
the dof manager only transfers element data during load balancing
Definition dofmanager.hh:1131
void resizeForRestrict()
resize memory before data restriction during grid adaptation is done.
Definition dofmanager.hh:986
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:224
ReserveMemoryObjectType reserveMemObj_
Definition dofmanager.hh:299
void clearDataInliners()
clear data inliner list
Definition dofmanager.hh:1108
bool notifyGlobalChange(const bool wasChanged) const
communicate new sequence number
Definition dofmanager.hh:1093
IndexSetRestrictProlong(DofManagerType &dm, RestrictProlongIndexSetType &is, RestrictProlongIndexSetType &rm)
Definition dofmanager.hh:702
bool fixedSize(const int dim, const int codim) const
fixed size is false
Definition dofmanager.hh:1137
virtual void reserve(const SizeType newSize)=0
resize memory
void addDataInliner(DataCollType &d)
add data handler for data inlining to dof manager
Definition dofmanager.hh:1102
void scatter(XtractStreamType &str, ConstElementType &element, size_t)
unpacks all data attached of this entity from message buffer
Definition dofmanager.hh:1171
ManagedDofStorage(const GridImp &grid, const MapperType &mapper)
Constructor of ManagedDofStorage.
Definition dofmanager.hh:567
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:302
bool hasIndexSets() const
if dofmanagers list is not empty return true
Definition dofmanager.hh:969
virtual size_t usedMemorySize() const =0
return size of mem used by MemObject
InsertIndicesToSet< IndexSetType, EntityType > insertIdxObj_
Definition dofmanager.hh:134
InsertIndicesToSet(IndexSetType &iset)
Definition dofmanager.hh:631
ManagedDofStorageInterface::MemObjectCheckType MemObjectCheckType
Definition dofmanager.hh:280
~ManagedDofStorageImplementation()
destructor deleting MemObject from resize and reserve List
Definition dofmanager.hh:327
void addIndexSet(const IndexSetType &iset)
add index set to dof manager's list of index sets
Definition dofmanager.hh:1296
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, false > IndexSetRestrictProlongNoResizeType
Definition dofmanager.hh:851
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:1007
const Communication & comm() const
interface documentation for (grid part) index sets
Definition common/indexset.hh:123
specialize with true if index set implements the interface for consecutive index sets
Definition common/indexset.hh:61
static bool verbose()
obtain the cached value for fem.verbose with default verbosity level 2
Definition io/parameter.hh:466
output stream writing into a given std::ostream
Definition standardstreams.hh:61
input stream reading from a given std::istream
Definition standardstreams.hh:202
Definition gridobjectstreams.hh:18
Definition dofmanager.hh:786
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
Definition datacollector.hh:262
virtual void clear()
clear object list
Definition datacollector.hh:378
virtual void apply(ObjectStreamType &str, const EntityType &entity) const
Definition datacollector.hh:289
Definition dofmanager.hh:59
Definition dofmanager.hh:605
Definition dofmanager.hh:624
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:235
Definition dofmanager.hh:643
Definition dofmanager.hh:668
Definition dofmanager.hh:276
Definition dofmanager.hh:561
Definition dofmanager.hh:695
Definition dofmanager.hh:745
Definition dofmanager.hh:757
Interface class defining the local behaviour of the restrict/prolong operation (using BN)
Definition restrictprolonginterface.hh:40
void initialize()
initialize restrict prolong object (if necessary) before adaptation takes place
Definition restrictprolonginterface.hh:52
Definition space/mapper/capabilities.hh:22
Definition singletonlist.hh:25
T endl(T... args)
T forward(T... args)
T max(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8