linearFEM::Linear2d Class Referenceabstract
Space for linear triangular and bilinear quadrilateral FEM in 2D. More...
#include <space2D.hh>
Public Types | |
typedef concepts::Scan< Element > | Scan |
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 SMap & | S (uint i) const |
Returns the ith S matrix. More... | |
virtual Scan * | scan () const |
virtual Scanner * | scan () 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::BoundaryConditions * | bc_ |
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::Mesh2 & | msh_ |
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.
Definition at line 44 of file space2D.hh.
Member Typedef Documentation
◆ Scan
Definition at line 46 of file space2D.hh.
◆ Scanner
|
inherited |
◆ SMap
typedef void(* linearFEM::Linear2d::SMap) (const concepts::TColumn< Real > &, concepts::TColumn< Real > &) |
Definition at line 47 of file space2D.hh.
◆ type
|
inherited |
Constructor & Destructor Documentation
◆ Linear2d()
linearFEM::Linear2d::Linear2d | ( | concepts::Mesh2 & | msh, |
uint | level, | ||
concepts::BoundaryConditions * | bc = 0 |
||
) |
Constructor.
- Parameters
-
msh Mesh level Number levels for initial refinement bc Boundary conditions
◆ ~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
-
elm Element to refine level Number of refinements
◆ deactivate_()
|
private |
Deactives children of this edge and the new vertex.
◆ dim() [1/2]
|
inlinevirtual |
Definition at line 58 of file space2D.hh.
◆ dim() [2/2]
|
pure virtualinherited |
Returns the dimension of the space.
Implemented in concepts::SpaceOnCells< Real >, concepts::DummySpace< Real >, hp2D::hpAdaptiveSpace< Real >, hp3D::Space, hp2Dedge::Space, hp2D::Space, hp2D::hpAdaptiveSpace< Real >, and hp1D::Space.
◆ getOutputDimension()
|
inlinevirtualinherited |
◆ info()
|
protectedvirtual |
Reimplemented from concepts::Space< Real >.
◆ nelm() [1/2]
|
inlinevirtual |
Definition at line 59 of file space2D.hh.
◆ nelm() [2/2]
|
pure virtualinherited |
Returns the number of elements in the space.
Implemented in concepts::SpaceOnCells< Real >, concepts::DummySpace< Real >, hp2D::hpAdaptiveSpace< Real >, hp3D::Space, hp2Dedge::Space, hp2D::Space, hp2D::hpAdaptiveSpace< Real >, and hp1D::Space.
◆ rebuild()
void linearFEM::Linear2d::rebuild | ( | ) |
Rebuilds the space.
◆ rebuild0_()
|
private |
Determines maximal level and sets control information.
rebuild0_
is called recursively.
- Parameters
-
cntr Support of the element l Current level L Maximal level
◆ rebuild1_() [1/2]
|
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
-
cell Cell of the element T0 T columns from element on a higher level
◆ rebuild1_() [2/2]
|
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
-
cell Cell of the element T0 T 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 |
◆ S1()
|
static |
◆ S2()
|
static |
◆ S3()
|
static |
◆ scan() [1/2]
|
virtual |
◆ scan() [2/2]
|
pure virtualinherited |
Returns a scanner to iterate over the elements of the space.
Implemented in concepts::SpaceOnCells< Real >, concepts::DummySpace< Real >, hp2D::hpAdaptiveSpace< Real >, hp3D::Space, hp2Dedge::Space, hp2D::Space, hp2D::hpAdaptiveSpace< Real >, and hp1D::Space.
Member Data Documentation
◆ adj_
|
private |
Adjustements (ie. level changes) for the elements.
Definition at line 103 of file space2D.hh.
◆ bc_
|
private |
Boundary conditions.
Definition at line 99 of file space2D.hh.
◆ ctrl0_
|
private |
Control information for vertices: active, member of space, valid index.
Definition at line 105 of file space2D.hh.
◆ ctrl0L_
|
private |
Level information for vertices.
Definition at line 107 of file space2D.hh.
◆ ctrl1_
|
private |
Control information for edges: active, member of space.
Definition at line 109 of file space2D.hh.
◆ ctrl1L_
|
private |
Level information for edges.
Definition at line 111 of file space2D.hh.
◆ ctrl2_
|
private |
Control information for elements.
Definition at line 113 of file space2D.hh.
◆ dim_
|
private |
Number of degrees of freedom.
Definition at line 91 of file space2D.hh.
◆ dof_
|
private |
Degree of freedom map.
Definition at line 115 of file space2D.hh.
◆ elm_
|
private |
List of elements.
Definition at line 101 of file space2D.hh.
◆ msh_
|
private |
Mesh which this space is based on.
Definition at line 97 of file space2D.hh.
◆ nelm_
|
private |
Number of elements.
Definition at line 93 of file space2D.hh.
◆ rebuild_
|
private |
Flag for rebuilding the space.
Definition at line 95 of file space2D.hh.
◆ S_
|
staticprivate |
Definition at line 117 of file space2D.hh.
The documentation for this class was generated from the following file:
- linearFEM/space2D.hh