Class xlifepp::SetOfElems#

class SetOfElems : public xlifepp::Geometry#

Inheritence diagram for xlifepp::SetOfElems:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"] "1" [label="xlifepp::SetOfElems" tooltip="xlifepp::SetOfElems" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for xlifepp::SetOfElems:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "21" [label="xlifepp::Collection< string_t >" tooltip="xlifepp::Collection< string_t >"] "14" [label="xlifepp::Matrix< real_t >" tooltip="xlifepp::Matrix< real_t >"] "18" [label="xlifepp::Vector< real_t >" tooltip="xlifepp::Vector< real_t >"] "29" [label="xlifepp::Vector< xlifepp::Vector< real_t > >" tooltip="xlifepp::Vector< xlifepp::Vector< real_t > >"] "38" [label="std::list< std::pair< number_t, real_t > >" tooltip="std::list< std::pair< number_t, real_t > >"] "10" [label="std::map< number_t, std::vector< number_t > >" tooltip="std::map< number_t, std::vector< number_t > >"] "8" [label="std::map< number_t, xlifepp::Geometry * >" tooltip="std::map< number_t, xlifepp::Geometry * >"] "37" [label="std::map< string_t, number_t >" tooltip="std::map< string_t, number_t >"] "39" [label="std::list< T >" tooltip="std::list< T >"] "9" [label="std::map< K, T >" tooltip="std::map< K, T >"] "5" [label="std::vector< T >" tooltip="std::vector< T >"] "24" [label="std::vector< T >" tooltip="std::vector< T >"] "17" [label="std::vector< K >" tooltip="std::vector< K >"] "4" [label="std::vector< RealPair >" tooltip="std::vector< RealPair >"] "20" [label="std::vector< const xlifepp::Transformation * >" tooltip="std::vector< const xlifepp::Transformation * >"] "25" [label="std::vector< number_t >" tooltip="std::vector< number_t >"] "15" [label="std::vector< real_t >" tooltip="std::vector< real_t >"] "34" [label="std::vector< std::vector< GeoNumPair > >" tooltip="std::vector< std::vector< GeoNumPair > >"] "11" [label="std::vector< std::vector< int_t > >" tooltip="std::vector< std::vector< int_t > >"] "41" [label="std::vector< std::vector< number_t > >" tooltip="std::vector< std::vector< number_t > >"] "22" [label="std::vector< string_t >" tooltip="std::vector< string_t >"] "33" [label="std::vector< xlifepp::GeomDomain * >" tooltip="std::vector< xlifepp::GeomDomain * >"] "32" [label="std::vector< xlifepp::GeomElement * >" tooltip="std::vector< xlifepp::GeomElement * >"] "36" [label="std::vector< xlifepp::Parameter * >" tooltip="std::vector< xlifepp::Parameter * >"] "7" [label="std::vector< xlifepp::Point >" tooltip="std::vector< xlifepp::Point >"] "26" [label="std::vector< xlifepp::Transformation * >" tooltip="std::vector< xlifepp::Transformation * >"] "30" [label="std::vector< xlifepp::Vector< real_t > >" tooltip="std::vector< xlifepp::Vector< real_t > >"] "3" [label="xlifepp::BoundingBox" tooltip="xlifepp::BoundingBox"] "23" [label="xlifepp::Collection< T >" tooltip="xlifepp::Collection< T >"] "12" [label="xlifepp::ExtrusionData" tooltip="xlifepp::ExtrusionData"] "40" [label="xlifepp::GeoNode" tooltip="xlifepp::GeoNode"] "2" [label="xlifepp::Geometry" tooltip="xlifepp::Geometry"] "16" [label="xlifepp::Matrix< K >" tooltip="xlifepp::Matrix< K >"] "31" [label="xlifepp::Mesh" tooltip="xlifepp::Mesh"] "6" [label="xlifepp::MinimalBox" tooltip="xlifepp::MinimalBox"] "35" [label="xlifepp::Parameters" tooltip="xlifepp::Parameters"] "28" [label="xlifepp::Parametrization" tooltip="xlifepp::Parametrization"] "27" [label="xlifepp::Point" tooltip="xlifepp::Point"] "1" [label="xlifepp::SetOfElems" tooltip="xlifepp::SetOfElems" fillcolor="#BFBFBF"] "13" [label="xlifepp::Transformation" tooltip="xlifepp::Transformation"] "19" [label="xlifepp::Vector< K >" tooltip="xlifepp::Vector< K >"] "21" -> "22" [dir=forward tooltip="public-inheritance"] "21" -> "23" [dir=forward tooltip="template-instance"] "14" -> "15" [dir=forward tooltip="public-inheritance"] "14" -> "16" [dir=forward tooltip="template-instance"] "18" -> "15" [dir=forward tooltip="public-inheritance"] "18" -> "19" [dir=forward tooltip="template-instance"] "29" -> "30" [dir=forward tooltip="public-inheritance"] "29" -> "19" [dir=forward tooltip="template-instance"] "38" -> "39" [dir=forward tooltip="template-instance"] "10" -> "9" [dir=forward tooltip="template-instance"] "8" -> "9" [dir=forward tooltip="template-instance"] "37" -> "9" [dir=forward tooltip="template-instance"] "17" -> "5" [dir=forward tooltip="template-instance"] "4" -> "5" [dir=forward tooltip="template-instance"] "20" -> "5" [dir=forward tooltip="template-instance"] "25" -> "5" [dir=forward tooltip="template-instance"] "15" -> "5" [dir=forward tooltip="template-instance"] "34" -> "5" [dir=forward tooltip="template-instance"] "11" -> "5" [dir=forward tooltip="template-instance"] "41" -> "5" [dir=forward tooltip="template-instance"] "22" -> "5" [dir=forward tooltip="template-instance"] "33" -> "5" [dir=forward tooltip="template-instance"] "32" -> "5" [dir=forward tooltip="template-instance"] "36" -> "5" [dir=forward tooltip="template-instance"] "7" -> "5" [dir=forward tooltip="template-instance"] "26" -> "5" [dir=forward tooltip="template-instance"] "30" -> "5" [dir=forward tooltip="template-instance"] "3" -> "4" [dir=forward tooltip="usage"] "23" -> "24" [dir=forward tooltip="public-inheritance"] "12" -> "13" [dir=forward tooltip="usage"] "12" -> "21" [dir=forward tooltip="usage"] "12" -> "25" [dir=forward tooltip="usage"] "12" -> "15" [dir=forward tooltip="usage"] "12" -> "18" [dir=forward tooltip="usage"] "12" -> "26" [dir=forward tooltip="usage"] "12" -> "27" [dir=forward tooltip="usage"] "40" -> "40" [dir=forward tooltip="usage"] "40" -> "2" [dir=forward tooltip="usage"] "2" -> "3" [dir=forward tooltip="usage"] "2" -> "6" [dir=forward tooltip="usage"] "2" -> "8" [dir=forward tooltip="usage"] "2" -> "10" [dir=forward tooltip="usage"] "2" -> "11" [dir=forward tooltip="usage"] "2" -> "12" [dir=forward tooltip="usage"] "2" -> "28" [dir=forward tooltip="usage"] "2" -> "2" [dir=forward tooltip="usage"] "2" -> "40" [dir=forward tooltip="usage"] "16" -> "17" [dir=forward tooltip="public-inheritance"] "31" -> "2" [dir=forward tooltip="usage"] "31" -> "7" [dir=forward tooltip="usage"] "31" -> "32" [dir=forward tooltip="usage"] "31" -> "33" [dir=forward tooltip="usage"] "31" -> "25" [dir=forward tooltip="usage"] "31" -> "34" [dir=forward tooltip="usage"] "31" -> "31" [dir=forward tooltip="usage"] "6" -> "7" [dir=forward tooltip="usage"] "35" -> "36" [dir=forward tooltip="usage"] "35" -> "37" [dir=forward tooltip="usage"] "28" -> "2" [dir=forward tooltip="usage"] "28" -> "18" [dir=forward tooltip="usage"] "28" -> "29" [dir=forward tooltip="usage"] "28" -> "31" [dir=forward tooltip="usage"] "28" -> "35" [dir=forward tooltip="usage"] "28" -> "38" [dir=forward tooltip="usage"] "27" -> "15" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "7" [dir=forward tooltip="usage"] "1" -> "41" [dir=forward tooltip="usage"] "13" -> "14" [dir=forward tooltip="usage"] "13" -> "18" [dir=forward tooltip="usage"] "13" -> "20" [dir=forward tooltip="usage"] "19" -> "17" [dir=forward tooltip="public-inheritance"] }

