Vec3D Class Reference

#include <Vector.h>

Public Member Functions

 Vec3D ()
 constructor More...
 
 Vec3D (const SmallVector< 3 > &vector)
 
 Vec3D (const std::array< Mdouble, 3 > &vector)
 Alternative constructor, taking a const std::array<Mdouble, 3> More...
 
 Vec3D (const Mdouble x, const Mdouble y, const Mdouble z)
 Alternative constructor, taking the three elements as arguments. More...
 
void setZero ()
 Sets all elements to zero. More...
 
void setNaN ()
 Sets all elements to NaN. More...
 
bool isZero () const
 Checks if ALL elements are zero. More...
 
bool isNaN () const
 Checks if ALL elements are zero. More...
 
Vec3D operator+ (const Vec3D &a) const
 Adds another vector. More...
 
Vec3D operator- (const Vec3D a) const
 Binary vector subtraction. More...
 
bool operator== (const Vec3D &a) const
 
Vec3D multiplyElementwise (const Vec3D &a) const
 
Vec3D divideElementwise (const Vec3D &a) const
 
Vec3D signedSquare () const
 
Vec3D operator* (const Mdouble a) const
 Multiplies by a scalar. More...
 
Vec3D operator/ (Mdouble a) const
 Divides by a scalar. More...
 
Vec3Doperator+= (const Vec3D &a)
 Adds another vector. More...
 
bool operator>= (const Vec3D &a) const
 Checks if all coordinates satisfy this>=a. More...
 
bool operator< (const Vec3D &a) const
 
Vec3Doperator-= (const Vec3D &a)
 Subtracts another vector. More...
 
Vec3Doperator*= (Mdouble a)
 Multiplies by a scalar. More...
 
Vec3Doperator/= (const Mdouble a)
 Divides by a scalar. More...
 
Mdouble dot (const Vec3D &b) const
 Calculates the dot product of this with another Vec3D: \( this \cdot b\). More...
 
void normalise ()
 Makes this Vec3D unit length. More...
 
void setLength (Mdouble length)
 Make this Vec3D a certain length. More...
 
Vec3D cross (const Vec3D &b) const
 Calculates the cross product of this with another Vec3D: \( this \times b\). More...
 
Mdouble getLength () const
 Calculates the length of this Vec3D: \( \sqrt{a\cdot a} \). More...
 
Mdouble getLengthSquared () const
 Calculates the squared length of this Vec3D: \( a\cdot a \). More...
 
Mdouble getComponent (int index) const
 Returns the requested component of this Vec3D. More...
 
void setComponent (int index, double val)
 Sets the requested component of this Vec3D to the requested value. More...
 
Mdoubleoperator[] (int index)
 Implements operator [] to easier access to x, y, z. More...
 
const Mdoubleoperator[] (int index) const
 Implements static variant of operator []. More...
 
Mdoublex ()
 RW reference to X. More...
 
Mdouble x () const
 RO reference to X. More...
 
Mdoubley ()
 RW reference to Y. More...
 
Mdouble y () const
 RO reference to Y. More...
 
Mdoublez ()
 RW reference to Z. More...
 
Mdouble z () const
 RO reference to Z. More...
 
void setX (Mdouble x)
 
void setY (Mdouble y)
 
void setZ (Mdouble z)
 
Mdouble getX () const
 
Mdouble getY () const
 
Mdouble getZ () const
 
void set (Mdouble x, Mdouble y, Mdouble z)
 
Mdouble getRadialCoordinateSquared () const
 Returns the square of the radial cylindrical coordinate, r^2=x^2+y^2. More...
 
Mdouble getRadialCoordinate () const
 Returns the square of the radial cylindrical coordinate, r=sqrt(x^2+y^2). More...
 
Vec3D getSphericalCoordinates () const
 Returns the representation of this Vec3D in spherical coordinates. More...
 
Vec3D getCylindricalCoordinates () const
 Returns the representation of this Vec3D in cylindrical coordinates. More...
 
Vec3D getFromCylindricalCoordinates () const
 Returns the representation of this Vec3D in cylindrical coordinates. More...
 
Vec3D getCylindricalTensorField (const Vec3D &position) const
 Returns this vector field at point p to cylindrical coordinates. More...
 
bool isEqualTo (const Vec3D &other, double tol) const
 Checks if the length this Vec3D is equal the length of other with a certain tolerance. More...
 

Static Public Member Functions

static Mdouble dot (const Vec3D &a, const Vec3D &b)
 Calculates the dot product of two Vec3D: \( a \cdot b\). More...
 
static Vec3D max (const Vec3D &a, const Vec3D &b)
 Calculates the pointwise maximum of two Vec3D. More...
 
static Vec3D min (const Vec3D &a, const Vec3D &b)
 Calculates the pointwise minimum of two Vec3D. More...
 
static double max (const Vec3D &a)
 Calculates the maximum coordinate of vector a. More...
 
static double min (const Vec3D &a)
 Calculates the minimum coordinate of vector a. More...
 
static Vec3D square (const Vec3D &a)
 Calculates the pointwise square of a Vec3D. More...
 
static Vec3D sqrt (const Vec3D &a)
 Calculates the pointwise square root of a Vec3D. More...
 
static Vec3D cross (const Vec3D &a, const Vec3D &b)
 Calculates the cross product of two Vec3D: \( a \times b\). More...
 
static Mdouble getDistance (const Vec3D &a, const Vec3D &b)
 Calculates the distance between two Vec3D: \( \sqrt{\left(a-b\right) \cdot \left(a-b\right)} \). More...
 
static Mdouble getDistanceSquared (const Vec3D &a, const Vec3D &b)
 Calculates the squared distance between two Vec3D: \( \left(a-b\right) \cdot \left(a-b\right) \). More...
 
static Mdouble getLength (const Vec3D &a)
 Calculates the length of a Vec3D: \( \sqrt{a\cdot a} \). More...
 
static Mdouble getLengthSquared (const Vec3D &a)
 Calculates the squared length of a Vec3D: \( a\cdot a \). More...
 
static Vec3D getUnitVector (const Vec3D &a)
 Returns a unit Vec3D based on a. More...
 

Public Attributes

Mdouble X
 the vector components More...
 
Mdouble Y
 
Mdouble Z
 

Friends

std::ostream & operator<< (std::ostream &os, const Vec3D &a)
 Adds elements to an output stream. More...
 
std::istream & operator>> (std::istream &is, Vec3D &a)
 Adds elements to an input stream. More...
 
Vec3D operator- (const Vec3D &a)
 Reverts the direction of a vector. More...
 
Vec3D operator* (Mdouble a, const Vec3D &b)
 Multiplies all elements by a scalar. More...
 

Constructor & Destructor Documentation

◆ Vec3D() [1/4]

Vec3D::Vec3D ( )
inline

◆ Vec3D() [2/4]

Vec3D::Vec3D ( const SmallVector< 3 > &  vector)

Alternative constructor, that constructs a Vec3D from a SmallVector size 3

Parameters
[in]vectorSmall vector that should be copied
14 {
15  X = vector[0];
16  Y = vector[1];
17  Z = vector[2];
18 }
Mdouble Y
Definition: Kernel/Math/Vector.h:45
Mdouble Z
Definition: Kernel/Math/Vector.h:45
Mdouble X
the vector components
Definition: Kernel/Math/Vector.h:45

References X, Y, and Z.

◆ Vec3D() [3/4]

Vec3D::Vec3D ( const std::array< Mdouble, 3 > &  vector)
inline

Alternative constructor, taking a const std::array<Mdouble, 3>

Alternative constructor, lets you define all three elements.

Parameters
[in]vectorstd::array<Mdouble, 3>
61  {
62  X = vector[0];
63  Y = vector[1];
64  Z = vector[2];
65  };

References X, Y, and Z.

◆ Vec3D() [4/4]

Vec3D::Vec3D ( const Mdouble  x,
const Mdouble  y,
const Mdouble  z 
)
inline

Alternative constructor, taking the three elements as arguments.

Alternative constructor, lets you define all three elements.

Parameters
[in]xthe x-component
[in]ythe y-component
[in]zthe z-component
75  {
76  X = x;
77  Y = y;
78  Z = z;
79  }
Mdouble & y()
RW reference to Y.
Definition: Kernel/Math/Vector.h:401
Mdouble & z()
RW reference to Z.
Definition: Kernel/Math/Vector.h:413
Mdouble & x()
RW reference to X.
Definition: Kernel/Math/Vector.h:389

References X, x(), Y, y(), Z, and z().

Member Function Documentation

◆ cross() [1/2]

