dune-fem  2.4.1-rc
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::AdaptiveIndexSetBase< TraitsImp > Class Template Reference

consecutive, persistent index set for the leaf level based on the grid's hierarchy index set More...

#include </local/tomalk/somewhere/tmp/dune-fem/dune/fem/gridpart/adaptiveleafindexset.hh>

Inheritance diagram for Dune::Fem::AdaptiveIndexSetBase< TraitsImp >:
Inheritance graph

Public Types

typedef BaseType::IndexType IndexType
 index type */ More...
 
typedef BaseType::Types Types
 geometry type range type */ More...
 
typedef BaseType::template Codim< 0 >::Entity ElementType
 type of codimension 0 Entity More...
 
typedef GridPartType::IntersectionIteratorType IntersectionIteratorType
 type of intersection iterator More...
 
typedef GridPartType::IntersectionType IntersectionType
 type of intersections More...
 

Public Member Functions

 AdaptiveIndexSetBase (const GridPartType &gridPart)
 Constructor. More...
 
virtual ~AdaptiveIndexSetBase ()
 Destructor. More...
 
int type () const
 return type of index set, for GrapeDataIO More...
 
virtual std::string name () const
 return name of index set More...
 
IndexType size (GeometryType type) const
 return number of entities of given type */ More...
 
IndexType size (int codim) const
 return number of entities of given type */ More...
 
const std::vector< GeometryType > & geomTypes (const int codim) const
 return vector of geometry types used of given codimension */ More...
 
Types types (const int codim) const
 return range of geometry types */ More...
 
template<class EntityType >
bool contains (const EntityType &en) const
 return true if entity has index */ More...
 
void insertEntity (const GridElementType &entity)
 please doc me */ More...
 
void removeEntity (const GridElementType &entity)
 please doc me */ More...
 
void resizeVectors ()
 reallocate the vector for new size More...
 
void resize ()
 please doc me */ More...
 
bool compress ()
 please doc me */ More...
 
template<class Entity >
IndexType index (const Entity &entity) const
 return number of entities of given type */ More...
 
template<int codim>
IndexType index (const typename GridPartType::template Codim< codim >::EntityType &entity) const
 return number of entities of given type */ More...
 
IndexType index (const IntersectionType &intersection) const
 
IndexType subIndex (const IntersectionType &intersection, int subNumber, unsigned int codim) const
 
template<class Entity >
IndexType subIndex (const Entity &entity, int subNumber, unsigned int codim) const
 return index for given subentity */ More...
 
template<int cd>
IndexType subIndex (const typename GridPartType::template Codim< cd >::EntityType &entity, int subNumber, unsigned int codim) const
 return index for given subentity */ More...
 
int numberOfHoles (GeometryType type) const
 return number of holes for given type */ More...
 
int numberOfHoles (const int codim) const
 return number of holes of the sets indices More...
 
int oldIndex (int hole, GeometryType type) const
 return old index for given hole and type */ More...
 
int oldIndex (const int hole, const int codim) const
 return old index, for dof manager only More...
 
int newIndex (int hole, GeometryType type) const
 return new index for given hole and type */ More...
 
int newIndex (const int hole, const int codim) const
 return new index, for dof manager only returns index More...
 
template<class StreamTraits >
bool write (OutStreamInterface< StreamTraits > &out) const
 please doc me */ More...
 
template<class StreamTraits >
bool read (InStreamInterface< StreamTraits > &in)
 please doc me */ More...
 
void backup () const
 please doc me More...
 
void restore ()
 please doc me More...
 
void addBackupRestore () overridefinal
 please doc me More...
 
void removeBackupRestore () overridefinal
 please doc me More...
 
bool contains (const Entity &entity) const
 return true if entity has index More...
 
IndexType index (const typename Codim< codim >::Entity &entity) const
 return index for given entity More...
 
IndexType subIndex (const typename Codim< codim >::Entity &entity, int i, unsigned int cd) const
 return index for given subentity More...
 

Static Public Attributes

static const int dimension = BaseType::dimension
 grid dimension */ More...
 
static const int numCodimensions = TraitsImp :: numCodimensions
 number of supported codimensions More...
 
static const int intersectionCodimension = TraitsImp :: intersectionCodimension
 intersection codimension (numCodim-1 if enabled, otherwise -1) More...
 