This class defines an initial mesh from a list of points (pts), a list of elements (elems) and a list of boundaries (bounds).

Each element is defined by N numbers corresponding to the rank of its N vertices in the vector pts ; the numbers start from 1. Thus, elems[k][i] is the number of the vertex (i+1) of the element number (k+1) (if the elements are numbered starting from 1), and 1 <= elems[k][i] <= pts.size(). The boundaries of the polygonal domain defined by the elements are also defined by point numbers with the same convention. Each boundary is defined by the list of numbers of the points they belong to, given in any order. The last argument nbsubdiv is the number of subdivisions wanted. The initial mesh corresponds to nbsubdiv=0. -> Important: the subdivision algorithm generate a new point on each edge of the mesh. It belongs to boundary B if the two end points of the edge belong to the boundary B ; it is an internal point otherwise. Owing to this rule, in order to get a correct result, care must be taken in the definition of the boundaries since too few boundaries may lead to get boundary points that are in fact inside the domain. For instance, subdividing one single triangle leads to mandatory define its three edges as boundaries.

Public Functions

inline SetOfElems(const std::vector<Point> &pts, const std::vector<std::vector<number_t>> &elems, const std::vector<std::vector<number_t>> &bounds, const std::vector<string_t> &names, const ShapeType esh, const number_t nbsubdiv = 1)#

