Class documentation of Concepts

Loading...
Searching...
No Matches

#include <cell2D.hh>

Inheritance diagram for concepts::Quad3d:
concepts::QuadNd concepts::Cell2 concepts::Cell concepts::OutputOperator

Public Types

typedef uint index_type
 

Public Member Functions

 Quad3d (Quad &cntr, const MappingQuad3d &map, const Z2 dir=0)
 
virtual Quad3dchild (uint i)
 
virtual const Quad3dchild (uint i) const
 
bool hasChildren () const
 
Real3d chi (Real xi, Real eta) const
 
Real3d elemMap (const Real2d &coord_local) const
 Element map from point local coordinates in 2D.
 
Real3d jacobianColumn (uint i, const Real xi, const Real eta) const
 
Real faceElement (const Real xi, const Real eta) const
 
virtual Real gramDeterminantRoot (const Real xi, const Real eta) const
 
virtual Real lineElement (const Real xi, const uint edge) const
 
Real3d n0 (Real xi, Real eta) const
 
Real3d vertex (uint i) const
 Returns the coordinates of the ith vertex.
 
Real3d center () const
 Returns the center of the cell.
 
const MappingQuad3dmap () const
 
Quad3dclone (Quad &cntr, MappingQuad3d *map) const
 Returns a copy of itself.
 
virtual uint dim () const
 
Z2 dir () const
 
Quadconnector () const
 Returns the quadrilateral connector (topology)
 
Level< 2 > level () const
 
virtual Real3d elemMap (const Real3d &coord_local) const
 
virtual Real3d elemMap (const Real coord_local) const
 Element map from point local coordinates in 1D.
 

Static Public Attributes

static uint MAX_LEVEL
 

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.
 
Quad3dcreateChild_ (Quad &cntr, const Index &idx, bool flag) const
 

Protected Attributes

MappingQuad3dmap_
 Pointer to the element map.
 
Quadcntr_
 Reference to the quadrilateral connector (topology)
 
Index idx_
 Index of this element.
 

Detailed Description

A quadrilateral cell in 3D.

If a quad is subdivided, two or four new quads are created. This happens automatically, if a child is requested, depending on the strategy that has been set. If two or four children are created depends on the chosen strategy. The default strategy is the create four children.

The directions of the edges in the quadrilateral on the coarsest level are externally defined, see Quad::rho(). The edges of quadrilaterals which are created by subdivision are always counter-clockwise.

Definition at line 849 of file cell2D.hh.

Member Typedef Documentation

◆ index_type

typedef uint concepts::QuadNd::index_type
inherited

Definition at line 194 of file cell2D.hh.

Constructor & Destructor Documentation

◆ Quad3d()

concepts::Quad3d::Quad3d ( Quad cntr,
const MappingQuad3d map,
const Z2  dir = 0 
)

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

Parameters
cntrTopological information of the quadrilateral
mapElement map of the quadrilateral
dirDirection of the normal vector when looking at the quad from the side that the counterclockwise orientation of the nodes can be seen (dir = 0: normal points back to the point of view, dir = 1: normal points in view direction).

Member Function Documentation

◆ center()

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

Returns the center of the cell.

Implements concepts::Cell2.

Definition at line 946 of file cell2D.hh.

◆ chi()

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

Evaluates the element map. Maps a point from the the reference coordinates in [0,1]2 onto the physical coordinates.

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

◆ child() [1/2]

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

Returns a child. If no children exist, four new children are created. The quadrilateral is cut into four new quadrilaterals by joining the midpoints of its edges.

Parameters
iIndex of the child to be returned.

Implements concepts::Cell2.

◆ child() [2/2]

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

Quad3d * concepts::Quad3d::clone ( Quad cntr,
MappingQuad3d map 
) const
inline

Returns a copy of itself.

Definition at line 954 of file cell2D.hh.

◆ connector()

