A 3D cell: triangle. More...

#include <cell2D.hh>

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

Classes

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

Public Types

typedef uint index_type
 

Public Member Functions

Real3d center () const
 Returns the center of the cell. More...
 
Real3d chi (Real xi, Real eta) const
 The element map. More...
 
virtual Triangle3dchild (uint i)
 Returns a child. More...
 
virtual const Triangle3dchild (uint i) const
 Returns a child. More...
 
Triangle3dclone (Triangle &cntr, MapTriangle3d *map) const
 Returns a copy of itself. More...
 
Triangleconnector () const
 Returns the triangle connector (topology) More...
 
virtual Real3d elemMap (const Real coord_local) const
 Element map from point local coordinates in 1D. More...
 
Real3d elemMap (const Real2d &coord_local) const
 Element map from point local coordinates in 2D. More...
 
virtual Real3d elemMap (const Real3d &coord_local) const
 Element map from point local coordinates in 3D. More...
 
bool hasChildren () const
 Returns true if there is a least one child. More...
 
const MapTriangle3dmap () const
 Returns the element map. More...
 
 Triangle3d (Triangle &cntr, const MapTriangle3d &map)
 Constructor. More...
 
Real3d vertex (uint i) const
 Returns the coordinates of the ith vertex. More...
 
virtual ~Triangle3d ()
 

Static Public Attributes

static uint MAX_LEVEL
 

Protected Member Functions

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

Private Member Functions

 Triangle3d (Triangle &cntr, MapTriangle3d *map, const Index &key)
 Private constructor. More...
 

Private Attributes

Triangle3dchld_
 Pointer to the first child. More...
 
Trianglecntr_
 Reference to the triangle connector (topology) More...
 
Index idx_
 Index of this element. More...
 
Triangle3dlnk_
 Pointer to a sibling. More...
 
MapTriangle3dmap_
 Pointer to the element map. More...
 

Friends

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

Detailed Description

A 3D cell: triangle.

If a triangle is subdivided, four new children are created.

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

Definition at line 719 of file cell2D.hh.

Member Typedef Documentation

◆ index_type

Definition at line 727 of file cell2D.hh.

Constructor & Destructor Documentation

◆ Triangle3d() [1/2]

concepts::Triangle3d::Triangle3d ( Triangle cntr,
const MapTriangle3d map 
)

Constructor.

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

Parameters
cntrTopological information of the triangle
mapElement map of this triangle

◆ ~Triangle3d()

virtual concepts::Triangle3d::~Triangle3d ( )
virtual

◆ Triangle3d() [2/2]

concepts::Triangle3d::Triangle3d ( Triangle cntr,
MapTriangle3d map,
const Index key 
)
private

Private constructor.

Member Function Documentation

◆ center()

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

Returns the center of the cell.

Implements concepts::Cell2.

Definition at line 796 of file cell2D.hh.

◆ chi()

Real3d concepts::Triangle3d::chi ( Real  xi,
Real  eta 
) const

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).

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

◆ child() [1/2]

virtual Triangle3d* concepts::Triangle3d::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 Triangle3d* concepts::Triangle3d::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()

Triangle3d* concepts::Triangle3d::clone ( Triangle cntr,
MapTriangle3d map 
) const
inline

Returns a copy of itself.

Definition at line 802 of file cell2D.hh.

◆ connector()

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

Returns the triangle connector (topology)

Implements concepts::Cell2.

Definition at line 779 of file cell2D.hh.

◆ 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::Edge2d, concepts::Edge1d, concepts::Sphere3d, and concepts::SphericalSurface3d.

◆ elemMap() [2/3]

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

Element map from point local coordinates in 2D.

Implements concepts::Cell2.

Definition at line 790 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::Triangle3d::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Implements concepts::Cell.

◆ map()

const MapTriangle3d* concepts::Triangle3d::map ( ) const
inline

Returns the element map.

Definition at line 799 of file cell2D.hh.

◆ vertex()

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

Returns the coordinates of the ith vertex.

Implements concepts::Cell2.

Friends And Related Function Documentation

◆ operator<<

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

Member Data Documentation

◆ chld_

Triangle3d* concepts::Triangle3d::chld_
private

Pointer to the first child.

The children are stored in a linked list.

Definition at line 819 of file cell2D.hh.

◆ cntr_

Triangle& concepts::Triangle3d::cntr_
private

Reference to the triangle connector (topology)

Definition at line 811 of file cell2D.hh.

◆ idx_

Index concepts::Triangle3d::idx_
private

Index of this element.

Definition at line 808 of file cell2D.hh.

◆ lnk_

Triangle3d* concepts::Triangle3d::lnk_
private

Pointer to a sibling.

Definition at line 814 of file cell2D.hh.

◆ map_

MapTriangle3d* concepts::Triangle3d::map_
private

Pointer to the element map.

Definition at line 822 of file cell2D.hh.

◆ MAX_LEVEL

uint concepts::Triangle3d::MAX_LEVEL
static

Definition at line 731 of file cell2D.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