Class documentation of Concepts

Loading...
Searching...
No Matches

#include <cell3D.hh>

Inheritance diagram for concepts::Hexahedron3d:
concepts::Cell3 concepts::Cell concepts::OutputOperator

Classes

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

Public Types

typedef uint index_type
 

Public Member Functions

 Hexahedron3d (Hexahedron &cntr, const MappingHexahedron3d &map)
 
virtual Hexahedron3dchild (uint i)
 
virtual const Hexahedron3dchild (uint i) const
 
Hexahedronconnector () const
 Returns the connector.
 
Real3d chi (Real xi, Real eta, Real zeta) const
 
Real3d elemMap (const Real3d &coord_local) const
 Element map from point local coordinates in 3D.
 
MapReal3d jacobian (const Real xi, const Real eta, const Real zeta) const
 
MapReal3d jacobian (const concepts::Real3d &p) const
 
MapReal3d hessian (const uint i, const Real xi, const Real eta, const Real zeta) const
 
MapReal3d hessian (const uint i, const concepts::Real3d &p) const
 
MapReal3d jacobianInverse (const Real xi, const Real eta, const Real zeta) const
 
Real jacobianDeterminant (const Real xi, const Real eta, const Real zeta) const
 
const Level< 3 > & level () const
 Returns the level of the cell.
 
Real3d vertex (uint i) const
 Returns the coordinates of the ith vertex.
 
Real3d center () const
 Returns the center of the cell.
 
const MappingHexahedron3dmap () const
 Returns the element map.
 
MappingQuad3dfaceMap (uint face) const
 
void setStrategy (const Hex3dSubdivision *strategy=0)
 
const Hex3dSubdivisiongetStrategy () const
 
bool hasChildren () const
 Returns true if there is a least one child.
 
virtual Real3d elemMap (const Real coord_local) const
 Element map from point local coordinates in 1D.
 
virtual Real3d elemMap (const Real2d &coord_local) const
 Element map from point local coordinates in 2D.
 

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

class Hex3dSubdivision
 
class Hex3dSubdiv8
 
class Hex3dSubdiv2x
 
class Hex3dSubdiv2y
 
class Hex3dSubdiv2z
 
class Hex3dSubdiv4x
 
class Hex3dSubdiv4y
 
class Hex3dSubdiv4z
 
std::ostream & operator<< (std::ostream &os, const Hexahedron3d::Index &i)
 

Detailed Description

A 3D cell: hexahedron. This cell contains a reference to the topological information of the hexahedron in cntr_. If a hexahedron is subdivided, two, four or eight new hexahedra are created. This happens automatically, if a child is requested, depending on the strategy that has been set.

The faces of the hexahedron have the following local coordinates in the element:

  • face 0 (bottom): z = 0
  • face 1 (front): y = 0
  • face 2 (right): x = 1
  • face 3 (back): y = 1
  • face 4 (left): x = 0
  • face 5 (top): z = 1
Examples
meshes.cc.

Definition at line 317 of file cell3D.hh.

Member Typedef Documentation

◆ index_type

typedef uint concepts::Hexahedron3d::index_type

Definition at line 333 of file cell3D.hh.

Constructor & Destructor Documentation

◆ Hexahedron3d()

concepts::Hexahedron3d::Hexahedron3d ( Hexahedron cntr,
const MappingHexahedron3d map 
)

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

Parameters
cntrTopological information of the hexadron
mapElement map of the hexahedron

Member Function Documentation

◆ center()

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

Returns the center of the cell.

Implements concepts::Cell3.

Definition at line 456 of file cell3D.hh.

◆ chi()

Real3d concepts::Hexahedron3d::chi ( Real  xi,
Real  eta,
Real  zeta 
) const

The element map. Maps a point from the unit cube $[0,1]^3$ onto the element.

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

◆ child() [1/2]

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

Returns a pointer to the ith child. Children are created if they do not already exist.

Implements concepts::Cell3.

◆ child() [2/2]

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

Returns a pointer to the ith child. Children are not created if they do not already exist, instead 0 is returned.

Implements concepts::Cell3.

◆ connector()

Hexahedron & concepts::Hexahedron3d::connector ( ) const
inlinevirtual

Returns the connector.

Implements concepts::Cell3.

Definition at line 382 of file cell3D.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::SphericalSurface3d, concepts::Sphere3d, concepts::Edge1d, and concepts::Edge2d.

◆ elemMap() [2/3]

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

◆ elemMap() [3/3]