Vec3D Vec3D::cross ( const Vec3D a,
const Vec3D b 
)
static

Calculates the cross product of two Vec3D: \( a \times b\).

Calculates the cross product of two vectors NB: this is a STATIC function!

Parameters
[in]athe first vector
[in]bthe second vector
Returns
the cross product of the arguments
144 {
145  return Vec3D(a.Y * b.Z - a.Z * b.Y, a.Z * b.X - a.X * b.Z, a.X * b.Y - a.Y * b.X);
146 }
Scalar * b
Definition: benchVecAdd.cpp:17
Vec3D()
constructor
Definition: Kernel/Math/Vector.h:50
const Scalar * a
Definition: level2_cplx_impl.h:32

References a, b, and Vec3D().

Referenced by MarbleRun::actionsAfterTimeStep(), IntersectionOfWalls::add3PointObject(), ChuteWithHopper::addHopper(), IntersectionOfWalls::addTetra(), IntersectionOfWalls::addTetraSTL(), MeshTriangle::checkInteractions(), DPMBase::computeAllForces(), Mercury3Dclump::computeAllForces(), DPMBase::computeForcesDueToWalls(), FrictionInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), DPMBase::computeInternalForce(), ChuteWithPeriodicInflow::computeInternalForces(), IntersectionOfWalls::createOpenPrism(), IntersectionOfWalls::createPrism(), cross(), BaseParticle::getAngularMomentum(), MeshTriangle::getBaricentricWeight(), HorizontalBaseScrew::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), BaseWall::getInteractionWith(), TriangleMeshWall::getInteractionWith(), ParticleParticleCollision::getRelativeVelocity(), WallParticleCollision::getRelativeVelocity(), Membrane::Edge::getSineHalfTheta(), BaseInteractable::getVelocityAtContact(), TriangleMeshWall::getVolumeTetrahedron(), InfiniteWall::InfiniteWall(), TriangleWall::isInsideTriangle(), main(), WearableTriangulatedWall::processDebris(), ClumpParticle::rotatePrincipalDirections(), AngledPeriodicBoundary::set(), TriangulatedWall::setNormalsAndNeighbours(), IntersectionOfWalls::setPointsAndLines(), AxisymmetricHopper::setupInitialConditions(), WearableTriangleMeshWall::storeDebris(), WearableTriangulatedWall::storeDebris(), UniformRandomPDs(), ClumpParticle::updatePebblesVelPos(), MeshTriangle::updateVertexAndNormal(), TriangleWall::updateVertexAndNormal(), and WallVTKWriter::writeVTKSurfaceArea().

◆ cross() [2/2]

Vec3D Vec3D::cross ( const Vec3D b) const
inline

Calculates the cross product of this with another Vec3D: \( this \times b\).

287 { return Vec3D::cross(*this, b); }
static Vec3D cross(const Vec3D &a, const Vec3D &b)
Calculates the cross product of two Vec3D: .
Definition: Vector.cc:143

References b, and cross().

◆ divideElementwise()

Vec3D Vec3D::divideElementwise ( const Vec3D a) const
inline
133  {
134  return Vec3D(X/a.X, Y/a.Y, Z/a.Z);
135  }

References a, Vec3D(), X, Y, and Z.

◆ dot() [1/2]

Mdouble Vec3D::dot ( const Vec3D a,
const Vec3D b 
)
static

Calculates the dot product of two Vec3D: \( a \cdot b\).

Calculates the dot product of two vectors. NB: this is a STATIC function!

Parameters
[in]athe first vector
[in]bthe second vector
Returns
the resulting scalar
57 {
58  return a.X * b.X + a.Y * b.Y + a.Z * b.Z;
59 }

References a, and b.

Referenced by ChangingTOIParticle::actionsAfterTimeStep(), IntersectionOfWalls::addTetraSTL(), Membrane::Edge::applyBendForce(), Membrane::Edge::applyStretchForce(), Membrane::Edge::calculateUPre(), ConstantMassFlowMaserBoundary::checkBoundaryAfterParticleMoved(), CGHandler::computeContactPoints(), FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), ChuteWithPeriodicInflow::computeInternalForces(), HertzianBSHPViscoelasticInteraction::computeNormalForce(), HertzianViscoelasticInteraction::computeNormalForce(), LinearPlasticViscoelasticInteraction::computeNormalForce(), LinearViscoelasticInteraction::computeNormalForce(), MeltableInteraction::computeNormalForce(), SinterInteraction::computeNormalForce(), SinterLinInteraction::computeNormalForce(), SPHInteraction::computeNormalForce(), HertzianSinterInteraction::computeSinterForce(), SlidingFrictionInteraction::computeSlidingSpring(), HorizontalBaseScrew::convertLimits(), AngledPeriodicBoundary::distance(), dot(), BaseInteraction::gatherContactStatistics(), MeshTriangle::getBaricentricWeight(), CGCoordinates::R::getCNormal(), ConstantMassFlowMaserBoundary::getDistance(), SubcriticalMaserBoundary::getDistance(), FluxBoundary::getDistance(), TriangulatedWall::Face::getDistance(), DeletionBoundary::getDistance(), PeriodicBoundary::getDistance(), TimeDependentPeriodicBoundary::getDistance(), NurbsSurface::getDistance(), ArcWall::getDistanceAndNormal(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), HorizontalBaseScrew::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), Combtooth::getDistanceAndNormal(), TriangleWall::getDistanceAndNormal(), TriangulatedWall::Face::getDistanceAndNormal(), IntersectionOfWalls::getDistanceAndNormal(), SubcriticalMaserBoundaryTEST::getDistanceFromRight(), InfiniteWall::getDistanceNormalOverlapSuperquadric(), MeshTriangle::getDistanceNormalOverlapType(), DPMBase::getGravitationalEnergy(), CGCoordinates::R::getINormal(), CGCoordinates::XYZ::getINormal(), InteractionHandler::getInteraction(), BaseWall::getInteractionWith(), BaseWall::getLinePlaneIntersect(), AngledPeriodicBoundary::getOpeningAngle(), MeltableInteraction::getOverlapGrowthRate(), CGCoordinates::R::getPNormal(), DPMBase::getRotationalEnergy(), BaseParticle::getRotationalEnergy(), ClumpParticle::getRotationalEnergy(), Membrane::Edge::getSineHalfTheta(), MindlinInteraction::getTangentialOverlap(), Membrane::getVolume(), TriangleMeshWall::getVolumeTetrahedron(), InfiniteWallWithHole::getWallDistance(), FrictionInteraction::integrate(), MindlinRollingTorsionInteraction::integrate(), PeriodicBoundary::isClosestToLeftBoundary(), TimeDependentPeriodicBoundary::isClosestToLeftBoundary(), ConstantMassFlowMaserBoundary::isClosestToRightBoundary(), SubcriticalMaserBoundary::isClosestToRightBoundary(), BaseWall::isInsideWallVTK(), main(), InfiniteWallWithHole::move_time(), SuperQuadricParticle::overlapFromContactPoint(), BaseWall::projectOntoWallVTK(), ClumpParticle::rotatePrincipalDirections(), ClumpParticle::rotateTensorOfInertia(), DeletionBoundary::set(), FluxBoundary::set(), ArcWall::set(), ConstantMassFlowMaserBoundary::set(), PeriodicBoundary::set(), SubcriticalMaserBoundary::set(), InfiniteWallWithHole::set(), TimeDependentPeriodicBoundary::set(), AngledPeriodicBoundary::set(), ChutePeriodic::set_chute_parameters(), Vreman::set_symmetric_contraction(), ContractionWithPeriodicInflow::set_symmetric_contraction(), ChuteWithPeriodicInflowAndContraction::set_symmetric_contraction(), ChuteWithContraction::set_symmetric_contraction(), ConstantMassFlowMaserBoundary::setPlanewiseShift(), PeriodicBoundary::setPlanewiseShift(), SubcriticalMaserBoundary::setPlanewiseShift(), IntersectionOfWalls::setPointsAndLines(), AngledPeriodicBoundary::shiftPosition(), AngledPeriodicBoundary::shiftPositions(), WearableTriangulatedWall::storeDebris(), ClumpParticle::updateExtraQuantities(), MindlinInteraction::updateK_t(), DPMBase::writeEneTimeStep(), LawinenBox::writeEneTimeStep(), BaseCoupling< M, O >::writeEneTimeStep(), SilbertHstop::writeToEne(), and BaseInteraction::writeToFStat().

◆ dot() [2/2]

Mdouble Vec3D::dot ( const Vec3D b) const
inline

