Class documentation of Concepts

Loading...
Searching...
No Matches

#include <cell2D.hh>

Inheritance diagram for concepts::Triangle2d:
concepts::Cell2 concepts::Cell concepts::OutputOperator

Classes

struct  Index
 Subclass of Triangle2d representing its index. More...
 

Public Types

typedef uint index_type
 

Public Member Functions

 Triangle2d (Triangle &cntr, const MappingTriangle2d &map)
 
virtual Triangle2dchild (uint i)
 
virtual const Triangle2dchild (uint i) const
 
Triangleconnector () const
 Returns the triangle connector (topology)
 
ushort level () const
 
Real2d chi (Real xi, Real eta) const
 
Real3d elemMap (const Real2d &coord_local) const
 Element map from point local coordinates in 2D.
 
Real jacobianDeterminant (const Real x, const Real y) const
 
MapReal2d jacobian (Real x, Real y) const
 
Real area () const
 Returns the area of the element.
 
MapReal2d jacobianInverse (const Real x, const Real y) const
 
Real3d vertex (uint i) const
 Returns the coordinates of the ith vertex.
 
Real3d center () const
 Returns the center of the cell.
 
const MappingTriangle2dmap () const
 Returns the element map.
 
Triangle2dclone (Triangle &cntr, MappingTriangle2d *map) const
 Returns a copy of itself.
 
virtual Real3d elemMap (const Real3d &coord_local) const
 
virtual Real3d elemMap (const Real coord_local) const
 Element map from point local coordinates in 1D.
 
bool hasChildren () const
 Returns true if there is a least one child.
 

Static Public Member Functions

static Real2d duffyInv (const Real2d &x)
 

Static Public Attributes

static uint MAX_LEVEL
 

Protected Member Functions

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

Friends

std::ostream & operator<< (std::ostream &os, const Triangle2d::Index &i)
 

Detailed Description

A 2D cell: triangle. If a triangle is subdivided, four new children are created.

See also
Cell for more information on cells in a mesh.
Examples
meshes.cc.

Definition at line 31 of file cell2D.hh.

Member Typedef Documentation

◆ index_type

typedef uint concepts::Triangle2d::index_type

Definition at line 39 of file cell2D.hh.

Constructor & Destructor Documentation

◆ Triangle2d()

concepts::Triangle2d::Triangle2d ( Triangle cntr,
const MappingTriangle2d map 
)

Constructor. Takes the connector cntr and the element map map and creates a cell.

Parameters
cntrTopological information of the triangle
mapElement map of the triangle

Member Function Documentation

◆ center()

Real3d concepts::Triangle2d::center ( ) const
inlinevirtual

Returns the center of the cell.

Implements concepts::Cell2.

Definition at line 143 of file cell2D.hh.

◆ chi()

Real2d concepts::Triangle2d::chi ( Real  xi,
Real  eta 
) const

Evaluates the element map. Maps a corner from the unit square [0,1]2 onto the element. The three vertices are (0, 0), (1, 0) and (1, 1). If you already have coordinates in the triangle, use duffyInv.

Returns
Point in 2D in physical coordinates.
Parameters
xi$\in [0,1]$
eta$\in [0,1]$

◆ child() [1/2]

virtual Triangle2d * concepts::Triangle2d::child ( uint  i)
virtual

Returns a child. If no children exist, four new children are created. The triangle is cut into four new triangles by joining the midpoints of its edges.

Parameters
iIndex of the child to be returned.

Implements concepts::Cell2.

◆ child() [2/2]

virtual const Triangle2d * concepts::Triangle2d::child ( uint  i) const
virtual

Returns a child. If no children exist, none are created and 0 is returned.

Parameters
iIndex of the child to be returned.

Implements concepts::Cell2.

◆ clone()

Triangle2d * concepts::Triangle2d::clone ( Triangle cntr,
MappingTriangle2d map 
) const
inline

Returns a copy of itself.

Definition at line 148 of file cell2D.hh.

◆ connector()

Triangle & concepts::Triangle2d::connector ( ) const
inlinevirtual

Returns the triangle connector (topology)

Implements concepts::Cell2.

Definition at line 91 of file cell2D.hh.

◆ duffyInv()

static Real2d concepts::Triangle2d::duffyInv ( const Real2d x)
static

Maps coordinates from $\{(\xi,\eta) : 0 \leq \eta \leq \xi \leq 1\}$ to $[0,1]^2$ to use them in chi.

◆ elemMap() [1/3]

virtual Real3d concepts::Cell::elemMap ( const Real  coord_local) const
virtualinherited

Element map from point local coordinates in 1D.

Reimplemented in concepts::SphericalSurface3d, concepts::Sphere3d, concepts::Edge1d, and concepts::Edge2d.

◆ elemMap() [2/3]

Real3d concepts::Triangle2d::elemMap ( const Real2d coord_local) const
inlinevirtual

Element map from point local coordinates in 2D.

Implements concepts::Cell2.

Definition at line 112 of file cell2D.hh.

◆ elemMap() [3/3]

virtual Real3d concepts::Cell2::elemMap ( const Real3d coord_local) const
inlinevirtualinherited

Element map from point local coordinates in 3D

Reference element is 2D, third component is omitted.

Reimplemented from concepts::Cell.

Definition at line 104 of file cell.hh.

◆ hasChildren()

bool concepts::Cell::hasChildren ( ) const
inlineinherited

Returns true if there is a least one child.

Definition at line 50 of file cell.hh.

◆ info()

virtual std::ostream & concepts::Triangle2d::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Implements concepts::Cell.

◆ jacobian()

MapReal2d concepts::Triangle2d::jacobian ( Real  x,
Real  y 
) const

Returns the Jacobian in a 2D linear map. The input is a point from [0,1]2, the output is the Jacobian of the map at the given point. The Jacobian includes the map from $T = \{(\xi,\eta) : 0 \leq \eta \leq \xi \leq 1\}$ into the physical coordinates but not the map from $[0,1]^2$ to $T$.

Parameters
x$\in [0,1]$
y$\in [0,1]$

◆ jacobianDeterminant()

Real concepts::Triangle2d::jacobianDeterminant ( const Real  x,
const Real  y 
) const

Returns determinant of the Jacobian.

See also
jacobian

◆ jacobianInverse()

MapReal2d concepts::Triangle2d::jacobianInverse ( const Real  x,
const Real  y 
) const

Returns the inverse of the Jacobian in a 2D linear map

See also
jacobian

◆ level()

ushort concepts::Triangle2d::level ( ) const
inline

Returns the level of the cell. The level describes the refinements in both directions with respect to the parent cell in the initial mesh. This level information is taken into account when evaluating the element map or the Jacobian.

Definition at line 98 of file cell2D.hh.

◆ map()

const MappingTriangle2d * concepts::Triangle2d::map ( ) const
inline

Returns the element map.

Definition at line 145 of file cell2D.hh.

◆ vertex()

Real3d concepts::Triangle2d::vertex ( uint  i) const
virtual

Returns the coordinates of the ith vertex.

Implements concepts::Cell2.

Member Data Documentation

◆ MAX_LEVEL

uint concepts::Triangle2d::MAX_LEVEL
static

Definition at line 43 of file cell2D.hh.


The documentation for this class was generated from the following file: