Loading...
Searching...
No Matches
Vector< Cmpt > Class Template Reference

Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross-product operators. More...

#include <Vector.H>

Inheritance diagram for Vector< Cmpt >:
Collaboration diagram for Vector< Cmpt >:

Public Types

enum  components { X , Y , Z }
 Component labeling enumeration. More...
typedef Vector< label > labelType
 Equivalent type of labels used for valid component indexing.
Public Types inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
typedef VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > vsType
 VectorSpace type.
typedef Cmpt cmptType
 Component type.
typedef Cmpt magType
 Magnitude type.
typedef direction size_type
 The type to represent the size of a VectorSpace.
typedef Cmpt * iterator
 Random access iterator for traversing VectorSpace.
typedef const Cmpt * const_iterator
 Random access iterator for traversing VectorSpace.

Public Member Functions

 Vector ()=default
 Default construct.
 Vector (const Vector &)=default
 Copy construct.
Vectoroperator= (const Vector &)=default
 Copy assignment.
 Vector (Foam::zero)
 Construct initialized to zero.
template<class Cmpt2>
 Vector (const VectorSpace< Vector< Cmpt2 >, Cmpt2, 3 > &vs)
 Copy construct from VectorSpace of the same rank.
 Vector (const Cmpt &vx, const Cmpt &vy, const Cmpt &vz)
 Construct from three components.
 Vector (Istream &is)
 Construct from Istream.
const Cmpt & x () const noexcept
 Access to the vector x component.
const Cmpt & y () const noexcept
 Access to the vector y component.
const Cmpt & z () const noexcept
 Access to the vector z component.
Cmpt & x () noexcept
 Access to the vector x component.
Cmpt & y () noexcept
 Access to the vector y component.
Cmpt & z () noexcept
 Access to the vector z component.
const Vector< Cmpt > & centre (const Foam::UList< Vector< Cmpt > > &) const noexcept
 Return this (for point which is a typedef to Vector<scalar>).
scalar mag () const
 The length (L2-norm) of the vector.
scalar magSqr () const
 The length (L2-norm) squared of the vector.
scalar dist (const Vector< Cmpt > &v2) const
 The L2-norm distance from another vector. The mag() of the difference.
scalar distSqr (const Vector< Cmpt > &v2) const
 The L2-norm distance squared from another vector. The magSqr() of the difference.
Vector< Cmpt > & normalise (const scalar tol=ROOTVSMALL)
 Inplace normalise the vector by its magnitude.
Vector< Cmpt > & removeCollinear (const Vector< Cmpt > &unitVec)
 Inplace removal of components that are collinear to the given unit vector.
Cmpt inner (const Vector< Cmpt > &v2) const
 Scalar-product of this with another Vector.
Vector< Cmpt > cross (const Vector< Cmpt > &v2) const
 Cross-product of this with another Vector.
template<class Cmpt2>
std::enable_if_t< std::is_convertible_v< Cmpt2, Cmpt >, void > operator+= (const Vector< Cmpt2 > &b)
 Add compatible vector to this.
template<class Cmpt2>
std::enable_if_t< std::is_convertible_v< Cmpt2, Cmpt >, void > operator-= (const Vector< Cmpt2 > &b)
 Subtract compatible vector from this.
Public Member Functions inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
const Foam::VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 VectorSpace ()=default
 Default construct.
const Cmpt & component (const direction) const
void replace (const direction, const Cmpt &)
const Cmpt * cdata () const noexcept
 Return const pointer to the first data element.
Cmpt * data () noexcept
 Return pointer to the first data element.
void fill (const Cmpt &s)
 Assign all components to given value.
const Cmpt & operator[] (const direction) const
void operator= (const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > &)
void operator+= (const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > &)
void operator-= (const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > &)
void operator*= (const scalar)
void operator/= (const scalar)
iterator begin () noexcept
 Return an iterator (pointer) to begin of VectorSpace.
const_iterator cbegin () const noexcept
 Return const_iterator (const pointer) to begin of VectorSpace.
iterator end () noexcept
 Return an iterator (pointer) to end of VectorSpace.
const_iterator cend () const noexcept
 Return const_iterator (const pointer) to end of VectorSpace.

Static Public Member Functions

static bool less_xyz (const Vector< Cmpt > &a, const Vector< Cmpt > &b)
 Lexicographically compare a and b with order (x:y:z).
static bool less_yzx (const Vector< Cmpt > &a, const Vector< Cmpt > &b)
 Lexicographically compare a and b with order (y:z:x).
static bool less_zxy (const Vector< Cmpt > &a, const Vector< Cmpt > &b)
 Lexicographically compare a and b with order (z:x:y).
Static Public Member Functions inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
static constexpr direction size () noexcept
 The number of elements in the VectorSpace = Ncmpts.
static Vector< Cmpt > uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s.

Static Public Attributes

static constexpr direction rank = 1
 Rank of Vector is 1.
Static Public Attributes inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
static constexpr direction dim
 Dimensionality of space.
static constexpr direction nComponents
 Number of components in this vector space.
static constexpr direction mRows
static constexpr direction nCols
static const char *const typeName
static const char *const componentNames []
static const Vector< Cmpt > zero
static const Vector< Cmpt > one
static const Vector< Cmpt > max
static const Vector< Cmpt > min
static const Vector< Cmpt > rootMax
static const Vector< Cmpt > rootMin

Additional Inherited Members

Public Attributes inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
Cmpt v_ [Ncmpts]
 The components of this vector space.

Detailed Description

template<class Cmpt>
class Foam::Vector< Cmpt >

Templated 3D Vector derived from VectorSpace adding construction from 3 components, element access using x(), y() and z() member functions and the inner-product (dot-product) and cross-product operators.

A centre() member function which returns the Vector for which it is called is defined so that point which is a typedef to Vector<scalar> behaves as other shapes in the shape hierarchy.

Source files

Definition at line 58 of file Vector.H.

Member Typedef Documentation

◆ labelType

template<class Cmpt>
typedef Vector<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 69 of file Vector.H.

Member Enumeration Documentation

◆ components

template<class Cmpt>
enum components

Component labeling enumeration.

Enumerator

Definition at line 83 of file Vector.H.

Constructor & Destructor Documentation

◆ Vector() [1/6]

template<class Cmpt>
Vector ( )
default

Default construct.

Referenced by centre(), cross(), dist(), distSqr(), inner(), less_xyz(), less_yzx(), less_zxy(), removeCollinear(), Vector(), Vector(), and Vector().

Here is the caller graph for this function:

◆ Vector() [2/6]

template<class Cmpt>
Vector ( const Vector< Cmpt > & )
default

Copy construct.

◆ Vector() [3/6]

template<class Cmpt>
Vector ( Foam::zero )
inline

Construct initialized to zero.

Definition at line 25 of file VectorI.H.

References Vector(), and VectorSpace< Vector< Cmpt >, Cmpt, 3 >::zero.

Here is the call graph for this function:

◆ Vector() [4/6]

template<class Cmpt>
template<class Cmpt2>
Vector ( const VectorSpace< Vector< Cmpt2 >, Cmpt2, 3 > & vs)
inline

Copy construct from VectorSpace of the same rank.

Definition at line 33 of file VectorI.H.

References Vector(), and VectorSpace< Vector< Cmpt >, Cmpt, 3 >::VectorSpace().

Here is the call graph for this function:

◆ Vector() [5/6]

template<class Cmpt>
Vector ( const Cmpt & vx,
const Cmpt & vy,
const Cmpt & vz )
inline

Construct from three components.

Definition at line 43 of file VectorI.H.

References x, y, and z().

Here is the call graph for this function:

◆ Vector() [6/6]

template<class Cmpt>
Vector ( Istream & is)
inlineexplicit

Construct from Istream.

Definition at line 57 of file VectorI.H.

References Vector().

Here is the call graph for this function:

Member Function Documentation

◆ operator=()

template<class Cmpt>
Vector & operator= ( const Vector< Cmpt > & )
default

Copy assignment.

Referenced by triad::operator=().

Here is the caller graph for this function:

◆ x() [1/2]

template<class Cmpt>
const Cmpt & x ( ) const
inlinenoexcept

Access to the vector x component.

Definition at line 135 of file Vector.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), SymmTensor< Cmpt >::addDiag(), Tensor< Cmpt >::addDiag(), triad::align(), sensitivitySurface::assembleSensitivities(), sensitivitySurfacePoints::assembleSensitivities(), tetIndices::barycentricToPoint(), blockDescriptor::blockDescriptor(), PDRblock::blockMeshDict(), NURBS3DVolume::bound(), boundBox::box_box_overlaps(), PDRblock::C(), energySpectrum::calcAndWriteSpectrum(), CentredFitSnGradData< Polynomial >::calcFit(), FitData< FitDataType, ExtendedStencil, Polynomial >::calcFit(), rotorDiskSource::calculate(), ijkAddressing::checkIndex(), Tensor< Cmpt >::col(), axisAligned::computeControlPoints(), transformBox::computeControlPoints(), NURBS3DVolume::confineInertControlPoints(), boundBox::contains(), boundBox::containsInside(), NURBS3DVolume::coordinates(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), cross(), volumetricBSplinesDesignVariables::dCdb(), volBSplinesBase::decomposeDV(), SymmTensor< Cmpt >::diag(), Tensor< Cmpt >::diag(), distSqr(), volumetricBSplinesDesignVariables::dndb(), volumetricBSplinesDesignVariables::dSdb(), PDRblock::dx(), volumetricBSplinesDesignVariables::dxdbFace(), adjointRotatingWallVelocityFvPatchVectorField::dxdbMult(), volumetricBSplinesDesignVariables::dxdbVol(), pitchForkRing::energy(), forceCoeffs::execute(), Foam::faceNij(), Foam::facePoint(), Foam::facePointN(), Foam::facePointN(), NURBS3DVolume::findPointsInBox(), pitchForkRing::force(), rigidBodyModel::forwardDynamics(), Foam::fromCartesian(), FIRECore::getFirePoint(), boundaryMesh::getNearest(), PDRblock::grid(), ijkAddressing::index(), voxelMeshSearch::index(), voxelMeshSearch::index(), voxelMeshSearch::index3(), voxelMeshSearch::index3(), waveMakerPointPatchVectorField::initialiseGeometry(), waveModel::initialiseGeometry(), inner(), cellShapeControlMesh::insert(), cellShapeControlMesh::insertFar(), NURBS3DVolume::JacobianUVW(), Rxyz::jcalc(), Ryxz::jcalc(), Rzyx::jcalc(), Foam::lerp(), cellMDLimitedGrad< Type >::limitFace(), momentOfInertia::massPropertiesSolid(), twoDPointCorrector::normalDir(), Field< T >::normalise(), NURBS3DCurve::nrm2D(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Vector< vector >::operator+=(), Vector< vector >::operator-=(), Foam::operator/(), Foam::operator/(), Foam::operator/(), Foam::operator^(), Foam::operator^(), plane::planeIntersect(), ijkMesh::pointLabel(), polyTopoChange::pointRemoved(), tetrahedron< Point, PointRef >::pointToBarycentric(), triad::primaryDirection(), projectFace::project(), FIRECore::putFirePoint(), quaternion::quaternion(), Foam::Ra(), AC3DsurfaceFormat< Face >::read(), energySpectrum::read(), volumetricBSplinesDesignVariables::readBounds(), PDRblock::reset(), IjkField< Type >::resize(), linearSpringDamper::restrain(), euler::rotation(), SymmTensor< Cmpt >::row(), Tensor< Cmpt >::row(), treeBoundBox::searchOrder(), BezierDesignVariables::setBounds(), NURBS3DCurve::setNrm2DOrientation(), KinematicLookupTableInjection< CloudType >::setPositionAndCell(), ReactingLookupTableInjection< CloudType >::setPositionAndCell(), ReactingMultiphaseLookupTableInjection< CloudType >::setPositionAndCell(), ThermoLookupTableInjection< CloudType >::setPositionAndCell(), snappyVoxelMeshDriver::snappyVoxelMeshDriver(), Foam::sqr(), leastSquares::stencilWeights(), treeBoundBox::subOctant(), treeBoundBox::subOctant(), treeBoundBox::subOctant(), SymmTensor< Cmpt >::subtractDiag(), Tensor< Cmpt >::subtractDiag(), Foam::toCartesian(), NURBS3DVolumeCylindrical::transformationTensorDxDb(), controlPointsDefinition::transformControlPoints(), NURBS3DVolumeCylindrical::transformPointToCartesian(), Foam::transformPrincipal_vector(), pointConstraint::unconstrainedDirections(), joint::unitQuaternion(), NURBS3DVolumeCylindrical::updateLocalCoordinateSystem(), PDRblock::V(), ijkMesh::vertLabels(), NURBS3DVolume::volumeDerivativeCP(), wallLayerCells::wallLayerCells(), SMESHsurfaceFormat< Face >::write(), sixDoFRigidBodyState::write(), STLtriangle::write(), meshToMeshMethod::writeConnectivity(), forceCoeffs::writeIntegratedDataFile(), cellCuts::writeOBJ(), coupledPolyPatch::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), triSurfaceTools::writeOBJ(), Cloud< ParticleType >::writePositions(), moleculeCloud::writeXYZ(), Foam::Xinterpolate(), Foam::XstepForwardsToNextPoint(), and Foam::zip().

◆ y() [1/2]

template<class Cmpt>
const Cmpt & y ( ) const
inlinenoexcept

Access to the vector y component.

Definition at line 140 of file Vector.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), SymmTensor< Cmpt >::addDiag(), Tensor< Cmpt >::addDiag(), triad::align(), sensitivitySurface::assembleSensitivities(), sensitivitySurfacePoints::assembleSensitivities(), tetIndices::barycentricToPoint(), blockDescriptor::blockDescriptor(), PDRblock::blockMeshDict(), NURBS3DVolume::bound(), boundBox::box_box_overlaps(), PDRblock::C(), energySpectrum::calcAndWriteSpectrum(), CentredFitSnGradData< Polynomial >::calcFit(), FitData< FitDataType, ExtendedStencil, Polynomial >::calcFit(), rotorDiskSource::calculate(), ijkAddressing::checkIndex(), Tensor< Cmpt >::col(), axisAligned::computeControlPoints(), transformBox::computeControlPoints(), NURBS3DVolume::confineInertControlPoints(), boundBox::contains(), boundBox::containsInside(), NURBS3DVolume::coordinates(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), cross(), volumetricBSplinesDesignVariables::dCdb(), volBSplinesBase::decomposeDV(), SymmTensor< Cmpt >::diag(), Tensor< Cmpt >::diag(), distSqr(), volumetricBSplinesDesignVariables::dndb(), volumetricBSplinesDesignVariables::dSdb(), volumetricBSplinesDesignVariables::dxdbFace(), adjointRotatingWallVelocityFvPatchVectorField::dxdbMult(), volumetricBSplinesDesignVariables::dxdbVol(), PDRblock::dy(), pitchForkRing::energy(), forceCoeffs::execute(), Foam::faceNij(), Foam::facePoint(), Foam::facePointN(), Foam::facePointN(), NURBS3DVolume::findPointsInBox(), pitchForkRing::force(), rigidBodyModel::forwardDynamics(), Foam::fromCartesian(), FIRECore::getFirePoint(), boundaryMesh::getNearest(), PDRblock::grid(), ijkAddressing::index(), voxelMeshSearch::index(), voxelMeshSearch::index(), voxelMeshSearch::index3(), voxelMeshSearch::index3(), waveMakerPointPatchVectorField::initialiseGeometry(), waveModel::initialiseGeometry(), inner(), cellShapeControlMesh::insert(), cellShapeControlMesh::insertFar(), NURBS3DVolume::JacobianUVW(), Rxyz::jcalc(), Ryxz::jcalc(), Rzyx::jcalc(), Foam::lerp(), cellMDLimitedGrad< Type >::limitFace(), momentOfInertia::massPropertiesSolid(), twoDPointCorrector::normalDir(), Field< T >::normalise(), NURBS3DCurve::nrm2D(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Vector< vector >::operator+=(), Vector< vector >::operator-=(), Foam::operator/(), Foam::operator/(), Foam::operator/(), Foam::operator^(), Foam::operator^(), plane::planeIntersect(), ijkMesh::pointLabel(), polyTopoChange::pointRemoved(), tetrahedron< Point, PointRef >::pointToBarycentric(), triad::primaryDirection(), projectFace::project(), FIRECore::putFirePoint(), quaternion::quaternion(), Foam::Ra(), AC3DsurfaceFormat< Face >::read(), energySpectrum::read(), volumetricBSplinesDesignVariables::readBounds(), PDRblock::reset(), IjkField< Type >::resize(), linearSpringDamper::restrain(), euler::rotation(), SymmTensor< Cmpt >::row(), Tensor< Cmpt >::row(), treeBoundBox::searchOrder(), BezierDesignVariables::setBounds(), NURBS3DCurve::setNrm2DOrientation(), snappyVoxelMeshDriver::snappyVoxelMeshDriver(), Foam::sqr(), leastSquares::stencilWeights(), treeBoundBox::subOctant(), treeBoundBox::subOctant(), treeBoundBox::subOctant(), SymmTensor< Cmpt >::subtractDiag(), Tensor< Cmpt >::subtractDiag(), Foam::toCartesian(), NURBS3DVolumeCylindrical::transformationTensorDxDb(), controlPointsDefinition::transformControlPoints(), NURBS3DVolumeCylindrical::transformPointToCartesian(), Foam::transformPrincipal_vector(), pointConstraint::unconstrainedDirections(), joint::unitQuaternion(), NURBS3DVolumeCylindrical::updateLocalCoordinateSystem(), PDRblock::V(), ijkMesh::vertLabels(), NURBS3DVolume::volumeDerivativeCP(), wallLayerCells::wallLayerCells(), SMESHsurfaceFormat< Face >::write(), sixDoFRigidBodyState::write(), STLtriangle::write(), meshToMeshMethod::writeConnectivity(), forceCoeffs::writeIntegratedDataFile(), cellCuts::writeOBJ(), coupledPolyPatch::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), triSurfaceTools::writeOBJ(), Cloud< ParticleType >::writePositions(), moleculeCloud::writeXYZ(), Foam::Xinterpolate(), and Foam::zip().

◆ z() [1/2]

template<class Cmpt>
const Cmpt & z ( ) const
inlinenoexcept

Access to the vector z component.

Definition at line 145 of file Vector.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), SymmTensor< Cmpt >::addDiag(), Tensor< Cmpt >::addDiag(), triad::align(), sensitivitySurface::assembleSensitivities(), sensitivitySurfacePoints::assembleSensitivities(), tetIndices::barycentricToPoint(), blockDescriptor::blockDescriptor(), PDRblock::blockMeshDict(), NURBS3DVolume::bound(), boundBox::box_box_overlaps(), PDRblock::C(), energySpectrum::calcAndWriteSpectrum(), CentredFitSnGradData< Polynomial >::calcFit(), FitData< FitDataType, ExtendedStencil, Polynomial >::calcFit(), rotorDiskSource::calculate(), ijkAddressing::checkIndex(), Tensor< Cmpt >::col(), axisAligned::computeControlPoints(), transformBox::computeControlPoints(), NURBS3DVolume::confineInertControlPoints(), boundBox::contains(), boundBox::containsInside(), NURBS3DVolume::coordinates(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), cross(), volumetricBSplinesDesignVariables::dCdb(), volBSplinesBase::decomposeDV(), SymmTensor< Cmpt >::diag(), Tensor< Cmpt >::diag(), distSqr(), volumetricBSplinesDesignVariables::dndb(), volumetricBSplinesDesignVariables::dSdb(), volumetricBSplinesDesignVariables::dxdbFace(), adjointRotatingWallVelocityFvPatchVectorField::dxdbMult(), volumetricBSplinesDesignVariables::dxdbVol(), PDRblock::dz(), pitchForkRing::energy(), forceCoeffs::execute(), Foam::faceNij(), Foam::facePoint(), Foam::facePointN(), Foam::facePointN(), NURBS3DVolume::findPointsInBox(), pitchForkRing::force(), rigidBodyModel::forwardDynamics(), Foam::fromCartesian(), FIRECore::getFirePoint(), boundaryMesh::getNearest(), PDRblock::grid(), ijkAddressing::index(), voxelMeshSearch::index(), voxelMeshSearch::index(), voxelMeshSearch::index3(), voxelMeshSearch::index3(), waveMakerPointPatchVectorField::initialiseGeometry(), waveModel::initialiseGeometry(), inner(), cellShapeControlMesh::insert(), cellShapeControlMesh::insertFar(), NURBS3DVolume::JacobianUVW(), Rxyz::jcalc(), Ryxz::jcalc(), Rzyx::jcalc(), Foam::lerp(), cellMDLimitedGrad< Type >::limitFace(), magSqr(), momentOfInertia::massPropertiesSolid(), twoDPointCorrector::normalDir(), Field< T >::normalise(), NURBS3DCurve::nrm2D(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator&(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Foam::operator*(), Vector< vector >::operator+=(), Vector< vector >::operator-=(), Foam::operator/(), Foam::operator/(), Foam::operator/(), Foam::operator^(), Foam::operator^(), plane::planeIntersect(), ijkMesh::pointLabel(), polyTopoChange::pointRemoved(), tetrahedron< Point, PointRef >::pointToBarycentric(), triad::primaryDirection(), projectFace::project(), FIRECore::putFirePoint(), quaternion::quaternion(), Foam::Ra(), AC3DsurfaceFormat< Face >::read(), energySpectrum::read(), volumetricBSplinesDesignVariables::readBounds(), PDRblock::reset(), IjkField< Type >::resize(), linearSpringDamper::restrain(), euler::rotation(), SymmTensor< Cmpt >::row(), Tensor< Cmpt >::row(), treeBoundBox::searchOrder(), BezierDesignVariables::setBounds(), NURBS3DCurve::setNrm2DOrientation(), snappyVoxelMeshDriver::snappyVoxelMeshDriver(), Foam::sqr(), leastSquares::stencilWeights(), treeBoundBox::subOctant(), treeBoundBox::subOctant(), treeBoundBox::subOctant(), SymmTensor< Cmpt >::subtractDiag(), Tensor< Cmpt >::subtractDiag(), Foam::toCartesian(), controlPointsDefinition::transformControlPoints(), NURBS3DVolumeCylindrical::transformPointToCartesian(), Foam::transformPrincipal_vector(), joint::unitQuaternion(), NURBS3DVolumeCylindrical::updateLocalCoordinateSystem(), PDRblock::V(), Vector(), ijkMesh::vertLabels(), NURBS3DVolume::volumeDerivativeCP(), wallLayerCells::wallLayerCells(), SMESHsurfaceFormat< Face >::write(), sixDoFRigidBodyState::write(), STLtriangle::write(), meshToMeshMethod::writeConnectivity(), forceCoeffs::writeIntegratedDataFile(), cellCuts::writeOBJ(), coupledPolyPatch::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), Foam::meshTools::writeOBJ(), triSurfaceTools::writeOBJ(), Cloud< ParticleType >::writePositions(), moleculeCloud::writeXYZ(), and Foam::zip().

◆ x() [2/2]

template<class Cmpt>
Cmpt & x ( )
inlinenoexcept

Access to the vector x component.

Definition at line 150 of file Vector.H.

◆ y() [2/2]

template<class Cmpt>
Cmpt & y ( )
inlinenoexcept

Access to the vector y component.

Definition at line 155 of file Vector.H.

◆ z() [2/2]

template<class Cmpt>
Cmpt & z ( )
inlinenoexcept

Access to the vector z component.

Definition at line 160 of file Vector.H.

◆ centre()

template<class Cmpt>
const Foam::Vector< Cmpt > & centre ( const Foam::UList< Vector< Cmpt > > & ) const
inlinenoexcept

Return this (for point which is a typedef to Vector<scalar>).

Definition at line 66 of file VectorI.H.

References Foam::noexcept, and Vector().

Referenced by cellShape::centre(), treeDataEdge::centre(), and extendedEdgeMesh::sortPointsAndEdges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mag()

template<class Cmpt>
Foam::scalar mag ( ) const
inline

The length (L2-norm) of the vector.

Definition at line 88 of file VectorI.H.

References Foam::magSqr().

Referenced by cellShape::mag().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ magSqr()

template<class Cmpt>
Foam::scalar magSqr ( ) const
inline

The length (L2-norm) squared of the vector.

Definition at line 76 of file VectorI.H.

References Foam::magSqr(), x, y, and z().

Referenced by faNVDscheme< Type, NVDweight >::weights().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dist()

template<class Cmpt>
Foam::scalar dist ( const Vector< Cmpt > & v2) const
inline

The L2-norm distance from another vector. The mag() of the difference.

Definition at line 107 of file VectorI.H.

References distSqr(), and Vector().

Referenced by triSurfaceTools::calcInterpolationWeights(), Foam::calcProximityOfFeatureEdges(), Foam::calcProximityOfFeaturePoints(), sampledSet::findNearFace(), boundaryMesh::getNearest(), boundBox::mag(), triangle< Point, PointRef >::nearestPoint(), and face::ray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ distSqr()

template<class Cmpt>
Foam::scalar distSqr ( const Vector< Cmpt > & v2) const
inline

The L2-norm distance squared from another vector. The magSqr() of the difference.

Definition at line 95 of file VectorI.H.

References Foam::magSqr(), Vector(), x(), y(), and z().

Referenced by triSurfaceMesh::boundingSpheres(), dist(), patchFieldProbe::findElements(), dynamicTreeDataPoint::findNearest(), mapNearestMethod::findNearestCell(), treeDataFace::getVolumeType(), surfaceFeatures::nearestEdges(), surfaceFeatures::nearestSamples(), and faceCollapser::setRefinement().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ normalise()

template<class Cmpt>
Foam::Vector< Cmpt > & normalise ( const scalar tol = ROOTVSMALL)
inline

◆ removeCollinear()

template<class Cmpt>
Foam::Vector< Cmpt > & removeCollinear ( const Vector< Cmpt > & unitVec)
inline

Inplace removal of components that are collinear to the given unit vector.

Definition at line 136 of file VectorI.H.

References Vector().

Referenced by Foam::calcLeVector(), searchableSurfacesQueries::findNearest(), searchableExtrudedCircle::findParametricNearest(), cylindrical::R(), axes::rotation(), Foam::rotation_e3e1(), and faNVDscheme< Type, NVDweight >::weights().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ inner()

template<class Cmpt>
Cmpt inner ( const Vector< Cmpt > & v2) const
inline

Scalar-product of this with another Vector.

Definition at line 146 of file VectorI.H.

References Vector(), x(), y(), and z().

Referenced by Foam::operator&(), and Foam::operator&().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cross()

template<class Cmpt>
Foam::Vector< Cmpt > cross ( const Vector< Cmpt > & v2) const
inline

Cross-product of this with another Vector.

Definition at line 156 of file VectorI.H.

References Vector(), x(), y(), and z().

Referenced by Foam::operator^().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ less_xyz()

template<class Cmpt>
bool less_xyz ( const Vector< Cmpt > & a,
const Vector< Cmpt > & b )
inlinestatic

Lexicographically compare a and b with order (x:y:z).

Definition at line 173 of file VectorI.H.

References b, and Vector().

Here is the call graph for this function:

◆ less_yzx()

template<class Cmpt>
bool less_yzx ( const Vector< Cmpt > & a,
const Vector< Cmpt > & b )
inlinestatic

Lexicographically compare a and b with order (y:z:x).

Definition at line 197 of file VectorI.H.

References b, and Vector().

Here is the call graph for this function:

◆ less_zxy()

template<class Cmpt>
bool less_zxy ( const Vector< Cmpt > & a,
const Vector< Cmpt > & b )
inlinestatic

Lexicographically compare a and b with order (z:x:y).

Definition at line 221 of file VectorI.H.

References b, and Vector().

Here is the call graph for this function:

◆ operator+=()

template<class Cmpt>
template<class Cmpt2>
std::enable_if_t< std::is_convertible_v< Cmpt2, Cmpt >, void > operator+= ( const Vector< Cmpt2 > & b)
inline

Add compatible vector to this.

Definition at line 267 of file Vector.H.

◆ operator-=()

template<class Cmpt>
template<class Cmpt2>
std::enable_if_t< std::is_convertible_v< Cmpt2, Cmpt >, void > operator-= ( const Vector< Cmpt2 > & b)
inline

Subtract compatible vector from this.

Definition at line 279 of file Vector.H.

Member Data Documentation

◆ rank

template<class Cmpt>
direction rank = 1
staticconstexpr

Rank of Vector is 1.

Definition at line 77 of file Vector.H.


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