DUNE-FEM (unstable)

#include <dune/fem/space/common/dofmanager.hh>

Public Types

typedef Grid GridType
 type of Grid this DofManager belongs to
 
typedef char DataType
 data type of data to communicate
 

Public Member Functions

double memoryFactor () const
 return factor to over estimate new memory allocation
 
template<class IndexSetType >
void addIndexSet (const IndexSetType &iset)
 add index set to dof manager's list of index sets More...
 
template<class IndexSetType >
void removeIndexSet (const IndexSetType &iset)
 removed index set from dof manager's list of index sets More...
 
template<class ManagedDofStorageImp >
void addDofStorage (ManagedDofStorageImp &dofStorage)
 add a managed dof storage to the dof manager. More...
 
template<class ManagedDofStorageImp >
void removeDofStorage (ManagedDofStorageImp &dofStorage)
 remove a managed dof storage from the dof manager. More...
 
NewIndexSetRestrictProlongType & indexSetRestrictProlong ()
 returns the index set restriction and prolongation operator
 
IndexSetRestrictProlongNoResizeType & indexSetRestrictProlongNoResize ()
 returns the index set restriction and prolongation operator
 
bool hasIndexSets () const
 if dofmanagers list is not empty return true
 
size_t usedMemorySize () const
 return used memory size of all MemObjects in bytes.
 
void resizeForRestrict ()
 resize memory before data restriction during grid adaptation is done.
 
void reserveMemory (std::size_t nsize, bool dummy=false)
 reserve memory for at least nsize elements, dummy is needed for dune-grid ALUGrid version
 
int sequence () const
 return number of sequence, if dofmanagers memory was changed by calling some method like resize, then also this number will increase More...
 
void resize ()
 Resize index sets and memory due to what the mapper has as new size. More...
 
void insertEntity (ConstElementType &element)
 Inserts entity to all index sets added to dof manager.
 
void removeEntity (ConstElementType &element) const
 Removes entity from all index sets added to dof manager.
 
void resizeMemory ()
 resize the MemObject if necessary
 
void enlargeMemory ()
 resize the MemObject if necessary
 
void incrementSequenceNumber ()
 increase the DofManagers internal sequence number More...
 
void compress ()
 Compress all data that is hold by this dofmanager. More...
 
bool notifyGlobalChange (const bool wasChanged) const
 communicate new sequence number
 
template<class DataCollType >
void addDataInliner (DataCollType &d)
 add data handler for data inlining to dof manager
 
void clearDataInliners ()
 clear data inliner list
 
template<class DataCollType >
void addDataXtractor (DataCollType &d)
 add data handler for data xtracting to dof manager
 
void clearDataXtractors ()
 clear data xtractor list
 
bool contains (const int dim, const int codim) const
 the dof manager only transfers element data during load balancing
 
bool fixedSize (const int dim, const int codim) const
 fixed size is false
 
template<class Entity >
size_t size (const Entity &) const
 for convenience
 
void gather (InlineStreamType &str, ConstElementType &element) const
 packs all data attached to this entity
 
void scatter (XtractStreamType &str, ConstElementType &element, size_t)
 unpacks all data attached of this entity from message buffer
 
template<class MessageBuffer , class Entity >
void scatter (MessageBuffer &str, const Entity &entity, size_t)
 unpacks all data of this entity from message buffer
 
void backup () const
 :: backup More...
 
void restore ()
 :: restore More...
 
template<class OutStream >
void write (OutStream &out) const
 write all index sets to a given stream More...
 
template<class InStream >
void read (InStream &in)
 read all index sets from a given stream More...
 
size_t size (const EntityType &e) const
 how many objects of type DataType have to be sent for a given entity More...
 
void gather (MessageBufferImp &buff, const EntityType &e) const
 pack data from user to message buffer More...
 
void scatter (MessageBufferImp &buff, const EntityType &e, size_t n)
 unpack data from message buffer to user. More...
 

Static Public Member Functions

static ThisTypeinstance (const GridType &grid)
 obtain a reference to the DofManager for a given grid More...
 

Detailed Description

template<class Grid>
class Dune::Fem::DofManager< Grid >

The DofManager is responsible for managing memory allocation and freeing for all discrete functions living on the grid the manager belongs to. There is only one DofManager per grid. Each discrete function knows its dofmanager and can sign in. If the grid is adapted, then the dofmanager reorganizes the memory if necessary. The DofManager holds a list of MemObjects which manage the memory and the corresponding mapper so they can determine the size of new memory. Furthermore the DofManager holds an IndexSet which the DofMapper needs for calculating the indices in the dof vector for a given entity and local dof number. This IndexSet is delivered to the mapper when a function space is created. The default value for the IndexSet is the DefaultIndexSet class which is mostly a wrapper for the grid indices.

Member Function Documentation

◆ gather()

void Dune::CommDataHandleIF< DofManager< Grid > , char >::gather ( MessageBufferImp &  buff,
const EntityType &  e 
) const
inlineinherited

pack data from user to message buffer

Parameters
buffmessage buffer provided by the grid
eentity for which date should be packed to buffer

◆ scatter()

void Dune::CommDataHandleIF< DofManager< Grid > , char >::scatter ( MessageBufferImp &  buff,
const EntityType &  e,
size_t  n 
)
inlineinherited

unpack data from message buffer to user.

Parameters
buffmessage buffer provided by the grid. This is not const, because the buffer has an internal iterator that gets advanced when reading from the buffer.
eentity for which date should be unpacked from buffer
nnumber of data written to buffer for this entity before

◆ size()

size_t Dune::CommDataHandleIF< DofManager< Grid > , char >::size ( const EntityType &  e) const
inlineinherited

how many objects of type DataType have to be sent for a given entity

Note
Only the sender side needs to know this size.
Parameters
eentity for which the size should be determined

The documentation for this class was generated from the following files:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 20, 23:30, 2024)