default constructor

virtual string_t asString() const#

format as string

inline const std::vector<std::vector<number_t>> &bounds() const#

returns list of elements on boundary

inline virtual Geometry *clone() const#

virtual copy constructor

inline const std::vector<std::vector<number_t>> &elems() const#

returns list of elements

inline ShapeType elemShape() const#

returns shape of the elements

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

apply a homothety on a SetOfElems (1 key)

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

apply a homothety on a SetOfElems (2 keys)

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

apply a homothety on a SetOfElems

inline virtual SetOfElems &homothetize(real_t factor)#

apply a homothety on a SetOfElems

inline virtual number_t nbSides() const#

returns the number of sides

inline virtual number_t nbSubdiv() const#

returns number of subdivision

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

list of every point (non const)

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

list of every point (const)

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

apply a point reflection on a SetOfElems (1 key)

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

apply a point reflection on a SetOfElems

inline std::vector<Point> &pts()#

return list of points (non const)

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

returns list of points (const)

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

apply a reflection2d on a SetOfElems (1 key)

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

apply a reflection2d on a SetOfElems (2 keys)

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

apply a reflection2d on a SetOfElems

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

apply a reflection2d on a SetOfElems

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

apply a reflection3d on a SetOfElems (1 key)

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

apply a reflection3d on a SetOfElems (2 keys)

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

apply a reflection3d on a SetOfElems

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

apply a reflection3d on a SetOfElems

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

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

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

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

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

apply a rotation 2D on a SetOfElems

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

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

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

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

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

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

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

apply a rotation on a SetOfElems

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

apply a rotation on a SetOfElems

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

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

apply a rotation 3D on a SetOfElems

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

apply a rotation 3D on a SetOfElems

inline virtual SetOfElems *setofelems()#

access to child SetOfElems object

inline virtual const SetOfElems *setofelems() const#

access to child SetOfElems object (const)

virtual SetOfElems &transform(const Transformation &t)#

apply a geometrical transformation on a SetOfElems

apply a geometrical transformation to a SetOfElems

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

apply a translation on a SetOfElems (1 key)

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

apply a translation on a SetOfElems (3 reals version)

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

apply a translation on a SetOfElems (vector version)