Hermes2D  3.0
Hermes::Hermes2D::Element Class Reference

Stores one element of a mesh. More...

#include <element.h>

Public Member Functions

void calc_area (bool precise_for_curvature=false)
 This takes much longer. More...
void calc_diameter ()
 Calculates the diameter.
void get_center (double &x, double &y)
 Returns the center of gravity.
bool get_edge_orientation (int ie) const
ElementMode2D get_mode () const
bool is_triangle () const
bool is_quad () const
bool is_curved () const
unsigned char get_nvert () const
bool is_parallelogram () const
bool has_const_ref_map () const
bool hsplit () const
bool vsplit () const
bool bsplit () const
unsigned char next_vert (unsigned char i) const
 Helper functions to obtain the index of the next or previous vertex/edge.
unsigned char prev_vert (unsigned char i) const
Elementget_neighbor (int ie) const
void ref_all_nodes ()
void unref_all_nodes (HashTable *ht)

Public Attributes

int id
 element id number
bool active
 0 = active, no sons; 1 = inactive (refined), has sons
bool used
 array item usage flag
 pointer to the parent element for the current son
bool visited
 true if the element has been visited during assembling
 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
 curved mapping, nullptr if not curvilinear
double area
 Serves for saving the once calculated area of this element.
bool center_set
double x_center
double y_center
double diameter
 Serves for saving the once calculated diameter of this element.
unsigned short iro_cache
 Increase in integration order, see RefMap::calc_inv_ref_order()
unsigned char nvert
 number of vertices (3 or 4)

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 nullptr.

Definition at line 107 of file element.h.

Member Function Documentation

void Hermes::Hermes2D::Element::calc_area ( bool  precise_for_curvature = false)

This takes much longer.

Calculates the area of the element.

[in]precise_for_curvatureIf curved elements should be evaluated exactly. \

Definition at line 128 of file element.cpp.

Referenced by ref_all_nodes(), and unref_all_nodes().

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

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

Definition at line 117 of file element.cpp.

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