![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
2D U-shaped cavity: thick rectangular frame with the top (+y) side open. More...
#include <openRectChannel2D.h>
Public Member Functions | |
| OpenRectChannel2D () | |
| OpenRectChannel2D (double x0, double y0, double x1, double y1, double t, double z, std::string description="") | |
| OpenRectChannel2D (const OpenRectChannel2D &other) | |
| OpenRectChannel2D & | operator= (const OpenRectChannel2D &other) |
| void | buildVertices () |
| void | transform (const util::Point &translation, const double &scale, const double &angle, const util::Point &axis, const util::Point *rotationPoint) override |
Similarity about pivot \(\mathbf p\) (default: old center d_x), then rigid displacement \(\mathbf t\) = translation: \(\mathbf y = \mathbf p + s\,\mathbf R(\mathbf x-\mathbf p) + \mathbf t\). When \(\theta=0\) and \(s=1\), \(\mathbf y = \mathbf x + \mathbf t\) for every point and the center. | |
| double | volume () const override |
| Computes the volume (area in 2d, length in 1d) of object. | |
| util::Point | center () const override |
| Computes the center of object. | |
| std::pair< util::Point, util::Point > | box () const override |
| Computes the bounding box of object. | |
| std::pair< util::Point, util::Point > | box (const double &tol) const override |
| Computes the bounding box of object. | |
| double | inscribedRadius () const override |
| Computes the radius of biggest circle/sphere completely within the object. | |
| double | boundingRadius () const override |
| Computes the radius of smallest circle/sphere such that object can be fit into it. | |
| bool | isInside (const util::Point &x) const override |
| Checks if point is inside this object. | |
| bool | isOutside (const util::Point &x) const override |
| Checks if point is outside of this object. | |
| bool | isNear (const util::Point &x, const double &tol) const override |
| Checks if point is within given distance of this object. | |
| bool | isNearBoundary (const util::Point &x, const double &tol, const bool &within) const override |
| Checks if point is within given distance of this object. | |
| bool | doesIntersect (const util::Point &x) const override |
| Checks if point lies exactly on the boundary. | |
| bool | isInside (const std::pair< util::Point, util::Point > &bx) const override |
| Checks if box is completely inside. | |
| bool | isOutside (const std::pair< util::Point, util::Point > &bx) const override |
| Checks if box is outside of the object. | |
| bool | isNear (const std::pair< util::Point, util::Point > &bx, const double &tol) const override |
| Checks if box is within given distance of this object. | |
| bool | doesIntersect (const std::pair< util::Point, util::Point > &bx) const override |
| Checks if box intersects this object. | |
| std::string | printStr (int nt=0, int lvl=0) const override |
| Returns the string containing printable information about the object. | |
| void | print (int nt=0, int lvl=0) const override |
| Prints the information about the object. | |
| void | print () const override |
| Prints the information about the object. | |
Public Member Functions inherited from geom::GeomObject | |
| GeomObject (std::string name="", std::string description="") | |
| Constructor. | |
| virtual bool | wallContactQuery (const util::Point &x, WallContactHit &hit) const |
Closest-point / signed-gap query for analytical wall contact. Default: unsupported (returns false, clears hit). | |
Data Fields | |
| double | d_x0 = 0. |
| double | d_y0 = 0. |
| double | d_x1 = 0. |
| double | d_y1 = 0. |
| double | d_t = 0. |
| double | d_z = 0. |
| std::vector< util::Point > | d_vertices |
| CCW boundary of the U-shaped solid (10 vertices, uniform thickness t). | |
| util::Point | d_x |
Area centroid of the polygon (same convention as d_x on other GeomObjects). | |
Data Fields inherited from geom::GeomObject | |
| const std::string | d_name |
| name of object | |
| const std::string | d_description |
| Further description of object. | |
| std::vector< std::string > | d_tags |
| Tags/attributes about the object. | |
Private Member Functions | |
| bool | pointInPolygon2D (const util::Point &p) const |
| double | polygonArea2D () const |
| util::Point | polygonCentroid2D () const |
2D U-shaped cavity: thick rectangular frame with the top (+y) side open.
Parameters (createGeomObject): x0, y0, x1, y1, t, z — outer axis-aligned box [x0,x1]×[y0,y1] in the plane z = const, wall thickness t. Requires x1 − x0 > 2t, y1 − y0 > 2t, t > 0.
The polygon uses only horizontal/vertical edges: the top of each side wall at the opening is flat at y = y1 (not diagonal to the inner corner).
Definition at line 30 of file openRectChannel2D.h.
| geom::OpenRectChannel2D::OpenRectChannel2D | ( | ) |
Definition at line 49 of file openRectChannel2D.cpp.
| geom::OpenRectChannel2D::OpenRectChannel2D | ( | double | x0, |
| double | y0, | ||
| double | x1, | ||
| double | y1, | ||
| double | t, | ||
| double | z, | ||
| std::string | description = "" |
||
| ) |
Definition at line 53 of file openRectChannel2D.cpp.
References buildVertices().
| geom::OpenRectChannel2D::OpenRectChannel2D | ( | const OpenRectChannel2D & | other | ) |
Definition at line 66 of file openRectChannel2D.cpp.
References geom::GeomObject::d_tags.
|
overridevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented from geom::GeomObject.
Definition at line 217 of file openRectChannel2D.cpp.
References d_vertices, and d_x.
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from geom::GeomObject.
Definition at line 193 of file openRectChannel2D.cpp.
References box().
Referenced by box(), isNear(), and isNear().
|
overridevirtual |
Computes the bounding box of object.
| tol | Tolerance/padding used in creating bounding box |
Reimplemented from geom::GeomObject.
Definition at line 197 of file openRectChannel2D.cpp.
References d_vertices, util::Point::d_x, util::Point::d_y, and util::Point::d_z.
| void geom::OpenRectChannel2D::buildVertices | ( | ) |
Definition at line 94 of file openRectChannel2D.cpp.
References d_t, d_vertices, d_x, d_x0, d_x1, d_y0, d_y1, d_z, and polygonCentroid2D().
Referenced by OpenRectChannel2D().
|
overridevirtual |
Computes the center of object.
Reimplemented from geom::GeomObject.
Definition at line 191 of file openRectChannel2D.cpp.
References d_x.
|
overridevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 278 of file openRectChannel2D.cpp.
References geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point lies exactly on the boundary.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 254 of file openRectChannel2D.cpp.
References isNearBoundary().
|
overridevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented from geom::GeomObject.
Definition at line 213 of file openRectChannel2D.cpp.
References d_t.
|
overridevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 258 of file openRectChannel2D.cpp.
References geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is inside this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 225 of file openRectChannel2D.cpp.
References d_z, util::Point::d_z, and pointInPolygon2D().
Referenced by doesIntersect(), isInside(), isOutside(), and isOutside().
|
overridevirtual |
Checks if box is within given distance of this object.
| box | Box |
| tol | Tolerance used in checking the nearness |
Reimplemented from geom::GeomObject.
Definition at line 273 of file openRectChannel2D.cpp.
References geom::areBoxesNear(), and box().
|
overridevirtual |
Checks if point is within given distance of this object.
| x | Point |
| tol | Tolerance used in checking the nearness |
Reimplemented from geom::GeomObject.
Definition at line 235 of file openRectChannel2D.cpp.
References box(), and geom::isPointInsideBox().
Referenced by isNearBoundary().
|
overridevirtual |
Checks if point is within given distance of this object.
| x | Point |
| tol | Tolerance used in checking the nearness |
| within | Check if the point is within (inside) the object |
Reimplemented from geom::GeomObject.
Definition at line 240 of file openRectChannel2D.cpp.
References d_vertices, util::isLess(), and isNear().
Referenced by doesIntersect().
|
overridevirtual |
Checks if box is outside of the object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 265 of file openRectChannel2D.cpp.
References geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is outside of this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 231 of file openRectChannel2D.cpp.
References isInside().
| OpenRectChannel2D & geom::OpenRectChannel2D::operator= | ( | const OpenRectChannel2D & | other | ) |
Definition at line 79 of file openRectChannel2D.cpp.
References d_t, geom::GeomObject::d_tags, d_vertices, d_x, d_x0, d_x1, d_y0, d_y1, and d_z.
|
private |
Definition at line 114 of file openRectChannel2D.cpp.
References d_vertices, util::Point::d_x, and util::Point::d_y.
Referenced by isInside().
|
private |
Definition at line 130 of file openRectChannel2D.cpp.
References d_vertices.
Referenced by volume().
|
private |
Definition at line 143 of file openRectChannel2D.cpp.
References d_vertices, and util::Point::d_x.
Referenced by buildVertices(), and transform().
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from geom::GeomObject.
Definition at line 78 of file openRectChannel2D.h.
References print().
Referenced by print().
|
inlineoverridevirtual |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Reimplemented from geom::GeomObject.
Definition at line 77 of file openRectChannel2D.h.
References printStr().
|
overridevirtual |
Returns the string containing printable information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Reimplemented from geom::GeomObject.
Definition at line 285 of file openRectChannel2D.cpp.
References d_t, d_vertices, d_x0, d_x1, d_y0, d_y1, d_z, util::io::getTabS(), and util::io::printStr().
Referenced by print().
|
overridevirtual |
Similarity about pivot \(\mathbf p\) (default: old center d_x), then rigid displacement \(\mathbf t\) = translation: \(\mathbf y = \mathbf p + s\,\mathbf R(\mathbf x-\mathbf p) + \mathbf t\). When \(\theta=0\) and \(s=1\), \(\mathbf y = \mathbf x + \mathbf t\) for every point and the center.
| translation | Rigid translation vector \(\mathbf t\) (added after rotate+scale about \(\mathbf p\)) |
| scale | Uniform scale factor |
| angle | Rotation angle (radians) |
| axis | Axis of rotation |
| rotationPoint | If non-null, use as \(\mathbf p\); if null, use old d_x as pivot. |
Reimplemented from geom::GeomObject.
Definition at line 163 of file openRectChannel2D.cpp.
References d_t, d_vertices, d_x, util::Point::d_x, d_x0, d_x1, d_y0, d_y1, d_z, polygonCentroid2D(), and util::rotate().
|
overridevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented from geom::GeomObject.
Definition at line 187 of file openRectChannel2D.cpp.
References polygonArea2D().
| double geom::OpenRectChannel2D::d_t = 0. |
Definition at line 36 of file openRectChannel2D.h.
Referenced by buildVertices(), inscribedRadius(), operator=(), printStr(), and transform().
| std::vector<util::Point> geom::OpenRectChannel2D::d_vertices |
CCW boundary of the U-shaped solid (10 vertices, uniform thickness t).
Definition at line 39 of file openRectChannel2D.h.
Referenced by boundingRadius(), box(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenRectChannel2DGeo(), buildVertices(), isNearBoundary(), operator=(), pointInPolygon2D(), polygonArea2D(), polygonCentroid2D(), printStr(), and transform().
| util::Point geom::OpenRectChannel2D::d_x |
Area centroid of the polygon (same convention as d_x on other GeomObjects).
Definition at line 42 of file openRectChannel2D.h.
Referenced by boundingRadius(), buildVertices(), center(), operator=(), and transform().
| double geom::OpenRectChannel2D::d_x0 = 0. |
Definition at line 32 of file openRectChannel2D.h.
Referenced by mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenRectChannel2DGeo(), buildVertices(), operator=(), printStr(), and transform().
| double geom::OpenRectChannel2D::d_x1 = 0. |
Definition at line 34 of file openRectChannel2D.h.
Referenced by mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenRectChannel2DGeo(), buildVertices(), operator=(), printStr(), and transform().
| double geom::OpenRectChannel2D::d_y0 = 0. |
Definition at line 33 of file openRectChannel2D.h.
Referenced by mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenRectChannel2DGeo(), buildVertices(), operator=(), printStr(), and transform().
| double geom::OpenRectChannel2D::d_y1 = 0. |
Definition at line 35 of file openRectChannel2D.h.
Referenced by mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenRectChannel2DGeo(), buildVertices(), operator=(), printStr(), and transform().
| double geom::OpenRectChannel2D::d_z = 0. |
Definition at line 37 of file openRectChannel2D.h.
Referenced by buildVertices(), isInside(), operator=(), printStr(), and transform().