static const bool hasSingleGeometryType = Dune::Capabilities::hasSingleGeometryType< GridType > :: v
 true if only one geometry type is available More...
 

Protected Types

typedef TraitsImp::GridPartType GridPartType
 
typedef GridPartType::GridType GridType
 
typedef TraitsImp::CodimIndexSetType CodimIndexSetType
 
typedef GridType::template Codim< 0 >::Entity GridElementType
 
typedef DofManager< GridTypeDofManagerType
 dof manager type More...
 

Protected Member Functions

bool codimAvailable (const int codim) const
 
CodimIndexSetTypecodimLeafSet (const int codim) const
 
void insertIndex (const GridElementType &entity)
 
void insertIntersections (const GridElementType &entity) const
 
void insertTemporary (const GridElementType &entity)
 
void removeIndex (const GridElementType &entity)
 
void checkHierarchy (const GridElementType &entity, bool wasNew)
 
template<PartitionIteratorType pt>
void markAllUsed ()
 
void clear ()
 clear index set (only for structured grids) More...
 
void setupIndexSet ()
 mark all indices of interest More...
 
template<PartitionIteratorType pt>
void markAllBelowOld ()
 
template<int codim>
void setupCodimSet (const std::integral_constant< bool, true > &hasEntities) const
 
template<int codim>
void setupCodimSet (const std::integral_constant< bool, false > &hasEntities) const
 
void setupIntersections () const
 
template<int codim>
IndexType countElements (GeometryType type, const std::integral_constant< bool, true > &hasEntities) const
 
template<int codim>
IndexType countElements (GeometryType type, const std::integral_constant< bool, false > &hasEntities) const
 
FaceType getIntersectionFace (const IntersectionType &intersection) const
 
FaceType getIntersectionFace (const IntersectionType &intersection, const ElementType &inside) const
 
TraitsImp::IndexSetType & impl ()
 
const TraitsImp::IndexSetType & impl () const
 

Protected Attributes

const GridTypegrid_
 
DofManagerTypedofManager_
 

Adaptation

void insertEntity (const typename BaseType::template Codim< 0 >::Entity &entity)
 please doc me More...
 
void removeEntity (const typename BaseType::template Codim< 0 >::Entity &entity)
 please doc me More...
 
void write (OutStreamInterface< T > &stream) const
 please doc me More...
 
void read (InStreamInterface< T > &stream)
 please doc me More...
 
static constexpr bool consecutive () noexcept
 please doc me More...
 

Detailed Description

template<class TraitsImp>
class Dune::Fem::AdaptiveIndexSetBase< TraitsImp >

consecutive, persistent index set for the leaf level based on the grid's hierarchy index set

This index set generates a consecutive leaf index out of the unique global index of each entity. It can be used instead of the default grid index sets and can be generated for each grid implementation.

Note
The base implementation can support either only one codimension or all codimensions of the grid.

Member Typedef Documentation

template<class TraitsImp>
typedef TraitsImp :: CodimIndexSetType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::CodimIndexSetType
protected
typedef DofManager< GridType > Dune::Fem::PersistentIndexSet< TraitsImp , AdaptiveIndexSet >::DofManagerType
protectedinherited

dof manager type

template<class TraitsImp>
typedef BaseType :: template Codim< 0 >:: Entity Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::ElementType

type of codimension 0 Entity

template<class TraitsImp>
typedef GridType::template Codim< 0 >::Entity Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::GridElementType
protected
template<class TraitsImp>
typedef TraitsImp :: GridPartType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::GridPartType
protected
template<class TraitsImp>
typedef GridPartType :: GridType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::GridType
protected
template<class TraitsImp>
typedef BaseType :: IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::IndexType

index type */

*/

type of intersection iterator

template<class TraitsImp>
typedef GridPartType :: IntersectionType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::IntersectionType

type of intersections

template<class TraitsImp>
typedef BaseType :: Types Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::Types

geometry type range type */

*/

Constructor & Destructor Documentation

template<class TraitsImp>
Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::AdaptiveIndexSetBase ( const GridPartType gridPart)
inline

Constructor.

get geometry types (not working for hybrid grids, like to whole set itself)

template<class TraitsImp>
virtual Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::~AdaptiveIndexSetBase ( )
inlinevirtual

Destructor.

Member Function Documentation

