![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
Defines abstract geometrical domain. More...
#include <geomObjects.h>
Public Member Functions | |
| GeomObject (std::string name="", std::string description="") | |
| Constructor. | |
| virtual double | volume () const |
| Computes the volume (area in 2d, length in 1d) of object. | |
| virtual util::Point | center () const |
| Computes the center of object. | |
| virtual std::pair< util::Point, util::Point > | box () const |
| Computes the bounding box of object. | |
| virtual std::pair< util::Point, util::Point > | box (const double &tol) const |
| Computes the bounding box of object. | |
| virtual double | inscribedRadius () const |
| Computes the radius of biggest circle/sphere completely within the object. | |
| virtual double | boundingRadius () const |
| Computes the radius of smallest circle/sphere such that object can be fit into it. | |
| virtual std::string | printStr (int nt, int lvl) const |
| Returns the string containing printable information about the object. | |
| virtual void | print (int nt, int lvl) const |
| Prints the information about the object. | |
| virtual void | print () const |
| Prints the information about the object. | |
| virtual void | transform (const util::Point &translation, const double &scale, const double &angle, const util::Point &axis, const util::Point *rotationPoint=nullptr) |
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. | |
| 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). | |
Interaction with point | |
| virtual bool | isInside (const util::Point &x) const |
| Checks if point is inside this object. | |
| virtual bool | isOutside (const util::Point &x) const |
| Checks if point is outside of this object. | |
| virtual bool | isNear (const util::Point &x, const double &tol) const |
| Checks if point is within given distance of this object. | |
| virtual bool | isNearBoundary (const util::Point &x, const double &tol, const bool &within) const |
| Checks if point is within given distance of this object. | |
| virtual bool | doesIntersect (const util::Point &x) const |
| Checks if point lies exactly on the boundary. | |
Interaction with box | |
| virtual bool | isInside (const std::pair< util::Point, util::Point > &box) const |
| Checks if box is completely inside. | |
| virtual bool | isOutside (const std::pair< util::Point, util::Point > &box) const |
| Checks if box is outside of the object. | |
| virtual bool | isNear (const std::pair< util::Point, util::Point > &box, const double &tol) const |
| Checks if box is within given distance of this object. | |
| virtual bool | doesIntersect (const std::pair< util::Point, util::Point > &box) const |
| Checks if box intersects this object. | |
Data Fields | |
| 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 abstract geometrical domain.
Definition at line 122 of file geomObjects.h.
|
inlineexplicit |
Constructor.
| name | Name of the geometric object |
| description | Description of object (e.g., further classification or any tag) |
Definition at line 140 of file geomObjects.h.
|
inlinevirtual |
Computes the radius of smallest circle/sphere such that object can be fit into it.
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 187 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::boundingRadius().
|
inlinevirtual |
Computes the bounding box of object.
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 161 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::box(), geom::AnnulusGeomObject::box(), and mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOccBoxFromAabb().
|
inlinevirtual |
Computes the bounding box of object.
| tol | Tolerance/padding used in creating bounding box |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 171 of file geomObjects.h.
|
inlinevirtual |
Computes the center of object.
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 155 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::center(), and geom::AnnulusGeomObject::transform().
|
inlinevirtual |
Checks if box intersects this object.
| box | Box |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 281 of file geomObjects.h.
|
inlinevirtual |
Checks if point lies exactly on the boundary.
| x | Point |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 236 of file geomObjects.h.
|
inlinevirtual |
Computes the radius of biggest circle/sphere completely within the object.
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 180 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::inscribedRadius().
|
inlinevirtual |
Checks if box is completely inside.
| box | Box |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 250 of file geomObjects.h.
|
inlinevirtual |
Checks if point is inside this object.
| x | Point |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 198 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::isInside().
|
inlinevirtual |
Checks if box is within given distance of this object.
| box | Box |
| tol | Tolerance used in checking the nearness |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 270 of file geomObjects.h.
|
inlinevirtual |
Checks if point is within given distance of this object.
| x | Point |
| tol | Tolerance used in checking the nearness |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 214 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::isNear(), and geom::AnnulusGeomObject::isNear().
|
inlinevirtual |
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 in geom::Plane, geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 225 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::isNearBoundary().
|
inlinevirtual |
Checks if box is outside of the object.
| box | Box |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 260 of file geomObjects.h.
|
inlinevirtual |
Checks if point is outside of this object.
| x | Point |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 206 of file geomObjects.h.
|
inlinevirtual |
Prints the information about the object.
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::NullGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 321 of file geomObjects.h.
References print().
Referenced by print().
|
inlinevirtual |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::NullGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 316 of file geomObjects.h.
References printStr().
|
inlinevirtual |
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 in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::NullGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 295 of file geomObjects.h.
References d_description, d_name, and util::io::getTabS().
Referenced by print(), and geom::AnnulusGeomObject::printStr().
|
inlinevirtual |
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 in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::NullGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 335 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::transform().
|
inlinevirtual |
Computes the volume (area in 2d, length in 1d) of object.
Reimplemented in geom::AnnulusGeomObject, geom::ComplexGeomObject, geom::Plane, geom::Line, geom::Triangle, geom::Square, geom::Rectangle, geom::Hexagon, geom::Drum2D, geom::Cube, geom::Cuboid, geom::Circle, geom::Ellipse, geom::Sphere, geom::Ellipsoid, geom::Cylinder, geom::OpenCuboidChannel3D, and geom::OpenRectChannel2D.
Definition at line 149 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::center(), and geom::AnnulusGeomObject::volume().
|
inlinevirtual |
Closest-point / signed-gap query for analytical wall contact. Default: unsupported (returns false, clears hit).
Reimplemented in geom::Plane, geom::Line, and geom::Rectangle.
Definition at line 345 of file geomObjects.h.
Referenced by anonymous_namespace{main.cpp}::checkWallSpringOnly(), and anonymous_namespace{main.cpp}::minGrainWallGap().
| const std::string geom::GeomObject::d_description |
Further description of object.
Definition at line 129 of file geomObjects.h.
Referenced by printStr().
| const std::string geom::GeomObject::d_name |
name of object
Definition at line 126 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::AnnulusGeomObject(), mesh_gen::buildAnnulus2DInCurrentModel(), mesh_gen::buildAnnulus3DInCurrentModel(), mesh_gen::buildGmshGeometryInCurrentModel(), geom::ComplexGeomObject::ComplexGeomObject(), geom::createGeomDeepCopy(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::embedPointInAnnulus2D(), mesh_gen::anonymous_namespace{annulusMesh3D.cpp}::embedPointInAnnulus3D(), printStr(), geom::AnnulusGeomObject::printStr(), geom::ComplexGeomObject::printStr(), geom::NullGeomObject::printStr(), geom::Line::printStr(), geom::Triangle::printStr(), geom::Square::printStr(), geom::Rectangle::printStr(), geom::Hexagon::printStr(), geom::Drum2D::printStr(), geom::Cube::printStr(), geom::Cuboid::printStr(), geom::Circle::printStr(), geom::Ellipse::printStr(), geom::Sphere::printStr(), geom::Ellipsoid::printStr(), and geom::Cylinder::printStr().
| std::vector<std::string> geom::GeomObject::d_tags |
Tags/attributes about the object.
Definition at line 132 of file geomObjects.h.
Referenced by geom::AnnulusGeomObject::AnnulusGeomObject(), geom::Circle::Circle(), geom::ComplexGeomObject::ComplexGeomObject(), geom::Cube::Cube(), geom::Cuboid::Cuboid(), geom::Cylinder::Cylinder(), geom::Ellipse::Ellipse(), geom::Ellipsoid::Ellipsoid(), geom::Hexagon::Hexagon(), geom::Line::Line(), geom::NullGeomObject::NullGeomObject(), geom::OpenCuboidChannel3D::OpenCuboidChannel3D(), geom::OpenRectChannel2D::OpenRectChannel2D(), geom::AnnulusGeomObject::operator=(), geom::Circle::operator=(), geom::ComplexGeomObject::operator=(), geom::Cube::operator=(), geom::Cuboid::operator=(), geom::Cylinder::operator=(), geom::Drum2D::operator=(), geom::Ellipse::operator=(), geom::Ellipsoid::operator=(), geom::Hexagon::operator=(), geom::Line::operator=(), geom::NullGeomObject::operator=(), geom::OpenCuboidChannel3D::operator=(), geom::OpenRectChannel2D::operator=(), geom::Plane::operator=(), geom::Rectangle::operator=(), geom::Sphere::operator=(), geom::Square::operator=(), geom::Triangle::operator=(), geom::Plane::Plane(), geom::Rectangle::Rectangle(), geom::Sphere::Sphere(), geom::Square::Square(), and geom::Triangle::Triangle().