Class xlifepp::GeomElement#
-
class GeomElement#
-
object represents the geometric support of mesh elements.
It either a plain element or a side element (side of a GeomElement).
when it is a plain element, there is always a MeshElement associated to its but no parentSides
when it is a side element, there is at least a parent (parentSides is not empty) and by default no MeshElement, but if required, MeshElement may be constructed (buildSideMeshElement)
Public Functions
-
GeomElement(const GeomElement&)#
-
copy constructor
-
GeomElement(const Mesh*, const RefElement*, dimen_t, number_t)#
-
construct a plain element from Mesh, ReferenceElement and space dimension
-
GeomElement(GeomElement*, number_t, number_t)#
-
construct a side element from GeomElement parent and side number
-
inline ~GeomElement()#
-
destructor
-
MeshElement *buildSideMeshElement() const#
-
create a MeshElement object when element it a side element (not automatic)
-
inline void clearGeomMapData()#
-
clear geometric map data (i.e geoMapData object)
-
bool contains(const std::vector<real_t>&)#
-
true if point p as vector belongs to element
-
void deleteMeshElement()#
-
destroy meshElement information
-
const Point &edgeVertex(number_t i, number_t e) const#
-
return the ith vertex of edge e>=1 (i=1,…) (side in 2D, side of side in 3D)
-
GeoNumPair elementSharingSide(number_t s) const#
-
if exists, return the side element associated to side s>=1 else return 0
return the adjacent element by side s as a pair of (GeomElement*, number_t)
-
std::vector<GeoNumPair> elementsSharingSideOfSide(number_t s, bool o = false) const#
-
return the list of adjacent elements by side of side s
-
std::vector<GeoNumPair> elementsSharingVertex(number_t v, bool o = false) const#
-
return the list of adjacent elements by vertex v
-
string_t encodeElement(number_t s = 0, number_t ss = 0) const#
-
string key of element or side element or side of side element from ascending vertex numbers
-
string_t encodeElementNodes(number_t s = 0) const#
-
string key of element or side element from ascending node numbers
-
inline const GeomRefElement *geomRefElement(number_t i = 0) const#
-
return geomrefelement if i=0 else geomrefelement of side i
-
inline bool hasMeshElement() const#
-
true if it handles a MeshElement structure
-
inline bool isSideElement() const#
-
true if it is a side element
-
real_t measure(const number_t sideNo = 0) const#
-
return measure of element if side_no = 0, measure of side number side_no > 0
-
MeshElement *meshElement()#
-
return meshElement_p if not null (non const) else error
-
const MeshElement *meshElement() const#
-
return meshElement_p if not null else error
-
std::vector<number_t> nodeNumbers(number_t s = 0) const#
-
return the global numbers of nodes if s=0, of side s else
-
const std::vector<real_t> &normalVector() const#
-
return normal vector to element according to orientation
return outward normal vector on element
-
std::vector<real_t> normalVector(number_t s) const#
-
return outward normal vector on side s>0 (not normalized) or normal to element when s=0
return outward normal vector on side
-
GeomElement &operator=(const GeomElement&)#
-
assign operator
-
const GeomElement *parent(number_t i = 0) const#
-
return i-th parent (no check)
-
const GeomElement *parentInDomain(const MeshDomain*) const#
-
look for a parent in a domain (if exists return the first one)
-
const GeoNumPair parentSide(number_t i) const#
-
return i-th parent and its side (no check)
-
inline std::vector<GeoNumPair> &parentSides()#
-
access to parentSides_
-
inline const std::vector<GeoNumPair> &parentSides() const#
-
access to parentSides_ (const)
-
void print(std::ostream&) const#
-
print geomelement characteristics
-
void printVertices(std::ostream&, IOFormat f = _undefFormat) const#
-
print vertices in default format, raw format and matlab format
-
const RefElement *refElement(number_t i = 0) const#
-
return reference element if i=0 else ref element of side i
-
ShapeType shapeType(number_t i = 0) const#
-
return the shape type of element (i=0) and its sides (_segment, _triangle, …)
-
const Point &sideOfSideVertex(number_t i, number_t ss) const#
-
return the ith vertex of side of side ss>=1 (i=1,…)
-
real_t size() const#
-
return measure of element if side_no = 0, measure of side number side_no > 0
characteristic size of element (computed if not available)
-
std::vector<GeomElement*> splitP1() const#
-
split element in first order elements and return as a list
-
std::vector<real_t> tangentVector(number_t) const#
-
return tangent vector on an edge (not normalized)
return outward normal vector on side
Public Members
-
mutable real_t color#
-
useful to mark an element (default = 0)
-
mutable real_t flag#
-
useful to mark an element in internal process (default = 0)
-
real_t phi#
-
angle to describe local curvature (phi in x-z plane), default 0
-
real_t theta#
-
angle to describe local curvature (theta in x-y plane), default 0
-
mutable GeomElement *twin_p#
-
twin geomElement in case of geomElement on an interface
Friends
-
friend std::ostream &operator<<(std::ostream&, const GeomElement&)#
-
outputs geomelement characteristics