void Dune::Fem::PersistentIndexSet< TraitsImp , AdaptiveIndexSet >::addBackupRestore ( )
inlinefinaloverridevirtualinherited

please doc me

Implements Dune::Fem::PersistentIndexSetInterface.

void Dune::Fem::PersistentIndexSet< TraitsImp , AdaptiveIndexSet >::backup ( ) const
inlineinherited

please doc me

template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::checkHierarchy ( const GridElementType entity,
bool  wasNew 
)
inlineprotected
template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::clear ( )
inlineprotected

clear index set (only for structured grids)

template<class TraitsImp>
bool Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::codimAvailable ( const int  codim) const
inlineprotected
template<class TraitsImp>
CodimIndexSetType& Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::codimLeafSet ( const int  codim) const
inlineprotected
template<class TraitsImp >
bool Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::compress ( )
inline

please doc me */

*/

static constexpr bool Dune::Fem::ConsecutiveIndexSet< TraitsImp >::consecutive ( )
inlinestaticnoexceptinherited

please doc me

bool Dune::Fem::IndexSet< TraitsImp >::contains ( const Entity &  entity) const
inlineinherited

return true if entity has index

template<class TraitsImp>
template<class EntityType >
bool Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::contains ( const EntityType &  en) const
inline

return true if entity has index */

*/

template<class TraitsImp >
template<int codim>
AdaptiveIndexSetBase< TraitsImp >::IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::countElements ( GeometryType  type,
const std::integral_constant< bool, true > &  hasEntities 
) const
inlineprotected
template<class TraitsImp >
template<int codim>
AdaptiveIndexSetBase< TraitsImp >::IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::countElements ( GeometryType  type,
const std::integral_constant< bool, false > &  hasEntities 
) const
inlineprotected
template<class TraitsImp>
const std::vector<GeometryType>& Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::geomTypes ( const int  codim) const
inline

return vector of geometry types used of given codimension */

Deprecated:
"IndexSet::geomTypes(codim) is deprecated, use IndexSet::types(codim) instead"

*/

template<class TraitsImp>
FaceType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::getIntersectionFace ( const IntersectionType intersection) const
inlineprotected
template<class TraitsImp>
FaceType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::getIntersectionFace ( const IntersectionType intersection,
const ElementType inside 
) const
inlineprotected
const TraitsImp ::IndexSetType& Dune::Fem::IndexSet< TraitsImp >::impl ( ) const
inlineprotectedinherited
TraitsImp ::IndexSetType& Dune::Fem::ConsecutiveIndexSet< TraitsImp >::impl ( )
inlineprotectedinherited
IndexType Dune::Fem::IndexSet< TraitsImp >::index ( const typename Codim< codim >::Entity &  entity) const
inlineinherited

return index for given entity

template<class TraitsImp>
template<class Entity >
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::index ( const Entity &  entity) const
inline

return number of entities of given type */

*/

template<class TraitsImp>
template<int codim>
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::index ( const typename GridPartType::template Codim< codim >::EntityType &  entity) const
inline

return number of entities of given type */

*/

template<class TraitsImp>
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::index ( const IntersectionType intersection) const
inline
void Dune::Fem::ConsecutiveIndexSet< TraitsImp >::insertEntity ( const typename BaseType::template Codim< 0 >::Entity &  entity)
inlineinherited

please doc me

template<class TraitsImp>
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::insertEntity ( const GridElementType entity)
inline

please doc me */

*/

template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::insertIndex ( const GridElementType entity)
inlineprotected
template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::insertIntersections ( const GridElementType entity) const
inlineprotected
template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::insertTemporary ( const GridElementType entity)
inlineprotected
template<class TraitsImp >
template<PartitionIteratorType pt>
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::markAllBelowOld ( )
inlineprotected
template<class TraitsImp >
template<PartitionIteratorType pt>
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::markAllUsed ( )
inlineprotected
template<class TraitsImp>
virtual std::string Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::name ( ) const
inlinevirtual
template<class TraitsImp>
int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::newIndex ( int  hole,
GeometryType  type 
) const
inline

return new index for given hole and type */

*/

template<class TraitsImp>
int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::newIndex ( const int  hole,
const int  codim 
) const
inline

return new index, for dof manager only returns index

template<class TraitsImp>
int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::numberOfHoles ( GeometryType  type) const
inline

return number of holes for given type */

*/

template<class TraitsImp>
int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::numberOfHoles ( const int  codim) const
inline

return number of holes of the sets indices

template<class TraitsImp>
int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::oldIndex ( int  hole,
GeometryType  type 
) const
inline

return old index for given hole and type */

*/

template<class TraitsImp>
int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::oldIndex ( const int  hole,
const int  codim 
) const
inline

return old index, for dof manager only

void Dune::Fem::ConsecutiveIndexSet< TraitsImp >::read ( InStreamInterface< T > &  stream)
inlineinherited

please doc me

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

please doc me */

*/

References Dune::Std::min().

Referenced by Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::write().

void Dune::Fem::PersistentIndexSet< TraitsImp , AdaptiveIndexSet >::removeBackupRestore ( )
inlinefinaloverridevirtualinherited

please doc me

Implements Dune::Fem::PersistentIndexSetInterface.

void Dune::Fem::ConsecutiveIndexSet< TraitsImp >::removeEntity ( const typename BaseType::template Codim< 0 >::Entity &  entity)
inlineinherited

please doc me

template<class TraitsImp>
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::removeEntity ( const GridElementType entity)
inline

please doc me */

*/

template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::removeIndex ( const GridElementType entity)
inlineprotected
template<class TraitsImp>
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::resize ( )
inline

please doc me */

*/

template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::resizeVectors ( )
inline

reallocate the vector for new size

void Dune::Fem::PersistentIndexSet< TraitsImp , AdaptiveIndexSet >::restore ( )
inlineinherited

please doc me

template<class TraitsImp >
template<int codim>
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::setupCodimSet ( const std::integral_constant< bool, true > &  hasEntities) const
inlineprotected
template<class TraitsImp >
template<int codim>
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::setupCodimSet ( const std::integral_constant< bool, false > &  hasEntities) const
inlineprotected
template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::setupIndexSet ( )
inlineprotected

mark all indices of interest

template<class TraitsImp >
void Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::setupIntersections ( ) const
inlineprotected
template<class TraitsImp>
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::size ( GeometryType  type) const
inline

return number of entities of given type */

*/

template<class TraitsImp>
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::size ( int  codim) const
inline

return number of entities of given type */

*/

IndexType Dune::Fem::IndexSet< TraitsImp >::subIndex ( const typename Codim< codim >::Entity &  entity,
int  i,
unsigned int  cd 
) const
inlineinherited

return index for given subentity

template<class TraitsImp>
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::subIndex ( const IntersectionType intersection,
int  subNumber,
unsigned int  codim 
) const
inline
template<class TraitsImp>
template<class Entity >
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::subIndex ( const Entity &  entity,
int  subNumber,
unsigned int  codim 
) const
inline

return index for given subentity */

*/

template<class TraitsImp>
template<int cd>
IndexType Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::subIndex ( const typename GridPartType::template Codim< cd >::EntityType &  entity,
int  subNumber,
unsigned int  codim 
) const
inline

return index for given subentity */

*/

template<class TraitsImp>
int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::type ( ) const
inline

return type of index set, for GrapeDataIO

template<class TraitsImp>
Types Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::types ( const int  codim) const
inline

return range of geometry types */

*/

void Dune::Fem::ConsecutiveIndexSet< TraitsImp >::write ( OutStreamInterface< T > &  stream) const
inlineinherited

please doc me

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

Member Data Documentation

template<class TraitsImp>
const int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::dimension = BaseType::dimension
static

grid dimension */

*/

DofManagerType& Dune::Fem::PersistentIndexSet< TraitsImp , AdaptiveIndexSet >::dofManager_
protectedinherited
const GridType& Dune::Fem::PersistentIndexSet< TraitsImp , AdaptiveIndexSet >::grid_
protectedinherited
template<class TraitsImp>
const bool Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::hasSingleGeometryType = Dune::Capabilities::hasSingleGeometryType< GridType > :: v
static

true if only one geometry type is available

template<class TraitsImp>
const int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::intersectionCodimension = TraitsImp :: intersectionCodimension
static

intersection codimension (numCodim-1 if enabled, otherwise -1)

template<class TraitsImp>
const int Dune::Fem::AdaptiveIndexSetBase< TraitsImp >::numCodimensions = TraitsImp :: numCodimensions
static

number of supported codimensions


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