Helper class for building 2D hp-FEM spaces (space pre builder). More...

#include <spacePreBuilder.hh>

Inheritance diagram for hp2D::hpFull:
hp2D::SpacePreBuilder concepts::Adaptivity< F, Tadj > concepts::SpacePreBuilder concepts::OutputOperator

Classes

class  Cause
 

Public Member Functions

void adjust (const concepts::AdaptiveAdjustP< 2 > &a)
 Adjusts the mesh and polynomial degrees in the next rebuild step for all 'member of space' cell. More...
 
virtual void adjust (const concepts::Connector &cell, const concepts::AdaptiveAdjustP< 2 > &a)
 Adjusts the mesh and polynomial degrees in the next rebuild step for this cell. More...
 
virtual void adjust (const F &cell, const Tadj &a)=0
 Adjusts in the next rebuild step for this cell. More...
 
void adjust (const uint nrCell, const concepts::AdaptiveAdjustP< 2 > &a)
 Adjusts the mesh and polynomial degrees in the next rebuild step for the nrCell th 'member of space' cell. More...
 
std::set< concepts::Cell2 * > allCells () const
 Returns set of all cells. More...
 
uint available () const
 Returns 0 if the potential degrees of freedom has to be rebuilt with rebuildDof(), otherwise the number of the build. More...
 
concepts::Set< concepts::Cell2 * > cells () const
 Returns set of 'member of space' cells. More...
 
void clearAllIndices (uint spcNo=0)
 Resets all to spcNo belonging indices, which were set with setIndex(). More...
 
virtual ushort edgeDof (const concepts::Connector2 &cntr, uint i) const
 Returns the maximal polynomial degree of the degrees of freedom on edge i in the cell cntr. More...
 
virtual ushort edgeP (const concepts::Connector2 &cntr, uint i) const
 Returns the maximal polynomial degree of an edge i in cell cntr, if edge has degrees of freedom or is hanging. More...
 
 hpFull (concepts::Mesh2 &msh, uint l=0, uint p=1, bool build=false)
 Constructor. More...
 
 hpFull (const hpFull &preBuild)
 Copy constructor, the copy contains the same mesh, all information about adjustments and degrees of freedoms are copied. More...
 
const concepts::IndexRangeindex (uint dim, const concepts::Connector2 &cntr, uint i=0, uint spcNo=0) const
 Returns the index range of the dof inside cell cntr. More...
 
virtual concepts::Set< concepts::IndexRangeindices (uint dim, const concepts::Connector &cntr, uint spcNo=0) const throw (concepts::MissingFeature)
 Returns all indices of degrees of freedom of one dimension dim which belong to the cell cntr. More...
 
virtual const ushort * innerDof (const concepts::Connector2 &cntr) const
 Returns a pointer to the maximal polynomial degrees of the inner degree of freedom in the cell quad. More...
 
bool isHangEdge (const concepts::Connector1 &cntr) const
 Returns true, if edge is hanging. More...
 
virtual concepts::Mesh2mesh () const
 Returns mesh. More...
 
uint ncells ()
 Number of cells on the finest level. More...
 
virtual const ushort * pMax (const concepts::Connector2 &cntr, ushort *p=0) const
 Returns a pointer to the maximal polynomial degrees in the cell quad to represent all those basis functions whose support contains quad. More...
 
virtual void rebuildDof ()
 Rebuilds the potential degrees of freedom. More...
 
virtual void rebuildMesh ()
 Rebuilds the mesh due to adjustments, set polynomial degrees in inner degrees of freedom. More...
 
virtual concepts::IndexRangesetIndex (uint &firstIdx, uint noIdx, uint dim, const concepts::Connector &cntr, uint i=0, uint spcNo=0) throw (concepts::NotValidDof)
 Sets the index range of the dof inside cell cntr and returns it. More...
 
virtual void setP (uint p, const concepts::Set< uint > &donts)
 Adjusts all cells with polynomial degree equal to p, which dont have a vertex with attribute equal to one given in the donts set. More...
 