Calculates the dot product of this with another Vec3D: \( this \cdot b\).

237 { return Vec3D::dot(*this, b); }
static Mdouble dot(const Vec3D &a, const Vec3D &b)
Calculates the dot product of two Vec3D: .
Definition: Vector.cc:56

References b, and dot().

◆ getComponent()

Mdouble Vec3D::getComponent ( int  index) const

Returns the requested component of this Vec3D.

returns the vector element belonging to the given index.

Parameters
[in]indexthe index of interest (should be 0, 1 or 2)
Returns
the value of the vector element belonging to the given index
175 {
176  switch (index)
177  {
178  case 0:
179  return X;
180  case 1:
181  return Y;
182  case 2:
183  return Z;
184  default:
185  logger(ERROR, "[Vector::getComponent] Index = %, which is too high for a 3D vector (should be 0-2).",
186  index);
187  return 0;
188  }
189 }
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
@ ERROR

References ERROR, logger, X, Y, and Z.

Referenced by MeshTriangle::checkInteractions(), Dipole::computeMultipoleExpansion(), Domain::containsParticle(), Panel::createPanels(), Domain::findNearbyBoundaries(), Panel::Panel(), Domain::setBounds(), and Domain::setRange().

◆ getCylindricalCoordinates()

Vec3D Vec3D::getCylindricalCoordinates ( ) const

Returns the representation of this Vec3D in cylindrical coordinates.

Transforms the (Cartesian) vector to cylindrical coordinates

Returns
Transformed vector
271 {
272  return Vec3D(std::sqrt(X * X + Y * Y), std::atan2(Y, X), Z);
273 }
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:139
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134

References atan2(), sqrt(), Vec3D(), X, Y, and Z.

Referenced by CylinderInsertionBoundary::placeParticle().

◆ getCylindricalTensorField()

Vec3D Vec3D::getCylindricalTensorField ( const Vec3D p) const

Returns this vector field at point p to cylindrical coordinates.

Transforms the (Cartesian) vector to cylindrical coordinates. See https://en.wikipedia.org/wiki/Vector_fields_in_cylindrical_and_spherical_coordinates

Returns
Transformed vector
281 {
282  //define sin(A)=y/r, cos(A)=x/r
283  Mdouble r = std::sqrt(p.X * p.X + p.Y * p.Y);
284  Mdouble s = p.Y / r;
285  Mdouble c = p.X / r;
286  if (r == 0)
287  {
288  s = 0;
289  c = 1;
290  }
291  return Vec3D(X * c + Y * s, -X * s + Y * c, Z);
292 }
double Mdouble
Definition: GeneralDefine.h:13
float * p
Definition: Tutorial_Map_using.cpp:9
RealScalar s
Definition: level1_cplx_impl.h:130
r
Definition: UniformPSDSelfTest.py:20
int c
Definition: calibrate.py:100

References calibrate::c, p, UniformPSDSelfTest::r, s, sqrt(), Vec3D(), X, Y, and Z.

Referenced by CGFields::StandardFields::setCylindricalFields(), and CGFields::GradVelocityField::setCylindricalFields().

◆ getDistance()

Mdouble Vec3D::getDistance ( const Vec3D a,
const Vec3D b 
)
static

Calculates the distance between two Vec3D: \( \sqrt{\left(a-b\right) \cdot \left(a-b\right)} \).

Calculates the square of the distance (i.e. the length of the difference) between two vectors. NB: this is a STATIC function!

Parameters
[in]athe first vector
[in]bthe second vector
Returns
the square of the distance between the two arguments.

Calculates the distance (i.e. the length of the difference) between two vectors NB: this is a STATIC function!

Parameters
[in]athe first vector
[in]bthe second vector
Returns
the distance between the two arguments.
156 {
157  return std::sqrt(getDistanceSquared(a, b));
158 }
static Mdouble getDistanceSquared(const Vec3D &a, const Vec3D &b)
Calculates the squared distance between two Vec3D: .
Definition: Kernel/Math/Vector.h:303

References a, b, getDistanceSquared(), and sqrt().

Referenced by main(), Panel::setPanelInteractions(), and WallVTKWriter::writeCGFields().

◆ getDistanceSquared()

static Mdouble Vec3D::getDistanceSquared ( const Vec3D a,
const Vec3D b 
)
inlinestatic

Calculates the squared distance between two Vec3D: \( \left(a-b\right) \cdot \left(a-b\right) \).

303  {
304  const double X = a.X-b.X;
305  const double Y = a.Y-b.Y;
306  const double Z = a.Z-b.Z;
307  return (X * X + Y * Y + Z * Z);
308  //return getLengthSquared(a - b);
309  }

References a, b, X, Y, and Z.

Referenced by Mercury3Dclump::checkClumpForInteraction(), Mercury3Dclump::checkClumpForInteractionPeriodic(), DPMBase::checkParticleForInteractionLocal(), ChuteWithPeriodicInflow::computeInternalForces(), getDistance(), Mercury3D::hGridFindContactsWithTargetCell(), and BaseParticle::isInContactWith().

◆ getFromCylindricalCoordinates()

Vec3D Vec3D::getFromCylindricalCoordinates ( ) const

Returns the representation of this Vec3D in cylindrical coordinates.

Transforms the (cylindrical) vector to cartesian coordinates

Returns
Transformed vector
Todo:
299 {
301  return Vec3D(X * std::cos(Y), X * std::sin(Y), Z);
302 }
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137

References cos(), sin(), Vec3D(), X, Y, and Z.

◆ getLength() [1/2]

Mdouble Vec3D::getLength ( ) const

Calculates the length of this Vec3D: \( \sqrt{a\cdot a} \).

Calculates the length of this vector

Returns
the (scalar) length of this vector
340 {
341  return std::sqrt(getLengthSquared());
342 }
Mdouble getLengthSquared() const
Calculates the squared length of this Vec3D: .
Definition: Vector.cc:164

References getLengthSquared(), and sqrt().

Referenced by CGHandler::computeContactPoints(), AngledPeriodicBoundarySecondUnitTest::computeExternalForces(), ChuteWithPeriodicInflow::computeInternalForces(), SphericalWall::getDistance(), SphericalWall::getDistanceAndNormal(), TriangulatedWall::Face::getDistanceAndNormal(), AngledPeriodicBoundary::set(), AxisymmetricHopper::setupInitialConditions(), and testCGHandler().

◆ getLength() [2/2]

Mdouble Vec3D::getLength ( const Vec3D a)
static

Calculates the length of a Vec3D: \( \sqrt{a\cdot a} \).

Calculates the length of a given vector NB: this is a STATIC function!

Parameters
[in]avector to be measured.
Returns
length of the argument.
351 {
352  return a.getLength();
353 }

References a.

Referenced by ChangingTOIParticle::actionsAfterTimeStep(), DrivenParticleClass::actionsAfterTimeStep(), NautaMixer::addScrew(), Membrane::Edge::applyBendForce(), BaseCluster::applyCentralForce(), Membrane::Edge::applyStretchForce(), BondedInteraction::bondInPlace(), SolidifyingLiquidMigrationWilletInteraction::bondInPlace(), Combtooth::Combtooth(), Mercury3Dclump::computeAllForces(), CGHandler::computeContactPoints(), FrictionInteraction::computeFrictionForce(), MindlinInteraction::computeFrictionForce(), MindlinRollingTorsionInteraction::computeFrictionForce(), ChuteWithPeriodicInflow::computeInternalForces(), ScrewsymmetricIntersectionOfWalls::computeNormalRadialDeltaN(), SlidingFrictionInteraction::computeSlidingSpring(), Quaternion::fromAxisAndAngle(), BaseInteraction::gatherContactStatistics(), AxisymmetricIntersectionOfWalls::getDistanceAndNormal(), HorizontalBaseScrew::getDistanceAndNormal(), Coil::getDistanceAndNormal(), Combtooth::getDistanceAndNormal(), CylindricalWall::getDistanceAndNormal(), InfiniteWallWithHole::getDistanceAndNormal(), ParabolaChute::getDistanceAndNormal(), SineWall::getDistanceAndNormal(), VChute::getDistanceAndNormal(), ClumpParticle::getRotationalEnergy(), MindlinInteraction::getTangentialOverlap(), SlidingFrictionInteraction::getTangentialOverlap(), main(), BaseCluster::makeDataAnalysis(), FileReader::read(), ClumpParticle::rotatePrincipalDirections(), Combtooth::set(), Chute::setChuteAngle(), WearableTriangleMeshWall::storeDebris(), ClumpParticle::updateExtraQuantities(), MindlinInteraction::updateK_t(), MeshTriangle::updateVertexAndNormal(), SingleParticle< SpeciesType >::writeEneTimeStep(), BaseInteraction::writeToFStat(), and WallVTKWriter::writeVTKSurfaceArea().

◆ getLengthSquared() [1/2]

◆ getLengthSquared() [2/2]

static Mdouble Vec3D::getLengthSquared ( const Vec3D a)
inlinestatic

◆ getRadialCoordinate()

Mdouble Vec3D::getRadialCoordinate ( ) const

Returns the square of the radial cylindrical coordinate, r=sqrt(x^2+y^2).

223 {
224  return std::sqrt(X * X + Y * Y);
225 }

References sqrt(), X, and Y.

◆ getRadialCoordinateSquared()

Mdouble Vec3D::getRadialCoordinateSquared ( ) const

Returns the square of the radial cylindrical coordinate, r^2=x^2+y^2.

218 {
219  return X * X + Y * Y;
220 }

References X, and Y.

◆ getSphericalCoordinates()

Vec3D Vec3D::getSphericalCoordinates ( ) const

Returns the representation of this Vec3D in spherical coordinates.

Transforms the (Cartesian) vector to spherical coordinates

Returns
Transformed vector
232 {
233  Vec3D sphericalCoord;
234 
235  // Calculate radial distance
236  sphericalCoord.X = std::sqrt(X * X + Y * Y + Z * Z);
237 
238  // Calculate azimuthal angle (theta)
239  sphericalCoord.Y = std::acos(Z / sphericalCoord.X);
240 
241  // Calculate polar angle (phi)
242  if (X == 0.0)
243  {
244  if (Y >= 0.0)
245  {
246  sphericalCoord.Z = constants::pi / 2.0;
247  }
248  else
249  {
250  sphericalCoord.Z = -constants::pi / 2.0;
251  }
252  }
253  else
254  {
255  sphericalCoord.Z = std::atan2(Y, X);
256  // Adjust the range to [0, 2*pi)
257  if (sphericalCoord.Z < 0.0)
258  {
259  sphericalCoord.Z += 2.0 * constants::pi;
260  }
261  }
262 
263  return sphericalCoord;
264 }
AnnoyingScalar acos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:138
Definition: Kernel/Math/Vector.h:30
const Mdouble pi
Definition: ExtendedMath.h:23

References acos(), atan2(), constants::pi, sqrt(), X, Y, and Z.

Referenced by SphereInsertionBoundary::placeParticle().

◆ getUnitVector()

Vec3D Vec3D::getUnitVector ( const Vec3D a)
static

Returns a unit Vec3D based on a.

Calculates the unit vector of a given vector (unless it is a vector with zero length; in that case it returns a 3D vector with each element equal to zero). NB: this is a STATIC function!

Parameters
[in]athe vector of interest
Returns
unit vector in the direction of the argument (unless the argument has length zero; in that case a zero-vector).
365 {
366  Mdouble Length2 = a.getLengthSquared();
367  if (Length2 != 0.0)
368  return a / std::sqrt(Length2);
369  else
370  return Vec3D(0, 0, 0);
371 }

References a, sqrt(), and Vec3D().

Referenced by IntersectionOfWalls::createOpenPrism(), IntersectionOfWalls::createPrism(), MindlinInteraction::getTangentialOverlap(), WearableTriangulatedWall::processDebris(), TriangulatedWall::setNormalsAndNeighbours(), CGHandlerSelfTest::setupInitialConditions(), and MindlinInteraction::updateK_t().

◆ getX()

◆ getY()

◆ getZ()

◆ isEqualTo()

bool Vec3D::isEqualTo ( const Vec3D other,
double  tol 
) const

Checks if the length this Vec3D is equal the length of other with a certain tolerance.

Checks if the length of the vector is equal to the one given in the first argument (other), with a tolerance given in the second argument (tol).

Parameters
[in]otherthe 3D vector to check against
[in]tolthe tolerance
Returns
returns TRUE if the difference between the lengths of this vector and that given in the first argument (other) is smaller than the given tolerance.
314 {
315  if ((Vec3D::getLengthSquared(*this - other)) <= tol * tol)
316  {
317  return true;
318  }
319  else
320  {
321  return false;
322  }
323 }

References getLengthSquared().

Referenced by STLTriangle::isEqualTo(), and main().

◆ isNaN()

bool Vec3D::isNaN ( ) const

Checks if ALL elements are zero.

Checks if ALL elements are zero

Returns
TRUE if ALL elements are zero
45 {
46  return std::isnan(X) || std::isnan(Y) || std::isnan(Z);
47 }
#define isnan(X)
Definition: main.h:109

References isnan, X, Y, and Z.

◆ isZero()

bool Vec3D::isZero ( ) const
inline

Checks if ALL elements are zero.

95  { return X == 0.0 && Y == 0.0 && Z == 0.0; }

References X, Y, and Z.

Referenced by MeshTriangle::rotate(), TriangleWall::rotate(), ArcWallUnitTest::setupInitialConditions(), and TriangleWall::updateVertexAndNormal().

◆ max() [1/2]

static double Vec3D::max ( const Vec3D a)
inlinestatic

Calculates the maximum coordinate of vector a.

252 {return std::max(std::max(a.X,a.Y),a.Z);}
#define max(a, b)
Definition: datatypes.h:23

References a, and max.

◆ max() [2/2]

Vec3D Vec3D::max ( const Vec3D a,
const Vec3D b 
)
static

Calculates the pointwise maximum of two Vec3D.

Calculates the pointwise maximum of two vectors. NB: this is a STATIC function!

Parameters
[in]athe first vector
[in]bthe second vector
Returns
The resulting vector, in which each element is the maximum of the equivalent elements of the arguments
70 {
71  return Vec3D(std::max(a.X, b.X), std::max(a.Y, b.Y), std::max(a.Z, b.Z));
72 }

References a, b, max, and Vec3D().

Referenced by statistics_while_running< T >::auto_set_domain(), FileReader::read(), TriangleMeshWall::updateBoundingBox(), TriangleMeshWall::updateBoundingBoxGlobal(), MeshTriangle::updateVertexAndNormal(), and TriangleWall::updateVertexAndNormal().

◆ min() [1/2]

static double Vec3D::min ( const Vec3D a)
inlinestatic

Calculates the minimum coordinate of vector a.

257 {return std::min(std::min(a.X,a.Y),a.Z);}
#define min(a, b)
Definition: datatypes.h:22

References a, and min.

◆ min() [2/2]

Vec3D Vec3D::min ( const Vec3D a,
const Vec3D b 
)
static

Calculates the pointwise minimum of two Vec3D.

Calculates the pointwise minimum of two vectors. NB: this is a STATIC function!

Parameters
[in]athe first vector
[in]bthe second vector
Returns
The resulting vector, in which each element is the minimum of the equivalent elements of the arguments
83 {
84  return Vec3D(std::min(a.X, b.X), std::min(a.Y, b.Y), std::min(a.Z, b.Z));
85 }

References a, b, min, and Vec3D().

Referenced by BaseWall::addParticlesAtWall(), statistics_while_running< T >::auto_set_domain(), FileReader::read(), TriangleMeshWall::updateBoundingBox(), TriangleMeshWall::updateBoundingBoxGlobal(), MeshTriangle::updateVertexAndNormal(), and TriangleWall::updateVertexAndNormal().

◆ multiplyElementwise()

Vec3D Vec3D::multiplyElementwise ( const Vec3D a) const
inline
129  {
130  return Vec3D(X*a.X, Y*a.Y, Z*a.Z);
131  }

References a, Vec3D(), X, Y, and Z.

Referenced by BaseWall::setForceControl(), and BaseWall::setVelocityControl().

◆ normalise()

void Vec3D::normalise ( )

Makes this Vec3D unit length.

Normalises the vector, i.e. divides all elements by the vectors length (resulting in a vector in the same direction, but with unit length).

104 {
105  Mdouble length2 = this->getLengthSquared();
106  if (length2 == 0)
107  {
108  logger(ERROR, "Normalizing a vector of length 0");
109  }
110  *this /= std::sqrt(length2);
111 }

References ERROR, getLengthSquared(), logger, and sqrt().

