OpenMD  2.5
Molecular Dynamics in the Open
OpenMD::Vector3< Real > Class Template Reference

#include "math/Vector3.hpp"

Inheritance diagram for OpenMD::Vector3< Real >:
OpenMD::Vector< Real, 3 >

Public Types

typedef Real ElemType
 
typedef Real * ElemPoinerType
 
- Public Types inherited from OpenMD::Vector< Real, 3 >
typedef Real ElemType
 
typedef Real * ElemPoinerType
 

Public Member Functions

 Vector3 ()
 
 Vector3 (Real x, Real y, Real z)
 
 Vector3 (Real *array)
 
 Vector3 (const Vector< Real, 3 > &v)
 
Vector3< Real > & operator= (const Vector< Real, 3 > &v)
 
Real & x ()
 
Real x () const
 
Real & y ()
 
Real y () const
 
Real & z ()
 
Real z () const
 
- Public Member Functions inherited from OpenMD::Vector< Real, 3 >
 Vector ()
 
 Vector (const Vector< Real, Dim > &v)
 
 Vector (const Real &s)
 
 Vector (Real *v)
 
Vector< Real, Dim > & operator= (const Vector< Real, Dim > &v)
 
Real & operator[] (unsigned int i)
 
const Real & operator[] (unsigned int i) const
 
Real & operator() (unsigned int i)
 
const Real & operator() (unsigned int i) const
 
void getArray (Real *array)
 
Real * getArrayPointer ()
 
bool operator== (const Vector< Real, Dim > &v)
 
bool operator!= (const Vector< Real, Dim > &v)
 
void zero ()
 
void negate ()
 
void negate (const Vector< Real, Dim > &v1)
 
void add (const Vector< Real, Dim > &v1)
 
void add (const Vector< Real, Dim > &v1, const Vector< Real, Dim > &v2)
 
void sub (const Vector< Real, Dim > &v1)
 
void sub (const Vector< Real, Dim > &v1, const Vector &v2)
 
void mul (Real s)
 
void mul (const Vector< Real, Dim > &v1, Real s)
 
void Vmul (const Vector< Real, Dim > &v1, const Vector< Real, Dim > &v2)
 
Vector< Real, Dim > & abs ()
 
Real max ()
 
void div (Real s)
 
void div (const Vector< Real, Dim > &v1, Real s)
 
void Vdiv (const Vector< Real, Dim > &v1, const Vector< Real, Dim > &v2)
 
Vector< Real, Dim > & operator+= (const Vector< Real, Dim > &v1)
 
Vector< Real, Dim > & operator-= (const Vector< Real, Dim > &v1)
 
Vector< Real, Dim > & operator*= (Real s)
 
Vector< Real, Dim > & operator/= (Real s)
 
Real sum ()
 
Real componentProduct ()
 
Real length ()
 
Real lengthSquare ()
 
void normalize ()
 
bool isNormalized ()
 
unsigned int size ()
 

Additional Inherited Members

- Protected Attributes inherited from OpenMD::Vector< Real, 3 >
Real data_ [Dim]
 

Detailed Description

template<typename Real>
class OpenMD::Vector3< Real >

Definition at line 66 of file Vector3.hpp.

Member Typedef Documentation

◆ ElemPoinerType

template<typename Real>
typedef Real* OpenMD::Vector3< Real >::ElemPoinerType

Definition at line 69 of file Vector3.hpp.

◆ ElemType

template<typename Real>
typedef Real OpenMD::Vector3< Real >::ElemType

Definition at line 68 of file Vector3.hpp.

Constructor & Destructor Documentation

◆ Vector3() [1/4]

template<typename Real>
OpenMD::Vector3< Real >::Vector3 ( )
inline

Definition at line 70 of file Vector3.hpp.

◆ Vector3() [2/4]

template<typename Real>
OpenMD::Vector3< Real >::Vector3 ( Real  x,
Real  y,
Real  z 
)
inline

Constructs and initializes a Vector3 from x, y, z coordinates

Definition at line 73 of file Vector3.hpp.

◆ Vector3() [3/4]

template<typename Real>
OpenMD::Vector3< Real >::Vector3 ( Real *  array)
inline

Constructs and initializes from an array

Definition at line 80 of file Vector3.hpp.

◆ Vector3() [4/4]

