![]() |
PeriDEM 0.3.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A structure to represent 3d vectors. More...
#include <point.h>
Public Member Functions | |
| Point () | |
| Constructor. | |
| template<class T > | |
| Point (T x, T y, T z) | |
| Constructor. | |
| template<class T > | |
| Point (T x[3]) | |
| Constructor. | |
| Point (const std::vector< double > &p) | |
| Constructor. | |
| Point (const Point &p) | |
| Copy constructor. | |
| std::string | printStr (int nt=0, int lvl=0) const |
| Returns the string containing printable information about the object. | |
| void | print (int nt=0, int lvl=0) const |
| Prints the information about the object. | |
| std::vector< double > | toVec () const |
| Returns coordinate in stl form. | |
| double | length () const |
| Computes the Euclidean length of the vector. | |
| double | lengthSq () const |
| Computes the Euclidean length of the vector. | |
| double | dot (const Point &b) const |
| Computes the dot product of this vector with another point. | |
| double | dist (const Point &b) const |
| Computes the distance between a given point from this point. | |
| Point | cross (const Point &b) const |
| Computes the cross product between this vector and given vector. | |
| Point | project (const Point &b, bool is_unit=false) const |
| Computes projection of vector on this vector. | |
| Point | projectNormal (const Point &b, bool is_unit=false) const |
| Computes projection of vector on plane with normal as this vector. | |
Data Fields | |
| double | d_x |
| the x coordinate | |
| double | d_y |
| the y coordinate | |
| double | d_z |
| the z coordinate | |
Group operators | |
| Point & | operator+= (const double b) |
| Addition by scalar operator. | |
| Point & | operator-= (const double b) |
| Subtraction by scalar operator. | |
| Point & | operator*= (const double b) |
| Multiplication by scalar operator. | |
| Point & | operator+= (const Point &b) |
| Addition operator. | |
| Point & | operator-= (const Point &b) |
| Subtraction operator. | |
| Point & | operator*= (const Point &b) |
| Multiplication (pointwise/elementwise) operator. | |
| Point & | operator/= (const double b) |
| Division by scalar operator. | |
| double & | operator[] (size_t i) |
| Access operator. | |
| const double & | operator[] (size_t i) const |
| Access operator. | |
| Point | operator+ (Point lhs, const Point &rhs) |
| Addition operator. | |
| Point | operator- (Point lhs, const Point &rhs) |
| Subtraction operator. | |
| double | operator* (Point lhs, const Point rhs) |
| Multiplication (dot) operator. | |
| Point | operator* (Point lhs, const double rhs) |
| Scalar product operator. | |
| Point | operator+ (Point lhs, const double rhs) |
| Addition by scalar operator. | |
| Point | operator+ (const double lhs, Point rhs) |
| Addition by scalar operator. | |
| Point | operator- (Point lhs, const double rhs) |
| Subtraction by scalar operator. | |
| Point | operator- (const double lhs, Point rhs) |
| Subtraction by scalar operator. | |
| Point | operator* (const double lhs, Point rhs) |
| Multiplication by scalar operator. | |
| Point | operator/ (Point lhs, const double rhs) |
| Division by scalar operator. | |
|
inline |
Constructor.
Definition at line 44 of file point.h.
Referenced by projectNormal().
|
inline |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
Computes the cross product between this vector and given vector.
| b | Another vector |
Definition at line 157 of file point.h.
Referenced by util::angle(), and util::rotate().
|
inline |
Computes the distance between a given point from this point.
| b | Another point |
Definition at line 146 of file point.h.
Referenced by util::doubleGaussian2d(), util::gaussian2d(), geom::Circle::isInside(), and geom::Sphere::isInside().
|
inline |
Computes the dot product of this vector with another point.
| b | Another vector |
Definition at line 138 of file point.h.
Referenced by material::RnpMaterial::getS(), geom::Drum2D::isInside(), project(), and projectNormal().
|
inline |
Computes the Euclidean length of the vector.
Definition at line 124 of file point.h.
Referenced by util::angle(), util::angle(), geom::anonymous_namespace{geomObjects.cpp}::axisAngleToQuatSafe(), geom::Cylinder::box(), anonymous_namespace{selfContact.cpp}::cappedRepulsive(), anonymous_namespace{main.cpp}::checkWallSpringOnly(), geom::anonymous_namespace{openRectChannel2D.cpp}::distPointToSegment2D(), geom::Ellipsoid::Ellipsoid(), pd::ReferenceGapSelfContact::force(), material::RnpMaterial::getBondForceDirection(), material::PmbMaterial::getS(), material::PdElastic::getS(), material::PdState::getS(), geom::BoxPartition::isNear(), contact::PairForce::nodeDampingForce(), geom::Plane::Plane(), geom::pointDistancePlane(), geom::pointDistanceSegment(), project(), projectNormal(), contact::PairForce::springForce(), contact::StickSlipPairForce::springForce(), geom::Plane::transform(), geom::Plane::wallContactQuery(), geom::Line::wallContactQuery(), and geom::Rectangle::wallContactQuery().
|
inline |
Computes the Euclidean length of the vector.
Definition at line 130 of file point.h.
Referenced by geom::doLinesIntersect(), geom::isPointInsideCylinder(), geom::isPointInsideCylinder(), geom::pointDistanceLine(), and geom::Line::wallContactQuery().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Prints the information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 112 of file point.h.
References printStr().
|
inline |
Returns the string containing printable information about the object.
| nt | Number of tabs to append before printing |
| lvl | Information level (higher means more information) |
Definition at line 94 of file point.h.
Referenced by print(), geom::AnnulusGeomObject::printStr(), geom::ComplexGeomObject::printStr(), geom::Plane::printStr(), geom::Triangle::printStr(), geom::Square::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(), geom::Cylinder::printStr(), fe::QuadData::printStr(), geom::ParticleTransform::printStr(), inp::BCDeck::printStr(), and geom::OpenCuboidChannel3D::printStr().
Computes projection of vector on this vector.
| b | Another vector |
| is_unit | Specify if this is a unit vector |
Definition at line 169 of file point.h.
References d_x, d_y, d_z, dot(), and length().
Computes projection of vector on plane with normal as this vector.
| b | Another vector |
| is_unit | Specify if this is a unit vector |
Definition at line 181 of file point.h.
References d_x, d_y, d_z, dot(), length(), and Point().
|
inline |
Returns coordinate in stl form.
Definition at line 118 of file point.h.
Referenced by anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), getInputJson(), and anonymous_namespace{testDeckRoundTrip.cpp}::testBCDeck().
| double util::Point::d_x |
the x coordinate
Definition at line 33 of file point.h.
Referenced by geom::anonymous_namespace{openCuboidChannel3D.cpp}::aabbFromCorners(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::addEllipseDiskOcc(), rw::writer::VtkWriter::appendNodes(), geom::anonymous_namespace{geomObjects.cpp}::axisAngleToQuatSafe(), particle::BaseParticle::BaseParticle(), geom::Triangle::box(), geom::Circle::box(), geom::Ellipse::box(), geom::Sphere::box(), geom::Ellipsoid::box(), geom::OpenRectChannel2D::box(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildCircleOcc(), mesh_gen::buildCylinderOcc(), mesh_gen::buildEllipseOcc(), mesh_gen::buildEllipsoidOcc(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenCuboidChannel3DGeo(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildSphereOcc(), geom::OpenCuboidChannel3D::computeCenter(), geom::anonymous_namespace{openCuboidChannel3D.cpp}::cornersFromAabb(), cross(), util::derRotate2D(), dist(), dot(), geom::anonymous_namespace{geomObjects.cpp}::ellipseLocal(), geom::anonymous_namespace{geomObjects.cpp}::ellipsoidBodyCoords(), geom::anonymous_namespace{geomObjects.cpp}::ellipsoidMetric(), geom::ellipsoidRotationMatrix(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::embedPointInAnnulus2D(), mesh_gen::anonymous_namespace{annulusMesh3D.cpp}::embedPointInAnnulus3D(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::embedPointOpenCuboidChannel3DForMesh(), geom::exampleGeomParams(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::finish2DCutEmbedSurface(), mesh_gen::anonymous_namespace{annulusMesh3D.cpp}::finish3DCutEmbedVolume(), geom::getCenter(), geom::getCornerPoints(), fe::HexElem::getDerShapes(), fe::QuadElem::getDerShapes(), fe::HexElem::getShapes(), fe::LineElem::getShapes(), fe::QuadElem::getShapes(), fe::TetElem::getShapes(), fe::TriElem::getShapes(), geom::OpenCuboidChannel3D::inClosedShell(), geom::OpenCuboidChannel3D::inRemovedFaceSlab(), geom::BoxPartition::isNear(), geom::Square::isNearBoundary(), geom::Rectangle::isNearBoundary(), geom::Cube::isNearBoundary(), geom::Cuboid::isNearBoundary(), geom::isPointInsideBox(), geom::isPointInsideCuboid(), geom::isPointInsideRectangle(), geom::isPointInsideRectangle(), length(), lengthSq(), main(), main(), fe::LineElem::mapPointToRefElem(), fe::TetElem::mapPointToRefElem(), fe::TriElem::mapPointToRefElem(), util::Matrix3::Matrix3(), util::Matrix3::Matrix3(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator[](), operator[](), mesh_gen::physicalGroupsWallOpenFromFace3D(), Point(), geom::OpenRectChannel2D::pointInPolygon2D(), geom::OpenRectChannel2D::polygonCentroid2D(), printStr(), geom::OpenCuboidChannel3D::printStr(), project(), projectNormal(), geom::Rectangle::Rectangle(), util::rotate2D(), util::rotateCW2D(), geom::Square::Square(), util::SymMatrix3::SymMatrix3(), toVec(), geom::OpenCuboidChannel3D::transform(), geom::OpenRectChannel2D::transform(), geom::triangleArea(), geom::OpenCuboidChannel3D::volume(), geom::Line::wallContactQuery(), and geom::Rectangle::wallContactQuery().
| double util::Point::d_y |
the y coordinate
Definition at line 36 of file point.h.
Referenced by geom::anonymous_namespace{openCuboidChannel3D.cpp}::aabbFromCorners(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::addEllipseDiskOcc(), rw::writer::VtkWriter::appendNodes(), geom::anonymous_namespace{geomObjects.cpp}::axisAngleToQuatSafe(), geom::Triangle::box(), geom::Circle::box(), geom::Ellipse::box(), geom::Sphere::box(), geom::Ellipsoid::box(), geom::OpenRectChannel2D::box(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildCircleOcc(), mesh_gen::buildCylinderOcc(), mesh_gen::buildEllipseOcc(), mesh_gen::buildEllipsoidOcc(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), anonymous_namespace{main.cpp}::buildInputJson(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenCuboidChannel3DGeo(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildSphereOcc(), geom::OpenCuboidChannel3D::computeCenter(), geom::anonymous_namespace{openCuboidChannel3D.cpp}::cornersFromAabb(), cross(), util::derRotate2D(), dist(), dot(), geom::anonymous_namespace{geomObjects.cpp}::ellipseLocal(), geom::anonymous_namespace{geomObjects.cpp}::ellipsoidBodyCoords(), geom::anonymous_namespace{geomObjects.cpp}::ellipsoidMetric(), geom::ellipsoidRotationMatrix(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::embedPointOpenCuboidChannel3DForMesh(), geom::exampleGeomParams(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::finish2DCutEmbedSurface(), mesh_gen::anonymous_namespace{annulusMesh3D.cpp}::finish3DCutEmbedVolume(), fe::HexElem::getDerShapes(), fe::QuadElem::getDerShapes(), fe::HexElem::getShapes(), fe::QuadElem::getShapes(), fe::TetElem::getShapes(), fe::TriElem::getShapes(), geom::OpenCuboidChannel3D::inClosedShell(), geom::OpenCuboidChannel3D::inRemovedFaceSlab(), geom::BoxPartition::isNear(), geom::Square::isNearBoundary(), geom::Rectangle::isNearBoundary(), geom::Cube::isNearBoundary(), geom::Cuboid::isNearBoundary(), geom::isPointInsideBox(), geom::isPointInsideCuboid(), geom::isPointInsideRectangle(), geom::isPointInsideRectangle(), length(), lengthSq(), main(), main(), fe::TetElem::mapPointToRefElem(), fe::TriElem::mapPointToRefElem(), util::Matrix3::Matrix3(), util::Matrix3::Matrix3(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator[](), operator[](), mesh_gen::physicalGroupsWallOpenFromFace3D(), Point(), geom::OpenRectChannel2D::pointInPolygon2D(), printStr(), geom::OpenCuboidChannel3D::printStr(), project(), projectNormal(), geom::Rectangle::Rectangle(), util::rotate2D(), util::rotateCW2D(), geom::Square::Square(), util::SymMatrix3::SymMatrix3(), anonymous_namespace{testDeckRoundTrip.cpp}::testBCBaseDeck(), toVec(), geom::OpenCuboidChannel3D::transform(), geom::triangleArea(), geom::OpenCuboidChannel3D::volume(), geom::Line::wallContactQuery(), and geom::Rectangle::wallContactQuery().
| double util::Point::d_z |
the z coordinate
Definition at line 39 of file point.h.
Referenced by geom::anonymous_namespace{openCuboidChannel3D.cpp}::aabbFromCorners(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::addEllipseDiskOcc(), rw::writer::VtkWriter::appendNodes(), geom::anonymous_namespace{geomObjects.cpp}::axisAngleToQuatSafe(), geom::Triangle::box(), geom::Sphere::box(), geom::Ellipsoid::box(), geom::OpenRectChannel2D::box(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildCircleOcc(), mesh_gen::buildCylinderOcc(), mesh_gen::buildEllipseOcc(), mesh_gen::buildEllipsoidOcc(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildOpenCuboidChannel3DGeo(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::buildSphereOcc(), geom::OpenCuboidChannel3D::computeCenter(), geom::anonymous_namespace{openCuboidChannel3D.cpp}::cornersFromAabb(), cross(), dist(), dot(), geom::anonymous_namespace{geomObjects.cpp}::ellipsoidBodyCoords(), geom::anonymous_namespace{geomObjects.cpp}::ellipsoidMetric(), geom::ellipsoidRotationMatrix(), mesh_gen::anonymous_namespace{builtinGmshGeometry.cpp}::embedPointOpenCuboidChannel3DForMesh(), geom::exampleGeomParams(), mesh_gen::anonymous_namespace{annulusMesh2D.cpp}::finish2DCutEmbedSurface(), mesh_gen::anonymous_namespace{annulusMesh3D.cpp}::finish3DCutEmbedVolume(), fe::HexElem::getDerShapes(), fe::HexElem::getShapes(), fe::TetElem::getShapes(), geom::OpenCuboidChannel3D::inClosedShell(), geom::OpenCuboidChannel3D::inRemovedFaceSlab(), geom::OpenRectChannel2D::isInside(), geom::BoxPartition::isNear(), geom::Cube::isNearBoundary(), geom::Cuboid::isNearBoundary(), geom::isPointInsideBox(), geom::isPointInsideCuboid(), length(), lengthSq(), main(), fe::TetElem::mapPointToRefElem(), util::Matrix3::Matrix3(), util::Matrix3::Matrix3(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator[](), operator[](), mesh_gen::physicalGroupsWallOpenFromFace3D(), Point(), printStr(), geom::OpenCuboidChannel3D::printStr(), project(), projectNormal(), geom::Rectangle::Rectangle(), geom::Square::Square(), util::SymMatrix3::SymMatrix3(), toVec(), geom::OpenCuboidChannel3D::transform(), geom::OpenCuboidChannel3D::volume(), and geom::Rectangle::wallContactQuery().