void setPolyEdgeRule (const PolyEdgeRule &rule)
 
void storeMatlab (const std::string name)
 Stores the mesh and degrees of freedoms in a matlab file, ".m" ending is needed. More...
 
virtual bool vtxDof (const concepts::Connector2 &cntr, uint i) const
 Returns, if the i th vertex of cell cntr has a degree of freedom. More...
 
virtual ~hpFull ()
 Destructor. More...
 

Protected Member Functions

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

Protected Attributes

concepts::Mesh2msh_
 Mesh. More...
 

Private Types

typedef concepts::AdaptiveControl< IndexTypeCtrlType_0
 
typedef concepts::AdaptiveControlP< 1, IndexTypeCtrlType_1
 
typedef concepts::AdaptiveControlP< 2, IndexTypeCtrlType_2
 
typedef std::map< uint, concepts::IndexRangeIndexType
 

Private Member Functions

void dependentEdges_ (const concepts::Quad &quad)
 
bool eliminateNonCauses_ (std::queue< Cause > &causes)
 Eliminate two causes of non-local decidability if the two edges are the same or one cause of non-local decidability if another cause exists whose edge is the ancestor. More...
 
template<class F >
void findControl_ (F *&ctrl, const concepts::Connector2 &cntr, uint i)
 Returns pointer to control information ctrl of vertex, edge or inner dof i in cell cntr. More...
 
IndexTypefindIndex_ (uint dim, const concepts::Connector2 &cntr, uint i)
 Returns pointer to index range and control tag of vertex, edge or inner dof i in cell cntr. More...
 
const IndexTypefindIndex_ (uint dim, const concepts::Connector2 &cntr, uint i) const
 
void getEdgeMappings_ (uint key, uint cKey, const concepts::Sequence< const concepts::Connector2 * > &root, concepts::MultiArray< 2, const concepts::Connector2 * > &edgesToCell, std::map< uint, concepts::Sequence< const concepts::Connector2 * > > &edgeToCell, std::map< uint, const concepts::Connector1 * > &fatherEdges, std::map< uint, uint > &mosEdges) const
 Returns. More...
 
template<class F >
bool getEdgeSupport_ (F cntr)
 Collect for each cell those edges, which belong to its support. More...
 
void getNonLocalVertexSupport_ (concepts::HashMap< std::queue< Cause > > &nonLocal, const std::map< uint, concepts::Sequence< const concepts::Connector2 * > > &rootCells)
 Enlarges the supports of non local vertex dof, that means to demark some cells from vertexList_ and to mark the right ancestor cell. More...
 
template<class F >
bool getPretendedVertexSupport_ (F cntr, concepts::HashMap< std::queue< Cause > > &nonLocal)
 Collect for each cell that nodes, which pretend to belong to its support. More...
 
void getRootCells_ (const concepts::Connector2 &cntr, const std::set< uint > &vertices, std::map< uint, concepts::Sequence< const concepts::Connector2 * > > &rootCells)
 Returns the roots of the cell families for the nonlocal vertices. More...
 
bool isMember_ (const concepts::Connector1 &cntr) const
 Returns true, if edge is 'member of space'. More...
 
bool isMember_ (const concepts::Connector2 &cntr) const
 Returns true, if cell is 'member of space'. More...
 
void memberEdges_ (const concepts::Connector2 &cntr, std::set< const concepts::Connector1 * > &edges)
 Collect all edges of cells without children in the set edges and assign the polynomial degree of each edge to minimum of cells where the edge belongs to. More...
 
ushort * pMax_ (const concepts::InfiniteQuad &cntr) const
 
ushort * pMax_ (const concepts::Quad &cntr) const
 
const ushort * pMinInner_ (const concepts::Quad &quad)
 Returns a pointer to the minimal polynomial degrees of the inner degrees in the cell quad and their children. More...
 
void polyDependentEdges_ (const concepts::Quad &quad, const concepts::Edge &edge, const concepts::Edge &oppEdge, const uint p)
 