Quad & concepts::QuadNd::connector ( ) const
inlinevirtualinherited

Returns the quadrilateral connector (topology)

Implements concepts::Cell2.

Definition at line 234 of file cell2D.hh.

◆ createChild_()

Quad3d * concepts::Quad3d::createChild_ ( Quad cntr,
const Index idx,
bool  flag 
) const
protected

Non-virtual form of the private createChild_() method. Can be called by inheritated classes.

◆ dim()

virtual uint concepts::Quad3d::dim ( ) const
inlinevirtual

Sets the subdivision strategy of this quad.

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 4 children.

Parameters
strategyPointer 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). Returns the subdivision strategy of this quad.

If you want to find check against another strategy use

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

Implements concepts::QuadNd.

Definition at line 979 of file cell2D.hh.

◆ dir()

Z2 concepts::Quad3d::dir ( ) const
inline

Returns the direction of the normal vector

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

◆ elemMap() [2/3]

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

Element map from point local coordinates in 2D.

Implements concepts::Cell2.

Definition at line 897 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.

◆ faceElement()

Real concepts::Quad3d::faceElement ( const Real  xi,
const Real  eta 
) const

Returns the face element for the transformation at xi, eta $\in [0,1]$

◆ gramDeterminantRoot()

virtual Real concepts::Quad3d::gramDeterminantRoot ( const Real  xi,
const Real  eta 
) const
inlinevirtual

Returns the square root of the Gram determinant.

The Gram determinant is given by

\[
  \det(A^\top A) \,,
\]

where A is the Jacobian of the mapping. Note that for a Quad2d this is the same as the determinant of the Jacobian.

Implements concepts::QuadNd.

Definition at line 934 of file cell2D.hh.

◆ hasChildren()

bool concepts::Quad3d::hasChildren ( ) const
inline

Definition at line 886 of file cell2D.hh.

◆ info()

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

Returns information in an output stream.

Implements concepts::Cell.

◆ jacobianColumn()

Real3d concepts::Quad3d::jacobianColumn ( uint  i,
const Real  xi,
const Real  eta 
) const

Computes the Jacobian for xi, eta $\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)2 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 & b \end{pmatrix}
\vec \xi \]

where $a = 2^{-l_0}$, $b = 2^{-l_1}$. $\vec l = (l_0, l_1)$ 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 & b \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().

TODO: improve/revise comment

◆ level()

Level< 2 > concepts::QuadNd::level ( ) const
inlineinherited

Returns the level of the cell. The level describes the refinements in both directions with respect to the parent cell in the initial mesh. This level information is taken into account when evaluating the element map or the Jacobian.

Definition at line 257 of file cell2D.hh.

◆ lineElement()

virtual Real concepts::Quad3d::lineElement ( const Real  xi,
const uint  edge 
) const
virtual

Implements concepts::QuadNd.

◆ map()

const MappingQuad3d * concepts::Quad3d::map ( ) const
inline

Returns the stored element map (same for all family related to one ancestor).

Definition at line 951 of file cell2D.hh.

◆ n0()

Real3d concepts::Quad3d::n0 ( Real  xi,
Real  eta 
) const

Returns the normal vector on a point of the quad.

◆ vertex()

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

Returns the coordinates of the ith vertex.

Implements concepts::Cell2.

Member Data Documentation

◆ cntr_

Quad& concepts::QuadNd::cntr_
protectedinherited

Reference to the quadrilateral connector (topology)

Definition at line 261 of file cell2D.hh.

◆ idx_

Index concepts::QuadNd::idx_
protectedinherited

Index of this element.

Definition at line 263 of file cell2D.hh.

◆ map_

MappingQuad3d* concepts::Quad3d::map_
protected

Pointer to the element map.

Definition at line 989 of file cell2D.hh.

◆ MAX_LEVEL

uint concepts::QuadNd::MAX_LEVEL
staticinherited

Definition at line 198 of file cell2D.hh.


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