![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Hollow axis-aligned cuboid shell with uniform wall thickness and one outer face open. More...
#include <openCuboidChannel3D.h>
Public Member Functions | |
| OpenCuboidChannel3D () | |
| OpenCuboidChannel3D (double x0, double y0, double z0, double x1, double y1, double z1, double t, int open_face, std::string description="") | |
| OpenCuboidChannel3D (const OpenCuboidChannel3D &other) | |
| OpenCuboidChannel3D & | operator= (const OpenCuboidChannel3D &other) |
| 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 | |
| util::Point | d_lo |
| Outer AABB low corner. | |
| util::Point | d_hi |
| Outer AABB high corner. | |
| double | d_t = 0. |
| Wall thickness. | |
| int | d_openFace = 0 |
| Which outer face is open: 0=+x, 1=−x, 2=+y, 3=−y, 4=+z, 5=−z (world axes after transform). | |
| util::Point | d_x |
| Centroid of the open shell (cached). | |
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 | |
| void | validateAndRefreshCenter () |
| bool | inClosedShell (const util::Point &p) const |
| bool | inRemovedFaceSlab (const util::Point &p) const |
| util::Point | computeCenter () const |
Hollow axis-aligned cuboid shell with uniform wall thickness and one outer face open.
Deck / GeomObject::d_name: **open_cuboid_channel_3d** (pairs with 2D open_rect_channel_2d, which uses a rectangular footprint in the plane).
Parameters (createGeomObject): x0,y0,z0,x1,y1,z1,t,open_face — outer AABB [x0,x1]×[y0,y1]×[z0,z1], wall thickness t, and open_face ∈ {0,…,5}: 0 = +x, 1 = −x, 2 = +y, 3 = −y, 4 = +z, 5 = −z (world axes).
The solid is the closed shell (outer minus inner cavity) with the corresponding outer face slab removed (the “roof” / lid of that side), so the cavity connects to the exterior through that opening.
Definition at line 34 of file openCuboidChannel3D.h.
| geom::OpenCuboidChannel3D::OpenCuboidChannel3D | ( | ) |
Definition at line 62 of file openCuboidChannel3D.cpp.
| geom::OpenCuboidChannel3D::OpenCuboidChannel3D | ( | double | x0, |
| double | y0, | ||
| double | z0, | ||
| double | x1, | ||
| double | y1, | ||
| double | z1, | ||
| double | t, | ||
| int | open_face, | ||
| std::string | description = "" |
||
| ) |
Definition at line 65 of file openCuboidChannel3D.cpp.
References validateAndRefreshCenter().
| geom::OpenCuboidChannel3D::OpenCuboidChannel3D | ( | const OpenCuboidChannel3D & | other | ) |
Definition at line 76 of file openCuboidChannel3D.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 265 of file openCuboidChannel3D.cpp.
|
overridevirtual |
Computes the bounding box of object.
Reimplemented from geom::GeomObject.
Definition at line 257 of file openCuboidChannel3D.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 259 of file openCuboidChannel3D.cpp.
|
overridevirtual |
Computes the center of object.
Reimplemented from geom::GeomObject.
Definition at line 255 of file openCuboidChannel3D.cpp.
References d_x.
|
private |
Definition at line 179 of file openCuboidChannel3D.cpp.
References d_hi, d_lo, d_openFace, d_t, util::Point::d_x, util::Point::d_y, and util::Point::d_z.
Referenced by transform(), and validateAndRefreshCenter().
|
overridevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 321 of file openCuboidChannel3D.cpp.
References geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point lies exactly on the boundary.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 297 of file openCuboidChannel3D.cpp.
References isNearBoundary().
|
private |
Definition at line 100 of file openCuboidChannel3D.cpp.
References d_hi, d_lo, d_t, util::Point::d_x, util::Point::d_y, and util::Point::d_z.
Referenced by inRemovedFaceSlab(), and isInside().
|
private |
Definition at line 115 of file openCuboidChannel3D.cpp.
References d_hi, d_lo, d_openFace, d_t, util::Point::d_x, util::Point::d_y, util::Point::d_z, and inClosedShell().
Referenced by isInside().
|
overridevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented from geom::GeomObject.
Definition at line 263 of file openCuboidChannel3D.cpp.
References d_t.
|
overridevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 301 of file openCuboidChannel3D.cpp.
References geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is inside this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 275 of file openCuboidChannel3D.cpp.
References inClosedShell(), and inRemovedFaceSlab().
Referenced by doesIntersect(), isInside(), isNearBoundary(), 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 316 of file openCuboidChannel3D.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 281 of file openCuboidChannel3D.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 285 of file openCuboidChannel3D.cpp.
References isInside(), isNear(), and isOutside().
Referenced by doesIntersect().
|
overridevirtual |
Checks if box is outside of the object.
| box | Box |
Reimplemented from geom::GeomObject.
Definition at line 308 of file openCuboidChannel3D.cpp.
References geom::getCornerPoints(), and isInside().
|
overridevirtual |
Checks if point is outside of this object.
| x | Point |
Reimplemented from geom::GeomObject.
Definition at line 279 of file openCuboidChannel3D.cpp.
References isInside().
Referenced by isNearBoundary().
| OpenCuboidChannel3D & geom::OpenCuboidChannel3D::operator= | ( | const OpenCuboidChannel3D & | other | ) |
Definition at line 86 of file openCuboidChannel3D.cpp.
References d_hi, d_lo, d_openFace, d_t, geom::GeomObject::d_tags, and d_x.
|
inlineoverridevirtual |
Prints the information about the object.
Reimplemented from geom::GeomObject.
Definition at line 82 of file openCuboidChannel3D.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 81 of file openCuboidChannel3D.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 328 of file openCuboidChannel3D.cpp.
References d_hi, d_lo, d_openFace, d_t, d_x, util::Point::d_x, util::Point::d_y, util::Point::d_z, util::io::getTabS(), util::Point::printStr(), and volume().
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 222 of file openCuboidChannel3D.cpp.
References computeCenter(), d_hi, d_lo, d_openFace, d_t, d_x, util::Point::d_x, util::Point::d_y, util::Point::d_z, and geom::mapSimilarity().
|
private |
Definition at line 98 of file openCuboidChannel3D.cpp.
References computeCenter(), and d_x.
Referenced by OpenCuboidChannel3D().
|
overridevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented from geom::GeomObject.
Definition at line 236 of file openCuboidChannel3D.cpp.
References d_hi, d_lo, d_openFace, d_t, util::Point::d_x, util::Point::d_y, and util::Point::d_z.
Referenced by printStr().
| util::Point geom::OpenCuboidChannel3D::d_hi |
Outer AABB high corner.
Definition at line 39 of file openCuboidChannel3D.h.
Referenced by boundingRadius(), box(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenCuboidChannel3DGeo(), computeCenter(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::embedPointOpenCuboidChannel3DForMesh(), inClosedShell(), inRemovedFaceSlab(), operator=(), printStr(), transform(), and volume().
| util::Point geom::OpenCuboidChannel3D::d_lo |
Outer AABB low corner.
Definition at line 37 of file openCuboidChannel3D.h.
Referenced by boundingRadius(), box(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenCuboidChannel3DGeo(), computeCenter(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::embedPointOpenCuboidChannel3DForMesh(), inClosedShell(), inRemovedFaceSlab(), operator=(), printStr(), transform(), and volume().
| int geom::OpenCuboidChannel3D::d_openFace = 0 |
Which outer face is open: 0=+x, 1=−x, 2=+y, 3=−y, 4=+z, 5=−z (world axes after transform).
Definition at line 45 of file openCuboidChannel3D.h.
Referenced by mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenCuboidChannel3DGeo(), computeCenter(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::embedPointOpenCuboidChannel3DForMesh(), inRemovedFaceSlab(), operator=(), printStr(), transform(), and volume().
| double geom::OpenCuboidChannel3D::d_t = 0. |
Wall thickness.
Definition at line 41 of file openCuboidChannel3D.h.
Referenced by mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenCuboidChannel3DGeo(), computeCenter(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::embedPointOpenCuboidChannel3DForMesh(), inClosedShell(), inRemovedFaceSlab(), inscribedRadius(), operator=(), printStr(), transform(), and volume().
| util::Point geom::OpenCuboidChannel3D::d_x |
Centroid of the open shell (cached).
Definition at line 48 of file openCuboidChannel3D.h.
Referenced by boundingRadius(), center(), operator=(), printStr(), transform(), and validateAndRefreshCenter().