void polyHangingEdges_ (const concepts::Connector1 &edge, const uint &p)
 Give recursivly edge and its hanging children edges the polynomial degree p in polyHang_. More...
 
void refine_ (concepts::Cell2 &cell, ushort *P, concepts::HashMap< CtrlType_2 >::iterator &i2)
 Method for given the polynomial degrees to children, if the mesh was refined outside of this class. More...
 
void refine_ (concepts::InfiniteQuad2d &cell, concepts::Level< 2 > L, short *P, concepts::HashMap< CtrlType_2 >::iterator &i2)
 
void refine_ (concepts::Quad2d &cell, concepts::Level< 2 > L, short *P, concepts::HashMap< CtrlType_2 >::iterator &i2)
 Method for refinement of mesh and enlargment of polynomial degrees of inner degrees of freedom. More...
 
void setPmax_ (const concepts::Connector2 &cntr, ushort *Pmax)
 
ushort takeOutchildrenEdges_ (const concepts::Connector1 &edge, const concepts::Connector1 &cntr1, std::set< const concepts::Connector1 * > &edges, std::set< const concepts::Connector0 * > &vertices)
 Erase all hanging edges and hanging nodes from the sets edges and vertices and from the control object for edges. More...
 

Private Attributes

concepts::HashMap< concepts::AdaptiveAdjustP< 2 > > adj_
 Hash table of the adjustment information of the elements. More...
 
std::set< concepts::Cell2 * > allCells_
 Set of all cells. More...
 
uint build_
 Number of the build. More...
 
concepts::Set< concepts::Cell2 * > cells_
 Set of cells of finest mesh (without children) More...
 
concepts::HashMap< CtrlType_0ctrl0_
 Hash table of the control information for the vertices. More...
 
concepts::HashMap< CtrlType_1ctrl1_
 Hash table of the control information for the edges. More...
 
concepts::HashMap< CtrlType_2ctrl2_
 Hash table of the control information for the 2D cells. More...
 
concepts::HashMap< std::set< uint > > edgeList_
 Hash table which maps from key of cell to the key of those edges, whose support cell is the cell. More...
 
concepts::Set< uint > hangEdges_
 Keys of hanging edges (with and without children) More...
 
concepts::HashMap< concepts::StiffArray< 2, ushort > > pmax_
 Hash table for polynomial degree in cells to represent all those basis functions whose support contains the cell. More...
 
concepts::HashMap< concepts::StiffArray< 2, ushort > > pminInner_
 Hash table for the polynomial degrees in non 'member of space' cells, which is the minimum of the polynomial degrees of inner degrees of freedom in the cells and in the children. More...
 
concepts::HashMap< ushort > polyDep_
 Hash table for polynomial degree of dependent edges. More...
 
std::unique_ptr< const PolyEdgeRulepolyEdgeRule_
 Rule for defining polynomial degrees on edges. More...
 
concepts::HashMap< ushort > polyHang_
 Hash table for polynomial degree of hanging edges. More...
 
bool rebuild_
 If true: the potential degrees of freedom have to be rebuilt. More...
 
concepts::HashMap< std::set< uint > > vertexList_
 Hash table which maps from key of cell to the key of those vertices, whose support cell is the cell. More...
 

Detailed Description

Helper class for building 2D hp-FEM spaces (space pre builder).

Holds potential degrees of freedom (dof), that are nodes, edges and cells and the latter with maximal polynomial degrees (P > 0).

Adaptivity
You can adaptively refine this space pre builder by using adjust() on some cells to refine them or increase their polynomial degree. Please note that these extensions can be locally varying (ie. non-uniform) and anisotropic.

The adjustment orders are collected and the dof are rebuild when calling rebuildDof().

The degrees of freedoms are distributed to the nodes, edges and cells to have small supports. Hanging nodes and hanging edges don't get dof. The space pre builders fullfills the minimum rule, the maximal polynomial degree (P) on a edge is never larger than P of the inner degrees of freedom (in the direction of the edge) in one of the adjacent cells.

