A hexahedron in the topology. More...

#include <topology3D.hh>

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

Public Member Functions

const Attributeattrib () const
 Returns the attribute of the connector. More...
 
virtual const Hexahedronchild (uint i) const
 
virtual Hexahedronchild (uint i, bool mode=0)
 Returns a child. More...
 
Edgeedge (uint i) const
 Returns a 1D component: edge. More...
 
Quadface (uint i) const
 Returns a 2D component: face. More...
 
const HexSubdivisiongetStrategy () const
 Returns the subdivision strategy of this quad. More...
 
 Hexahedron (Quad &quad0, Quad &quad1, Quad &quad2, Quad &quad3, Quad &quad4, Quad &quad5, const Attribute attrib=Attribute())
 Constructor. 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...
 
Z2 rho (int i) const
 Returns the orientation of a face. More...
 
void setAttrib (uint attrb)
 
void setStrategy (const HexSubdivision *strategy=0) throw (StrategyChange)
 Sets the subdivision strategy of this hexahedron. More...
 
Z4 tau (int i) const
 Returns the rotation of a face. 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 ~Hexahedron ()
 

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

Hexahedronchld_
 Pointer to the first child. More...
 
Hexahedronlnk_
 Pointer to a sibling. More...
 
Quadquad_ [6]
 Array of quadrilaterals. More...
 
Z2 rho_ [6]
 Array of the orientation flags for the quadrilaterals. More...
 
const HexSubdivisionsubdivStrategy_
 NOTE: You have to look at the Hexahedron like this, where the numbering are the quads. More...
 
Z4 tau_ [6]
 Array of the rotation flags for the quadrilaterals. More...
 

Friends

class HexSubdiv2x
 
class HexSubdiv2y
 
class HexSubdiv2z
 
class HexSubdiv4x
 
class HexSubdiv4y
 
class HexSubdiv4z
 
class HexSubdiv8
 

Detailed Description

A hexahedron in the topology.

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

Every face can have two different orientations in the hexahedron (this is stored in the array rho_ – similar to the orientation of an edge in a triangle or quadrilateral, see Triangle or Quad) and it can have four possible rotations (enumerating the vertices).

See also
Triangle
Quad
Author
Philipp Frauenfelder, 2000
Examples
meshes.cc.

Definition at line 134 of file topology3D.hh.

Constructor & Destructor Documentation

◆ Hexahedron()

concepts::Hexahedron::Hexahedron ( Quad quad0,
Quad quad1,
Quad quad2,
Quad quad3,
Quad quad4,
Quad quad5,
const Attribute  attrib = Attribute() 
)

Constructor.

Creates a hexahedron out of six quadrilaterals. The faces must form a hexahedron.

The first quadrilateral is thought to be the floor of the hexahedron and its normal orientation is right screwed into the hexahedron. The normal orientation of the four walls is right screwed out of the hexahedron. The normal orientation of the last quadrilateral (the ceiling) is right screwed into the hexahedron.

The walls of the hexahedron (quadrilaterals 1 to 4) must be given in the proper order: they must follow the normal orientation of the floor.

Parameters
quad0Floor of the hexahedron
quad1..quad4Walls of the hexahedron
quad5Ceiling of the hexahedron
attribAttribute of the hexahedron

◆ ~Hexahedron()

virtual concepts::Hexahedron::~Hexahedron ( )
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 Hexahedron* concepts::Hexahedron::child ( uint  i) const
virtual

Implements concepts::Connector3.

◆ child() [2/2]

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

Returns a child.

If children are created, all faces of the hexahedron are refined and one new edge is introduced. This gives one new hexahedron 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::Hexahedron::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()

Quad* concepts::Hexahedron::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 182 of file topology3D.hh.

◆ getStrategy()

const HexSubdivision* concepts::Hexahedron::getStrategy ( ) const
inline

Returns the subdivision strategy of this quad.

If you want to find check against another strategy use

quad.getStrategy() == QuadSubdiv2V::instance()

