Class xlifepp::Ellipsoid#

class Ellipsoid : public xlifepp::Volume#

definition of an ellipsoidal geometry in R^3 (volume)

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

  • _center: to define the center of the Ellipsoid

  • _v1, _v2, _v6: to define apogees of the Ellipsoid

  • _xlength, _ylength, _zlength: to define axis lengths of the Ellipsoid

  • _xradius, _yradius, _zradius: to define semi-axis lengths of the Ellipsoid

  • _type: indicator to fit curved boundaries (default) or not which gives flat (or plane) boundaries

  • _nboctants: to define an ellipsoidal sector from octants.

  • _nnodes: to define the number of nodes on the edges of the Ellipsoid

  • _hsteps: to define the local mesh steps on build points of the Ellipsoid

  • _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

Subclassed by xlifepp::Ball

Public Functions

Ellipsoid()#

default constructor

default ellipsoid is sphere of center (0,0,0) and radius 1

Ellipsoid(const Ellipsoid &e)#

copy constructor

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

key-value constructor

virtual string_t asString() const#

true if a full ellipsoid

format as string

virtual std::vector<const Point*> boundNodes() const#

returns list of points on boundary (const)

virtual Geometry &buildBoundary() const#

create boundary Geometry

create boundary geometry of ellipsoid as a composite (union of faces)

inline const Point &center() const#

accessor to point

inline virtual Geometry *clone() const#

virtual copy constructor

virtual void computeMB()#

computes the minimal box

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

returns list of edges

returns list of curve vertices

inline virtual Ellipsoid *ellipsoid()#

access to child Ellipsoid object

inline virtual const Ellipsoid *ellipsoid() const#

access to child Ellipsoid object (const)

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

apply a homothety on a Ellipsoid (1 key)

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

apply a homothety on a Ellipsoid (2 keys)

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

apply a homothety on a Ellipsoid

inline virtual Ellipsoid &homothetize(real_t factor)#

apply a homothety on a Ellipsoid

bool isFull() const#

true if a ball

inline real_t length1() const#

return first axis length

inline real_t length2() const#

return second axis length

inline real_t length3() const#

return third axis length

virtual real_t measure() const#

return the length/area/volume of the geometry

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 dimen_t nbOctants() const#

returns number of octants

inline virtual number_t nbSides() const#

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

virtual number_t nbSubdiv() const#

returns number of subdivisions

virtual std::vector<Point*> nodes()#

returns list of every main point (non const)

virtual std::vector<const Point*> nodes() const#

returns list of every point (const)

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

apply a point reflection on a Ellipsoid (1 key)

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

apply a point reflection on a Ellipsoid

inline real_t radius1() const#

return first semi-axis length

inline real_t radius2() const#

return second semi-axis length

inline real_t radius3() const#

return third semi-axis length

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

apply a reflection2d on a Ellipsoid (1 key)

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

apply a reflection2d on a Ellipsoid (2 keys)

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

apply a reflection2d on a Ellipsoid

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

apply a reflection2d on a Ellipsoid

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

apply a reflection3d on a Ellipsoid (1 key)

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

apply a reflection3d on a Ellipsoid (2 keys)

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

apply a reflection3d on a Ellipsoid

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

apply a reflection3d on a Ellipsoid

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

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

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

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

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

apply a rotation 2D on a Ellipsoid

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

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

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

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

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

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

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

apply a rotation on a Ellipsoid

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

apply a rotation on a Ellipsoid

inline virtual Ellipsoid &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 Ellipsoid

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

apply a rotation 3D on a Ellipsoid

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

apply a rotation 3D on a Ellipsoid

inline std::vector<std::pair<real_t, dimen_t>> rotations() const#

returns rotations

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

returns list of faces

returns list of face vertices

virtual Ellipsoid &transform(const Transformation &t)#

apply a geometrical transformation on a Ellipsoid

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

apply a translation on a Ellipsoid (1 key)

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

apply a translation on a Ellipsoid (3 reals version)

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

apply a translation on a Ellipsoid (vector version)

inline virtual dimen_t type() const#

return type of subdivision

inline const std::vector<Point> &v() const#

accessor to true vertices

inline const Point &v(number_t i) const#

accessor to vertex i

virtual std::vector<Point*> wholeNodes()#

return list of every point (non const)

virtual std::vector<const Point*> wholeNodes() const#

returns list of every point (const)

inline virtual bool withNnodes() const#

check if Ellipsoid is defined only with _nnodes or with _hsteps option