Class xlifepp::Ellipse#

class Ellipse : public xlifepp::Surface#

definition of an elliptic geometry in R^3 (surface)

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

  • _center: to define the center of the Ellipse

  • _v1, _v2: to define apogees of the Ellipse

  • _xlength, _ylength: to define axis lengths of the Ellipse

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

  • _angle1, _angle2: to define an elliptic sector from a pair of angles. The angular origin is determined by _v1

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

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

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

  • _domain_name: to define the domain name

  • _side_names/_edge_names: to define the side names

  • _vertex_names: to define the side of side names

  • _varnames: to define the variable names for print purpose

Subclassed by xlifepp::Disk

Public Functions

Ellipse()#

default constructor

default ellipse is circle of center (0,0,0) and radius 1, no parametrization

Ellipse(const Point &center, const Point &p1, const Point &p2, const std::vector<number_t> &n = std::vector<number_t>(4, 2), const string_t &domName = string_t(), const std::vector<string_t> &sideNames = std::vector<string_t>(4, ""), const std::vector<string_t> &sideOfSideNames = std::vector<string_t>(4, ""))#

default constructor with 3 points

Ellipse(const Point &center, const Point &p1, const Point &p2, const std::vector<real_t> &h, const string_t &domName = string_t(), const std::vector<string_t> &sideNames = std::vector<string_t>(4, ""), const std::vector<string_t> &sideOfSideNames = std::vector<string_t>(4, ""))#

default constructor with 3 points

Ellipse(Parameter p1, Parameter p2, Parameter p3)#

key-value constructor

inline virtual ~Ellipse()#

destructor

virtual string_t asString() const#

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 ellipse

inline Point center() const#

accessor to point

inline virtual Geometry *clone() const#

virtual copy constructor for Geometry

inline virtual Surface *cloneS() const#

virtual copy constructor for Surface

virtual void collect(const string_t &n, std::list<Geometry*>&) const#

collect in a list all canonical geometry’s with name n

collect in a list all canonical geometry’s with name n (may be the ellipse itself and some ellipse sides: EllArc)

virtual void computeBB()#

computes the bounding box

virtual void computeMB()#

computes the minimal box

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

returns list of edges (const)

inline virtual Disk *disk()#

access to child Disk object

inline virtual const Disk *disk() const#

access to child Disk object (const)

inline virtual Ellipse *ellipse()#

access to child Ellipse object

inline virtual const Ellipse *ellipse() const#

access to child Ellipse object (const)

Vector<real_t> funParametrization(const Point &pt, Parameters &pars, DiffOpType d = _id) const#

parametrization P0+(P1-P0)*r*cos(t)+P2-P0)*r*sin(t)

parametrization P0 + (P1-P0)*r*cos(s) + (P2-P0)*r*sin(s) 0 <= r <= 1, 0 <= t <= 1, s= thetamin_+ t*(thetamax_-thetamin_)

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

apply a homothety on a Ellipse (1 key)

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

apply a homothety on a Ellipse (2 keys)

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

apply a homothety on a Ellipse

inline virtual Ellipse &homothetize(real_t factor)#

apply a homothety on a Ellipse

Vector<real_t> invParametrization(const Point &pt, Parameters &pars, DiffOpType d = _id) const#

inverse of parametrization (u,v)=invf(p)

inverse of parametrization (u,v)=invf(pt)

inline virtual bool isPlane() const#

return true if geometry is plane

inline bool isSector() const#

returns the flag being true if it is an elliptical sector

inline real_t length1() const#

return first axis length

inline real_t length2() const#

return second axis length

inline 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 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 subdivision

virtual std::vector<int_t> nnodesPerBorder()#

i-th value is nnodes of the Geometry’s i-th border, else -1 if defined with hsteps

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 Ellipse &pointReflect(const Parameter &p1)#

apply a point reflection on a Ellipse (1 key)

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

apply a point reflection on a Ellipse

inline real_t radius1() const#

return first semi-axis length

inline real_t radius2() const#

return second semi-axis length

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

apply a reflection2d on a Ellipse (1 key)

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

apply a reflection2d on a Ellipse (2 keys)

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

apply a reflection2d on a Ellipse

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

apply a reflection2d on a Ellipse

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

apply a reflection3d on a Ellipse (1 key)

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

apply a reflection3d on a Ellipse (2 keys)

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

apply a reflection3d on a Ellipse

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

apply a reflection3d on a Ellipse

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

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

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

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

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

apply a rotation 2D on a Ellipse

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

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

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

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

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

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

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

apply a rotation on a Ellipse

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

apply a rotation on a Ellipse

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

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

apply a rotation 3D on a Ellipse

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

apply a rotation 3D on a Ellipse

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

returns list of surfaces (const)

inline real_t thetamax() const#

returns the second angle

inline real_t thetamin() const#

returns the first angle

virtual Ellipse &transform(const Transformation &t)#

apply a geometrical transformation on a Ellipse

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

apply a translation on a Ellipse (1 key)

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

apply a translation on a Ellipse (3 reals version)

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

apply a translation on a Ellipse (vector version)

inline virtual dimen_t type() const#

returns 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 (read only)

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

returns list of every point (p_ and v_) (non const)