-------— The numbers are maximal vertical polynomial degree | 1 | | for inner dof. The maximal polynomial degree of the --— 2 | long vertical edge in the middle is the minimum, so

| 2 | | P = 1.

On edges we have to distinguish between the maximal polynomial degree of dof, if there are, and the maximal polynomial degree to represent edge dof of larger support. The latter can be the case also for hanging edges.

------------— The numbers are maximal vertical polynomial | 2 | | degree for inner dof. The large vertical edge ------— 2 | in the middle has P = 2 and the vertical edge | 1 | 2 | | between the cells with 1 and 2 has P = 1 ------------— (minimum rule). All the cells are in the support of the basis functions belonging to the large vertical edge. So also the small cell with 1 needs vertical P = 2 to represent the latter basis functions, however there is no dof with P = 2 on the small vertical edge between 1 and 2.

To get information about the dof use vtxDof(), edgeDof() and innerDof().

To get the maximal polynomial degree for representing all basis functions use pMax().

Author
Kersten Schmidt, 2005

Definition at line 168 of file spacePreBuilder.hh.

Member Typedef Documentation

◆ CtrlType_0

◆ CtrlType_1

Definition at line 336 of file spacePreBuilder.hh.

◆ CtrlType_2

Definition at line 338 of file spacePreBuilder.hh.

◆ IndexType

typedef std::map<uint, concepts::IndexRange> hp2D::hpFull::IndexType
private

Definition at line 332 of file spacePreBuilder.hh.

Constructor & Destructor Documentation

◆ hpFull() [1/2]

hp2D::hpFull::hpFull ( concepts::Mesh2 msh,
uint  l = 0,
uint  p = 1,
bool  build = false 
)

Constructor.

◆ hpFull() [2/2]

hp2D::hpFull::hpFull ( const hpFull preBuild)

Copy constructor, the copy contains the same mesh, all information about adjustments and degrees of freedoms are copied.

So h-refinement will be achieved in both pre builders.

◆ ~hpFull()

virtual hp2D::hpFull::~hpFull ( )
inlinevirtual

Destructor.

Definition at line 178 of file spacePreBuilder.hh.

Member Function Documentation

◆ adjust() [1/4]

void hp2D::hpFull::adjust ( const concepts::AdaptiveAdjustP< 2 > &  a)

Adjusts the mesh and polynomial degrees in the next rebuild step for all 'member of space' cell.

Previous adjustment orders are overwritten.

◆ adjust() [2/4]

virtual void hp2D::hpFull::adjust ( const concepts::Connector cell,
const concepts::AdaptiveAdjustP< 2 > &  a 
)
virtual

Adjusts the mesh and polynomial degrees in the next rebuild step for this cell.

Previous adjustment orders are overwritten.

◆ adjust() [3/4]

template<class F = Connector, class Tadj = class AdaptiveAdjust<1>>
virtual void concepts::Adaptivity< F, Tadj >::adjust ( const F &  cell,
const Tadj &  a 
)
pure virtualinherited

Adjusts in the next rebuild step for this cell.

◆ adjust() [4/4]

void hp2D::hpFull::adjust ( const uint  nrCell,
const concepts::AdaptiveAdjustP< 2 > &  a 
)

Adjusts the mesh and polynomial degrees in the next rebuild step for the nrCell th 'member of space' cell.

Previous adjustment orders are overwritten.

◆ allCells()

std::set<concepts::Cell2*> hp2D::hpFull::allCells ( ) const
inline

Returns set of all cells.

Definition at line 315 of file spacePreBuilder.hh.

◆ available()

uint hp2D::hpFull::available ( ) const
inline

Returns 0 if the potential degrees of freedom has to be rebuilt with rebuildDof(), otherwise the number of the build.

This number is useful for a space to decide, wether its available and valid, if the rebuildDof() is called directly and not through space methods.

Definition at line 204 of file spacePreBuilder.hh.

◆ cells()

concepts::Set<concepts::Cell2*> hp2D::hpFull::cells ( ) const
inline

Returns set of 'member of space' cells.

Definition at line 313 of file spacePreBuilder.hh.