Referenced by IntersectionOfWalls::addTetraSTL(), HorizontalScrew::getDistanceAndNormal(), ScrewsymmetricIntersectionOfWalls::getDistanceAndNormal(), SimpleDrumSuperquadrics::getDistanceAndNormal(), Screw::getDistanceAndNormalLabCoordinates(), SimpleDrumSuperquadrics::getDistanceNormalOverlapSuperquadric(), ClumpParticle::rotatePrincipalDirections(), ArcWall::set(), setLength(), HorizontalMixer::setOuterWalls(), HorizontalMixerWalls::setOuterWalls(), UniformRandomPDs(), MeshTriangle::updateVertexAndNormal(), and TriangleWall::updateVertexAndNormal().

◆ operator*()

Vec3D Vec3D::operator* ( const Mdouble  a) const
inline

Multiplies by a scalar.

Multiplies each element with a scalar

Parameters
[in]athe scalar to be multiplied with
Returns
the resulting vector
148  {
149  return Vec3D(X * a, Y * a, Z * a);
150  }

References a, Vec3D(), X, Y, and Z.

◆ operator*=()

Vec3D& Vec3D::operator*= ( Mdouble  a)
inline

Multiplies by a scalar.

Multiplies each element by a scalar

Parameters
[in]ascalar to be multiplied by
Returns
(reference to) itself, i.e. resulting vector
207  {
208  X *= a;
209  Y *= a;
210  Z *= a;
211  return *this;
212  }

References a, X, Y, and Z.

◆ operator+()

Vec3D Vec3D::operator+ ( const Vec3D a) const
inline

Adds another vector.

Adds vector to itself

Parameters
[in]avector to be added
Returns
resulting 3D vector
109  {
110  return Vec3D(X + a.X, Y + a.Y, Z + a.Z);
111  }

References a, Vec3D(), X, Y, and Z.

◆ operator+=()

Vec3D& Vec3D::operator+= ( const Vec3D a)
inline

Adds another vector.

Adds a vector to itself

Parameters
[in]avector to be added
Returns
(reference to) itself, i.e. resulting vector
169  {
170  X += a.X;
171  Y += a.Y;
172  Z += a.Z;
173  return *this;
174  }

References a, X, Y, and Z.

◆ operator-()

Vec3D Vec3D::operator- ( const Vec3D  a) const
inline

Binary vector subtraction.

Subtracts a vector from another vector

Parameters
[in]avector to be subtracted
Returns
resulting vector
120  {
121  return Vec3D(X - a.X, Y - a.Y, Z - a.Z);
122  };

References a, Vec3D(), X, Y, and Z.

◆ operator-=()

Vec3D& Vec3D::operator-= ( const Vec3D a)
inline

Subtracts another vector.

Subtracts a vector from itself

Parameters
[in]avector to be subtracted
Returns
(reference to) itself, i.e. resulting vector
194  {
195  X -= a.X;
196  Y -= a.Y;
197  Z -= a.Z;
198  return *this;
199  }

References a, X, Y, and Z.

◆ operator/()

Vec3D Vec3D::operator/ ( Mdouble  a) const
inline

Divides by a scalar.

Divides each element by a scalar

Parameters
[in]athe scalar to be divided by
Returns
resulting vector
158  {
159  return Vec3D(X / a, Y / a, Z / a);
160  }

References a, Vec3D(), X, Y, and Z.

◆ operator/=()

Vec3D& Vec3D::operator/= ( const Mdouble  a)
inline

Divides by a scalar.

Divides each element by a scalar

Parameters
[in]ascalar to be divided by
Returns
(reference to) itself, i.e. resulting vector
221  {
222  X /= a;
223  Y /= a;
224  Z /= a;
225  return *this;
226  }

References a, X, Y, and Z.

◆ operator<()

bool Vec3D::operator< ( const Vec3D a) const
inline
183  {
184  return X<a.X && Y<a.Y && Z<a.Z;
185  }

References a, X, Y, and Z.

◆ operator==()

bool Vec3D::operator== ( const Vec3D a) const
inline
125  {
126  return X == a.X and Y == a.Y and Z == a.Z;
127  };

References a, X, Y, and Z.

◆ operator>=()

bool Vec3D::operator>= ( const Vec3D a) const
inline

Checks if all coordinates satisfy this>=a.

179  {
180  return X>=a.X && Y>=a.Y && Z>=a.Z;
181  }

References a, X, Y, and Z.

◆ operator[]() [1/2]

Mdouble& Vec3D::operator[] ( int  index)
inline

Implements operator [] to easier access to x, y, z.

354  {
355  switch (index)
356  {
357  case 0:
358  return X;
359  case 1:
360  return Y;
361  case 2:
362  return Z;
363  default:
364  throw std::out_of_range("Index out of bounds");
365  }
366  }

References X, Y, and Z.

◆ operator[]() [2/2]

const Mdouble& Vec3D::operator[] ( int  index) const
inline

Implements static variant of operator [].

372  {
373  switch (index)
374  {
375  case 0:
376  return X;
377  case 1:
378  return Y;
379  case 2:
380  return Z;
381  default:
382  throw std::out_of_range("Index out of bounds");
383  }
384  }

References X, Y, and Z.

◆ set()

void Vec3D::set ( Mdouble  x,
Mdouble  y,
Mdouble  z 
)
inline
441  {
442  X = x;
443  Y = y;
444  Z = z;
445  }

References X, x(), Y, y(), Z, and z().

◆ setComponent()

void Vec3D::setComponent ( int  index,
double  val 
)

Sets the requested component of this Vec3D to the requested value.

Sets the element of the vector belonging to the first argument (index) to the value given in the second argument (val).

Parameters
[in]indexindex of element of interest,
[in]valvalue to be set
198 {
199  switch (index)
200  {
201  case 0:
202  X = val;
203  break;
204  case 1:
205  Y = val;
206  break;
207  case 2:
208  Z = val;
209  break;
210  default:
211  logger(ERROR, "[Vector::setComponent] Index = %, which is too high for a 3D vector (should be 0-2).",
212  index);
213  }
214 }
val
Definition: calibrate.py:119

References ERROR, logger, calibrate::val, X, Y, and Z.

Referenced by ScaleCoupling< M, O >::computeCouplingForce(), Panel::createPanels(), Panel::Panel(), and Domain::setBounds().

◆ setLength()

void Vec3D::setLength ( Mdouble  length)

Make this Vec3D a certain length.

Sets the length of the vector to a given scalar (while maintaining the direction).

Parameters
[in]lengththe length to be set
119 {
120  this->normalise();
121  *this *= length;
122 }
void normalise()
Makes this Vec3D unit length.
Definition: Vector.cc:103

References normalise().

◆ setNaN()

void Vec3D::setNaN ( )

Sets all elements to NaN.

Sets each element to zero.

34 {
35  X = constants::NaN;
36  Y = constants::NaN;
37  Z = constants::NaN;
38 }
const Mdouble NaN
Definition: GeneralDefine.h:22

References constants::NaN, X, Y, and Z.

Referenced by BaseInteraction::BaseInteraction().

◆ setX()

void Vec3D::setX ( Mdouble  x)
inline
423  { X = x; }

References X, and x().

Referenced by SCoupling< M, O >::createDPMWallsFromFiniteElems().

◆ setY()

void Vec3D::setY ( Mdouble  y)
inline
426  { Y = y; }

References Y, and y().

Referenced by SCoupling< M, O >::createDPMWallsFromFiniteElems().

◆ setZ()

void Vec3D::setZ ( Mdouble  z)
inline
429  { Z = z; }

References Z, and z().

Referenced by SCoupling< M, O >::createDPMWallsFromFiniteElems().

◆ setZero()

◆ signedSquare()

Vec3D Vec3D::signedSquare ( ) const
inline
137  {
138  return Vec3D(fabs(X)*X, fabs(Y)*Y, fabs(Z)*Z);
139  }
Real fabs(const Real &a)
Definition: boostmultiprec.cpp:117

References boost::multiprecision::fabs(), Vec3D(), X, Y, and Z.

◆ sqrt()

Vec3D Vec3D::sqrt ( const Vec3D a)
static

Calculates the pointwise square root of a Vec3D.

Calculates the pointwise square root of a given vector. NB: this is a STATIC function!

Parameters
[in]athe vector to be pointwise square rooted
Returns
the resulting vector, of which each element is the square root of the equivalent element of the argument.
132 {
133  return Vec3D(std::sqrt(a.X), std::sqrt(a.Y), std::sqrt(a.Z));
134 }

References a, sqrt(), and Vec3D().

◆ square()

Vec3D Vec3D::square ( const Vec3D a)
static

Calculates the pointwise square of a Vec3D.

Calculates the pointwise square of the vector. NB: this is a STATIC function!

Parameters
[in]athe vector to be squared.
Returns
the resulting vector, of which each element is the square of the equivalent element of the argument.
95 {
96  return Vec3D(a.X * a.X, a.Y * a.Y, a.Z * a.Z);
97 }

References a, and Vec3D().

Referenced by CGFields::DisplacementField::getSquared(), CGFields::GradVelocityField::getSquared(), and CGFields::StandardFields::getSquared().

◆ x() [1/2]

◆ x() [2/2]

Mdouble Vec3D::x ( ) const
inline

RO reference to X.

396  { return X; }

References X.

◆ y() [1/2]

◆ y() [2/2]

Mdouble Vec3D::y ( ) const
inline

RO reference to Y.

408  { return Y; }

References Y.

◆ z() [1/2]

◆ z() [2/2]

Mdouble Vec3D::z ( ) const
inline

RO reference to Z.

420  { return Z; }

References Z.

Friends And Related Function Documentation

◆ operator*

Vec3D operator* ( Mdouble  a,
const Vec3D b 
)
friend

Multiplies all elements by a scalar.

Multiplies each element of a given vector (b) by a given scalar (a). NB: this is a global function and a friend of the Vec3D class. Gets called when a scalar multiplication of the form (Mdouble) * (Vec3D) is performed.

Parameters
[in]athe scalar
[in]bthe vector
Returns
the resulting vector
513  {
514  return Vec3D(b.X * a, b.Y * a, b.Z * a);
515  }

◆ operator-

Vec3D operator- ( const Vec3D a)
friend

Reverts the direction of a vector.

500  {
501  return Vec3D(-a.X, -a.Y, -a.Z);
502  }

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Vec3D a 
)
friend

Adds elements to an output stream.

Adds all elements of the vector to an output stream. NB: this is a global function and a friend of the Vec3D class!

Parameters
[in]osthe output stream,
[in]aThe vector of interest
Returns
the output stream with vector elements added
381 {
382  os << a.X << ' ' << a.Y << ' ' << a.Z;
383  return os;
384 }

◆ operator>>

std::istream& operator>> ( std::istream &  is,
Vec3D a 
)
friend

Adds elements to an input stream.

Reads all elements of a given vector from an input stream. NB: this is a global function and a friend of the Vec3D class!

Parameters
[in,out]isthe input stream
[in,out]athe vector to be read in
Returns
the input stream from which the vector elements were read
394 {
395  is >> a.X;
396  is >> a.Y;
397  is >> a.Z;
398  //TW: clearing the stream avoids the nasty problem on ARM processors that the failbit is set to true if numbers below DBL_MIN=1e-308 are read.
399  #if defined(__arm__) || defined(__aarch64__)
400  if (is.fail()) {
402  logger(VERBOSE, "Read in subnormal number %", a);
403  is.clear();
404  }
405  }
406  #endif
407  return is;
408 }
@ VERBOSE

Member Data Documentation

◆ X

Mdouble Vec3D::X

the vector components

Referenced by ScaleCoupledBeam::actionsAfterSolve(), HertzianBSHPInteractionTwoParticleElasticCollision::actionsAfterSolve(), SphericalSuperQuadricCollision::actionsAfterSolve(), SpeciesTest::actionsAfterSolve(), T_protectiveWall::actionsAfterTimeStep(), ChangingTOIParticle::actionsAfterTimeStep(), SingleParticleSegregation::actionsAfterTimeStep(), ContactDetectionNormalSpheresTest::actionsAfterTimeStep(), ContactDetectionRotatedSpheresTest::actionsAfterTimeStep(), protectiveWall::actionsAfterTimeStep(), DrivenParticleClass::actionsAfterTimeStep(), LawinenBox::actionsBeforeTimeStep(), SmoothChute::actionsBeforeTimeStep(), AngleOfRepose::actionsBeforeTimeStep(), Chutebelt::actionsBeforeTimeStep(), StressStrainControlBoundary::activateStrainRateControl(), NautaMixer::addBaseWall(), NautaMixer::addConeWall(), ChuteWithHopper::addHopper(), NautaMixer::addParticlesAtWall(), BaseWall::addParticlesAtWall(), ClumpParticle::angularAccelerateClumpIterative(), statistics_while_running< T >::auto_set_domain(), HeaterBoundary::checkBoundaryAfterParticleMoved(), ChuteWithContraction::ChuteWithContraction(), ChuteWithPeriodicInflow::cleanChute(), ChuteWithContraction::cleanChute(), Chute::cleanChute(), ScrewsymmetricIntersectionOfWalls::computeDeltaZ(), SuperQuadricParticle::computeHessianLabFixed(), Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), ChuteWithPeriodicInflow::computeInternalForces(), BaseCluster::computeInternalStructure(), SuperQuadricParticle::computeMass(), ScrewsymmetricIntersectionOfWalls::computeNormalRadialDeltaN(), SuperQuadricParticle::computeResidualContactDetection(), SuperQuadricParticle::computeShape(), SuperQuadricParticle::computeShapeGradientLabFixed(), AxisymmetricIntersectionOfWalls::convertLimits(), ScrewsymmetricIntersectionOfWalls::convertLimits(), Funnel::create_funnel(), LawinenBox::create_inflow_particle(), Funnel::create_inflow_particle(), FlowRule::create_inflow_particle(), SilbertPeriodic::create_inflow_particle(), Chute::createBottom(), divideElementwise(), ChuteWithWedge::extendBottom(), SubcriticalMaserBoundaryTEST::extendBottom(), MembraneDemo::fixMembraneEdges(), Quaternion::fromAxisAndAngle(), BidisperseCubeInsertionBoundary::generateParticle(), BaseWall::getAxis(), getComponent(), SuperQuadricParticle::getContactPointPlanB(), getCylindricalCoordinates(), getCylindricalTensorField(), BaseParticle::getDisplacement2(), HeaterBoundary::getDistance(), CubeDeletionBoundary::getDistance(), HorizontalScrew::getDistanceAndNormal(), ScrewsymmetricIntersectionOfWalls::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), Coil::getDistanceAndNormal(), CylindricalWall::getDistanceAndNormal(), InfiniteWallWithHole::getDistanceAndNormal(), SineWall::getDistanceAndNormal(), VChute::getDistanceAndNormal(), LevelSetWall::getDistanceAndNormalLabCoordinates(), Screw::getDistanceAndNormalLabCoordinates(), getDistanceSquared(), getFromCylindricalCoordinates(), InfiniteWall::getFurthestPointSuperQuadric(), InfiniteWallWithHole::getHoleDistance(), SuperQuadricParticle::getInitialGuessForContact(), SuperQuadricParticle::getInteractionWithSuperQuad(), SuperQuadricParticle::getJacobianOfContactDetectionObjective(), getLengthSquared(), ParticleHandler::getMassTimesPosition(), getMPISum(), DomainHandler::getParticleDomainGlobalIndex(), getRadialCoordinate(), getRadialCoordinateSquared(), ParticleParticleCollision::getRelativeVelocityComponents(), WallParticleCollision::getRelativeVelocityComponents(), getSphericalCoordinates(), CGExactOverlapUnitTest::getVolume(), HeaterBoundary::getVolume(), SuperQuadricParticle::getVolume(), CGCoordinates::O::getVolumeOfAveragedDimensions(), WearableNurbsWall::getVolumeUnderSurface(), WearableNurbsWall::getVolumeUnderSurfaceX(), getX(), DPMBase::getXCenter(), Mercury2D::hGridFindParticleContacts(), Mercury3D::hGridFindParticleContacts(), Mercury2D::hGridGetInteractingParticleList(), Mercury3D::hGridGetInteractingParticleList(), Mercury2D::hGridHasParticleContacts(), Mercury3D::hGridHasParticleContacts(), Mercury2D::hGridUpdateParticle(), Mercury3D::hGridUpdateParticle(), MarbleRun::includeInDomain(), InitialConditions< SpeciesType >::InitialConditions(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), SuperQuadricParticle::isInContactWith(), isNaN(), isZero(), LawinenBox::LawinenBox(), LeesEdwardsSelfTest::LeesEdwardsSelfTest(), load(), main(), multiplyElementwise(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator==(), operator>=(), operator[](), ChuteWithPeriodicInflow::outputXBallsDataParticlee(), SuperQuadricParticle::overlapFromContactPoint(), BaseCluster::particleInsertionSuccessful(), FixedClusterInsertionBoundary::placeParticle(), ChuteInsertionBoundary::placeParticle(), CubeInsertionBoundary::placeParticle(), CylinderInsertionBoundary::placeParticle(), PolydisperseInsertionBoundary::placeParticle(), RandomClusterInsertionBoundary::placeParticle(), SphereInsertionBoundary::placeParticle(), ChuteWithPeriodicInflow::printTime(), RotatingDrumWet::printTime(), ForceLawsMPI2Test::printTime(), BaseCluster::printTime(), DPMBase::readNextDataFile(), save(), set(), SuperQuadricParticle::setBoundingRadius(), setComponent(), CGFields::OrientationField::setFields(), BaseCG::setHX(), SuperQuadricParticle::setInertia(), setNaN(), Quaternion::setOrientationViaNormal(), Domain::setRange(), HeaterBoundary::setStrength2D(), HeaterBoundary::setStrength3D(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), HourGlass::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), TimeDependentPeriodicBoundary3DSelfTest::setupInitialConditions(), AngleOfRepose::setupInitialConditions(), GetDistanceAndNormalForIntersectionOfWalls::setupInitialConditions(), GetDistanceAndNormalForScrew::setupInitialConditions(), GetDistanceAndNormalForTriangleWall::setupInitialConditions(), ParticleCreation::setupInitialConditions(), my_problem_HGRID::setupInitialConditions(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), DrumRot::setupInitialConditions(), RotatingDrum::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), Tutorial11::setupInitialConditions(), ArcWallUnitTest::setupInitialConditions(), MD_demo::setupInitialConditions(), ChuteBottom::setupInitialConditions(), BaseCG::setX(), setX(), setZero(), signedSquare(), FlowFrontChute::stretch(), ContactDetectionNormalSpheresTest::test(), Packing::test(), HertzContactRestitutionUnitTest::test(), UniformRandomPDs(), ScaleCoupling< M, O >::updateCoupledElements(), StressStrainControlBoundary::updateDomainSize(), PeriodicBoundaryHandler::updateMaserParticle(), Vec3D(), SuperQuadricParticle::writeDebugMessageStep2(), SuperQuadricParticle::writeDebugMessageStep3(), DPMBase::writeEneTimeStep(), LawinenBox::writeEneTimeStep(), Drum::writeEneTimeStep(), Slide::writeEneTimeStep(), BaseCoupling< M, O >::writeEneTimeStep(), GranuDrum::writeResults(), RotatingDrumBidisperse::writeResults(), BaseCluster::writeToCdatFile(), HorizontalScrew::writeVTK(), Screw::writeVTK(), and x().