Real3d concepts::Hexahedron3d::elemMap ( const Real3d coord_local) const
inlinevirtual

Element map from point local coordinates in 3D.

Reimplemented from concepts::Cell.

Definition at line 394 of file cell3D.hh.

◆ faceMap()

MappingQuad3d * concepts::Hexahedron3d::faceMap ( uint  face) const

Returns the mapping of a face. Constructs a cell for a face of this Hexahedron.

◆ getStrategy()

const Hex3dSubdivision * concepts::Hexahedron3d::getStrategy ( ) const
inline

Returns the subdivision strategy of this hexahedron

If you want to find check against another strategy use

hex.getStrategy() == Hex3dSubdiv4x::instance()

Definition at line 485 of file cell3D.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::Hexahedron3d::info ( std::ostream &  os) const
protectedvirtual

Returns information in an output stream.

Implements concepts::Cell.

◆ jacobian()

MapReal3d concepts::Hexahedron3d::jacobian ( const Real  xi,
const Real  eta,
const Real  zeta 
) const

Computes the Jacobian for xi, eta, zeta $\in [0,1]$. The Jacobian of a cell in the initial mesh is computed by the element map. The Jacobian of a subdivided cell is computed as follows. Let $H : \hat K \rightarrow \hat K'$ be the subdivision map in the reference coordinates (0,1)3 and $F_K : \hat K \rightarrow K$, $F_{K'} : \hat K \rightarrow K'$ the element maps of K and K' respectively. Then,

\[F_K : \hat K' \rightarrow K' \quad \text{and} \quad
F_K \circ H = F_{K'}. \]

The subdivision map H in reference coordinates is

\[H : \vec\xi \mapsto
\begin{pmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{pmatrix}
\vec \xi \]

where $a = 2^{-l_0}$, $b = 2^{-l_1}$, $c = 2^{-l_2}$ $\vec l = (l_0, l_1, l_2)$ is the level of the cell with respect to the cell in the initial mesh. The derivative of H is $dH = \begin{pmatrix} a & 0 & 0 \\ 0 & b & 0 \\
0 & 0 & c \end{pmatrix}$.

Then, the Jacobian of $F_{K'}$ is

\[dF_{K'} = dF_K \circ H \cdot dH. \]

The part $dF_K \circ H$ (without H) is computed by the element map and the part $\cdot dH$ is computed in jacobian().

◆ jacobianDeterminant()

Real concepts::Hexahedron3d::jacobianDeterminant ( const Real  xi,
const Real  eta,
const Real  zeta 
) const
inline

Returns the determinant of the Jacobian for xi, eta, zeta $\in [0,1]$

Definition at line 447 of file cell3D.hh.

◆ jacobianInverse()

MapReal3d concepts::Hexahedron3d::jacobianInverse ( const Real  xi,
const Real  eta,
const Real  zeta 
) const
inline

Returns the inverse of the Jacobian for xi, eta, zeta $\in [0,1]$

Definition at line 439 of file cell3D.hh.

◆ level()

const Level< 3 > & concepts::Hexahedron3d::level ( ) const
inline

Returns the level of the cell.

Definition at line 453 of file cell3D.hh.

◆ map()

const MappingHexahedron3d * concepts::Hexahedron3d::map ( ) const
inline

Returns the element map.

Definition at line 459 of file cell3D.hh.

◆ setStrategy()

void concepts::Hexahedron3d::setStrategy ( const Hex3dSubdivision strategy = 0)

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 or the topological strategy is set).

◆ vertex()

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

Returns the coordinates of the ith vertex.

Implements concepts::Cell3.

Friends And Related Symbol Documentation

◆ Hex3dSubdiv2x

Definition at line 320 of file cell3D.hh.

◆ Hex3dSubdiv2y

Definition at line 321 of file cell3D.hh.

◆ Hex3dSubdiv2z

Definition at line 322 of file cell3D.hh.

◆ Hex3dSubdiv4x

Definition at line 323 of file cell3D.hh.

◆ Hex3dSubdiv4y

Definition at line 324 of file cell3D.hh.

◆ Hex3dSubdiv4z

Definition at line 325 of file cell3D.hh.

◆ Hex3dSubdiv8

Definition at line 319 of file cell3D.hh.

◆ Hex3dSubdivision

Definition at line 318 of file cell3D.hh.

Member Data Documentation

◆ MAX_LEVEL

uint concepts::Hexahedron3d::MAX_LEVEL
static

Definition at line 337 of file cell3D.hh.


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