Class xlifepp::Parallelogram#

class Parallelogram : public xlifepp::Quadrangle#

definition of a parallelogram geometry in R^3

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

  • _v1, _v2, _v3, _v4: to define the vertices of the Parallelogram, counterclockwise oriented (_v3 is optional)

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

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

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

Public Functions

Parallelogram()#

default constructor

default parallelogram is [0,1]^2 No parametrization

Parallelogram(const Point &p1, const Point &p2, const Point &p4, 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

Parallelogram(const Point &p1, const Point &p2, const Point &p4, 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

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

key-value constructor

inline virtual ~Parallelogram()#

destructor

virtual string_t asString() const#

format as string

inline virtual Geometry *clone() const#

virtual copy constructor for Geometry

inline virtual Polygon *clonePG() const#

virtual copy constructor for Polygon

inline virtual Surface *cloneS() const#

virtual copy constructor for Surface

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

parametrization (1-u-v)*p1+u*p2+v*p4

parametrization (P1) : p = p1+u*(p2-p1)+v*(p4-p1)

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

apply a homothety on a Parallelogram (1 key)

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

apply a homothety on a Parallelogram (2 keys)

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

apply a homothety on a Parallelogram

inline virtual Parallelogram &homothetize(real_t factor)#

apply a homothety on a Parallelogram

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

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

real_t length1() const#

length of first or third side

real_t length2() const#

length of second or fourth side

virtual real_t measure() const#

surface of the parallelogram

inline number_t n1() const#

returns the number of nodes on first or third edge

inline number_t n2() const#

returns the number of nodes on second or fourth edge

inline virtual Parallelogram *parallelogram()#

access to child Parallelogram object

inline virtual const Parallelogram *parallelogram() const#

access to child Parallelogram object (const)

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

apply a point reflection on a Parallelogram (1 key)

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

apply a point reflection on a Parallelogram

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

apply a reflection2d on a Parallelogram (1 key)

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

apply a reflection2d on a Parallelogram (2 keys)

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

apply a reflection2d on a Parallelogram

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

apply a reflection2d on a Parallelogram

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

apply a reflection3d on a Parallelogram (1 key)

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

apply a reflection3d on a Parallelogram (2 keys)

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

apply a reflection3d on a Parallelogram

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

apply a reflection3d on a Parallelogram

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

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

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

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

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

apply a rotation 2D on a Parallelogram

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

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

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

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

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

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

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

apply a rotation on a Parallelogram

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

apply a rotation on a Parallelogram

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

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

apply a rotation 3D on a Parallelogram

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

apply a rotation 3D on a Parallelogram

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

returns list of surfaces (const)

virtual Parallelogram &transform(const Transformation &t)#

apply a geometrical transformation on a Parallelogram

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

apply a translation on a Parallelogram (1 key)

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

apply a translation on a Parallelogram (3 reals version)

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

apply a translation on a Parallelogram (vector version)