Hermes2D  2.0
Hermes::Hermes2D::Element Class Reference

Stores one element of a mesh. More...

#include <mesh.h>

Public Member Functions

double get_area ()
 
double get_diameter ()
 
void get_center (double &x, double &y)
 Returns the center of gravity.
 
int get_edge_orientation (int ie) const
 
ElementMode2D get_mode () const
 
bool is_triangle () const
 
bool is_quad () const
 
bool is_curved () const
 
int get_nvert () const
 
bool hsplit () const
 
bool vsplit () const
 
bool bsplit () const
 

Public Attributes

int id
 element id number
 
bool active
 0 = active, no sons; 1 = inactive (refined), has sons
 
bool used
 array item usage flag
 
Elementparent
 pointer to the parent element for the current son
 
bool visited
 true if the element has been visited during assembling
 
Nodevn [H2D_MAX_NUMBER_VERTICES]
 vertex node pointers
 
union {
   Node *   en [H2D_MAX_NUMBER_EDGES]
 edge node pointers
 
   Element *   sons [H2D_MAX_ELEMENT_SONS]
 son elements (up to four)
 
}; 
 
int marker
 element marker
 

Protected Member Functions

int next_vert (int i) const
 Helper functions to obtain the index of the next or previous vertex/edge.
 
int prev_vert (int i) const
 
Elementget_neighbor (int ie) const
 
void ref_all_nodes ()
 Internal.
 
void unref_all_nodes (HashTable *ht)
 Internal.
 

Protected Attributes

CurvMapcm
 
bool areaCalculated
 Serves for saving the once calculated area of this element.
 
double area
 Serves for saving the once calculated area of this element.
 
bool diameterCalculated
 Serves for saving the once calculated diameter of this element.
 
double diameter
 Serves for saving the once calculated diameter of this element.
 
int iro_cache
 Increase in integration order, see RefMap::calc_inv_ref_order()
 

Friends

class Mesh
 
class MeshReader
 
class MeshReaderH2D
 
class MeshReaderH1DXML
 
class MeshReaderH2DXML
 
class PrecalcShapeset
 
template<typename Scalar >
class Space
 
template<typename Scalar >
class Adapt
 
template<typename Scalar >
class H1Space
 
template<typename Scalar >
class HcurlSpace
 
template<typename Scalar >
class HdivSpace
 
template<typename Scalar >
class L2Space
 
template<typename Scalar >
class KellyTypeAdapt
 
template<typename Scalar >
class DiscreteProblem
 
template<typename Scalar >
class Solution
 
template<typename Scalar >
class NeighborSearch
 
template<typename Scalar >
class Filter
 
template<typename Scalar >
class MeshFunction
 
template<typename Scalar >
class Global
 
template<typename Scalar >
class RefinementSelectors::Selector
 
template<typename Scalar >
class RefinementSelectors::POnlySelector
 
template<typename Scalar >
class RefinementSelectors::HOnlySelector
 
template<typename Scalar >
class RefinementSelectors::OptimumSelector
 
template<typename Scalar >
class RefinementSelectors::ProjBasedSelector
 
template<typename Scalar >
class RefinementSelectors::H1ProjBasedSelector
 
template<typename Scalar >
class RefinementSelectors::L2ProjBasedSelector
 
template<typename Scalar >
class RefinementSelectors::HcurlProjBasedSelector
 
class Views::ScalarView
 
class Views::Linearizer
 
class RefMap
 
class Traverse
 
class Transformable
 
class CurvMap
 
class Views::Orderizer
 
class Views::Vectorizer
 
bool is_twin_nurbs (Element *e, int i)
 
int rtb_criterion (Element *e)
 
CurvMapcreate_son_curv_map (Element *e, int son)
 

Detailed Description

Stores one element of a mesh.

The element can be a triangle or a quad (nvert == 3 or nvert = 4), active or inactive.

Vertex/node index number   [2]  (3)----—(2)   | | [3]| quad. |[1]   | |  (0)----—(1)   [0] Active elements are actual existing elements in the mesh, which take part in the computation. Inactive elements are those which have once been active, but were refined, ie., replaced by several other (smaller) son elements. The purpose of the union is the following. Active elements store pointers to their vertex and edge nodes. Inactive elements store pointers to thier son elements and to vertex nodes.

If an element has curved edges, the member 'cm' points to an associated CurvMap structure, otherwise it is NULL.

Definition at line 120 of file mesh.h.

Member Function Documentation

double Hermes::Hermes2D::Element::get_area ( )

Calculates the area of the element. For curved elements, this is only an approximation: the curvature is not accounted for.

Definition at line 168 of file mesh.cpp.

Referenced by Hermes::Hermes2D::init_geom_surf(), and Hermes::Hermes2D::init_geom_vol().

double Hermes::Hermes2D::Element::get_diameter ( )

Returns the length of the longest edge for triangles, and the length of the longer diagonal for quads. Ignores element curvature.

Definition at line 215 of file mesh.cpp.

Referenced by Hermes::Hermes2D::KellyTypeAdapt< Scalar >::calc_err_internal(), Hermes::Hermes2D::init_geom_surf(), and Hermes::Hermes2D::init_geom_vol().

Element * Hermes::Hermes2D::Element::get_neighbor ( int  ie) const
protected

Returns a pointer to the neighboring element across the edge 'ie', or NULL if it does not exist or is across an irregular edge.

Definition at line 157 of file mesh.cpp.

Member Data Documentation


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