Class xlifepp::Geometry#
-
class Geometry#
-
Inheritence diagram for xlifepp::Geometry:
Collaboration diagram for xlifepp::Geometry:
handles geometric data of the physical problem
Subclassed by xlifepp::Curve, xlifepp::SetOfElems, xlifepp::SetOfPoints, xlifepp::Surface, xlifepp::Volume
Public Functions
-
Geometry()#
-
void constructor
-
explicit Geometry(const BoundingBox &bb, const string_t &na = "", ShapeType sh = _noShape, const string_t &nx = "x", const string_t &ny = "y", const string_t &nz = "z")#
-
basic constructor from bounding box
-
Geometry(const BoundingBox &bb, dimen_t d, const string_t &na = "", ShapeType sh = _noShape, const string_t &nx = "x", const string_t &ny = "y", const string_t &nz = "z")#
-
basic constructor from bounding box and dim
-
explicit Geometry(const string_t &fn)#
-
constructor from file (only Brep up to now)
init variable names, check domName (dim_ has to be already set !!!)
-
explicit Geometry(dimen_t d, const string_t &na = "", ShapeType sh = _noShape, const string_t &nx = "x", const string_t &ny = "y", const string_t &nz = "z")#
-
basic constructor from (unit bounding box)
constructor from file (only Brep up to now)
-
void addSuffix(const string_t &s)#
-
add a suffix to all names (geometry names and side domain names) format as string
-
const Parametrization &boundaryParametrization() const#
-
return boundary_parametrization if allocated
-
inline Parametrization *boundaryParametrizationP()#
-
return boundary prametrization pointer
-
virtual std::vector<const Point*> boundNodes() const#
-
return the list of boundary nodes defining the Geometry
-
bool buildC0PiecewiseParametrization() const#
-
try to build piecewise parametrization (for composite geometry)
build C0 piecewise parametrization of a composite geometry if not built
-
void buildConnectedParts() const#
-
build connectedParts structure
build connectedParts:
collect all the geometry components of same dimension that are connected
connected parts are sorted so that two geometries are adjacent to each other connectedParts is empty for canonical geometry
-
Parametrization &buildParametrization() const#
-
build parametrization if not built (for canonical geometry)
build parametrization of a composite geometry if not built
-
void buildPiecewiseParametrization() const#
-
build non C0 piecewise parametrization (for composite geometry)
-
void buildSideMaps(std::map<Geometry*, std::vector<std::set<number_t>>> &geomsides, std::map<std::set<number_t>, std::list<std::pair<Geometry*, number_t>>> &sidemap) const#
-
build side maps used by buildPiecewiseParametrisation functions
build non C0 piecewise parametrization (for composite geometry)
-
Strings buildSideNamesAfterCheck(number_t n, number_t n2 = 0) const#
-
check if n side names are given and complete when single or empty
We check if sideNames_ has size 0, 1, or n and return an equivalent Strings of size n n2 is an optional secondary possible size (case for some particular geometries)
-
void checkSideNamesAndUpdate(number_t n, number_t n2 = 0)#
-
check if n side names are given and update size when single or empty
We check if sideNames_ has size 0, 1, or n and update it with size n n2 is an optional secondary possible size (case for some particular geometries)
-
void cleanInclusions()#
-
clean geometries_ so that inclusions are not included by other ones in the list
-
void clearCompositeData()#
-
clear components_, geometries_, loops_ and connectedParts_ data
-
void clearExtrusionData()#
-
clear extrusionData_
-
void clearParametrization()#
-
reset parametrization pointers
-
virtual void collect(const string_t &n, std::list<Geometry*> &geoms) const#
-
collect in a list all canonical geometry’s with name n
-
void computeBB()#
-
compute the bounding box for a composite/loop geometry
-
inline virtual void computeMB()#
-
compute the minimal box for a composite/loop geometry
compute the minimal box
-
inline const std::vector<std::vector<int_t>> &connectedParts() const#
-
accessor to connectedParts_ (const)
-
virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> curves() const#
-
return the list of curves defining the borders of a 2D Geometry
-
inline string_t &domName()#
-
get the domain name (writable)
-
inline const string_t &domName() const#
-
get the domain name
-
inline void domName(const string_t &nm)#
-
set the domain name
-
inline virtual EllipsoidSidePart *ellipsoidSidePart()#
-
access to child Pyramid object
-
inline virtual const EllipsoidSidePart *ellipsoidSidePart() const#
-
access to child EllipsoidSidePart object (const)
-
inline ExtrusionData *extrusionData()#
-
return the data for extruded geometry
-
inline const ExtrusionData *extrusionData() const#
-
return the data for extruded geometry (const)
-
Geometry *find(const string_t &n) const#
-
return geometry with name n (a canonical geometry or a composite of canonical geometry’s)
-
inline const std::map<number_t, std::vector<number_t>> &geometries() const#
-
accessor to geometries_ (const)
-
inline virtual const std::vector<real_t> &h() const#
-
return the hsteps of the geometry
-
inline virtual Hexahedron *hexahedron()#
-
access to child Hexahedron object
-
inline virtual const Hexahedron *hexahedron() const#
-
access to child Hexahedron object (const)
-
inline virtual Geometry &homothetize(const Parameter &p1, const Parameter &p2)#
-
apply a homothety on a Geometry (2 keys)
-
inline virtual Geometry &homothetize(const Point &c = Point(0., 0., 0.), real_t factor = 1.)#
-
apply a homothety on a Geometry
-
void init(const string_t &nx = "x", const string_t &ny = "y", const string_t &nz = "z")#
-
intialize OCData, varNames and check domName
init variable names, check domName, set oc pointer null (dim_ has to be already set)
-
void initName(const string_t &nx = "x", const string_t &ny = "y", const string_t &nz = "z")#
-
intialize varNames and check domName
-
inline virtual bool isClosed() const#
-
return true if closed geometry
-
bool isInside(const Geometry &g) const#
-
check if geometry is inside another geometry (g) build a geometric geodesic starting at (x,dx)
-
inline virtual bool isPlane() const#
-
return true if geometry is plane
-
inline virtual bool isTranslated(const Geometry &g, Point &T) const#
-
return true if there is a translation between current geometry and an other one, T is the translation vector
-
inline virtual real_t measure() const#
-
return the length/area/volume of the geometry
-
inline virtual number_t n(number_t i) const#
-
accessor to number of nodes on the Geometry (read only)
-
inline 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<const Point*> nodes() const#
-
return the list of nodes defining the Geometry (const)
-
inline void ocTransform(const Transformation &t)#
-
< apply a Transformation to OC oject if available (binding ocTransformP to avoid spoiling a lot of functions with OC macro)
-
inline virtual Parallelepiped *parallelepiped()#
-
access to child Parallelepiped object
-
inline virtual const Parallelepiped *parallelepiped() const#
-
access to child Parallelepiped object (const)
-
inline virtual Parallelogram *parallelogram()#
-
access to child Parallelogram object
-
inline virtual const Parallelogram *parallelogram() const#
-
access to child Parallelogram object (const)
-
const Parametrization ¶metrization() const#
-
return parametrization if allocated
-
inline Parametrization *parametrizationP()#
-
return parametrization pointer
-
inline virtual ParametrizedArc *parametrizedArc()#
-
access to child CircArc object
-
inline virtual const ParametrizedArc *parametrizedArc() const#
-
access to child CircArc object (const)
-
inline virtual ParametrizedSurface *parametrizedSurface()#
-
access to child ParametrizedSurface object
-
inline virtual const ParametrizedSurface *parametrizedSurface() const#
-
access to child ParametrizedSurface object (const)
-
inline virtual Geometry &pointReflect(const Parameter &p1)#
-
apply a point reflection on a Geometry (1 key)
-
inline virtual Geometry &pointReflect(const Point &c = Point(0., 0., 0.))#
-
apply a point reflection on a Geometry
-
inline virtual Polyhedron *polyhedron()#
-
access to child Polyhedron object
-
inline virtual const Polyhedron *polyhedron() const#
-
access to child Polyhedron object (const)
-
void printBoundNodes(std::ostream &os) const#
-
print Geometry boundNodes() vector
-
inline virtual void printDetail(std::ostream &os) const#
-
print additional information
-
inline virtual Quadrangle *quadrangle()#
-
access to child Quadrangle object
-
inline virtual const Quadrangle *quadrangle() const#
-
access to child Quadrangle object (const)
-
inline virtual Geometry &reflect2d(const Parameter &p1, const Parameter &p2)#
-
apply a reflection2d on a Geometry (2 keys)
-
inline virtual Geometry &reflect2d(const Point &c, real_t dx, real_t dy = 0.)#
-
apply a reflection2d on a Geometry
-
inline virtual Geometry &reflect2d(const Point &c = Point(0., 0.), std::vector<real_t> d = std::vector<real_t>(2, 0.))#
-
apply a reflection2d on a Geometry
-
inline virtual Geometry &reflect3d(const Parameter &p1, const Parameter &p2)#
-
apply a reflection3d on a Geometry (2 keys)
-
inline virtual Geometry &reflect3d(const Point &c, real_t nx, real_t ny, real_t nz = 0.)#
-
apply a reflection3d on a Geometry
-
inline virtual Geometry &reflect3d(const Point &c = Point(0., 0., 0.), std::vector<real_t> n = std::vector<real_t>(3, 0.))#
-
apply a reflection3d on a Geometry
-
inline virtual RevCylinder *revCylinder()#
-
access to child RevCylinder object
-
inline virtual const RevCylinder *revCylinder() const#
-
access to child RevCylinder object (const)
-
inline virtual Geometry &rotate2d(const Parameter &p1, const Parameter &p2)#
-
apply a rotation 2D on a Geometry (2 keys)
-
inline virtual Geometry &rotate2d(const Point &c, real_t angle = 0.)#
-
apply a rotation 2D on a Geometry
-
inline virtual Geometry &rotate3d(const Parameter &p1, const Parameter &p2)#
-
apply a rotation 3D on a Geometry (2 keys)
-
inline virtual Geometry &rotate3d(const Parameter &p1, const Parameter &p2, const Parameter &p3)#
-
apply a rotation 3D on a Geometry (3 keys)
-
inline virtual Geometry &rotate3d(const Point &c, real_t dx, real_t dy, real_t angle)#
-
apply a rotation on a Geometry
-
inline virtual Geometry &rotate3d(const Point &c, real_t dx, real_t dy, real_t dz, real_t angle)#
-
apply a rotation on a Geometry
-
inline virtual Geometry &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 Geometry
-
inline virtual Geometry &rotate3d(real_t dx, real_t dy, real_t angle)#
-
apply a rotation 3D on a Geometry
-
inline virtual Geometry &rotate3d(real_t dx, real_t dy, real_t dz, real_t angle)#
-
apply a rotation 3D on a Geometry
-
void setBoundaryParametrization(const Parametrization &par)#
-
set boundary_parametrization
-
inline virtual void setHstep(real_t h)#
-
set the main h step, if not overriden do nothing
-
inline virtual SetOfElems *setofelems()#
-
access to child SetOfElems object
-
inline virtual const SetOfElems *setofelems() const#
-
access to child SetOfElems object (const)
-
inline virtual SetOfPoints *setofpoints()#
-
access to child SetOfPoints object
-
inline virtual const SetOfPoints *setofpoints() const#
-
access to child SetOfPoints object (const)
-
void setParametrization(const Parametrization &par)#
-
set parametrization
-
inline std::vector<string_t> &sideNames()#
-
returns the list of side domains’ names
-
inline const std::vector<string_t> &sideNames() const#
-
returns the list of side domains’ names
-
inline virtual SplineSurface *splineSurface()#
-
access to child SplineSurface object
-
inline virtual const SplineSurface *splineSurface() const#
-
access to child SplineSurface object (const)
-
virtual std::vector<std::pair<ShapeType, std::vector<const Point*>>> surfs() const#
-
return the list of surfaces defining the borders of a 3D Geometry
-
inline virtual Tetrahedron *tetrahedron()#
-
access to child Tetrahedron object
-
inline virtual const Tetrahedron *tetrahedron() const#
-
access to child tetrahedron object (const)
-
inline const string_t &teXFilename() const#
-
returns tex file name
-
inline void teXFilename(const string_t &fn)#
-
set filename to get a TeX output (drawing of the mesh)
-
virtual Geometry &transform(const Transformation &t)#
-
apply a geometrical transformation on a Geometry
-
inline virtual Geometry &translate(real_t ux, real_t uy = 0., real_t uz = 0.)#
-
apply a translation on a Geometry (3 reals version)
-
inline virtual Geometry &translate(std::vector<real_t> u)#
-
apply a translation on a Geometry (vector version)
-
inline virtual TrunkSidePart *trunkSidePart()#
-
access to child Pyramid object
-
inline virtual const TrunkSidePart *trunkSidePart() const#
-
access to child EllipsoidSidePart object (const)
-
inline virtual bool withNnodes() const#
-
check if geometry is defined only with _nnodes or with _hsteps option
Public Members
-
BoundingBox boundingBox#
-
the bounding box
-
mutable bool crackable#
-
tag to define if the geometry should be cracked or not
-
mutable string_t crackDomNameToOpen#
-
when open crack, name to the side domain to open.
-
mutable bool force#
-
tag to force inclusion when geometry engines fails
-
bool isPlaneSurface#
-
used only for 2D loop geometries
-
MinimalBox minimalBox#
-
the smallest box containing the geometry
Public Static Attributes
-
static bool checkInclusion = true#
-
to manage inclusion checking in composite algorithms
Friends
-
friend Geometry extrude(const Geometry &g, const Transformation &t, const std::vector<Parameter> &ps)#
-
main routine for the definition of a geometry by extrusion of another geometry, with a list if parameters
main external routine for the definition of a geometry by extrusion of another geometry, with a list if parameters
-
friend Geometry extrude(const Geometry &g, const Transformation &t, number_t layers, std::vector<string_t> sidenames)#
-
definition of a geometry by extrusion of another geometry, with side names
-
friend Geometry extrude(const Geometry &g, const Transformation &t, number_t layers, string_t domName, std::vector<string_t> sidenames)#
-
definition of a geometry by extrusion of another geometry, with name and side names
-
friend Geometry extrude(const Geometry &g, const Transformation &t, std::vector<string_t> sidenames)#
-
definition of a geometry by extrusion of another geometry, with side names
-
friend Geometry extrude(const Geometry &g, const Transformation &t, string_t domName, std::vector<string_t> sidenames)#
-
definition of a geometry by extrusion of another geometry, with name and side names
-
friend Geometry operator+(const Geometry &g1, const Geometry &g2)#
-
union of g1 and g2 (general case)
-
friend Geometry planeSurfaceFrom(const Geometry &c, string_t domName)#
-
definition of a geometry 2D from an union of boundaries 1D
-
friend Geometry ruledSurfaceFrom(const Geometry &c, string_t domName)#
-
definition of a geometry 2D from an union of boundaries 1D
-
friend Geometry surfaceFrom(const Geometry &c, string_t domName, bool isPlaneSurface)#
-
definition of a geometry 2D from its boundary 1D
definition of a geometry 2D from an union of boundaries 1D
-
friend Geometry toComposite(const Geometry &g)#
-
conversion of a canonical or loop Geometry into a composite geometry with one component
return a composite geometry with only one component: g
if g is canonical, the components_ vector contains only g
if g is loop, the components_ vector contains every border of g and g itself
if g is composite, it does nothing
this function is necessary when initializing composite Geometry before using += and -= operators
-
Geometry()#