![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
#include <geomObjects.h>
Public Member Functions | |
| Rectangle () | |
| Constructor. | |
| Rectangle (double Lx, double Ly, util::Point x=util::Point(), std::string description="") | |
| Constructor. | |
| Rectangle (const Rectangle &other) | |
| Copy constructor. | |
| Rectangle (util::Point x1, util::Point x2, std::string description="") | |
| Constructor. | |
| Rectangle & | operator= (const Rectangle &other) |
| Assignment operator. | |
| 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. | |
| bool | wallContactQuery (const util::Point &x, WallContactHit &hit) const override |
| 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. | |
| std::string | printStr (int nt, int lvl) const override |
| Returns the string containing printable information about the object. | |
| void | print (int nt, int lvl) const override |
| Prints the information about the object. | |
| void | print () const override |
| Prints the information about the object. | |
Interaction with point | |
| 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 |
| cons | |
| bool | doesIntersect (const util::Point &x) const override |
| Checks if point lies exactly on the boundary. | |
Interaction with box | |
| bool | isInside (const std::pair< util::Point, util::Point > &box) const override |
| Checks if box is completely inside. | |
| bool | isOutside (const std::pair< util::Point, util::Point > &box) const override |
| Checks if box is outside of the object. | |
| bool | isNear (const std::pair< util::Point, util::Point > &box, const double &tol) const override |
| Checks if box is within given distance of this object. | |
| bool | doesIntersect (const std::pair< util::Point, util::Point > &box) const override |
| Checks if box intersects this object. | |
Public Member Functions inherited from geom::GeomObject | |
| GeomObject (std::string name="", std::string description="") | |
| Constructor. | |
Data Fields | |
| std::vector< util::Point > | d_vertices |
| Vertices. | |
| util::Point | d_x |
| Center. | |
| double | d_Lx |
| Edge length of a rectangle in x-direction. | |
| double | d_Ly |
| Edge length of a rectangle in y-direction. | |
| double | d_r |
| Radius of bounding circle. | |
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. | |
Defines Rectangle.
Definition at line 1254 of file geomObjects.h.
|
inline |
Constructor.
Definition at line 1275 of file geomObjects.h.
|
inline |
Constructor.
| Lx | Length along x-direction |
| Ly | Length along y-direction |
| x | Center point |
| description | Description of object (e.g., further classification or any tag) |
Definition at line 1295 of file geomObjects.h.
References d_Lx, d_Ly, and d_vertices.
|
inline |
Copy constructor.
| other | Object to copy from |
Definition at line 1315 of file geomObjects.h.
References geom::GeomObject::d_tags.
|
inline |
Constructor.
| x1 | Left-bottom corner point |
| x2 | Right-top corner point |
| description | Description of object (e.g., further classification or any tag) |
Definition at line 1332 of file geomObjects.h.
References d_Lx, d_vertices, util::Point::d_x, util::Point::d_y, and util::Point::d_z.
|
overridevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented from geom::GeomObject.
Definition at line 657 of file geomObjects.cpp.
References d_r.
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from geom::GeomObject.
Definition at line 638 of file geomObjects.cpp.
References box().
Referenced by box(), doesIntersect(), isInside(), isNear(), isNear(), isOutside(), printStr(), and wallContactQuery().
|
overridevirtual |
Computes the bounding box of object.
| tol | Tolerance/padding used in creating bounding box |
Reimplemented from geom::GeomObject.
Definition at line 643 of file geomObjects.cpp.
References d_vertices, and d_x.
|
overridevirtual |
Computes the center of object.
Reimplemented from geom::GeomObject.
Definition at line 634 of file geomObjects.cpp.
References d_x.
|
overridevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 729 of file geomObjects.cpp.
References box(), geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point lies exactly on the boundary.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 696 of file geomObjects.cpp.
References isNearBoundary().
|
overridevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented from geom::GeomObject.
Definition at line 652 of file geomObjects.cpp.
References d_Lx, d_Ly, and util::isLess().
|
overridevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 701 of file geomObjects.cpp.
References box(), geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is inside this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 662 of file geomObjects.cpp.
References d_vertices, and geom::isPointInsideRectangle().
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 722 of file geomObjects.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 670 of file geomObjects.cpp.
References box(), and geom::isPointInsideBox().
Referenced by isNearBoundary().
|
overridevirtual |
cons
cons
Reimplemented from geom::GeomObject.
Definition at line 679 of file geomObjects.cpp.
References d_vertices, util::Point::d_x, util::Point::d_y, 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 711 of file geomObjects.cpp.
References box(), geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is outside of this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 666 of file geomObjects.cpp.
References isInside().
Assignment operator.
| other | Object to copy from |
Definition at line 1351 of file geomObjects.h.
References d_Lx, d_Ly, d_r, geom::GeomObject::d_tags, d_vertices, and d_x.
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from geom::GeomObject.
Definition at line 1503 of file geomObjects.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 1496 of file geomObjects.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 740 of file geomObjects.cpp.
References box(), d_Lx, d_Ly, geom::GeomObject::d_name, d_r, d_vertices, util::io::getTabS(), util::io::printBoxStr(), and util::io::printStr().
Referenced by print().
|
inlineoverridevirtual |
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 1368 of file geomObjects.h.
References d_Lx, d_Ly, d_r, d_vertices, d_x, and geom::mapSimilarity().
|
overridevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented from geom::GeomObject.
Definition at line 630 of file geomObjects.cpp.
|
overridevirtual |
Axis-aligned / vertex box surface (outward from filled rectangle).
Reimplemented from geom::GeomObject.
Definition at line 560 of file geomObjects.cpp.
References geom::WallContactHit::active, box(), geom::WallContactHit::closest, util::Point::d_x, util::Point::d_y, util::Point::d_z, util::Point::length(), geom::WallContactHit::outward_n, and geom::WallContactHit::signed_gap.
Referenced by main().
| double geom::Rectangle::d_Lx |
Edge length of a rectangle in x-direction.
Definition at line 1263 of file geomObjects.h.
Referenced by inscribedRadius(), operator=(), printStr(), Rectangle(), Rectangle(), transform(), and volume().
| double geom::Rectangle::d_Ly |
Edge length of a rectangle in y-direction.
Definition at line 1266 of file geomObjects.h.
Referenced by inscribedRadius(), operator=(), printStr(), Rectangle(), transform(), and volume().
| double geom::Rectangle::d_r |
Radius of bounding circle.
Definition at line 1269 of file geomObjects.h.
Referenced by boundingRadius(), operator=(), printStr(), and transform().
| std::vector<util::Point> geom::Rectangle::d_vertices |
Vertices.
Definition at line 1257 of file geomObjects.h.
Referenced by mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::assertRectangleAnnulusValid(), box(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildComplexRectangles2DOcc(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::embedPointInAnnulus2D(), isInside(), isNearBoundary(), operator=(), printStr(), Rectangle(), Rectangle(), and transform().
| util::Point geom::Rectangle::d_x |
Center.
Definition at line 1260 of file geomObjects.h.
Referenced by box(), center(), operator=(), and transform().