A 2D cell: triangle. More...
#include <cell2D.hh>


Classes | |
| struct | Index |
| Subclass of Triangle2d representing its index. More... | |
Public Member Functions | |
| Real | area () const |
| Returns the area of the element. | |
| Real3d | center () const |
| Returns the center of the cell. | |
| Real2d | chi (Real xi, Real eta) const |
| Evaluates the element map. | |
| virtual const Triangle2d * | child (uint i) const |
| Returns a child. | |
| virtual Triangle2d * | child (uint i) |
| Returns a child. | |
| Triangle2d * | clone (Triangle &cntr, MappingTriangle2d *map) const |
| Returns a copy of itself. | |
| Triangle & | connector () const |
| Returns the triangle connector (topology) | |
| virtual Real3d | elemMap (const Real3d &coord_local) const |
| Element map from point local coordinates in 3D. | |
| Real3d | elemMap (const Real2d &coord_local) const |
| Element map from point local coordinates in 2D. | |
| 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. | |
| MapReal2d | jacobian (Real x, Real y) const |
| Returns the Jacobian in a 2D linear map. | |
| Real | jacobianDeterminant (const Real x, const Real y) const |
| Returns determinant of the Jacobian. | |
| MapReal2d | jacobianInverse (const Real x, const Real y) const |
| Returns the inverse of the Jacobian in a 2D linear map. | |
| ushort | level () const |
| Returns the level of the cell. | |
| const MappingTriangle2d * | map () const |
| Returns the element map. | |
| Triangle2d (Triangle &cntr, const MappingTriangle2d &map) | |
| Constructor. | |
| Real3d | vertex (uint i) const |
| Returns the coordinates of the ith vertex. | |
| virtual | ~Triangle2d () |
Static Public Member Functions | |
| static Real2d | duffyInv (const Real2d &x) |
Maps coordinates from to to use them in chi. | |
Protected Member Functions | |
| virtual std::ostream & | info (std::ostream &os) const |
| Returns information in an output stream. | |
Private Member Functions | |
| Triangle2d (Triangle &cntr, MappingTriangle2d *map, const Index &idx) | |
| Private constructor. | |
Private Attributes | |
| Triangle2d * | chld_ |
| Pointer to the first child. | |
| Triangle & | cntr_ |
| Reference to the triangle connector (topology) | |
| Index | idx_ |
| Index of this element. | |
| Triangle2d * | lnk_ |
| Pointer to a sibling. | |
| MappingTriangle2d * | map_ |
| Pointer to the element map. | |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Triangle2d::Index &i) |
A 2D cell: triangle.
If a triangle is subdivided, four new children are created.
| concepts::Triangle2d::Triangle2d | ( | Triangle & | cntr, |
| const MappingTriangle2d & | map | ||
| ) |
Constructor.
Takes the connector cntr and the element map map and creates a cell.
| cntr | Topological information of the triangle |
| map | Element map of the triangle |
| virtual concepts::Triangle2d::~Triangle2d | ( | ) | [virtual] |
| concepts::Triangle2d::Triangle2d | ( | Triangle & | cntr, |
| MappingTriangle2d * | map, | ||
| const Index & | idx | ||
| ) | [private] |
Private constructor.
| Real concepts::Triangle2d::area | ( | ) | const |
Returns the area of the element.
| Real3d concepts::Triangle2d::center | ( | ) | const [inline, virtual] |
Returns the center of the cell.
Implements concepts::Cell2.
Definition at line 128 of file cell2D.hh.

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.
| xi | |
| eta | |
| 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.
| i | Index of the child to be returned. |
Implements concepts::Cell2.
| virtual const Triangle2d* concepts::Triangle2d::child | ( | uint | i | ) | const [virtual] |
Returns a child.
If no children exist, none are created and 0 is returned.
| i | Index of the child to be returned. |
Implements concepts::Cell2.
| Triangle2d* concepts::Triangle2d::clone | ( | Triangle & | cntr, |
| MappingTriangle2d * | map | ||
| ) | const [inline] |
| Triangle& concepts::Triangle2d::connector | ( | ) | const [inline, virtual] |
Returns the triangle connector (topology)
Implements concepts::Cell2.
Maps coordinates from
to
to use them in chi.
| virtual Real3d concepts::Cell2::elemMap | ( | const Real3d & | coord_local | ) | const [inline, virtual, inherited] |
Element map from point local coordinates in 3D.
Reference element is 2D, third component is omitted.
Reimplemented from concepts::Cell.
Definition at line 100 of file cell.hh.

Element map from point local coordinates in 1D.
Reimplemented in concepts::Edge1d, and concepts::Edge2d.
Element map from point local coordinates in 2D.
Implements concepts::Cell2.
Definition at line 97 of file cell2D.hh.

| bool concepts::Cell::hasChildren | ( | ) | const [inline, inherited] |
Returns true if there is a least one child.
Reimplemented in concepts::Quad2d, and concepts::InfiniteRect2d.
Definition at line 48 of file cell.hh.

| virtual std::ostream& concepts::Triangle2d::info | ( | std::ostream & | os | ) | const [protected, virtual] |
Returns information in an output stream.
Implements concepts::Cell.
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
into the physical coordinates but not the map from
to
.
| x | |
| y | |
Returns determinant of the Jacobian.
Returns the inverse of the Jacobian in a 2D linear map.
| ushort concepts::Triangle2d::level | ( | ) | const [inline] |
| const MappingTriangle2d* concepts::Triangle2d::map | ( | ) | const [inline] |
| Real3d concepts::Triangle2d::vertex | ( | uint | i | ) | const [virtual] |
Returns the coordinates of the ith vertex.
Implements concepts::Cell2.
| std::ostream& operator<< | ( | std::ostream & | os, |
| const Triangle2d::Index & | i | ||
| ) | [friend] |
Triangle2d* concepts::Triangle2d::chld_ [private] |
Triangle& concepts::Triangle2d::cntr_ [private] |
Index concepts::Triangle2d::idx_ [private] |
Triangle2d* concepts::Triangle2d::lnk_ [private] |
MappingTriangle2d* concepts::Triangle2d::map_ [private] |