Definition at line 216 of file topology3D.hh.

◆ info()

virtual std::ostream& concepts::Hexahedron::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()

Z2 concepts::Hexahedron::rho ( int  i) const
inline

Returns the orientation of a face.

See the description of rho_.

Parameters
iIndex of the face

Definition at line 188 of file topology3D.hh.

◆ setAttrib()

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

Definition at line 111 of file connector.hh.

◆ setStrategy()

void concepts::Hexahedron::setStrategy ( const HexSubdivision strategy = 0)
throw (StrategyChange
)

Sets the subdivision strategy of this hexahedron.

If the parameter is set to 0 (or if the method is called without parameter) the strategy is set to the default (if not already set). The default subdivision strategy is subdivision into 8 children.

  @param strategy Pointer to an instance of a subdivision strategy.
Exceptions
StrategyChangeif the change is not allowed (the change is not allowed if there are children present)

◆ tau()

Z4 concepts::Hexahedron::tau ( int  i) const
inline

Returns the rotation of a face.

See the description of tau_.

Parameters
iIndex of the face

Definition at line 193 of file topology3D.hh.

◆ vertex()

Vertex* concepts::Hexahedron::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.

Friends And Related Function Documentation

◆ HexSubdiv2x

friend class HexSubdiv2x
friend

Definition at line 136 of file topology3D.hh.

◆ HexSubdiv2y

friend class HexSubdiv2y
friend

Definition at line 137 of file topology3D.hh.

◆ HexSubdiv2z

friend class HexSubdiv2z
friend

Definition at line 138 of file topology3D.hh.

◆ HexSubdiv4x

friend class HexSubdiv4x
friend

Definition at line 139 of file topology3D.hh.

◆ HexSubdiv4y

friend class HexSubdiv4y
friend

Definition at line 140 of file topology3D.hh.

◆ HexSubdiv4z

friend class HexSubdiv4z
friend

Definition at line 141 of file topology3D.hh.

◆ HexSubdiv8

friend class HexSubdiv8
friend

Definition at line 135 of file topology3D.hh.

Member Data Documentation

◆ attrib_

Attribute concepts::Connector::attrib_
protectedinherited

Attribute.

Definition at line 132 of file connector.hh.

◆ chld_

Hexahedron* concepts::Hexahedron::chld_
private

Pointer to the first child.

The children are stored in a linked list.

Definition at line 223 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_

Hexahedron* concepts::Hexahedron::lnk_
private

Pointer to a sibling.

Definition at line 226 of file topology3D.hh.

◆ quad_

Quad* concepts::Hexahedron::quad_[6]
private

Array of quadrilaterals.

Definition at line 229 of file topology3D.hh.

◆ rho_

Z2 concepts::Hexahedron::rho_[6]
private

Array of the orientation flags for the quadrilaterals.

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

Definition at line 249 of file topology3D.hh.

◆ subdivStrategy_

const HexSubdivision* concepts::Hexahedron::subdivStrategy_
private

NOTE: You have to look at the Hexahedron like this, where the numbering are the quads.

    ____ ____
   | 1  | 0  |
   |____|____|
   | 2  |
   |____|
   | 3  |

____|____| | 5 | 4 | |____|____|

Rho and Tau specify the common edge, with orientation, one then has to turn and flip the quad to get the 0th edge in line with the unitvector in x (x,y;x,z) or y (y,z) direction. (ordering x<y<z) to have a working physical map on the baundary. For that to use properly there is a coordinate Transformation routine. Subdivision strategy for the hexahedron

Definition at line 267 of file topology3D.hh.

◆ tau_

Z4 concepts::Hexahedron::tau_[6]
private

Array of the rotation flags for the quadrilaterals.

tau_[0] gives the edge in the floor quadrilateral pointing to the first wall quadrilateral. tau_[i] for i=1,2,3,4 gives the edge in the respective quadrilateral which points to its predecessor. tau_[5] gives the edge in the ceiling quadrilateral pointing to the first wall quadrilateral.

Definition at line 239 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