dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::CodimIndexSet< GridImp > Class Template Reference

#include <dune/fem/gridpart/codimindexset.hh>

Public Types

typedef int IndexType
 

Public Member Functions

 CodimIndexSet (const GridType &grid, const int codim, const double memoryFactor=1.1)
 Constructor taking memory factor (default = 1.1)
 
void setMemoryFactor (const double memoryFactor)
 set memory overestimation factor
 
void resize ()
 reallocate the vectors
 
void prepareCompress ()
 prepare for setup (nothing to do here)
 
void clear ()
 clear set
 
void resetUsed ()
 set all entries to unused
 
bool consecutive ()
 
void checkConsecutive ()
 set all entries to unused
 
void clearHoles ()
 clear holes, i.e. set number of holes to zero
 
bool compress ()
 
IndexType additionalSizeEstimate () const
 return how much extra memory is needed for restriction
 
IndexType size () const
 return size of grid entities per level and codim
 
IndexType realSize () const
 return size of grid entities per level and codim
 
template<class EntityType >
IndexType index (const EntityType &entity) const
 return leaf index for given entity
 
template<class EntityType >
IndexType subIndex (const EntityType &entity, const int subNumber) const
 return leaf index for given entity
 
template<class EntityType >
IndexType subIndex (const EntityType &entity, const int subNumber, const std::integral_constant< bool, false > codim0) const
 return leaf index for given entity
 
template<class EntityType >
IndexType subIndex (const EntityType &entity, const int subNumber, const std::integral_constant< bool, true > codim0) const
 return leaf index for given entity
 
template<class EntityType >
bool exists (const EntityType &entity) const
 return state of index for given hierarchic number
 
template<class EntityType >
bool exists (const EntityType &entity, const int subNumber) const
 
IndexType numberOfHoles () const
 return number of holes
 
IndexType oldIndex (int elNum) const
 return old index, for dof manager only
 
IndexType newIndex (int elNum) const
 return new index, for dof manager only returns index
 
template<class EntityType >
void insert (const EntityType &entity)
 
template<class EntityType >
void insertSubEntity (const EntityType &entity, const int subNumber)
 
template<class EntityType >
void insertGhost (const EntityType &entity)
 
template<class EntityType >
void markForRemoval (const EntityType &entity)
 
template<class EntityType >
bool validIndex (const EntityType &entity) const
 
void print (std::ostream &out) const
 
template<class StreamTraits >
bool write (OutStreamInterface< StreamTraits > &out) const
 
template<class StreamTraits >
bool read (InStreamInterface< StreamTraits > &in)
 

Static Public Member Functions

static IndexType invalidIndex ()
 

Protected Types

typedef GridImp GridType
 
typedef CodimIndexSet< GridTypeThisType
 
typedef DynamicArray< IndexTypeIndexArrayType
 
typedef DynamicArray< INDEXSTATE > IndexStateArrayType
 
typedef PersistentContainer< GridType, IndexTypeIndexContainerType
 

Protected Member Functions

bool checkValidIndex (const IndexType &idx) const
 
void insertIdx (IndexType &index)
 

Protected Attributes

IndexContainerType leafIndex_
 
IndexStateArrayType indexState_
 
IndexArrayType holes_
 
IndexArrayType oldIdx_
 
IndexArrayType newIdx_
 
IndexType lastSize_
 
const int myCodim_
 
IndexType numberHoles_
 

Member Typedef Documentation

◆ GridType

template<class GridImp >
typedef GridImp Dune::Fem::CodimIndexSet< GridImp >::GridType
protected

◆ IndexArrayType

template<class GridImp >
typedef DynamicArray< IndexType > Dune::Fem::CodimIndexSet< GridImp >::IndexArrayType
protected

◆ IndexContainerType

template<class GridImp >
typedef PersistentContainer< GridType, IndexType > Dune::Fem::CodimIndexSet< GridImp >::IndexContainerType
protected

◆ IndexStateArrayType

template<class GridImp >
typedef DynamicArray< INDEXSTATE > Dune::Fem::CodimIndexSet< GridImp >::IndexStateArrayType
protected

◆ IndexType

template<class GridImp >
typedef int Dune::Fem::CodimIndexSet< GridImp >::IndexType

◆ ThisType

template<class GridImp >
typedef CodimIndexSet< GridType > Dune::Fem::CodimIndexSet< GridImp >::ThisType
protected

Constructor & Destructor Documentation

◆ CodimIndexSet()

template<class GridImp >
Dune::Fem::CodimIndexSet< GridImp >::CodimIndexSet ( const GridType grid,
const int  codim,
const double  memoryFactor = 1.1 
)
inline

Constructor taking memory factor (default = 1.1)

Member Function Documentation

◆ additionalSizeEstimate()

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::additionalSizeEstimate ( ) const
inline

return how much extra memory is needed for restriction

◆ checkConsecutive()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::checkConsecutive ( )
inline

set all entries to unused

◆ checkValidIndex()

template<class GridImp >
bool Dune::Fem::CodimIndexSet< GridImp >::checkValidIndex ( const IndexType idx) const
inlineprotected

◆ clear()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::clear ( )
inline

clear set

◆ clearHoles()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::clearHoles ( )
inline

clear holes, i.e. set number of holes to zero

◆ compress()

template<class GridImp >
bool Dune::Fem::CodimIndexSet< GridImp >::compress ( )
inline

make to index numbers consecutive return true, if at least one hole was closed

◆ consecutive()

template<class GridImp >
bool Dune::Fem::CodimIndexSet< GridImp >::consecutive ( )
inline

◆ exists() [1/2]

template<class GridImp >
template<class EntityType >
bool Dune::Fem::CodimIndexSet< GridImp >::exists ( const EntityType &  entity) const
inline

return state of index for given hierarchic number

◆ exists() [2/2]

template<class GridImp >
template<class EntityType >
bool Dune::Fem::CodimIndexSet< GridImp >::exists ( const EntityType &  entity,
const int  subNumber 
) const
inline

◆ index()

template<class GridImp >
template<class EntityType >
IndexType Dune::Fem::CodimIndexSet< GridImp >::index ( const EntityType &  entity) const
inline

return leaf index for given entity

◆ insert()

template<class GridImp >
template<class EntityType >
void Dune::Fem::CodimIndexSet< GridImp >::insert ( const EntityType &  entity)
inline

◆ insertGhost()

template<class GridImp >
template<class EntityType >
void Dune::Fem::CodimIndexSet< GridImp >::insertGhost ( const EntityType &  entity)
inline

◆ insertIdx()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::insertIdx ( IndexType index)
inlineprotected

◆ insertSubEntity()

template<class GridImp >
template<class EntityType >
void Dune::Fem::CodimIndexSet< GridImp >::insertSubEntity ( const EntityType &  entity,
const int  subNumber 
)
inline

◆ invalidIndex()

template<class GridImp >
static IndexType Dune::Fem::CodimIndexSet< GridImp >::invalidIndex ( )
inlinestatic

◆ markForRemoval()

template<class GridImp >
template<class EntityType >
void Dune::Fem::CodimIndexSet< GridImp >::markForRemoval ( const EntityType &  entity)
inline

◆ newIndex()

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::newIndex ( int  elNum) const
inline

return new index, for dof manager only returns index

◆ numberOfHoles()

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::numberOfHoles ( ) const
inline

return number of holes

◆ oldIndex()

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::oldIndex ( int  elNum) const
inline

return old index, for dof manager only

◆ prepareCompress()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::prepareCompress ( )
inline

prepare for setup (nothing to do here)

◆ print()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::print ( std::ostream &  out) const
inline

◆ read()

template<class GridImp >
template<class StreamTraits >
bool Dune::Fem::CodimIndexSet< GridImp >::read ( InStreamInterface< StreamTraits > &  in)
inline

◆ realSize()

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::realSize ( ) const
inline

return size of grid entities per level and codim

◆ resetUsed()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::resetUsed ( )
inline

set all entries to unused

◆ resize()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::resize ( )
inline

reallocate the vectors

◆ setMemoryFactor()

template<class GridImp >
void Dune::Fem::CodimIndexSet< GridImp >::setMemoryFactor ( const double  memoryFactor)
inline

set memory overestimation factor

◆ size()

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::size ( ) const
inline

return size of grid entities per level and codim

◆ subIndex() [1/3]

template<class GridImp >
template<class EntityType >
IndexType Dune::Fem::CodimIndexSet< GridImp >::subIndex ( const EntityType &  entity,
const int  subNumber 
) const
inline

return leaf index for given entity

◆ subIndex() [2/3]

template<class GridImp >
template<class EntityType >
IndexType Dune::Fem::CodimIndexSet< GridImp >::subIndex ( const EntityType &  entity,
const int  subNumber,
const std::integral_constant< bool, false >  codim0 
) const
inline

return leaf index for given entity

◆ subIndex() [3/3]

template<class GridImp >
template<class EntityType >
IndexType Dune::Fem::CodimIndexSet< GridImp >::subIndex ( const EntityType &  entity,
const int  subNumber,
const std::integral_constant< bool, true >  codim0 
) const
inline

return leaf index for given entity

◆ validIndex()

template<class GridImp >
template<class EntityType >
bool Dune::Fem::CodimIndexSet< GridImp >::validIndex ( const EntityType &  entity) const
inline

◆ write()

template<class GridImp >
template<class StreamTraits >
bool Dune::Fem::CodimIndexSet< GridImp >::write ( OutStreamInterface< StreamTraits > &  out) const
inline

Member Data Documentation

◆ holes_

template<class GridImp >
IndexArrayType Dune::Fem::CodimIndexSet< GridImp >::holes_
protected

◆ indexState_

template<class GridImp >
IndexStateArrayType Dune::Fem::CodimIndexSet< GridImp >::indexState_
protected

◆ lastSize_

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::lastSize_
protected

◆ leafIndex_

template<class GridImp >
IndexContainerType Dune::Fem::CodimIndexSet< GridImp >::leafIndex_
protected

◆ myCodim_

template<class GridImp >
const int Dune::Fem::CodimIndexSet< GridImp >::myCodim_
protected

◆ newIdx_

template<class GridImp >
IndexArrayType Dune::Fem::CodimIndexSet< GridImp >::newIdx_
protected

◆ numberHoles_

template<class GridImp >
IndexType Dune::Fem::CodimIndexSet< GridImp >::numberHoles_
protected

◆ oldIdx_

template<class GridImp >
IndexArrayType Dune::Fem::CodimIndexSet< GridImp >::oldIdx_
protected

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