◆ clearAllIndices()

void hp2D::hpFull::clearAllIndices ( uint  spcNo = 0)

Resets all to spcNo belonging indices, which were set with setIndex().

◆ dependentEdges_()

void hp2D::hpFull::dependentEdges_ ( const concepts::Quad quad)
private

◆ edgeDof()

virtual ushort hp2D::hpFull::edgeDof ( const concepts::Connector2 cntr,
uint  i 
) const
virtual

Returns the maximal polynomial degree of the degrees of freedom on edge i in the cell cntr.

Return value 0 for no degree of freedom.

Implements hp2D::SpacePreBuilder.

◆ edgeP()

virtual ushort hp2D::hpFull::edgeP ( const concepts::Connector2 cntr,
uint  i 
) const
virtual

Returns the maximal polynomial degree of an edge i in cell cntr, if edge has degrees of freedom or is hanging.

Return value 0 in other case.

Implements hp2D::SpacePreBuilder.

◆ eliminateNonCauses_()

bool hp2D::hpFull::eliminateNonCauses_ ( std::queue< Cause > &  causes)
private

Eliminate two causes of non-local decidability if the two edges are the same or one cause of non-local decidability if another cause exists whose edge is the ancestor.

Returns
if all causes are solved

◆ findControl_()

template<class F >
void hp2D::hpFull::findControl_ ( F *&  ctrl,
const concepts::Connector2 cntr,
uint  i 
)
private

Returns pointer to control information ctrl of vertex, edge or inner dof i in cell cntr.

The type of dof is taken from type of ctrl, i.e. CtrlType_0, CtrlType_1 or CtrlType_2.

◆ findIndex_() [1/2]

IndexType& hp2D::hpFull::findIndex_ ( uint  dim,
const concepts::Connector2 cntr,
uint  i 
)
private

Returns pointer to index range and control tag of vertex, edge or inner dof i in cell cntr.

Throws exception if there is not such a dof.

Parameters
dimdimension of entity of dof, e.g. 0 for node
inumber of the entity in cell, e.g. i.th node

◆ findIndex_() [2/2]

const IndexType& hp2D::hpFull::findIndex_ ( uint  dim,
const concepts::Connector2 cntr,
uint  i 
) const
private

◆ getEdgeMappings_()

void hp2D::hpFull::getEdgeMappings_ ( uint  key,
uint  cKey,
const concepts::Sequence< const concepts::Connector2 * > &  root,
concepts::MultiArray< 2, const concepts::Connector2 * > &  edgesToCell,
std::map< uint, concepts::Sequence< const concepts::Connector2 * > > &  edgeToCell,
std::map< uint, const concepts::Connector1 * > &  fatherEdges,
std::map< uint, uint > &  mosEdges 
) const
private

Returns.

  • for all cells of the cell families for a nonlocal vertex dof a mapping from two in the vertex ending edges to the cell,
  • for all 'member of space' cells of the cell families a mapping from one in the vertex ending 'member of space' edge to the cell, and
  • for all edges of the edge families, except the root edges, a mapping to the father edge, and
  • for all edges in edge families a mapping from key to key of 'member of space' edge in this family
Parameters
keykey of the nonlocal vertex
cKeykey of cell of the cause

◆ getEdgeSupport_()

template<class F >
bool hp2D::hpFull::getEdgeSupport_ ( cntr)
private

Collect for each cell those edges, which belong to its support.

◆ getNonLocalVertexSupport_()

void hp2D::hpFull::getNonLocalVertexSupport_ ( concepts::HashMap< std::queue< Cause > > &  nonLocal,
const std::map< uint, concepts::Sequence< const concepts::Connector2 * > > &  rootCells 
)
private

Enlarges the supports of non local vertex dof, that means to demark some cells from vertexList_ and to mark the right ancestor cell.

◆ getPretendedVertexSupport_()

template<class F >
bool hp2D::hpFull::getPretendedVertexSupport_ ( cntr,
concepts::HashMap< std::queue< Cause > > &  nonLocal 
)
private

