|
dune-fem 2.12-git
|
Loading...
Searching...
No Matches
dofmanager.hh
Go to the documentation of this file.
347 resize( std::integral_constant< bool, Capabilities::isAdaptiveDofMapper< MapperType >::v >(), enlargeOnly );
561 class ManagedDofStorage : public ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >
643 : public LocalInlinePlus < ResizeMemoryObjects < MemObjectType > , typename MemObjectType::SizeType >
668 : public LocalInlinePlus < ReserveMemoryObjects < MemObjectType > , typename MemObjectType::SizeType >
703 IndexSetRestrictProlong ( DofManagerType & dm , RestrictProlongIndexSetType & is, RestrictProlongIndexSetType & rm )
708 inline void restrictLocal ( const EntityType & father, const EntityType & son , bool initialize ) const
728 inline void prolongLocal ( const EntityType & father, const EntityType & son , bool initialize ) const
745 public RestrictProlongInterface< RestrictProlongTraits< EmptyIndexSetRestrictProlong, double > >
887 clearResizedArrays_( Parameter :: getValue("fem.dofmanager.clearresizedarrays", bool( true ) ) )
1368 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:613
bool removeReference()
decrease reference counter and return true if zero reached
Definition dofmanager.hh:98
void resizeAndMoveToRear()
Definition dofmanager.hh:519
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:708
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:1184
void enlargeMemory()
resize the MemObject if necessary
Definition dofmanager.hh:1046
ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > ThisType
Definition dofmanager.hh:284
DataCollectorInterface< GridType, InlineStreamType > DataInlinerType
Definition dofmanager.hh:806
size_t usedMemorySize() const
return used memory size of all MemObjects in bytes.
Definition dofmanager.hh:976
IndexSetRestrictProlongNoResizeType & indexSetRestrictProlongNoResize()
returns the index set restriction and prolongation operator
Definition dofmanager.hh:962
static DofManagerType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition dofmanager.hh:1473
ResizeMemoryObjects< ThisType > ResizeMemoryObjectType
Definition dofmanager.hh:297
ResizeMemoryObjectType resizeMemObj_
Definition dofmanager.hh:299
void addDataXtractor(DataCollType &d)
add data handler for data xtracting to dof manager
Definition dofmanager.hh:1116
DofManager< GridImp > DofManagerType
Definition dofmanager.hh:286
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:1013
LocalIndexSetObjectsType & removeList_
Definition dofmanager.hh:139
void enableDofCompression() override
enable dof compression for this MemObject
Definition dofmanager.hh:431
GridObjectStreamTraits< GridType >::OutStreamType InlineStreamImplType
Definition dofmanager.hh:798
bool compress()
wrap compress of index set
Definition dofmanager.hh:181
ManagedDofStorageImplementation(const ManagedDofStorageImplementation &)=delete
ResizeMemoryObjects(MemObjectType &mo)
Definition dofmanager.hh:653
void resize(std::false_type, const bool enlargeOnly)
Definition dofmanager.hh:446
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:1362
void dofCompress(const bool clearResizedArrays) override
copy the dof from the rear section of the vector to the holes
Definition dofmanager.hh:370
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:728
void resizeMemory()
resize the MemObject if necessary
Definition dofmanager.hh:1038
void insertEntity(ConstElementType &element)
Inserts entity to all index sets added to dof manager.
Definition dofmanager.hh:1021
static void deleteDofManager(DofManagerType &dm)
delete the dof manager that belong to the given grid
Definition dofmanager.hh:1511
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, true > NewIndexSetRestrictProlongType
Definition dofmanager.hh:850
SizeType size() const override
return size of underlying array
Definition dofmanager.hh:342
ReserveMemoryObjects(MemObjectType &mo)
Definition dofmanager.hh:678
DofManagerType::GridType GridType
Definition dofmanager.hh:1456
size_t size(const Entity &) const
for convenience
Definition dofmanager.hh:1145
DataCollectorInterface< GridType, XtractStreamType > DataXtractorType
Definition dofmanager.hh:805
MemObjectType::SizeType SizeType
Definition dofmanager.hh:675
const void * IdentifierType
Definition dofmanager.hh:64
void resize(const bool enlargeOnly) override
resize the memory with the new size
Definition dofmanager.hh:345
ReserveMemoryObjects< ThisType > ReserveMemoryObjectType
Definition dofmanager.hh:298
LocalInterface< SizeType > MemObjectCheckType
Definition dofmanager.hh:244
double memoryFactor() const
return factor to over estimate new memory allocation
Definition dofmanager.hh:904
void prolongLocal(EntityType &father, EntityType &son, bool initialize) const
prolong data to children and resize memory if doResize is true
Definition dofmanager.hh:754
ResizeMemoryObjectType & resizeMemoryObject()
return object that calls resize of this memory object
Definition dofmanager.hh:336
static bool writeDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
writes DofManager of corresponding grid, when DofManager exists
Definition dofmanager.hh:1483
ManagedDofStorageImplementation(const GridImp &grid, const MapperType &mapper, DofArrayType &array)
Constructor of ManagedDofStorageImplementation, only to call from derived classes.
Definition dofmanager.hh:310
NewIndexSetRestrictProlongType & indexSetRestrictProlong()
returns the index set restriction and prolongation operator
Definition dofmanager.hh:952
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:795
void resize(std::true_type, const bool enlargeOnly)
Definition dofmanager.hh:462
ManagedIndexSetInterface BaseType
type of base class
Definition dofmanager.hh:143
void moveToFront(const SizeType oldSize, const int block)
move block to front again
Definition dofmanager.hh:524
DofStorageInterface::SizeType SizeType
Definition dofmanager.hh:242
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:339
void gather(InlineStreamType &str, ConstElementType &element) const
packs all data attached to this entity
Definition dofmanager.hh:1152
~ManagedIndexSet()
destructor
Definition dofmanager.hh:165
MapperType & mapper() const
Definition dofmanager.hh:440
ManagedDofStorageInterface()=default
do not allow to create explicit instances
DofArrayType & getArray()
return reference to array for DiscreteFunction
Definition dofmanager.hh:437
virtual void read(StandardInStream &in)
new write method
Definition dofmanager.hh:199
void read(InStream &in)
read all index sets from a given stream
Definition dofmanager.hh:1236
void apply(EntityType &entity)
apply wraps the insertEntity method of the index set
Definition dofmanager.hh:635
static ThisType & instance(const GridType &grid)
obtain a reference to the DofManager for a given grid
Definition dofmanager.hh:1259
MessageBufferIF< InlineStreamImplType > InlineStreamType
Definition dofmanager.hh:802
~DofManager()
Desctructor, removes all MemObjects and IndexSetObjects.
Definition dofmanager.hh:1296
RemoveIndicesFromSet< IndexSetType, EntityType > removeIdxObj_
Definition dofmanager.hh:136
ManagedDofStorageInterface::SizeType SizeType
Definition dofmanager.hh:279
void addDofStorage(ManagedDofStorageImp &dofStorage)
add a managed dof storage to the dof manager.
Definition dofmanager.hh:1398
void compress()
Compress all data that is hold by this dofmanager.
Definition dofmanager.hh:1069
virtual ~ManagedIndexSetInterface()=default
void incrementSequenceNumber()
increase the DofManagers internal sequence number
Definition dofmanager.hh:1056
size_t usedMemorySize() const override
return used memory size
Definition dofmanager.hh:425
void restrictLocal(EntityType &father, EntityType &son, bool initialize) const
restrict data to father and resize memory if doResize is true
Definition dofmanager.hh:751
void removeEntity(ConstElementType &element) const
Removes entity from all index sets added to dof manager.
Definition dofmanager.hh:1031
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:994
static bool readDofManagerNew(const GridType &grid, const std ::string &filename, int timestep)
reads DofManager of corresponding grid, when DofManager exists
Definition dofmanager.hh:1497
void reserve(const SizeType needed) override
reserve memory for what is coming
Definition dofmanager.hh:351
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:579
void addReference()
increase reference counter
Definition dofmanager.hh:95
virtual SizeType size() const =0
size of space, i.e. mapper.size()
MessageBufferIF< XtractStreamImplType > XtractStreamType
Definition dofmanager.hh:801
MemObjectType::SizeType SizeType
Definition dofmanager.hh:650
ResizeMemoryObjects(const ResizeMemoryObjects &org)
Definition dofmanager.hh:654
GridObjectStreamTraits< GridType >::InStreamType XtractStreamImplType
Definition dofmanager.hh:797
ManagedIndexSet(const IndexSetType &iset, LocalIndexSetObjectsType &insertList, LocalIndexSetObjectsType &removeList)
Constructor of MemObject, only to call from DofManager.
Definition dofmanager.hh:146
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:616
EmptyIndexSetRestrictProlong IndexSetRestrictProlongType
Definition dofmanager.hh:855
void write(OutStream &out) const
write all index sets to a given stream
Definition dofmanager.hh:1225
void removeDofStorage(ManagedDofStorageImp &dofStorage)
remove a managed dof storage from the dof manager.
Definition dofmanager.hh:1416
void gather(MessageBuffer &str, const Entity &entity) const
Definition dofmanager.hh:1163
EmptyIndexSetRestrictProlong()
Definition dofmanager.hh:748
GridType::template Codim< 0 >::Entity ElementType
Definition dofmanager.hh:808
DofManagerImp DofManagerType
Definition dofmanager.hh:1455
void restrictFinalize(const EntityType &father) const
Definition dofmanager.hh:723
void clearDataXtractors()
clear data xtractor list
Definition dofmanager.hh:1122
bool contains(const int dim, const int codim) const
the dof manager only transfers element data during load balancing
Definition dofmanager.hh:1132
void resizeForRestrict()
resize memory before data restriction during grid adaptation is done.
Definition dofmanager.hh:987
bool equals(const IndexSet &iset) const
Definition dofmanager.hh:104
virtual void enableDofCompression()
enable dof compression for dof storage (default is empty)
Definition dofmanager.hh:225
ReserveMemoryObjectType reserveMemObj_
Definition dofmanager.hh:300
void clearDataInliners()
clear data inliner list
Definition dofmanager.hh:1109
bool notifyGlobalChange(const bool wasChanged) const
communicate new sequence number
Definition dofmanager.hh:1094
IndexSetRestrictProlong(DofManagerType &dm, RestrictProlongIndexSetType &is, RestrictProlongIndexSetType &rm)
Definition dofmanager.hh:703
bool fixedSize(const int dim, const int codim) const
fixed size is false
Definition dofmanager.hh:1138
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:1103
void scatter(XtractStreamType &str, ConstElementType &element, size_t)
unpacks all data attached of this entity from message buffer
Definition dofmanager.hh:1172
ManagedDofStorage(const GridImp &grid, const MapperType &mapper)
Constructor of ManagedDofStorage.
Definition dofmanager.hh:568
LocalIndexSetObjectsType & insertList_
Definition dofmanager.hh:138
ManagedIndexSetInterface(const IndexSet &iset)
Definition dofmanager.hh:71
size_t referenceCounter_
Definition dofmanager.hh:68
bool dataCompressionEnabled_
Definition dofmanager.hh:303
bool hasIndexSets() const
if dofmanagers list is not empty return true
Definition dofmanager.hh:970
virtual size_t usedMemorySize() const =0
return size of mem used by MemObject
InsertIndicesToSet< IndexSetType, EntityType > insertIdxObj_
Definition dofmanager.hh:135
InsertIndicesToSet(IndexSetType &iset)
Definition dofmanager.hh:632
ManagedDofStorageInterface::MemObjectCheckType MemObjectCheckType
Definition dofmanager.hh:281
~ManagedDofStorageImplementation()
destructor deleting MemObject from resize and reserve List
Definition dofmanager.hh:328
void addIndexSet(const IndexSetType &iset)
add index set to dof manager's list of index sets
Definition dofmanager.hh:1327
IndexSetRestrictProlong< ThisType, LocalIndexSetObjectsType, false > IndexSetRestrictProlongNoResizeType
Definition dofmanager.hh:852
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:1008
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
ObjectStreamType InStreamType
Definition gridobjectstreams.hh:70
ObjectStreamType OutStreamType
Definition gridobjectstreams.hh:71
Definition dofmanager.hh:787
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:60
Definition dofmanager.hh:606
Definition dofmanager.hh:625
Definition dofmanager.hh:124
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:236
Definition dofmanager.hh:644
Definition dofmanager.hh:669
Definition dofmanager.hh:277
Definition dofmanager.hh:562
Definition dofmanager.hh:696
Definition dofmanager.hh:746
Definition dofmanager.hh:758
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 emplace(T... args)
T endl(T... args)
T forward(T... args)
T make_pair(T... args)
T max(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8