A tetrahedron in the topology. More...

#include <topology3D.hh>

Inheritance diagram for concepts::Tetrahedron:
concepts::Connector3 concepts::Connector concepts::OutputOperator

Public Member Functions

const Attributeattrib () const
 Returns the attribute of the connector. More...
 
virtual const Tetrahedronchild (uint i) const
 
virtual Tetrahedronchild (uint i, bool mode=0)
 Returns a child. More...
 
Edgeedge (uint i) const
 Returns a 1D component: edge. More...
 
Triangleface (uint i) const
 Returns a 2D component: face. More...
 
const Keykey () const
 Returns the key of the connector. More...
 
int operator== (const Connector &cntr) const
 Comparison operator. More...
 
int related (const Connector &conn) const
 Checks if this connector is related to conn. More...
 
int rho (int i) const
 Returns the orientation of a face. More...
 
void setAttrib (uint attrb)
 
int tau (int i) const
 Returns the rotation of a face. More...
 
 Tetrahedron (Triangle &tri0, Triangle &tri1, Triangle &tri2, Triangle &tri3, Attribute attrib=Attribute())
 Constructor. More...
 
Vertexvertex (uint i) const
 Returns a 0D component: vertex A 3D element consists of 2D, 1D and 0D elements, the vertices can be queried here. More...
 
virtual ~Tetrahedron ()
 

Protected Member Functions

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

Protected Attributes

Attribute attrib_
 Attribute. More...
 
Key key_
 Unique key of the connector. More...
 

Static Protected Attributes

static uint cnt_
 Counter for the connectors. More...
 

Private Attributes

Tetrahedronchld_
 Pointer to the first child. More...
 
Tetrahedronlnk_
 Pointer to a sibling. More...
 
Z2 rho_ [4]
 Array of the orientation flags for the triangles. More...
 
Z3 tau_ [4]
 Array of the rotation flags for the triangles. More...
 
Triangletri_ [4]
 Array of triangles. More...
 

Detailed Description

A tetrahedron in the topology.

Implements the abstract methods from the parent classes to query the children, the vertices, the edges and faces of the tetrahedron.

Every face can have two different orientations in the tetrahedron (this is stored in the array rho – similar to the orientation of an edge in a triangle or quadrilateral, see geo_Triangle or qeo_Quadrilateral) and it can have three possible rotations (enumerating the vertices), stored in the array tau_.

Author
Philipp Frauenfelder, 2000

Definition at line 35 of file topology3D.hh.

Constructor & Destructor Documentation

◆ Tetrahedron()

concepts::Tetrahedron::Tetrahedron ( Triangle tri0,
Triangle tri1,
Triangle tri2,
Triangle tri3,
Attribute  attrib = Attribute() 
)

Constructor.

Creates a tetrahedron out of four triangles. The faces must form a tetrahedron.

The first triangle is thought to be the floor of the tetrahedron and its normal orientation is right screwed into the tetrahedron. The normal orientation of the other three triangles (forming the walls of the tetrahedron) is right screwed out of the tetrahedron.

The walls of the tetrahedron must be given in the proper order: they must follow the normal orientation of the floor.

Parameters
tri0Floor of the tetrahedron
tri1..tri3Walls of the tetrahedron
attribAttribute of the tetrahedron

◆ ~Tetrahedron()

virtual concepts::Tetrahedron::~Tetrahedron ( )
virtual

Member Function Documentation

◆ attrib()

const Attribute& concepts::Connector::attrib ( ) const
inlineinherited

Returns the attribute of the connector.

Definition at line 108 of file connector.hh.

◆ child() [1/2]

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

Implements concepts::Connector3.

◆ child() [2/2]

virtual Tetrahedron* concepts::Tetrahedron::child ( uint  i,
bool  mode = 0 
)
virtual

Returns a child.

If children are created, eight new children are created (with the same attributes as this one). All faces of the tetrahedron are refined and one new edge is introduced. This gives one new tetrahedron per vertex and one per face.

Parameters
iIndex of the child to be returned.
modemode = 1: No children are created
mode = 0: If no childs exist, eight new children are created.

Implements concepts::Connector3.

◆ edge()

Edge* concepts::Tetrahedron::edge ( uint  i) const
virtual

Returns a 1D component: edge.

A 3D element consists of 2D, 1D and 0D elements, the edges can be queried here.

Parameters
iIndex of the edge

Implements concepts::Connector3.

◆ face()

Triangle* concepts::Tetrahedron::face ( uint  i) const
inlinevirtual

Returns a 2D component: face.

A 3D element consists of 2D, 1D and 0D elements, the faces can be queried here.

Parameters
iIndex of the face

Implements concepts::Connector3.

Definition at line 73 of file topology3D.hh.

◆ info()

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

Returns information in an output stream.

Reimplemented from concepts::Connector.

◆ key()

const Key& concepts::Connector::key ( ) const
inlineinherited

Returns the key of the connector.

Definition at line 105 of file connector.hh.

◆ operator==()

int concepts::Connector::operator== ( const Connector cntr) const
inlineinherited

Comparison operator.

Definition at line 102 of file connector.hh.

◆ related()

int concepts::Connector::related ( const Connector conn) const
inherited

Checks if this connector is related to conn.

It is being checked if one of the two is an ancestor of the other.

Parameters
connOther connector
Returns
An integer i.
i=0 if there is no relationship or the connectors are identical
i>0 if conn is an ancestor of this connector
i<0 if conn is a descendant of this connector
|i| gives the number of generations between the connectors

◆ rho()

int concepts::Tetrahedron::rho ( int  i) const
inline

Returns the orientation of a face.

See the description of rho_.

Parameters
iIndex of the face

Definition at line 79 of file topology3D.hh.

◆ setAttrib()

void concepts::Connector::setAttrib ( uint  attrb)
inlineinherited

Definition at line 111 of file connector.hh.

◆ tau()

int concepts::Tetrahedron::tau ( int  i) const
inline

Returns the rotation of a face.

See the description of tau_.

Parameters
iIndex of the face

Definition at line 85 of file topology3D.hh.

◆ vertex()

Vertex* concepts::Tetrahedron::vertex ( uint  i) const
virtual

Returns a 0D component: vertex A 3D element consists of 2D, 1D and 0D elements, the vertices can be queried here.

Parameters
iIndex of the vertex

Implements concepts::Connector3.

Member Data Documentation

◆ attrib_

Attribute concepts::Connector::attrib_
protectedinherited

Attribute.

Definition at line 132 of file connector.hh.

◆ chld_

Tetrahedron* concepts::Tetrahedron::chld_
private

Pointer to the first child.

The children are stored in a linked list.

Definition at line 92 of file topology3D.hh.

◆ cnt_

uint concepts::Connector3::cnt_
staticprotectedinherited

Counter for the connectors.

This counter is used to create the unique key of the connector.

Definition at line 322 of file connector.hh.

◆ key_

Key concepts::Connector::key_
protectedinherited

Unique key of the connector.

Definition at line 129 of file connector.hh.

◆ lnk_

Tetrahedron* concepts::Tetrahedron::lnk_
private

Pointer to a sibling.

Definition at line 95 of file topology3D.hh.

◆ rho_

Z2 concepts::Tetrahedron::rho_[4]
private

Array of the orientation flags for the triangles.

  • 0 indicates that the triangle has its normal orientation
  • 1 indicates that the triangle does not have its normal orientation

Definition at line 113 of file topology3D.hh.

◆ tau_

Z3 concepts::Tetrahedron::tau_[4]
private

Array of the rotation flags for the triangles.

tau_[0] gives the edge in the floor triangle which points to the first wall triangle. tau_[i] for i=1,2,3 gives the edge in the respective triangle which points to the predecessor.

Definition at line 105 of file topology3D.hh.

◆ tri_

Triangle* concepts::Tetrahedron::tri_[4]
private

Array of triangles.

Definition at line 98 of file topology3D.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