Collect for each cell that nodes, which pretend to belong to its support.

◆ getRootCells_()

void hp2D::hpFull::getRootCells_ ( const concepts::Connector2 cntr,
const std::set< uint > &  vertices,
std::map< uint, concepts::Sequence< const concepts::Connector2 * > > &  rootCells 
)
private

Returns the roots of the cell families for the nonlocal vertices.

◆ index()

const concepts::IndexRange& hp2D::hpFull::index ( uint  dim,
const concepts::Connector2 cntr,
uint  i = 0,
uint  spcNo = 0 
) const

Returns the index range of the dof inside cell cntr.

Throws exception if there is not such a dof.

Parameters
dimdimension of entity of dof, e.g. 0 for node
inumber of the entity in cell, e.g. i.th node
spcNonumber for distinguish between global indices on same topological entity

◆ indices()

virtual concepts::Set<concepts::IndexRange> hp2D::hpFull::indices ( uint  dim,
const concepts::Connector cntr,
uint  spcNo = 0 
) const
throw (concepts::MissingFeature
)
virtual

Returns all indices of degrees of freedom of one dimension dim which belong to the cell cntr.

Returns it only, if ...

Parameters
spcNonumber for distinguish between global indices on same topological entity

Implements hp2D::SpacePreBuilder.

◆ info()

virtual std::ostream& hp2D::hpFull::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Reimplemented from concepts::SpacePreBuilder.

◆ innerDof()

virtual const ushort* hp2D::hpFull::innerDof ( const concepts::Connector2 cntr) const
virtual

Returns a pointer to the maximal polynomial degrees of the inner degree of freedom in the cell quad.

Returns value 0 if there are no inner dof (i.e. cell has no children).

Returns
pointer to array with two elements.

Implements hp2D::SpacePreBuilder.

◆ isHangEdge()

bool hp2D::hpFull::isHangEdge ( const concepts::Connector1 cntr) const

Returns true, if edge is hanging.

◆ isMember_() [1/2]

bool hp2D::hpFull::isMember_ ( const concepts::Connector1 cntr) const
private

Returns true, if edge is 'member of space'.

◆ isMember_() [2/2]

bool hp2D::hpFull::isMember_ ( const concepts::Connector2 cntr) const
private

Returns true, if cell is 'member of space'.

◆ memberEdges_()

void hp2D::hpFull::memberEdges_ ( const concepts::Connector2 cntr,
std::set< const concepts::Connector1 * > &  edges 
)
private

Collect all edges of cells without children in the set edges and assign the polynomial degree of each edge to minimum of cells where the edge belongs to.

◆ mesh()

virtual concepts::Mesh2& hp2D::SpacePreBuilder::mesh ( ) const
inlinevirtualinherited

Returns mesh.

Implements concepts::SpacePreBuilder.

Definition at line 45 of file spacePreBuilder.hh.

◆ ncells()

uint hp2D::hpFull::ncells ( )
inline

Number of cells on the finest level.

Definition at line 303 of file spacePreBuilder.hh.

◆ pMax()

virtual const ushort* hp2D::hpFull::pMax ( const concepts::Connector2 cntr,
ushort *  p = 0 
) const
virtual

Returns a pointer to the maximal polynomial degrees in the cell quad to represent all those basis functions whose support contains quad.

Returns value 0, if cell is not in the support of any basis function, e.g. it is too large.

  If \c p is given, the maximum polynomial degree is set to the
  maximum of its previous value and \c p and \c p is takes this
  value as well.

Implements hp2D::SpacePreBuilder.

◆ pMax_() [1/2]

ushort* hp2D::hpFull::pMax_ ( const concepts::InfiniteQuad cntr) const
private

◆ pMax_() [2/2]

ushort* hp2D::hpFull::pMax_ ( const concepts::Quad cntr) const
private

◆ pMinInner_()

const ushort* hp2D::hpFull::pMinInner_ ( const concepts::Quad quad)
private

Returns a pointer to the minimal polynomial degrees of the inner degrees in the cell quad and their children.

◆ polyDependentEdges_()

void hp2D::hpFull::polyDependentEdges_ ( const concepts::Quad quad,
const concepts::Edge edge,
const concepts::Edge oppEdge,
const uint  p 
)
private

◆ polyHangingEdges_()

void hp2D::hpFull::polyHangingEdges_ ( const concepts::Connector1 edge,
const uint &  p 
)
private

Give recursivly edge and its hanging children edges the polynomial degree p in polyHang_.

◆ rebuildDof()

virtual void hp2D::hpFull::rebuildDof ( )
virtual

Rebuilds the potential degrees of freedom.

Calls at beginning rebuildMesh().

Implements concepts::SpacePreBuilder.

◆ rebuildMesh()

virtual void hp2D::hpFull::rebuildMesh ( )
virtual

Rebuilds the mesh due to adjustments, set polynomial degrees in inner degrees of freedom.


Implements concepts::SpacePreBuilder.

◆ refine_() [1/3]

void hp2D::hpFull::refine_ ( concepts::Cell2 cell,
ushort *  P,
concepts::HashMap< CtrlType_2 >::iterator &  i2 
)
private

Method for given the polynomial degrees to children, if the mesh was refined outside of this class.

◆ refine_() [2/3]

void hp2D::hpFull::refine_ ( concepts::InfiniteQuad2d cell,
concepts::Level< 2 >  L,
short *  P,
concepts::HashMap< CtrlType_2 >::iterator &  i2 
)
private

◆ refine_() [3/3]

void hp2D::hpFull::refine_ ( concepts::Quad2d cell,
concepts::Level< 2 >  L,
short *  P,
concepts::HashMap< CtrlType_2 >::iterator &  i2 
)
private

Method for refinement of mesh and enlargment of polynomial degrees of inner degrees of freedom.

◆ setIndex()

virtual concepts::IndexRange& hp2D::hpFull::setIndex ( uint &  firstIdx,
uint  noIdx,
uint  dim,
const concepts::Connector cntr,
uint  i = 0,
uint  spcNo = 0 
)
throw (concepts::NotValidDof
)
virtual

Sets the index range of the dof inside cell cntr and returns it.

Throws exception if there is not such a dof.

Parameters
firstIdxfirst index in range
noIdxnumber of dof on this entity
dimdimension of entity of dof, e.g. 0 for node
cntrtopological cell on arbitrary level
inumber of the entity in cell, e.g. i.th node (not used for inner degrees of freedom)
spcNonumber for distinguish between global indices on same topological entity

Implements hp2D::SpacePreBuilder.

◆ setP()

virtual void hp2D::hpFull::setP ( uint  p,
const concepts::Set< uint > &  donts 
)
virtual

Adjusts all cells with polynomial degree equal to p, which dont have a vertex with attribute equal to one given in the donts set.

applies for given hprefinement on particular cells, which have the same attribute as other cells, s.t. a p-refinement on those cells does not apply.

Parameters
ppolynomial degree to set
dontsset of vertex attributes on which corressponding cells no p refinement should be setted

◆ setPmax_()

void hp2D::hpFull::setPmax_ ( const concepts::Connector2 cntr,
ushort *  Pmax 
)
private

◆ setPolyEdgeRule()

void hp2D::hpFull::setPolyEdgeRule ( const PolyEdgeRule rule)

◆ storeMatlab()

void hp2D::hpFull::storeMatlab ( const std::string  name)

Stores the mesh and degrees of freedoms in a matlab file, ".m" ending is needed.

◆ takeOutchildrenEdges_()

ushort hp2D::hpFull::takeOutchildrenEdges_ ( const concepts::Connector1 edge,
const concepts::Connector1 cntr1,
std::set< const concepts::Connector1 * > &  edges,
std::set< const concepts::Connector0 * > &  vertices 
)
private

Erase all hanging edges and hanging nodes from the sets edges and vertices and from the control object for edges.

Collects the hanging edges without children in the set hangEdges.

◆ vtxDof()

virtual bool hp2D::hpFull::vtxDof ( const concepts::Connector2 cntr,
uint  i 
) const
virtual

Returns, if the i th vertex of cell cntr has a degree of freedom.

Implements hp2D::SpacePreBuilder.

Member Data Documentation

◆ adj_

concepts::HashMap<concepts::AdaptiveAdjustP<2> > hp2D::hpFull::adj_
private

Hash table of the adjustment information of the elements.

Definition at line 329 of file spacePreBuilder.hh.

◆ allCells_

std::set<concepts::Cell2*> hp2D::hpFull::allCells_
private

Set of all cells.

Definition at line 364 of file spacePreBuilder.hh.

◆ build_

uint hp2D::hpFull::build_
private

Number of the build.

Definition at line 324 of file spacePreBuilder.hh.

◆ cells_

concepts::Set<concepts::Cell2*> hp2D::hpFull::cells_
private

Set of cells of finest mesh (without children)

Definition at line 362 of file spacePreBuilder.hh.

◆ ctrl0_

concepts::HashMap<CtrlType_0> hp2D::hpFull::ctrl0_
private

Hash table of the control information for the vertices.

Definition at line 341 of file spacePreBuilder.hh.

◆ ctrl1_

concepts::HashMap<CtrlType_1> hp2D::hpFull::ctrl1_
private

Hash table of the control information for the edges.

Definition at line 343 of file spacePreBuilder.hh.

◆ ctrl2_

concepts::HashMap<CtrlType_2> hp2D::hpFull::ctrl2_
private

Hash table of the control information for the 2D cells.

Definition at line 345 of file spacePreBuilder.hh.

◆ edgeList_

concepts::HashMap<std::set<uint> > hp2D::hpFull::edgeList_
private

Hash table which maps from key of cell to the key of those edges, whose support cell is the cell.

Definition at line 372 of file spacePreBuilder.hh.

◆ hangEdges_

concepts::Set<uint> hp2D::hpFull::hangEdges_
private

Keys of hanging edges (with and without children)

Definition at line 374 of file spacePreBuilder.hh.

◆ msh_

concepts::Mesh2& hp2D::SpacePreBuilder::msh_
protectedinherited

Mesh.

Definition at line 87 of file spacePreBuilder.hh.

◆ pmax_

concepts::HashMap<concepts::StiffArray<2,ushort> > hp2D::hpFull::pmax_
mutableprivate

Hash table for polynomial degree in cells to represent all those basis functions whose support contains the cell.

Definition at line 354 of file spacePreBuilder.hh.

◆ pminInner_

concepts::HashMap<concepts::StiffArray<2,ushort> > hp2D::hpFull::pminInner_
mutableprivate

Hash table for the polynomial degrees in non 'member of space' cells, which is the minimum of the polynomial degrees of inner degrees of freedom in the cells and in the children.

Definition at line 359 of file spacePreBuilder.hh.

◆ polyDep_

concepts::HashMap<ushort> hp2D::hpFull::polyDep_
private

Hash table for polynomial degree of dependent edges.

Definition at line 348 of file spacePreBuilder.hh.

◆ polyEdgeRule_

std::unique_ptr<const PolyEdgeRule> hp2D::hpFull::polyEdgeRule_
private

Rule for defining polynomial degrees on edges.

Definition at line 326 of file spacePreBuilder.hh.

◆ polyHang_

concepts::HashMap<ushort> hp2D::hpFull::polyHang_
private

Hash table for polynomial degree of hanging edges.

Definition at line 350 of file spacePreBuilder.hh.

◆ rebuild_

bool hp2D::hpFull::rebuild_
private

If true: the potential degrees of freedom have to be rebuilt.

Some cells have been marked for refinement or for coarsening.

Definition at line 322 of file spacePreBuilder.hh.

◆ vertexList_

concepts::HashMap<std::set<uint> > hp2D::hpFull::vertexList_
private

Hash table which maps from key of cell to the key of those vertices, whose support cell is the cell.

Definition at line 368 of file spacePreBuilder.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