PeriDEM 0.2.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. | |
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 151 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 140 of file point.h.
Referenced by util::doubleGaussian2d(), and util::gaussian2d().
|
inline |
Computes the dot product of this vector with another point.
b | Another vector |
Definition at line 132 of file point.h.
Referenced by material::RnpMaterial::getS(), project(), and projectNormal().
|
inline |
Computes the Euclidean length of the vector.
Definition at line 118 of file point.h.
Referenced by util::angle(), util::angle(), material::RnpMaterial::getBondForceDirection(), material::PmbMaterial::getS(), material::PdElastic::getS(), material::PdState::getS(), util::geometry::BoxPartition::isNear(), util::pointDistancePlane(), util::pointDistanceSegment(), project(), and projectNormal().
|
inline |
Computes the Euclidean length of the vector.
Definition at line 124 of file point.h.
Referenced by util::doLinesIntersect(), util::isPointInsideCylinder(), util::isPointInsideCylinder(), and util::pointDistanceLine().
|
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(), fe::QuadData::printStr(), inp::ParticleDeck::printStr(), inp::PICDeck::printStr(), and particle::ParticleTransform::printStr().
Computes projection of vector on this vector.
b | Another vector |
is_unit | Specify if this is a unit vector |
Definition at line 163 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 175 of file point.h.
References d_x, d_y, d_z, dot(), length(), and Point().
double util::Point::d_x |
the x coordinate
Definition at line 33 of file point.h.
Referenced by rw::writer::VtkWriter::appendNodes(), cross(), util::derRotate2D(), dist(), dot(), util::getCenter(), util::getCornerPoints(), fe::QuadElem::getDerShapes(), fe::LineElem::getShapes(), fe::QuadElem::getShapes(), fe::TetElem::getShapes(), fe::TriElem::getShapes(), util::geometry::BoxPartition::isNear(), util::geometry::Square::isNearBoundary(), util::geometry::Rectangle::isNearBoundary(), util::geometry::Cube::isNearBoundary(), util::geometry::Cuboid::isNearBoundary(), util::isPointInsideBox(), util::isPointInsideCuboid(), util::isPointInsideRectangle(), util::isPointInsideRectangle(), length(), lengthSq(), fe::LineElem::mapPointToRefElem(), fe::TetElem::mapPointToRefElem(), fe::TriElem::mapPointToRefElem(), util::Matrix3::Matrix3(), util::Matrix3::Matrix3(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator[](), operator[](), Point(), printStr(), project(), projectNormal(), util::geometry::Rectangle::Rectangle(), util::rotate2D(), util::rotateCW2D(), util::geometry::Square::Square(), util::SymMatrix3::SymMatrix3(), and util::triangleArea().
double util::Point::d_y |
the y coordinate
Definition at line 36 of file point.h.
Referenced by rw::writer::VtkWriter::appendNodes(), cross(), util::derRotate2D(), dist(), dot(), fe::QuadElem::getDerShapes(), fe::QuadElem::getShapes(), fe::TetElem::getShapes(), fe::TriElem::getShapes(), util::geometry::BoxPartition::isNear(), util::geometry::Square::isNearBoundary(), util::geometry::Rectangle::isNearBoundary(), util::geometry::Cube::isNearBoundary(), util::geometry::Cuboid::isNearBoundary(), util::isPointInsideBox(), util::isPointInsideCuboid(), util::isPointInsideRectangle(), util::isPointInsideRectangle(), length(), lengthSq(), fe::TetElem::mapPointToRefElem(), fe::TriElem::mapPointToRefElem(), util::Matrix3::Matrix3(), util::Matrix3::Matrix3(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator[](), operator[](), Point(), printStr(), project(), projectNormal(), util::geometry::Rectangle::Rectangle(), util::rotate2D(), util::rotateCW2D(), util::geometry::Square::Square(), util::SymMatrix3::SymMatrix3(), and util::triangleArea().
double util::Point::d_z |
the z coordinate
Definition at line 39 of file point.h.
Referenced by rw::writer::VtkWriter::appendNodes(), cross(), dist(), dot(), fe::TetElem::getShapes(), util::geometry::BoxPartition::isNear(), util::geometry::Cube::isNearBoundary(), util::geometry::Cuboid::isNearBoundary(), util::isPointInsideBox(), util::isPointInsideCuboid(), length(), lengthSq(), fe::TetElem::mapPointToRefElem(), util::Matrix3::Matrix3(), util::Matrix3::Matrix3(), operator*=(), operator*=(), operator+=(), operator+=(), operator-=(), operator-=(), operator/=(), operator[](), operator[](), Point(), printStr(), project(), projectNormal(), util::geometry::Rectangle::Rectangle(), util::geometry::Square::Square(), and util::SymMatrix3::SymMatrix3().