concepts::Quad3d Class Reference
A quadrilateral cell in 3D. More...
#include <cell2D.hh>
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 |
Evaluates the element map. More... | |
virtual Quad3d * | child (uint i) |
Returns a child. More... | |
virtual const Quad3d * | child (uint i) const |
Returns a child. More... | |
Quad3d * | clone (Quad &cntr, MappingQuad3d *map) const |
Returns a copy of itself. More... | |
Quad & | connector () const |
Returns the quadrilateral connector (topology) More... | |
virtual uint | dim () const |
Sets the subdivision strategy of this quad. More... | |
Z2 | dir () const |
Returns the direction of the normal vector. 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... | |
Real | faceElement (const Real xi, const Real eta) const |
Returns the face element for the transformation at xi , eta . More... | |
virtual Real | gramDeterminantRoot (const Real xi, const Real eta) const |
Returns the square root of the Gram determinant. More... | |
bool | hasChildren () const |
Real3d | jacobianColumn (uint i, const Real xi, const Real eta) const |
Computes the Jacobian for xi , eta . More... | |
Level< 2 > | level () const |
Returns the level of the cell. More... | |
virtual Real | lineElement (const Real xi, const uint edge) const |
const MappingQuad3d * | map () const |
Returns the stored element map (same for all family related to one ancestor). More... | |
Real3d | n0 (Real xi, Real eta) const |
Returns the normal vector on a point of the quad. More... | |
Quad3d (Quad &cntr, const MappingQuad3d &map, const Z2 dir=0) | |
Constructor. More... | |
Real3d | vertex (uint i) const |
Returns the coordinates of the ith vertex. More... | |
virtual | ~Quad3d () |
Static Public Attributes | |
static uint | MAX_LEVEL |
Protected Member Functions | |
Quad3d * | createChild_ (Quad &cntr, const Index &idx, bool flag) const |
Non-virtual form of the private createChild_() method. More... | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. More... | |
Protected Attributes | |
Quad & | cntr_ |
Reference to the quadrilateral connector (topology) More... | |
Index | idx_ |
Index of this element. More... | |
MappingQuad3d * | map_ |
Pointer to the element map. More... | |
Private Member Functions | |
virtual Quad3d * | createChild_ (Quad &cntr, const Index &idx) const |
Subdivision strategy for the quadrilateral. More... | |
Quad3d & | operator= (const Quad3d &other) |
Quad3d (const Quad3d &other) | |
Quad3d (Quad &cntr, MappingQuad3d *map, const Index &idx, const Z2 dir=0) | |
Private Attributes | |
Quad3d * | chld_ |
Pointer to the first child. More... | |
Z2 | dir_ |
Direction of the normal vector. More... | |
Quad3d * | lnk_ |
Pointer to a sibling. More... | |
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.
Member Typedef Documentation
◆ index_type
|
inherited |
Constructor & Destructor Documentation
◆ Quad3d() [1/3]
Constructor.
Takes the connector cntr
and the element map map
and creates a cell.
- Parameters
-
cntr Topological information of the quadrilateral map Element map of the quadrilateral dir Direction 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).
◆ ~Quad3d()
|
virtual |
◆ Quad3d() [2/3]
|
private |
◆ Quad3d() [3/3]
|
private |
Member Function Documentation
◆ center()
|
inlinevirtual |
Returns the center of the cell.
Implements concepts::Cell2.
◆ chi()
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 eta
◆ child() [1/2]
|
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
-
i Index of the child to be returned.
Implements concepts::Cell2.
◆ child() [2/2]
|
virtual |
Returns a child.
If no children exist, none are created and 0 is returned.
- Parameters
-
i Index of the child to be returned.
Implements concepts::Cell2.
◆ clone()
◆ connector()
|
inlinevirtualinherited |
Returns the quadrilateral connector (topology)
Implements concepts::Cell2.
◆ createChild_() [1/2]
|
privatevirtual |
Subdivision strategy for the quadrilateral.
Creates and returns a child.
Can only called by the object itself or friend classes. Its virtual, so that inheritated classes with additional properties can create a child of the same kind.
◆ createChild_() [2/2]
|
protected |
Non-virtual form of the private createChild_() method.
Can be called by inheritated classes.
◆ dim()
|
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
-
strategy Pointer to an instance of a subdivision strategy.
- Exceptions
-
StrategyChange if 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.
◆ dir()
|
inline |
◆ elemMap() [1/3]
Element map from point local coordinates in 1D.
Reimplemented in concepts::Edge2d, concepts::Edge1d, concepts::Sphere3d, and concepts::SphericalSurface3d.
◆ elemMap() [2/3]
Element map from point local coordinates in 2D.
Implements concepts::Cell2.
◆ elemMap() [3/3]
Element map from point local coordinates in 3D.
Reference element is 2D, third component is omitted.
Reimplemented from concepts::Cell.
◆ faceElement()
Returns the face element for the transformation at xi
, eta
.
◆ gramDeterminantRoot()
|
inlinevirtual |
Returns the square root of the Gram determinant.
The Gram determinant is given by
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.
◆ hasChildren()
◆ info()
|
protectedvirtual |
Returns information in an output stream.
Implements concepts::Cell.
◆ jacobianColumn()
Computes the Jacobian for xi
, eta
.
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 be the subdivision map in the reference coordinates (0,1)2 and , the element maps of K and K' respectively. Then,
The subdivision map H in reference coordinates is
where , . is the level of the cell with respect to the cell in the initial mesh. The derivative of H is .
Then, the Jacobian of is
The part (without H) is computed by the element map and the part is computed in jacobian()
.
TODO: improve/revise comment
◆ level()
|
inlineinherited |
◆ lineElement()
Implements concepts::QuadNd.
◆ map()
|
inline |
◆ n0()
Returns the normal vector on a point of the quad.
◆ operator=()
◆ vertex()
|
virtual |
Returns the coordinates of the ith vertex.
Implements concepts::Cell2.
Member Data Documentation
◆ chld_
|
private |
◆ cntr_
|
protectedinherited |
◆ dir_
|
private |
◆ idx_
|
protectedinherited |
◆ lnk_
|
private |
◆ map_
|
protected |
◆ MAX_LEVEL
The documentation for this class was generated from the following file:
- geometry/cell2D.hh