◆ Y

Mdouble Vec3D::Y

Referenced by ChangingTOIParticle::actionsAfterTimeStep(), SingleParticleSegregation::actionsAfterTimeStep(), ContactDetectionNormalSpheresTest::actionsAfterTimeStep(), ContactDetectionRotatedSpheresTest::actionsAfterTimeStep(), DrivenParticleClass::actionsAfterTimeStep(), SmoothChute::actionsBeforeTimeStep(), AngleOfRepose::actionsBeforeTimeStep(), Slide::actionsBeforeTimeStep(), StressStrainControlBoundary::activateStrainRateControl(), NautaMixer::addParticlesAtWall(), BaseWall::addParticlesAtWall(), ClumpParticle::angularAccelerateClumpIterative(), statistics_while_running< T >::auto_set_domain(), HeaterBoundary::checkBoundaryAfterParticleMoved(), ScrewsymmetricIntersectionOfWalls::computeDeltaZ(), SuperQuadricParticle::computeHessianLabFixed(), Mercury2D::computeInternalForces(), Mercury3D::computeInternalForces(), BaseCluster::computeInternalStructure(), SuperQuadricParticle::computeMass(), ScrewsymmetricIntersectionOfWalls::computeNormalRadialDeltaN(), SuperQuadricParticle::computeResidualContactDetection(), SuperQuadricParticle::computeShape(), SuperQuadricParticle::computeShapeGradientLabFixed(), AxisymmetricIntersectionOfWalls::convertLimits(), ScrewsymmetricIntersectionOfWalls::convertLimits(), Funnel::create_funnel(), LawinenBox::create_inflow_particle(), Funnel::create_inflow_particle(), FlowRule::create_inflow_particle(), SilbertPeriodic::create_inflow_particle(), Chute::createBottom(), divideElementwise(), SubcriticalMaserBoundaryTEST::extendBottom(), MembraneDemo::fixMembraneEdges(), MembraneSelfTest::fixMembraneEdges(), Quaternion::fromAxisAndAngle(), BidisperseCubeInsertionBoundary::generateParticle(), BaseWall::getAxis(), getComponent(), SuperQuadricParticle::getContactPointPlanB(), getCylindricalCoordinates(), getCylindricalTensorField(), BaseParticle::getDisplacement2(), HeaterBoundary::getDistance(), CubeDeletionBoundary::getDistance(), HorizontalScrew::getDistanceAndNormal(), ScrewsymmetricIntersectionOfWalls::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), Coil::getDistanceAndNormal(), CylindricalWall::getDistanceAndNormal(), InfiniteWallWithHole::getDistanceAndNormal(), SimpleDrumSuperquadrics::getDistanceAndNormal(), SineWall::getDistanceAndNormal(), VChute::getDistanceAndNormal(), LevelSetWall::getDistanceAndNormalLabCoordinates(), Screw::getDistanceAndNormalLabCoordinates(), SimpleDrumSuperquadrics::getDistanceNormalOverlapSuperquadric(), getDistanceSquared(), getFromCylindricalCoordinates(), InfiniteWall::getFurthestPointSuperQuadric(), InfiniteWallWithHole::getHoleDistance(), SuperQuadricParticle::getInitialGuessForContact(), SuperQuadricParticle::getInteractionWithSuperQuad(), SuperQuadricParticle::getJacobianOfContactDetectionObjective(), getLengthSquared(), ParticleHandler::getMassTimesPosition(), getMPISum(), DomainHandler::getParticleDomainGlobalIndex(), getRadialCoordinate(), getRadialCoordinateSquared(), ParticleParticleCollision::getRelativeVelocityComponents(), WallParticleCollision::getRelativeVelocityComponents(), getSphericalCoordinates(), CGExactOverlapUnitTest::getVolume(), HeaterBoundary::getVolume(), SuperQuadricParticle::getVolume(), CGCoordinates::O::getVolumeOfAveragedDimensions(), WearableNurbsWall::getVolumeUnderSurface(), WearableNurbsWall::getVolumeUnderSurfaceX(), getY(), DPMBase::getYCenter(), Mercury2D::hGridFindParticleContacts(), Mercury3D::hGridFindParticleContacts(), Mercury2D::hGridGetInteractingParticleList(), Mercury3D::hGridGetInteractingParticleList(), Mercury2D::hGridHasParticleContacts(), Mercury3D::hGridHasParticleContacts(), Mercury2D::hGridUpdateParticle(), Mercury3D::hGridUpdateParticle(), MarbleRun::includeInDomain(), InitialConditions< SpeciesType >::InitialConditions(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), SuperQuadricParticle::isInContactWith(), isNaN(), isZero(), LawinenBox::LawinenBox(), LeesEdwardsSelfTest::LeesEdwardsSelfTest(), load(), main(), multiplyElementwise(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator==(), operator>=(), operator[](), ChuteWithPeriodicInflow::outputXBallsDataParticlee(), SuperQuadricParticle::overlapFromContactPoint(), BaseCluster::particleInsertionSuccessful(), FixedClusterInsertionBoundary::placeParticle(), ChuteInsertionBoundary::placeParticle(), CubeInsertionBoundary::placeParticle(), CylinderInsertionBoundary::placeParticle(), PolydisperseInsertionBoundary::placeParticle(), RandomClusterInsertionBoundary::placeParticle(), SphereInsertionBoundary::placeParticle(), BaseCluster::printTime(), DPMBase::readNextDataFile(), save(), set(), SuperQuadricParticle::setBoundingRadius(), setComponent(), CGFields::OrientationField::setFields(), BaseCG::setHY(), SuperQuadricParticle::setInertia(), setNaN(), Quaternion::setOrientationViaNormal(), Domain::setRange(), HeaterBoundary::setStrength2D(), HeaterBoundary::setStrength3D(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), HourGlass::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), TimeDependentPeriodicBoundary3DSelfTest::setupInitialConditions(), AngleOfRepose::setupInitialConditions(), ParticleCreation::setupInitialConditions(), my_problem_HGRID::setupInitialConditions(), RotatingDrum::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), Tutorial11::setupInitialConditions(), ArcWallUnitTest::setupInitialConditions(), MD_demo::setupInitialConditions(), ChuteBottom::setupInitialConditions(), BaseCG::setY(), setY(), setZero(), signedSquare(), Packing::test(), UniformRandomPDs(), ScaleCoupling< M, O >::updateCoupledElements(), StressStrainControlBoundary::updateDomainSize(), Vec3D(), SuperQuadricParticle::writeDebugMessageStep2(), SuperQuadricParticle::writeDebugMessageStep3(), DPMBase::writeEneTimeStep(), Slide::writeEneTimeStep(), BaseCoupling< M, O >::writeEneTimeStep(), BaseCluster::writeToCdatFile(), HorizontalScrew::writeVTK(), Screw::writeVTK(), and y().

◆ Z

Mdouble Vec3D::Z

Referenced by GranuHeap::actionsAfterTimeStep(), ClosedCSCRestart::actionsAfterTimeStep(), ClosedCSCRun::actionsAfterTimeStep(), ClosedCSCWalls::actionsAfterTimeStep(), ChangingTOIParticle::actionsAfterTimeStep(), MarbleRun::actionsAfterTimeStep(), BouncingSuperQuadric::actionsAfterTimeStep(), ContactDetectionNormalSpheresTest::actionsAfterTimeStep(), ContactDetectionRotatedSpheresTest::actionsAfterTimeStep(), DrivenParticleClass::actionsAfterTimeStep(), LawinenBox::actionsBeforeTimeStep(), SmoothChute::actionsBeforeTimeStep(), StressStrainControlBoundary::activateStrainRateControl(), NautaMixer::addBaseWall(), NautaMixer::addConeWall(), ChuteWithHopper::addHopper(), NautaMixer::addParticlesAtWall(), BaseWall::addParticlesAtWall(), ClumpParticle::angularAccelerateClumpIterative(), statistics_while_running< T >::auto_set_domain(), statistics_while_running< T >::auto_set_z(), HeaterBoundary::checkBoundaryAfterParticleMoved(), Funnel::cleanChute(), ScrewsymmetricIntersectionOfWalls::computeDeltaZ(), SuperQuadricParticle::computeHessianLabFixed(), Mercury3D::computeInternalForces(), BaseCluster::computeInternalStructure(), SuperQuadricParticle::computeMass(), ScrewsymmetricIntersectionOfWalls::computeNormalRadialDeltaN(), SuperQuadricParticle::computeResidualContactDetection(), SuperQuadricParticle::computeShape(), SuperQuadricParticle::computeShapeGradientLabFixed(), ClosedCSCWalls::continueSolve(), AxisymmetricIntersectionOfWalls::convertLimits(), ScrewsymmetricIntersectionOfWalls::convertLimits(), Funnel::create_funnel(), LawinenBox::create_inflow_particle(), Funnel::create_inflow_particle(), FlowRule::create_inflow_particle(), SilbertPeriodic::create_inflow_particle(), divideElementwise(), SubcriticalMaserBoundaryTEST::extendBottom(), Quaternion::fromAxisAndAngle(), BidisperseCubeInsertionBoundary::generateParticle(), BaseWall::getAxis(), getComponent(), SuperQuadricParticle::getContactPointPlanB(), getCylindricalCoordinates(), getCylindricalTensorField(), BaseParticle::getDisplacement2(), HeaterBoundary::getDistance(), CubeDeletionBoundary::getDistance(), HorizontalBaseScrew::getDistanceAndNormal(), HorizontalScrew::getDistanceAndNormal(), ScrewsymmetricIntersectionOfWalls::getDistanceAndNormal(), BasicIntersectionOfWalls::getDistanceAndNormal(), Coil::getDistanceAndNormal(), CylindricalWall::getDistanceAndNormal(), InfiniteWallWithHole::getDistanceAndNormal(), SineWall::getDistanceAndNormal(), VChute::getDistanceAndNormal(), LevelSetWall::getDistanceAndNormalLabCoordinates(), Screw::getDistanceAndNormalLabCoordinates(), getDistanceSquared(), SphericalIndenter::getForceOnIndenter(), getFromCylindricalCoordinates(), InfiniteWall::getFurthestPointSuperQuadric(), SphericalIndenter::getIndenterHeight(), SphericalIndenter::getIndenterVelocity(), SuperQuadricParticle::getInitialGuessForContact(), SuperQuadricParticle::getInteractionWithSuperQuad(), SuperQuadricParticle::getJacobianOfContactDetectionObjective(), getLengthSquared(), ParticleHandler::getMassTimesPosition(), getMPISum(), DomainHandler::getParticleDomainGlobalIndex(), getSphericalCoordinates(), CGExactOverlapUnitTest::getVolume(), HeaterBoundary::getVolume(), SuperQuadricParticle::getVolume(), CGCoordinates::O::getVolumeOfAveragedDimensions(), WearableNurbsWall::getVolumeUnderSurface(), WearableNurbsWall::getVolumeUnderSurfaceX(), getZ(), DPMBase::getZCenter(), Mercury3D::hGridFindParticleContacts(), Mercury3D::hGridGetInteractingParticleList(), Mercury3D::hGridHasParticleContacts(), Mercury3D::hGridUpdateParticle(), MarbleRun::includeInDomain(), InitialConditions< SpeciesType >::InitialConditions(), ContactDetectionIntersectionOfWallsTest::introduceParticlesAtWall(), SuperQuadricParticle::isInContactWith(), isNaN(), isZero(), load(), main(), multiplyElementwise(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator==(), operator>=(), operator[](), ChuteWithPeriodicInflow::outputXBallsDataParticlee(), SuperQuadricParticle::overlapFromContactPoint(), BaseCluster::particleInsertionSuccessful(), FixedClusterInsertionBoundary::placeParticle(), ChuteInsertionBoundary::placeParticle(), CubeInsertionBoundary::placeParticle(), CylinderInsertionBoundary::placeParticle(), PolydisperseInsertionBoundary::placeParticle(), RandomClusterInsertionBoundary::placeParticle(), SphereInsertionBoundary::placeParticle(), ClosedCSCRestart::printTime(), ClosedCSCRun::printTime(), ClosedCSCWalls::printTime(), RotatingDrumWet::printTime(), CubeDeletionBoundarySelfTest::printTime(), DeletionBoundarySelfTest::printTime(), BaseCluster::printTime(), DPMBase::readNextDataFile(), save(), ClosedCSCWalls::saveWalls(), set(), SuperQuadricParticle::setBoundingRadius(), setComponent(), CGFields::OrientationField::setFields(), BaseCG::setHZ(), SuperQuadricParticle::setInertia(), setNaN(), Quaternion::setOrientationViaNormal(), Domain::setRange(), HeaterBoundary::setStrength2D(), HeaterBoundary::setStrength3D(), ClosedCSCWalls::setupInitialConditions(), CSCInit::setupInitialConditions(), CSCWalls::setupInitialConditions(), MercuryLogo::setupInitialConditions(), SmoothChute::setupInitialConditions(), HourGlass::setupInitialConditions(), MinimalExampleDrum::setupInitialConditions(), TimeDependentPeriodicBoundary3DSelfTest::setupInitialConditions(), GetDistanceAndNormalForIntersectionOfWalls::setupInitialConditions(), GetDistanceAndNormalForScrew::setupInitialConditions(), GetDistanceAndNormalForTriangleWall::setupInitialConditions(), ParticleCreation::setupInitialConditions(), GetDistanceAndNormalForTriangleWalls::setupInitialConditions(), DrumRot::setupInitialConditions(), RotatingDrum::setupInitialConditions(), InitialConditions< SpeciesType >::setupInitialConditions(), EllipticalSuperQuadricCollision::setupInitialConditions(), Tutorial11::setupInitialConditions(), MD_demo::setupInitialConditions(), ChuteBottom::setupInitialConditions(), BaseCG::setZ(), setZ(), setZero(), signedSquare(), Packing::test(), UniformRandomPDs(), ScaleCoupling< M, O >::updateCoupledElements(), StressStrainControlBoundary::updateDomainSize(), Vec3D(), SuperQuadricParticle::writeDebugMessageStep2(), SuperQuadricParticle::writeDebugMessageStep3(), DPMBase::writeEneTimeStep(), LawinenBox::writeEneTimeStep(), Drum::writeEneTimeStep(), Penetration::writeEneTimeStep(), SingleParticle< SpeciesType >::writeEneTimeStep(), BaseCoupling< M, O >::writeEneTimeStep(), GranuDrum::writeResults(), RotatingDrumBidisperse::writeResults(), BaseCluster::writeToCdatFile(), AxisymmetricIntersectionOfWalls::writeVTK(), HorizontalBaseScrew::writeVTK(), HorizontalScrew::writeVTK(), Screw::writeVTK(), and z().


The documentation for this class was generated from the following files: