Class xlifepp::Tetrahedron#

class Tetrahedron : public xlifepp::Polyhedron#

definition of a tetrahedron geometry in R^3

Tetrahedron constructors are based on a key-value system. Here are the available keys:

  • _v1, _v2, _v3, _v4: to define the vertices of the tetrahedron

  • _nnodes: to define the number of nodes on each edge of the Tetrahedron

  • _hsteps: to define the local mesh steps on the vertices of the Tetrahedron

  • _domain_name: to define the domain name

  • _side_names/_face_name: to define the side names

  • _edge_name: to define the side of side names

  • _vertex_name: to define the side of side of side names

  • _varnames: to define the variable names for print purpose

Public Functions

Tetrahedron()#

default constructor

default tetrahedron is tetrahedron (0,0,0) (1,0,0) (0,1,0) (0,0,1)

Tetrahedron(Parameter p1, Parameter p2, Parameter p3, Parameter p4)#

key-value constructor

virtual string_t asString() const#

format as string

inline virtual Geometry *clone() const#

virtual copy constructor

inline virtual void computeMB()#

computes the minimal box

virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> curves() const#

returns list of edges

inline virtual Tetrahedron &homothetize(const Parameter &p1)#

apply a homothety on a Tetrahedron (1 key)

inline virtual Tetrahedron &homothetize(const Parameter &p1, const Parameter &p2)#

apply a homothety on a Tetrahedron (2 keys)

inline virtual Tetrahedron &homothetize(const Point &c = Point(0., 0., 0.), real_t factor = 1.)#

apply a homothety on a Tetrahedron

inline virtual Tetrahedron &homothetize(real_t factor)#

apply a homothety on a Tetrahedron

virtual real_t measure() const#

return the length/area/volume of the geometry

inline virtual std::vector<number_t> nbElementsForGmshGeneration() const#

return number of points/arcs/lines/loops/surfaces/extrudable elementsof a geometry (only for gmsh generation)

inline virtual number_t nbSides() const#

returns the number of sides (faces) return number of points/arcs/lines/loops/surfaces/extrudable elementsof a geometry (only for gmsh generation)

inline virtual Tetrahedron &pointReflect(const Parameter &p1)#

apply a point reflection on a Tetrahedron (1 key)

inline virtual Tetrahedron &pointReflect(const Point &c = Point(0., 0., 0.))#

apply a point reflection on a Tetrahedron

inline virtual Tetrahedron &reflect2d(const Parameter &p1)#

apply a reflection2d on a Tetrahedron (1 key)

inline virtual Tetrahedron &reflect2d(const Parameter &p1, const Parameter &p2)#

apply a reflection2d on a Tetrahedron (2 keys)

inline virtual Tetrahedron &reflect2d(const Point &c, real_t dx, real_t dy = 0.)#

apply a reflection2d on a Tetrahedron

inline virtual Tetrahedron &reflect2d(const Point &c = Point(0., 0.), std::vector<real_t> d = std::vector<real_t>(2, 0.))#

apply a reflection2d on a Tetrahedron

inline virtual Tetrahedron &reflect3d(const Parameter &p1)#

apply a reflection3d on a Tetrahedron (1 key)

inline virtual Tetrahedron &reflect3d(const Parameter &p1, const Parameter &p2)#

apply a reflection3d on a Tetrahedron (2 keys)

inline virtual Tetrahedron &reflect3d(const Point &c, real_t nx, real_t ny, real_t nz = 0.)#

apply a reflection3d on a Tetrahedron

inline virtual Tetrahedron &reflect3d(const Point &c = Point(0., 0., 0.), std::vector<real_t> n = std::vector<real_t>(3, 0.))#

apply a reflection3d on a Tetrahedron

inline virtual Tetrahedron &rotate2d(const Parameter &p1)#

apply a rotation 2D on a Tetrahedron (1 key)

inline virtual Tetrahedron &rotate2d(const Parameter &p1, const Parameter &p2)#

apply a rotation 2D on a Tetrahedron (2 keys)

inline virtual Tetrahedron &rotate2d(const Point &c, real_t angle = 0.)#

apply a rotation 2D on a Tetrahedron

inline virtual Tetrahedron &rotate3d(const Parameter &p1)#

apply a rotation 3D on a Tetrahedron (1 key)

inline virtual Tetrahedron &rotate3d(const Parameter &p1, const Parameter &p2)#

apply a rotation 3D on a Tetrahedron (2 keys)

inline virtual Tetrahedron &rotate3d(const Parameter &p1, const Parameter &p2, const Parameter &p3)#

apply a rotation 3D on a Tetrahedron (3 keys)

inline virtual Tetrahedron &rotate3d(const Point &c, real_t dx, real_t dy, real_t angle)#

apply a rotation on a Tetrahedron

inline virtual Tetrahedron &rotate3d(const Point &c, real_t dx, real_t dy, real_t dz, real_t angle)#

apply a rotation on a Tetrahedron

inline virtual Tetrahedron &rotate3d(const Point &c, std::vector<real_t> d = std::vector<real_t>(3, 0.), real_t angle = 0.)#

apply a rotation 3D on a Tetrahedron

inline virtual Tetrahedron &rotate3d(real_t dx, real_t dy, real_t angle)#

apply a rotation 3D on a Tetrahedron

inline virtual Tetrahedron &rotate3d(real_t dx, real_t dy, real_t dz, real_t angle)#

apply a rotation 3D on a Tetrahedron

virtual void setFaces()#

set the faces vector when built

virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> surfs() const#

returns list of faces

inline virtual Tetrahedron *tetrahedron()#

access to child Tetrahedron object

inline virtual const Tetrahedron *tetrahedron() const#

access to child Tetrahedron object (const)

virtual Tetrahedron &transform(const Transformation &t)#

apply a geometrical transformation on a Tetrahedron

inline virtual Tetrahedron &translate(const Parameter &p1)#

apply a translation on a Tetrahedron (1 key)

inline virtual Tetrahedron &translate(real_t ux, real_t uy = 0., real_t uz = 0.)#

apply a translation on a Tetrahedron (3 reals version)

inline virtual Tetrahedron &translate(std::vector<real_t> u)#

apply a translation on a Tetrahedron (vector version)