template<typename Real>
OpenMD::Vector3< Real >::Vector3 ( const Vector< Real, 3 > &  v)
inline

Definition at line 82 of file Vector3.hpp.

Member Function Documentation

◆ operator=()

template<typename Real>
Vector3<Real>& OpenMD::Vector3< Real >::operator= ( const Vector< Real, 3 > &  v)
inline

Definition at line 84 of file Vector3.hpp.

◆ x() [1/2]

template<typename Real>
Real& OpenMD::Vector3< Real >::x ( )
inline

Returns reference of the first element of Vector3.

Returns
reference of the first element of Vector3

Definition at line 94 of file Vector3.hpp.

Referenced by OpenMD::Quaternion< Real >::align(), OpenMD::ForceMatrixDecomposition::buildNeighborList(), OpenMD::SHAPES::calcForce(), OpenMD::MAW::calcForce(), OpenMD::Sticky::calcForce(), OpenMD::MoLocator::calcRef(), OpenMD::Electrostatic::calcSurfaceTerm(), OpenMD::TwoDGofR::collectHistogram(), OpenMD::SelectionEvaluator::compareProperty(), OpenMD::ConvexHull::computeHull(), OpenMD::AlphaHull::computeHull(), OpenMD::MomentumCorrFunc::correlateFrames(), OpenMD::EnergyCorrFunc::correlateFrames(), OpenMD::cross(), OpenMD::ContactAngle2::doFrame(), OpenMD::RNEMD::doNIVS(), OpenMD::RNEMD::doSwap(), OpenMD::DistanceFinder::find(), OpenMD::Quaternion< Real >::fromAxisAngle(), OpenMD::Quaternion< Real >::fromShortestArc(), OpenMD::CubicLattice::getLatticeConstant(), OpenMD::Thermo::getTaggedAtomPairDistance(), OpenMD::Quaternion< Real >::getTwistSwingAxisAngle(), OpenMD::Cuboctahedron::inCluster111(), OpenMD::UniformField::initialize(), OpenMD::UniformGradient::initialize(), main(), OpenMD::NitrileFrequencyMap::NitrileFrequencyMap(), OpenMD::SurfaceDiffusion::positionCorrelation(), OpenMD::BOPofR::process(), OpenMD::Hxy::process(), OpenMD::BondOrderParameter::process(), OpenMD::Field< Vector3d >::processFrame(), OpenMD::Electrostatic::ReciprocalSpaceSum(), OpenMD::RNEMD::RNEMD(), OpenMD::RNEMDRTheta::RNEMDRTheta(), OpenMD::Quaternion< Real >::rotate(), OpenMD::ShellStatistics::ShellStatistics(), OpenMD::Quaternion< Real >::toAxisAngle(), OpenMD::Vector3< int >::Vector3(), OpenMD::Vlinear(), and OpenMD::Field< Vector3d >::writeField().

◆ x() [2/2]

template<typename Real>
Real OpenMD::Vector3< Real >::x ( ) const
inline

Returns the first element of Vector3.

Returns
the first element of Vector3

Definition at line 100 of file Vector3.hpp.

◆ y() [1/2]

template<typename Real>
Real& OpenMD::Vector3< Real >::y ( )
inline

Returns reference of the second element of Vector3.

Returns
reference of the second element of Vector3

Definition at line 106 of file Vector3.hpp.

Referenced by OpenMD::Quaternion< Real >::align(), OpenMD::ForceMatrixDecomposition::buildNeighborList(), OpenMD::SHAPES::calcForce(), OpenMD::MAW::calcForce(), OpenMD::Sticky::calcForce(), OpenMD::MoLocator::calcRef(), OpenMD::Electrostatic::calcSurfaceTerm(), OpenMD::TwoDGofR::collectHistogram(), OpenMD::SelectionEvaluator::compareProperty(), OpenMD::AlphaHull::computeHull(), OpenMD::ConvexHull::computeHull(), OpenMD::MomentumCorrFunc::correlateFrames(), OpenMD::EnergyCorrFunc::correlateFrames(), OpenMD::cross(), OpenMD::ContactAngle2::doFrame(), OpenMD::RNEMD::doNIVS(), OpenMD::RNEMD::doSwap(), OpenMD::DistanceFinder::find(), OpenMD::Quaternion< Real >::fromAxisAngle(), OpenMD::Quaternion< Real >::fromShortestArc(), OpenMD::Thermo::getTaggedAtomPairDistance(), OpenMD::Quaternion< Real >::getTwistSwingAxisAngle(), OpenMD::Cuboctahedron::inCluster111(), OpenMD::UniformField::initialize(), OpenMD::UniformGradient::initialize(), main(), OpenMD::NitrileFrequencyMap::NitrileFrequencyMap(), OpenMD::SurfaceDiffusion::positionCorrelation(), OpenMD::BOPofR::process(), OpenMD::Hxy::process(), OpenMD::BondOrderParameter::process(), OpenMD::Field< Vector3d >::processFrame(), OpenMD::Electrostatic::ReciprocalSpaceSum(), OpenMD::RNEMD::RNEMD(), OpenMD::RNEMDRTheta::RNEMDRTheta(), OpenMD::Quaternion< Real >::rotate(), OpenMD::ShellStatistics::ShellStatistics(), OpenMD::Quaternion< Real >::toAxisAngle(), OpenMD::Vector3< int >::Vector3(), OpenMD::Vlinear(), and OpenMD::Field< Vector3d >::writeField().

◆ y() [2/2]

template<typename Real>
Real OpenMD::Vector3< Real >::y ( ) const
inline

Returns the second element of Vector3.

Returns
c the second element of Vector3

Definition at line 112 of file Vector3.hpp.

◆ z() [1/2]

template<typename Real>
Real& OpenMD::Vector3< Real >::z ( )
inline

Returns reference of the third element of Vector3.

Returns
reference of the third element of Vector3

Definition at line 118 of file Vector3.hpp.

Referenced by OpenMD::Quaternion< Real >::align(), OpenMD::ForceMatrixDecomposition::buildNeighborList(), OpenMD::SHAPES::calcForce(), OpenMD::MAW::calcForce(), OpenMD::Sticky::calcForce(), OpenMD::MoLocator::calcRef(), OpenMD::Electrostatic::calcSurfaceTerm(), OpenMD::RNEMD::collectData(), OpenMD::SelectionEvaluator::compareProperty(), OpenMD::AlphaHull::computeHull(), OpenMD::ConvexHull::computeHull(), OpenMD::VCorrFuncZ::computeProperty1(), OpenMD::RCorrFuncZ::computeProperty1(), OpenMD::COHZ::correlateFrames(), OpenMD::LegendreCorrFuncZ::correlateFrames(), OpenMD::MomentumCorrFunc::correlateFrames(), OpenMD::EnergyCorrFunc::correlateFrames(), OpenMD::cross(), OpenMD::ContactAngle2::doFrame(), OpenMD::ContactAngle1::doFrame(), OpenMD::RNEMD::doNIVS(), OpenMD::RNEMD::doSwap(), OpenMD::DistanceFinder::find(), OpenMD::Quaternion< Real >::fromAxisAngle(), OpenMD::Quaternion< Real >::fromShortestArc(), OpenMD::Thermo::getTaggedAtomPairDistance(), OpenMD::Quaternion< Real >::getTwistSwingAxisAngle(), OpenMD::Cuboctahedron::inCluster111(), OpenMD::UniformField::initialize(), OpenMD::UniformGradient::initialize(), main(), OpenMD::NitrileFrequencyMap::NitrileFrequencyMap(), OpenMD::DensityPlot::process(), OpenMD::RippleOP::process(), OpenMD::BOPofR::process(), OpenMD::RhoZ::process(), OpenMD::Hxy::process(), OpenMD::BondOrderParameter::process(), OpenMD::Field< Vector3d >::processFrame(), OpenMD::Electrostatic::ReciprocalSpaceSum(), OpenMD::RNEMD::RNEMD(), OpenMD::RNEMDRTheta::RNEMDRTheta(), OpenMD::Quaternion< Real >::rotate(), OpenMD::ShellStatistics::ShellStatistics(), OpenMD::Quaternion< Real >::toAxisAngle(), OpenMD::Vector3< int >::Vector3(), OpenMD::Vlinear(), and OpenMD::Field< Vector3d >::writeField().

◆ z() [2/2]

template<typename Real>
Real OpenMD::Vector3< Real >::z ( ) const
inline

Returns the third element of Vector3.

Returns
f the third element of Vector3

Definition at line 124 of file Vector3.hpp.


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