Class that represents grid information of a given 2d Fem space. More...

#include <gridInfo.hh>

Inheritance diagram for hp2D::GridInfo< F >:
concepts::OutputOperator

Public Types

typedef concepts::HashMap< concepts::Sequence< uint > > CoarseToSuccessor
 
typedef concepts::HashMap< concepts::Sequence< UnderlyingElement > > EdgeToElms
 
enum  Type { regular = 0, cIrregular = 1, sIrregular = 2 }
 Enumeration for type of grid edges regular = a regular edge, edge with two neighbouring cells, boundary edge, edge with only one active adjacent element. More...
 
typedef concepts::ElementAndFacette< hp2D::Element< F > > UnderlyingElement
 

Public Member Functions

const concepts::Set< uint > & attribute () const
 Returns the setted attributes. More...
 
const CoarseToSuccessorget () const
 Returns a map from coarse irregular edges to sequence of keys, that represent successor (small irregular) edges in order. More...
 
const EdgeToElmsget (Type type) const
 Returns a map from requested edge keys to underlying elements. More...
 
 GridInfo (const concepts::SpaceOnCells< F > &spc, const concepts::Set< uint > &edgeAttr)
 Constructor. More...
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream. More...
 

Private Member Functions

bool activeEdge_ (const concepts::Set< uint > &edgeAttr, const concepts::Connector1 &edge) const
 
void build_ (const concepts::SpaceOnCells< F > &spc, const concepts::Set< uint > edgeAttr)
 Builds the maps with respect to input space and requested edges defined by attributes edgeAttr. More...
 
void get_sIrr_ (const concepts::Connector1 *edge, uint cE, const std::set< uint > &edge_1, std::set< uint > &edge_s, concepts::HashMap< concepts::Sequence< uint > > &cChld) const
 Recursive method that iterates over all successors until either no successor available or successor has key in edge_1, in the latter case edge_s gets updated by that key. More...
 

Private Attributes

concepts::Set< uint > edgeAttr_
 
EdgeToElms map_cIrr
 Map from irregular coarse edge to its underlying (active) space element. More...
 
CoarseToSuccessor map_CtS
 Map from coarse irregular edge key to successor edge keys in order. More...
 
EdgeToElms map_reg
 Map from regular edges to underlying elements. More...
 
EdgeToElms map_sIrr
 Map from irregular successor edge to its underlying (active) space element. More...
 

Detailed Description

template<class F = Real>
class hp2D::GridInfo< F >

Class that represents grid information of a given 2d Fem space.

The class stores mappings from edges to underlying elements of the Fem space.

Class works on spaces with hanging nodes, i.e. k-irregular grids.

If a edge is regular there are at most 2 underlying elements. If a edge is irregular it has only 1 underlying element.

Addition for coarse irregular edges a mapping to keys of succussor irregular edges is stores.

This class e.g. applicates for Tracespaces in hp2D package.

Author
Robert Gruhlke, 2016

Definition at line 42 of file gridInfo.hh.

Member Typedef Documentation

◆ CoarseToSuccessor

template<class F = Real>
typedef concepts::HashMap<concepts::Sequence<uint> > hp2D::GridInfo< F >::CoarseToSuccessor

Definition at line 46 of file gridInfo.hh.

◆ EdgeToElms

Definition at line 45 of file gridInfo.hh.

◆ UnderlyingElement

template<class F = Real>
typedef concepts::ElementAndFacette<hp2D::Element<F> > hp2D::GridInfo< F >::UnderlyingElement

Definition at line 44 of file gridInfo.hh.

Member Enumeration Documentation

◆ Type

template<class F = Real>
enum hp2D::GridInfo::Type

Enumeration for type of grid edges regular = a regular edge, edge with two neighbouring cells, boundary edge, edge with only one active adjacent element.

cIrregular = coarse irregular edge, that has successor edges that are irregular sIrregular = small irregular edge, that are successors of a coarse irregular edge. These edges have two adjacent elements, where that edge is edge of exactly of the two adjacent elements, i.e. elements have different level (size).

Enumerator
regular 
cIrregular 
sIrregular 

Definition at line 59 of file gridInfo.hh.

Constructor & Destructor Documentation

◆ GridInfo()

template<class F = Real>
hp2D::GridInfo< F >::GridInfo ( const concepts::SpaceOnCells< F > &  spc,
const concepts::Set< uint > &  edgeAttr 
)

Constructor.

Parameters
spca Space providing hp2D::Quad Elements
edgeAttrattributes of edges to be considered

Member Function Documentation

◆ activeEdge_()

template<class F = Real>
bool hp2D::GridInfo< F >::activeEdge_ ( const concepts::Set< uint > &  edgeAttr,
const concepts::Connector1 edge 
) const
inlineprivate

Definition at line 139 of file gridInfo.hh.

◆ attribute()

template<class F = Real>
const concepts::Set<uint>& hp2D::GridInfo< F >::attribute ( ) const

Returns the setted attributes.

◆ build_()

template<class F = Real>
void hp2D::GridInfo< F >::build_ ( const concepts::SpaceOnCells< F > &  spc,
const concepts::Set< uint >  edgeAttr 
)
private

Builds the maps with respect to input space and requested edges defined by attributes edgeAttr.

◆ get() [1/2]

template<class F = Real>
const CoarseToSuccessor& hp2D::GridInfo< F >::get ( ) const

Returns a map from coarse irregular edges to sequence of keys, that represent successor (small irregular) edges in order.

◆ get() [2/2]

template<class F = Real>
const EdgeToElms& hp2D::GridInfo< F >::get ( Type  type) const

Returns a map from requested edge keys to underlying elements.

Here the type of edge is specified by input type.

Parameters
typespecification for regular, coarse/successor irregular edge map

◆ get_sIrr_()

template<class F = Real>
void hp2D::GridInfo< F >::get_sIrr_ ( const concepts::Connector1 edge,
uint  cE,
const std::set< uint > &  edge_1,
std::set< uint > &  edge_s,
concepts::HashMap< concepts::Sequence< uint > > &  cChld 
) const
private

Recursive method that iterates over all successors until either no successor available or successor has key in edge_1, in the latter case edge_s gets updated by that key.

Parameters
edgecurrent edge
cEkey of the coarse father edge
edge_1set of all edge keys that are active (by attribute)
edge_sset of keys of successors of edge that are in edge_1
cChldmap from coarse Edge key to active successors

◆ info()

template<class F = Real>
virtual std::ostream& hp2D::GridInfo< F >::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::OutputOperator.

Member Data Documentation

◆ edgeAttr_

template<class F = Real>
concepts::Set<uint> hp2D::GridInfo< F >::edgeAttr_
private

Definition at line 95 of file gridInfo.hh.

◆ map_cIrr

template<class F = Real>
EdgeToElms hp2D::GridInfo< F >::map_cIrr
private

Map from irregular coarse edge to its underlying (active) space element.

Definition at line 119 of file gridInfo.hh.

◆ map_CtS

template<class F = Real>
CoarseToSuccessor hp2D::GridInfo< F >::map_CtS
private

Map from coarse irregular edge key to successor edge keys in order.

That is, the first/last successor edge has vertex that is first/second vertex of coarse irregular edge. Neighboured successor edges share one same vertex. This can be used to reconstruct irregular coarse Elements via successor elements and size information of underyling elements. This e.g. applies for basis function evaluation on successor edge with coarse edge information required, e.g. in T matrix.

Definition at line 136 of file gridInfo.hh.

◆ map_reg

template<class F = Real>
EdgeToElms hp2D::GridInfo< F >::map_reg
private

Map from regular edges to underlying elements.

Either there are two underlying elements or one. The latter one holds true if

  • the edge is a boundary edge
  • the edge is a interface map where one underlying element either is not active, i.e. not present or present w/o d.o.f.s

Definition at line 113 of file gridInfo.hh.

◆ map_sIrr

template<class F = Real>
EdgeToElms hp2D::GridInfo< F >::map_sIrr
private

Map from irregular successor edge to its underlying (active) space element.

Definition at line 125 of file gridInfo.hh.


The documentation for this class was generated from the following file:
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich