Builds the trace space of an FE space. More...

#include <traces.hh>

Inheritance diagram for hp2D::TraceSpace:
concepts::SpaceOnCells< Real > concepts::Space< Real >

Public Types

typedef concepts::Scan< hp1D::BaseElement< Real > > Scan
 
typedef Scan< ElementWithCell< Real > > Scanner
 
enum  traceTypes { FIRST, MEAN, JUMP }
 
typedef ElementWithCell< Real > type
 
typedef concepts::ElementAndFacette< hp2D::Element< Real > > UnderlyingElement
 

Public Member Functions

virtual uint dim () const
 
virtual uint dim () const=0
 Returns the dimension of the space. More...
 
virtual uint getOutputDimension () const
 Returns the default output dimension, when we consider plotting a real-valued operator on this space. More...
 
virtual uint nelm () const
 Returns the number of elements in the space. More...
 
virtual uint nelm () const=0
 Returns the number of elements in the space. More...
 
virtual void recomputeShapefunctions ()
 Recompute shape functions, e.g. More...
 
virtual Scanscan () const
 Returns a scanner to iterate over the elements of the space. More...
 
virtual Scannerscan () const=0
 Returns a scanner to iterate over the elements of the space. More...
 
 TraceSpace (concepts::SpaceOnCells< Real > &spc, const concepts::CellConditions *cc=0, enum traceTypes type=FIRST, const concepts::EdgeNormalVectorRule normalVectorRule=concepts::EdgeNormalVectorRule())
 Constructor. More...
 
 TraceSpace (const concepts::SpaceOnCells< Real > &spc, const concepts::CellConditions *cc=0, enum traceTypes type=FIRST, const concepts::EdgeNormalVectorRule normalVectorRule=concepts::EdgeNormalVectorRule())
 
 TraceSpace (const concepts::SpaceOnCells< Real > &spc, const concepts::Set< uint > edgeAttr, enum traceTypes type=FIRST, const concepts::EdgeNormalVectorRule &normalVectorRule=concepts::EdgeNormalVectorRule())
 Constructor. More...
 
const concepts::HashMap< concepts::Sequence< UnderlyingElement > > uelm () const
 Returns the mapping from the key of (topological) edge to the underlying 2D elements. More...
 
const concepts::Sequence< UnderlyingElementuelm (const concepts::Edge edge) const
 Returns the underlying 2D elements. More...
 
virtual ~TraceSpace ()
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 

Private Member Functions

template<class F >
bool build_ (const Quad< Real > *elm, F condition)
 Builds elements for the edges w.r.t. More...
 
void constructType_ (enum traceTypes type, const concepts::EdgeNormalVectorRule &normalVectorRule)
 
template<class F >
void test_ (const concepts::ElementWithCell< Real > &elm, F condition)
 Test if not implemented elements have edges w.r.t. More...
 

Private Attributes

const uint dim_
 Dimension of the FE space. More...
 
concepts::HashMap< hp1D::Element< Real > * > edges_
 Map from key of (topological) edge to the element. More...
 
concepts::Joiner< hp1D::BaseElement< Real > *, 1 > * elm_
 Linked list of the elements. More...
 
uint nelm_
 Number of elements currently active in the mesh. More...
 
std::unique_ptr< QuadEdgeBasequadEdge_
 
concepts::HashMap< concepts::Sequence< UnderlyingElement > > uelm_
 Map from key of (topological) edge to the underlying 2D elements. More...
 
bool warn_edgeBuildMissElem_
 

Detailed Description

Builds the trace space of an FE space.

The elements are from type hp2D::Edge.

One can restrict the trace operation by cell conditions.

If the FE space is rebuild, one has to construct the trace space again.

Additonally a map from the topological edge to the set of the underlying elements is stored.

Author
Kersten Schmidt, 2007
Examples
BGT_0.cc, elasticity2D_tutorial.cc, exactDtN.cc, inhomDirichletBCsLagrange.cc, inhomNeumannBCs.cc, and RobinBCs.cc.

Definition at line 52 of file traces.hh.

Member Typedef Documentation

◆ Scan

Definition at line 54 of file traces.hh.

◆ Scanner

typedef Scan<ElementWithCell<Real > > concepts::SpaceOnCells< Real >::Scanner
inherited

Definition at line 84 of file space.hh.

◆ type

typedef ElementWithCell<Real > concepts::SpaceOnCells< Real >::type
inherited

Definition at line 83 of file space.hh.

◆ UnderlyingElement

Member Enumeration Documentation

◆ traceTypes

Enumerator
FIRST 
MEAN 
JUMP 

Definition at line 57 of file traces.hh.

Constructor & Destructor Documentation

◆ TraceSpace() [1/3]

hp2D::TraceSpace::TraceSpace ( const concepts::SpaceOnCells< Real > &  spc,
const concepts::Set< uint >  edgeAttr,
enum traceTypes  type = FIRST,
const concepts::EdgeNormalVectorRule normalVectorRule = concepts::EdgeNormalVectorRule() 
)

Constructor.

Parameters
spcunderlying space
edgeAttrset of edge attributes

◆ TraceSpace() [2/3]

hp2D::TraceSpace::TraceSpace ( concepts::SpaceOnCells< Real > &  spc,
const concepts::CellConditions cc = 0,
enum traceTypes  type = FIRST,
const concepts::EdgeNormalVectorRule  normalVectorRule = concepts::EdgeNormalVectorRule() 
)

Constructor.

Parameters
spcunderlying space
ccbuild trace space w.r.t. cell conditions

If no cell conditions are given, the trace to all edges in the mesh is taken.

◆ TraceSpace() [3/3]

hp2D::TraceSpace::TraceSpace ( const concepts::SpaceOnCells< Real > &  spc,
const concepts::CellConditions cc = 0,
enum traceTypes  type = FIRST,
const concepts::EdgeNormalVectorRule  normalVectorRule = concepts::EdgeNormalVectorRule() 
)

◆ ~TraceSpace()

virtual hp2D::TraceSpace::~TraceSpace ( )
virtual

Member Function Documentation

◆ build_()

template<class F >
bool hp2D::TraceSpace::build_ ( const Quad< Real > *  elm,
condition 
)
private

Builds elements for the edges w.r.t.

to condition of the element elm, if it is a hp2D::Quad.

◆ constructType_()

void hp2D::TraceSpace::constructType_ ( enum traceTypes  type,
const concepts::EdgeNormalVectorRule normalVectorRule 
)
private

◆ dim() [1/2]

virtual uint hp2D::TraceSpace::dim ( ) const
inlinevirtual

Definition at line 91 of file traces.hh.

◆ dim() [2/2]

virtual uint concepts::SpaceOnCells< Real >::dim ( ) const
pure virtualinherited

◆ getOutputDimension()

virtual uint concepts::Space< Real >::getOutputDimension ( ) const
inlinevirtualinherited

Returns the default output dimension, when we consider plotting a real-valued operator on this space.

Definition at line 50 of file space.hh.

◆ info()

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

Reimplemented from concepts::SpaceOnCells< Real >.

◆ nelm() [1/2]

virtual uint hp2D::TraceSpace::nelm ( ) const
inlinevirtual

Returns the number of elements in the space.

Definition at line 94 of file traces.hh.

◆ nelm() [2/2]

virtual uint concepts::SpaceOnCells< Real >::nelm ( ) const
pure virtualinherited

Returns the number of elements in the space.

Implements concepts::Space< Real >.

Implemented in hp2D::hpAdaptiveSpace< Real >, hp3D::Space, hp2Dedge::Space, hp2D::Space, hp2D::hpAdaptiveSpace< Real >, and hp1D::Space.

◆ recomputeShapefunctions()

virtual void hp2D::TraceSpace::recomputeShapefunctions ( )
virtual

Recompute shape functions, e.g.

for other abscissas redefined through setIntegrationRule

◆ scan() [1/2]

virtual Scan* hp2D::TraceSpace::scan ( ) const
inlinevirtual

Returns a scanner to iterate over the elements of the space.

Examples
inhomDirichletBCsLagrange.cc.

Definition at line 97 of file traces.hh.

◆ scan() [2/2]

virtual Scanner* concepts::SpaceOnCells< Real >::scan ( ) const
pure virtualinherited

Returns a scanner to iterate over the elements of the space.

Implements concepts::Space< Real >.

Implemented in hp2D::hpAdaptiveSpace< Real >, hp3D::Space, hp2Dedge::Space, hp2D::Space, hp2D::hpAdaptiveSpace< Real >, and hp1D::Space.

◆ test_()

template<class F >
void hp2D::TraceSpace::test_ ( const concepts::ElementWithCell< Real > &  elm,
condition 
)
private

Test if not implemented elements have edges w.r.t.

to condition and throws an exception in that case.

◆ uelm() [1/2]

const concepts::HashMap<concepts::Sequence<UnderlyingElement> > hp2D::TraceSpace::uelm ( ) const
inline

Returns the mapping from the key of (topological) edge to the underlying 2D elements.

Definition at line 117 of file traces.hh.

◆ uelm() [2/2]

const concepts::Sequence<UnderlyingElement> hp2D::TraceSpace::uelm ( const concepts::Edge  edge) const
inline

Returns the underlying 2D elements.

Definition at line 104 of file traces.hh.

Member Data Documentation

◆ dim_

const uint hp2D::TraceSpace::dim_
private

Dimension of the FE space.

Definition at line 130 of file traces.hh.

◆ edges_

concepts::HashMap<hp1D::Element<Real>* > hp2D::TraceSpace::edges_
private

Map from key of (topological) edge to the element.

Definition at line 142 of file traces.hh.

◆ elm_

concepts::Joiner<hp1D::BaseElement<Real>*, 1>* hp2D::TraceSpace::elm_
private

Linked list of the elements.

Definition at line 136 of file traces.hh.

◆ nelm_

uint hp2D::TraceSpace::nelm_
private

Number of elements currently active in the mesh.

Definition at line 133 of file traces.hh.

◆ quadEdge_

std::unique_ptr<QuadEdgeBase> hp2D::TraceSpace::quadEdge_
private

Definition at line 144 of file traces.hh.

◆ uelm_

concepts::HashMap<concepts::Sequence<UnderlyingElement> > hp2D::TraceSpace::uelm_
private

Map from key of (topological) edge to the underlying 2D elements.

Definition at line 139 of file traces.hh.

◆ warn_edgeBuildMissElem_

bool hp2D::TraceSpace::warn_edgeBuildMissElem_
private

Definition at line 146 of file traces.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