#include <cell2D.hh>
Public Types | |
typedef uint | index_type |
Public Member Functions | |
Quad2d (Quad &cntr, const MappingQuad2d &map) | |
virtual Quad2d * | child (uint i) |
virtual const Quad2d * | child (uint i) const |
bool | hasChildren () const |
const Quad2d * | child (uint i, Real xi, Real eta, Real &xiC, Real &etaC) const |
Real2d | chi (Real xi, Real eta) const |
Real3d | elemMap (const Real2d &coord_local) const |
Element map from point local coordinates in 2D. | |
MapReal2d | jacobian (const Real xi, const Real eta) const |
MapReal2d | jacobian (const concepts::Real2d &p) const |
MapReal2d | jacobianInverse (const Real xi, const Real eta) const |
Returns the inverse of the Jacobian for xi , eta . | |
Real | jacobianDeterminant (const Real xi, const Real eta) const |
virtual Real | gramDeterminantRoot (const Real xi, const Real eta) const |
MapReal2d | inverseLaplace (const Real xi, const Real eta) const |
virtual Real | lineElement (const Real xi, const uint edge) const |
Real3d | vertex (uint i) const |
Returns the coordinates of the ith vertex. | |
Real3d | center () const |
Returns the center of the cell. | |
const MappingQuad2d * | map () const |
MappingEdge2d * | edgeMap (uint edge) const |
Quad2d * | clone (Quad &cntr, MappingQuad2d *map) const |
Returns a copy of itself. | |
virtual void | setStrategy (const Quad2dSubdivision *strategy=0) |
const Quad2dSubdivision * | getStrategy () const |
virtual uint | dim () const |
Quad & | connector () 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. | |
Quad2d * | createChild_ (Quad &cntr, const Index &idx, bool flag) const |
Quad2d (Quad &cntr, MappingQuad2d *map, const Index &idx) | |
Private constructor. | |
Protected Attributes | |
MappingQuad2d * | map_ |
Pointer to the element map. | |
Quad & | cntr_ |
Reference to the quadrilateral connector (topology) | |
Index | idx_ |
Index of this element. | |
Friends | |
class | Quad2dSubdivision |
class | Quad2dSubdiv4 |
class | Quad2dSubdiv2H |
class | Quad2dSubdiv2V |
A 2D cell: quadrilateral.
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.
concepts::Quad2d::Quad2d | ( | Quad & | cntr, |
const MappingQuad2d & | map | ||
) |
Constructor. Takes the connector cntr
and the element map map
and creates a cell.
cntr | Topological information of the quadrilateral |
map | Element map of the quadrilateral |
|
inlinevirtual |
Returns the center of the cell.
Implements concepts::Cell2.
Evaluates the element map. Maps a point from the the reference coordinates in [0,1]2 onto the physical coordinates.
xi | |
eta |
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.
i | Index of the child to be returned. |
Implements concepts::Cell2.
Returns a child. If no children exist, none are created and 0 is returned.
i | Index of the child to be returned. |
Implements concepts::Cell2.
|
inline |
Returns a child. If not a valid children exist, none are created and 0 is returned. FIXME: xiC and etaC are useless parameters
i | Index of the child to be returned. |
xi,eta | local coordinates, where the child is located |
xiC,etaC | local coordinates in the child |
|
inline |
|
inlinevirtualinherited |
Returns the quadrilateral connector (topology)
Implements concepts::Cell2.
|
protected |
Non-virtual form of the private createChild_() method. Can be called by inheritated classes.
Returns the dimension of the space
Implements concepts::QuadNd.
MappingEdge2d * concepts::Quad2d::edgeMap | ( | uint | edge | ) | const |
Returns the mapping of an edge.
Construct a cell for an edge of quad
with
Edge2d edge(*quad.connector().edge(0), *quad.edgeMap(0));
The edgeMap can be useful for egde integrals in a 2D quadrilateral mesh.
Element map from point local coordinates in 1D.
Reimplemented in concepts::SphericalSurface3d, concepts::Sphere3d, concepts::Edge1d, and concepts::Edge2d.
Element map from point local coordinates in 2D.
Implements concepts::Cell2.
Element map from point local coordinates in 3D
Reference element is 2D, third component is omitted.
Reimplemented from concepts::Cell.
|
inline |
|
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.
|
protectedvirtual |
Returns information in an output stream.
Implements concepts::Cell.
Computes the second partial derivatives of the inverse Mapping. Those from a cell in the initial mesh are computed by the element map itsself. For a subdivided cell, with the use of the subdivision map , the values are computed by the element map at the Point . For notation check out the documentation of the method jacobian()
of this class.
xi
, eta
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()
.
|
inlineinherited |
Computes the differential element on an edge.
xi
stand for one of the variables
,
depending on the edge.
Implements concepts::QuadNd.
|
inline |
|
virtual |
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.
strategy | Pointer to an instance of a subdivision strategy. |
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 coordinates of the ith vertex.
Implements concepts::Cell2.
|
friend |
|
friend |
|
friend |
|
friend |
|
protectedinherited |
|
protectedinherited |
|
protected |