dune-fem  2.4.1-rc
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > Class Template Reference

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/space/common/dofmanager.hh>

Inheritance diagram for Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >:
Inheritance graph

Public Member Functions

ResizeMemoryObjectTyperesizeMemoryObject ()
 return object that calls resize of this memory object More...
 
ReserveMemoryObjectTypereserveMemoryObject ()
 return object that calls reserve of this memory object More...
 
const std::string & name () const
 returns name of this vector More...
 
int size () const
 return size of underlying array More...
 
void resize ()
 resize the memory with the new size More...
 
void reserve (const int needed)
 reserve memory for what is comming More...
 
void dofCompress ()
 copy the dof from the rear section of the vector to the holes More...
 
size_t usedMemorySize () const
 return used memory size More...
 
void enableDofCompression ()
 enable dof compression for this MemObject More...
 
DofArrayType & getArray ()
 return reference to array for DiscreteFunction More...
 

Protected Types

typedef ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > ThisType
 
typedef DofManager< GridImp > DofManagerType
 
typedef ResizeMemoryObjects< ThisTypeResizeMemoryObjectType
 
typedef ReserveMemoryObjects< ThisTypeReserveMemoryObjectType
 

Protected Member Functions

 ManagedDofStorageImplementation (const ManagedDofStorageImplementation &)
 
 ManagedDofStorageImplementation (const GridImp &grid, const MapperType &mapper, const std::string &name, DofArrayType &array)
 Constructor of ManagedDofStorageImplementation, only to call from derived classes. More...
 
 ~ManagedDofStorageImplementation ()
 destructor deleting MemObject from resize and reserve List More...
 
MapperType & mapper () const
 
void resizeAndMoveToRear ()
 
void moveToFront (const int oldSize, const int block)
 move block to front again More...
 

Protected Attributes

DofManagerTypedm_
 
MapperType & mapper_
 
DofArrayType & array_
 
std::string name_
 
ResizeMemoryObjectType resizeMemObj_
 
ReserveMemoryObjectType reserveMemObj_
 
bool dataCompressionEnabled_
 

Detailed Description

template<class GridImp, class MapperType, class DofArrayType>
class Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >

A ManagedDofStorage holds the memory for one DiscreteFunction and the corresponding DofArrayMemory. ManagedDofStorageImplementation implements the basic features such as resize and dof compression. If a DiscreteFunction is signed in by a function space, then such a MemObject is created by the DofManager. The MemObject also knows the DofMapper from the function space which the discrete function belongs to. Here we dont know the exact type of the dof mapper therefore the methods newSize and calcInsertPoints of the mappers have to be virtual. This isnt a problem because this methods should only be called during memory reorganizing which is only once per timestep.

Member Typedef Documentation

template<class GridImp , class MapperType , class DofArrayType >
typedef DofManager<GridImp> Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::DofManagerType
protected
template<class GridImp , class MapperType , class DofArrayType >
typedef ReserveMemoryObjects< ThisType > Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::ReserveMemoryObjectType
protected
template<class GridImp , class MapperType , class DofArrayType >
typedef ResizeMemoryObjects< ThisType > Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::ResizeMemoryObjectType
protected
template<class GridImp , class MapperType , class DofArrayType >
typedef ManagedDofStorageImplementation<GridImp, MapperType , DofArrayType> Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::ThisType
protected

Constructor & Destructor Documentation

template<class GridImp , class MapperType , class DofArrayType >
Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::ManagedDofStorageImplementation ( const ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType > &  )
protected
template<class GridImp , class MapperType , class DofArrayType >
Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::ManagedDofStorageImplementation ( const GridImp &  grid,
const MapperType &  mapper,
const std::string &  name,
DofArrayType &  array 
)
inlineprotected
template<class GridImp , class MapperType , class DofArrayType >
Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::~ManagedDofStorageImplementation ( )
inlineprotected

destructor deleting MemObject from resize and reserve List

References Dune::Fem::DofManager< Grid >::removeDofStorage().

Member Function Documentation

template<class GridImp , class MapperType , class DofArrayType >
void Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::dofCompress ( )
inlinevirtual

copy the dof from the rear section of the vector to the holes

Implements Dune::Fem::ManagedDofStorageInterface.

References Dune::Fem::SpecialArrayFeatures< ArrayType >::assign().

template<class GridImp , class MapperType , class DofArrayType >
void Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::enableDofCompression ( )
inlinevirtual

enable dof compression for this MemObject

Reimplemented from Dune::Fem::DofStorageInterface.

template<class GridImp , class MapperType , class DofArrayType >
DofArrayType& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::getArray ( )
inline

return reference to array for DiscreteFunction

template<class GridImp , class MapperType , class DofArrayType >
MapperType& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::mapper ( ) const
inlineprotected
template<class GridImp , class MapperType , class DofArrayType >
void Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::moveToFront ( const int  oldSize,
const int  block 
)
inlineprotected
template<class GridImp , class MapperType , class DofArrayType >
const std::string& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::name ( ) const
inlinevirtual

returns name of this vector

Implements Dune::Fem::DofStorageInterface.

template<class GridImp , class MapperType , class DofArrayType >
void Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::reserve ( const int  needed)
inlinevirtual

reserve memory for what is comming

Implements Dune::Fem::ManagedDofStorageInterface.

template<class GridImp , class MapperType , class DofArrayType >
ReserveMemoryObjectType& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::reserveMemoryObject ( )
inline

return object that calls reserve of this memory object

template<class GridImp , class MapperType , class DofArrayType >
void Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::resize ( )
inlinevirtual
template<class GridImp , class MapperType , class DofArrayType >
void Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::resizeAndMoveToRear ( )
inlineprotected
template<class GridImp , class MapperType , class DofArrayType >
ResizeMemoryObjectType& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::resizeMemoryObject ( )
inline

return object that calls resize of this memory object

template<class GridImp , class MapperType , class DofArrayType >
int Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::size ( ) const
inlinevirtual

return size of underlying array

Implements Dune::Fem::DofStorageInterface.

template<class GridImp , class MapperType , class DofArrayType >
size_t Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::usedMemorySize ( ) const
inlinevirtual

return used memory size

Implements Dune::Fem::ManagedDofStorageInterface.

Member Data Documentation

template<class GridImp , class MapperType , class DofArrayType >
DofArrayType& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::array_
protected
template<class GridImp , class MapperType , class DofArrayType >
bool Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::dataCompressionEnabled_
protected
template<class GridImp , class MapperType , class DofArrayType >
DofManagerType& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::dm_
protected
template<class GridImp , class MapperType , class DofArrayType >
MapperType& Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::mapper_
protected
template<class GridImp , class MapperType , class DofArrayType >
std::string Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::name_
protected
template<class GridImp , class MapperType , class DofArrayType >
ReserveMemoryObjectType Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::reserveMemObj_
protected
template<class GridImp , class MapperType , class DofArrayType >
ResizeMemoryObjectType Dune::Fem::ManagedDofStorageImplementation< GridImp, MapperType, DofArrayType >::resizeMemObj_
protected

The documentation for this class was generated from the following file: