Space for linear triangular and bilinear quadrilateral FEM in 2D. More...

#include <space2D.hh>

Inheritance diagram for linearFEM::Linear2d:
concepts::Space< Real >

Public Types

typedef concepts::Scan< ElementScan
 
typedef Scan< Element< Real > > Scanner
 
typedef void(* SMap) (const concepts::TColumn< Real > &, concepts::TColumn< Real > &)
 
typedef Element< Real > type
 

Public Member Functions

void adjust (const Quad &elm, const short level)
 Adjusts an element in the space. More...
 
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...
 
 Linear2d (concepts::Mesh2 &msh, uint level, concepts::BoundaryConditions *bc=0)
 Constructor. More...
 
virtual uint nelm () const
 
virtual uint nelm () const=0
 Returns the number of elements in the space. More...
 
void rebuild ()
 Rebuilds the space. More...
 
const SMapS (uint i) const
 Returns the ith S matrix. More...
 
virtual Scanscan () const
 
virtual Scannerscan () const=0
 Returns a scanner to iterate over the elements of the space. More...
 
virtual ~Linear2d ()
 

Static Public Member Functions

static void S0 (const concepts::TColumn< Real > &src, concepts::TColumn< Real > &dst)
 
static void S1 (const concepts::TColumn< Real > &src, concepts::TColumn< Real > &dst)
 
static void S2 (const concepts::TColumn< Real > &src, concepts::TColumn< Real > &dst)
 
static void S3 (const concepts::TColumn< Real > &src, concepts::TColumn< Real > &dst)
 

Protected Member Functions

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

Private Member Functions

void deactivate_ (concepts::Connector1 &edg)
 Deactives children of this edge and the new vertex. More...
 
void rebuild0_ (concepts::Connector2 &cntr, const int l, int &L)
 Determines maximal level and sets control information. More...
 
void rebuild1_ (concepts::Quad2d &cell, concepts::TColumn< Real > *T0=0)
 Builds the elements for quads. More...
 
void rebuild1_ (concepts::Triangle2d &cell, concepts::TColumn< Real > *T0=0)
 Builds the elements for triangles. More...
 

Private Attributes

std::unordered_map< uint, short > adj_
 Adjustements (ie. level changes) for the elements. More...
 
concepts::BoundaryConditionsbc_
 Boundary conditions. More...
 
std::unordered_map< uint, short > ctrl0_
 Control information for vertices: active, member of space, valid index. More...
 
std::unordered_map< uint, short > ctrl0L_
 Level information for vertices. More...
 
std::unordered_map< uint, short > ctrl1_
 Control information for edges: active, member of space. More...
 
std::unordered_map< uint, short > ctrl1L_
 Level information for edges. More...
 
std::unordered_map< uint, short > ctrl2_
 Control information for elements. More...
 
uint dim_
 Number of degrees of freedom. More...
 
std::unordered_map< uint, uint > dof_
 Degree of freedom map. More...
 
concepts::Joiner< Element *, 1 > * elm_
 List of elements. More...
 
concepts::Mesh2msh_
 Mesh which this space is based on. More...
 
uint nelm_
 Number of elements. More...
 
bool rebuild_
 Flag for rebuilding the space. More...
 

Static Private Attributes

static SMap S_ [4]
 

Detailed Description

Space for linear triangular and bilinear quadrilateral FEM in 2D.

Author
Philipp Frauenfelder, 2002

Definition at line 44 of file space2D.hh.

Member Typedef Documentation

◆ Scan

Definition at line 46 of file space2D.hh.

◆ Scanner

typedef Scan<Element<Real > > concepts::Space< Real >::Scanner
inherited

Definition at line 47 of file space.hh.

◆ SMap

typedef void(* linearFEM::Linear2d::SMap) (const concepts::TColumn< Real > &, concepts::TColumn< Real > &)

Definition at line 47 of file space2D.hh.

◆ type

typedef Element<Real > concepts::Space< Real >::type
inherited

Definition at line 46 of file space.hh.

Constructor & Destructor Documentation

◆ Linear2d()

linearFEM::Linear2d::Linear2d ( concepts::Mesh2 msh,
uint  level,
concepts::BoundaryConditions bc = 0 
)

Constructor.

Parameters
mshMesh
levelNumber levels for initial refinement
bcBoundary conditions

◆ ~Linear2d()

virtual linearFEM::Linear2d::~Linear2d ( )
virtual

Member Function Documentation

◆ adjust()

void linearFEM::Linear2d::adjust ( const Quad elm,
const short  level 
)

Adjusts an element in the space.

Only quads have S matrices, therefore, only quads can be refined.

Parameters
elmElement to refine
levelNumber of refinements

◆ deactivate_()

void linearFEM::Linear2d::deactivate_ ( concepts::Connector1 edg)
private

Deactives children of this edge and the new vertex.

◆ dim() [1/2]

virtual uint linearFEM::Linear2d::dim ( ) const
inlinevirtual

Definition at line 58 of file space2D.hh.

◆ dim() [2/2]

virtual uint concepts::Space< 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& linearFEM::Linear2d::info ( std::ostream &  os) const
protectedvirtual

Reimplemented from concepts::Space< Real >.

◆ nelm() [1/2]

virtual uint linearFEM::Linear2d::nelm ( ) const
inlinevirtual

Definition at line 59 of file space2D.hh.

◆ nelm() [2/2]

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

◆ rebuild()

void linearFEM::Linear2d::rebuild ( )

Rebuilds the space.

◆ rebuild0_()

void linearFEM::Linear2d::rebuild0_ ( concepts::Connector2 cntr,
const int  l,
int &  L 
)
private

Determines maximal level and sets control information.

rebuild0_ is called recursively.

Parameters
cntrSupport of the element
lCurrent level
LMaximal level

◆ rebuild1_() [1/2]

void linearFEM::Linear2d::rebuild1_ ( concepts::Quad2d cell,
concepts::TColumn< Real > *  T0 = 0 
)
private

Builds the elements for quads.

This routine assigns degress of freedom to vertices, creates T matrices, applies S matrices. rebuild1_ is called recursively.

Parameters
cellCell of the element
T0T columns from element on a higher level

◆ rebuild1_() [2/2]

void linearFEM::Linear2d::rebuild1_ ( concepts::Triangle2d cell,
concepts::TColumn< Real > *  T0 = 0 
)
private

Builds the elements for triangles.

This routines assigns degress of freedom to vertices, creates T matrices. rebuild1_ is called recursively.

Precondition
T0 is 0 as there are no S matrices for triangles up to now.
Todo:
S matrices for triangles
Parameters
cellCell of the element
T0T columns from element on a higher level

◆ S()

const SMap& linearFEM::Linear2d::S ( uint  i) const

Returns the ith S matrix.

The S matrices are used for the irregular refinement of a mesh. An S matrix is independent of the geometry but it depends on the topological relation of the children with the parent: the bottom left child has a different S matrix than the top right etc.

◆ S0()

static void linearFEM::Linear2d::S0 ( const concepts::TColumn< Real > &  src,
concepts::TColumn< Real > &  dst 
)
static

◆ S1()

static void linearFEM::Linear2d::S1 ( const concepts::TColumn< Real > &  src,
concepts::TColumn< Real > &  dst 
)
static

◆ S2()

static void linearFEM::Linear2d::S2 ( const concepts::TColumn< Real > &  src,
concepts::TColumn< Real > &  dst 
)
static

◆ S3()

static void linearFEM::Linear2d::S3 ( const concepts::TColumn< Real > &  src,
concepts::TColumn< Real > &  dst 
)
static

◆ scan() [1/2]

virtual Scan* linearFEM::Linear2d::scan ( ) const
virtual

◆ scan() [2/2]

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

Member Data Documentation

◆ adj_

std::unordered_map<uint, short> linearFEM::Linear2d::adj_
private

Adjustements (ie. level changes) for the elements.

Definition at line 103 of file space2D.hh.

◆ bc_

concepts::BoundaryConditions* linearFEM::Linear2d::bc_
private

Boundary conditions.

Definition at line 99 of file space2D.hh.

◆ ctrl0_

std::unordered_map<uint, short> linearFEM::Linear2d::ctrl0_
private

Control information for vertices: active, member of space, valid index.

Definition at line 105 of file space2D.hh.

◆ ctrl0L_

std::unordered_map<uint, short> linearFEM::Linear2d::ctrl0L_
private

Level information for vertices.

Definition at line 107 of file space2D.hh.

◆ ctrl1_

std::unordered_map<uint, short> linearFEM::Linear2d::ctrl1_
private

Control information for edges: active, member of space.

Definition at line 109 of file space2D.hh.

◆ ctrl1L_

std::unordered_map<uint, short> linearFEM::Linear2d::ctrl1L_
private

Level information for edges.

Definition at line 111 of file space2D.hh.

◆ ctrl2_

std::unordered_map<uint, short> linearFEM::Linear2d::ctrl2_
private

Control information for elements.

Definition at line 113 of file space2D.hh.

◆ dim_

uint linearFEM::Linear2d::dim_
private

Number of degrees of freedom.

Definition at line 91 of file space2D.hh.

◆ dof_

std::unordered_map<uint, uint> linearFEM::Linear2d::dof_
private

Degree of freedom map.

Definition at line 115 of file space2D.hh.

◆ elm_

concepts::Joiner<Element*, 1>* linearFEM::Linear2d::elm_
private

List of elements.

Definition at line 101 of file space2D.hh.

◆ msh_

concepts::Mesh2& linearFEM::Linear2d::msh_
private

Mesh which this space is based on.

Definition at line 97 of file space2D.hh.

◆ nelm_

uint linearFEM::Linear2d::nelm_
private

Number of elements.

Definition at line 93 of file space2D.hh.

◆ rebuild_

bool linearFEM::Linear2d::rebuild_
private

Flag for rebuilding the space.

Definition at line 95 of file space2D.hh.

◆ S_

SMap linearFEM::Linear2d::S_[4]
staticprivate

Definition at line 117 of file space2D.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