All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Types | Public Member Functions | Static Public Attributes | List of all members
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...

Inheritance diagram for Vector< Cmpt >:
Inheritance graph
[legend]
Collaboration diagram for Vector< Cmpt >:
Collaboration graph
[legend]

Public Types

enum  components { X, Y, Z }
 Component labeling enumeration. More...
 
typedef Vector< labellabelType
 Equivalent type of labels used for valid component indexing. More...
 
- Public Types inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
typedef VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > vsType
 VectorSpace type. More...
 
typedef Cmpt cmptType
 Component type. More...
 

Public Member Functions

 Vector ()
 Construct null. More...
 
 Vector (const Foam::zero)
 Construct initialized to zero. More...
 
template<class Cmpt2 >
 Vector (const VectorSpace< Vector< Cmpt2 >, Cmpt2, 3 > &)
 Construct given VectorSpace of the same rank. More...
 
 Vector (const Cmpt &vx, const Cmpt &vy, const Cmpt &vz)
 Construct given three components. More...
 
 Vector (Istream &)
 Construct from Istream. More...
 
const Cmpt & x () const
 
const Cmpt & y () const
 
const Cmpt & z () const
 
Cmpt & x ()
 
Cmpt & y ()
 
Cmpt & z ()
 
const Vector< Cmpt > & centre (const Foam::List< Vector< Cmpt >> &) const
 Return *this (used for point which is a typedef to Vector<scalar>. More...
 
- Public Member Functions inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
 VectorSpace ()
 Construct null. More...
 
 VectorSpace (const Foam::zero)
 Construct initialized to zero. More...
 
 VectorSpace (Istream &)
 Construct from Istream. More...
 
 VectorSpace (const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > &)
 Construct as copy. More...
 
 VectorSpace (const VectorSpace< Form2, Cmpt2, Ncmpts > &)
 Construct as copy of a VectorSpace with the same size. More...
 
const Cmpt & component (const direction) const
 
Cmpt & component (const direction)
 
void component (Cmpt &, const direction) const
 
void replace (const direction, const Cmpt &)
 
const ConstBlock< SubVector, BStart > block () const
 
const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts >::template ConstBlock< SubVector, BStart > block () const
 
const Cmpt & operator[] (const direction) const
 
Cmpt & operator[] (const direction)
 
void operator= (const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > &)
 
void operator= (const Foam::zero)
 
void operator+= (const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > &)
 
void operator-= (const VectorSpace< Vector< Cmpt >, Cmpt, Ncmpts > &)
 
void operator*= (const scalar)
 
void operator/= (const scalar)
 

Static Public Attributes

static const direction rank = 1
 Rank of Vector is 1. More...
 
- Static Public Attributes inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
static const direction dim
 Dimensionality of space. More...
 
static const direction nComponents
 Number of components in this vector space. More...
 
static const direction mRows
 
static const 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

- Static Public Member Functions inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
static direction size ()
 Return the number of elements in the VectorSpace = Ncmpts. More...
 
static Vector< Cmpt > uniform (const Cmpt &s)
 Return a VectorSpace with all elements = s. More...
 
- Public Attributes inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
Cmpt v_ [Ncmpts]
 The components of this vector space. More...
 

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 hierachy.

Source files

Definition at line 57 of file Vector.H.

Member Typedef Documentation

◆ labelType

Equivalent type of labels used for valid component indexing.

Definition at line 65 of file Vector.H.

Member Enumeration Documentation

◆ components

enum components

Component labeling enumeration.

Enumerator

Definition at line 75 of file Vector.H.

Constructor & Destructor Documentation

◆ Vector() [1/5]

Vector ( )
inline

Construct null.

Definition at line 29 of file VectorI.H.

Referenced by Vector< vector >::Vector().

Here is the caller graph for this function:

◆ Vector() [2/5]

Vector ( const Foam::zero  )
inline

Construct initialized to zero.

Definition at line 34 of file VectorI.H.

◆ Vector() [3/5]

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

Construct given VectorSpace of the same rank.

Definition at line 43 of file VectorI.H.

◆ Vector() [4/5]

Vector ( const Cmpt &  vx,
const Cmpt &  vy,
const Cmpt &  vz 
)
inline

Construct given three components.

Definition at line 53 of file VectorI.H.

◆ Vector() [5/5]

Vector ( Istream is)
inline

Construct from Istream.

Definition at line 66 of file VectorI.H.

Member Function Documentation

◆ x() [1/2]

const Cmpt & x ( ) const
inline

Definition at line 75 of file VectorI.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), triad::align(), BarycentricTensor< Cmpt >::BarycentricTensor(), blockDescriptor::blockDescriptor(), Foam::meshTools::calcBoxPointNormals(), treeBoundBox::calcExtremities(), CentredFitSnGradData< Polynomial >::calcFit(), FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial >::calcFit(), cyclicPolyPatch::calcTransforms(), rotorDiskSource::calculate(), block::cells(), edgeCollapser::checkMeshQuality(), molecule::constantProperties::constantProperties(), boundBox::contains(), boundBox::containsInside(), MaxwellianThermal< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), treeBoundBox::distanceCmp(), blockDescriptor::edge(), blockDescriptor::edgesPointsWeights(), Foam::eigenValues(), Foam::eigenVector(), Foam::eigenVectors(), pitchForkRing::energy(), treeBoundBox::faceBits(), Foam::faceNij(), Foam::facePoint(), blockDescriptor::facePointLabel(), Foam::facePointN(), blockDescriptor::facePoints(), indexedOctree< Foam::treeDataFace >::findLine(), dynamicTreeDataPoint::findNearest(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::findNearest(), indexedOctree< Foam::treeDataFace >::findNearest(), blockDescriptor::flatFaceOrEdge(), pitchForkRing::force(), rigidBodyModel::forwardDynamics(), polyMesh::geometricD(), boundaryMesh::getNearest(), cylindricalCS::globalToLocal(), cellShapeControlMesh::insert(), cellShapeControlMesh::insertFar(), triangleFuncs::intersectBb(), treeBoundBox::intersects(), Foam::inv(), Rxyz::jcalc(), Ryxz::jcalc(), Rzyx::jcalc(), cellMDLimitedGrad< Type >::limitFace(), cylindricalCS::localToGlobal(), momentOfInertia::massPropertiesSolid(), conformalVoronoiMesh::maxSurfaceProtrusion(), molecule::move(), NamedEnum< directionType, 3 >::names(), blockDescriptor::nCells(), boundBox::nearest(), twoDPointCorrector::normalDir(), blockDescriptor::nPoints(), Foam::operator &(), treeDataPoint::findNearestOp::operator()(), treeDataEdge::findNearestOp::operator()(), Foam::operator*(), Foam::operator/(), Foam::operator^(), searchablePlate::overlaps(), boundBox::overlaps(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::overlaps(), indexedOctree< Foam::treeDataFace >::overlaps(), plane::planeCoeffs(), plane::planeIntersect(), blockDescriptor::pointLabel(), polyTopoChange::pointRemoved(), boundBox::points(), tetrahedron< Point, PointRef >::pointToBarycentric(), treeBoundBox::posBits(), particle< Type >::prepareForInteractionListReferral(), triad::primaryDirection(), quaternion::quaternion(), quaternion::R(), Foam::Ra(), AC3DsurfaceFormat< Face >::read(), Foam::readUpto(), coordSet::scalarCoord(), treeBoundBox::searchOrder(), ReactingLookupTableInjection< CloudType >::setPositionAndCell(), ThermoLookupTableInjection< CloudType >::setPositionAndCell(), ReactingMultiphaseLookupTableInjection< CloudType >::setPositionAndCell(), KinematicLookupTableInjection< CloudType >::setPositionAndCell(), polyMesh::solutionD(), triad::sortxyz(), SpatialVector< scalar >::SpatialVector(), Foam::sqr(), treeBoundBox::subBbox(), treeBoundBox::subOctant(), surfaceDisplacementPointPatchVectorField::surfaceDisplacementPointPatchVectorField(), Tensor< scalar >::Tensor(), Foam::toPoint(), coordinateRotation::transformPrincipal(), triad::triad(), pointConstraint::unconstrainedDirections(), joint::unitQuaternion(), blockDescriptor::vertex(), vtkInsertNextOpenFOAMPoint(), wallLayerCells::wallLayerCells(), vtkSetWriter< Type >::write(), X3DsurfaceFormat< Face >::write(), WRLsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), OBJedgeFormat::write(), AC3DsurfaceFormat< Face >::write(), OBJstream::write(), meshToMeshMethod::writeConnectivity(), VTKsurfaceFormatCore::writeHeader(), VTKedgeFormat::writeHeader(), Foam::meshTools::writeOBJ(), coupledPolyPatch::writeOBJ(), triSurfaceTools::writeOBJ(), cellCuts::writeOBJ(), blockMesh::writeTopology(), moleculeCloud::writeXYZ(), Foam::Xinterpolate(), and Foam::XstepForwardsToNextPoint().

◆ y() [1/2]

const Cmpt & y ( ) const
inline

Definition at line 81 of file VectorI.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), triad::align(), BarycentricTensor< Cmpt >::BarycentricTensor(), blockDescriptor::blockDescriptor(), Foam::meshTools::calcBoxPointNormals(), treeBoundBox::calcExtremities(), CentredFitSnGradData< Polynomial >::calcFit(), FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial >::calcFit(), cyclicPolyPatch::calcTransforms(), rotorDiskSource::calculate(), block::cells(), edgeCollapser::checkMeshQuality(), molecule::constantProperties::constantProperties(), boundBox::contains(), boundBox::containsInside(), MaxwellianThermal< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), treeBoundBox::distanceCmp(), blockDescriptor::edge(), blockDescriptor::edgesPointsWeights(), Foam::eigenValues(), Foam::eigenVector(), Foam::eigenVectors(), pitchForkRing::energy(), treeBoundBox::faceBits(), Foam::faceNij(), Foam::facePoint(), blockDescriptor::facePointLabel(), Foam::facePointN(), blockDescriptor::facePoints(), indexedOctree< Foam::treeDataFace >::findLine(), dynamicTreeDataPoint::findNearest(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::findNearest(), indexedOctree< Foam::treeDataFace >::findNearest(), blockDescriptor::flatFaceOrEdge(), pitchForkRing::force(), rigidBodyModel::forwardDynamics(), boundaryMesh::getNearest(), cylindricalCS::globalToLocal(), cellShapeControlMesh::insert(), cellShapeControlMesh::insertFar(), triangleFuncs::intersectBb(), treeBoundBox::intersects(), Foam::inv(), Rzyx::jcalc(), Rxyz::jcalc(), Ryxz::jcalc(), cellMDLimitedGrad< Type >::limitFace(), cylindricalCS::localToGlobal(), momentOfInertia::massPropertiesSolid(), conformalVoronoiMesh::maxSurfaceProtrusion(), molecule::move(), NamedEnum< directionType, 3 >::names(), blockDescriptor::nCells(), boundBox::nearest(), twoDPointCorrector::normalDir(), blockDescriptor::nPoints(), Foam::operator &(), treeDataPoint::findNearestOp::operator()(), treeDataEdge::findNearestOp::operator()(), Foam::operator*(), Foam::operator/(), Foam::operator^(), searchablePlate::overlaps(), boundBox::overlaps(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::overlaps(), indexedOctree< Foam::treeDataFace >::overlaps(), plane::planeCoeffs(), plane::planeIntersect(), blockDescriptor::pointLabel(), polyTopoChange::pointRemoved(), boundBox::points(), tetrahedron< Point, PointRef >::pointToBarycentric(), treeBoundBox::posBits(), particle< Type >::prepareForInteractionListReferral(), triad::primaryDirection(), quaternion::quaternion(), quaternion::R(), Foam::Ra(), AC3DsurfaceFormat< Face >::read(), Foam::readUpto(), coordSet::scalarCoord(), treeBoundBox::searchOrder(), triad::sortxyz(), SpatialVector< scalar >::SpatialVector(), Foam::sqr(), treeBoundBox::subBbox(), treeBoundBox::subOctant(), surfaceDisplacementPointPatchVectorField::surfaceDisplacementPointPatchVectorField(), Tensor< scalar >::Tensor(), Foam::toPoint(), coordinateRotation::transformPrincipal(), triad::triad(), pointConstraint::unconstrainedDirections(), joint::unitQuaternion(), blockDescriptor::vertex(), vtkInsertNextOpenFOAMPoint(), wallLayerCells::wallLayerCells(), vtkSetWriter< Type >::write(), X3DsurfaceFormat< Face >::write(), WRLsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OBJedgeFormat::write(), OBJstream::write(), meshToMeshMethod::writeConnectivity(), VTKsurfaceFormatCore::writeHeader(), VTKedgeFormat::writeHeader(), Foam::meshTools::writeOBJ(), coupledPolyPatch::writeOBJ(), triSurfaceTools::writeOBJ(), cellCuts::writeOBJ(), blockMesh::writeTopology(), moleculeCloud::writeXYZ(), and Foam::Xinterpolate().

◆ z() [1/2]

const Cmpt & z ( ) const
inline

Definition at line 87 of file VectorI.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), triad::align(), BarycentricTensor< Cmpt >::BarycentricTensor(), blockDescriptor::blockDescriptor(), Foam::meshTools::calcBoxPointNormals(), treeBoundBox::calcExtremities(), CentredFitSnGradData< Polynomial >::calcFit(), FitData< CentredFitSnGradData< Polynomial >, extendedCentredCellToFaceStencil, Polynomial >::calcFit(), cyclicPolyPatch::calcTransforms(), rotorDiskSource::calculate(), block::cells(), molecule::constantProperties::constantProperties(), boundBox::contains(), boundBox::containsInside(), MaxwellianThermal< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), treeBoundBox::distanceCmp(), blockDescriptor::edge(), blockDescriptor::edgesPointsWeights(), Foam::eigenValues(), Foam::eigenVector(), Foam::eigenVectors(), pitchForkRing::energy(), treeBoundBox::faceBits(), Foam::faceNij(), Foam::facePoint(), Foam::facePointN(), blockDescriptor::facePoints(), indexedOctree< Foam::treeDataFace >::findLine(), dynamicTreeDataPoint::findNearest(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::findNearest(), indexedOctree< Foam::treeDataFace >::findNearest(), blockDescriptor::flatFaceOrEdge(), pitchForkRing::force(), rigidBodyModel::forwardDynamics(), boundaryMesh::getNearest(), cylindricalCS::globalToLocal(), cellShapeControlMesh::insert(), cellShapeControlMesh::insertFar(), triangleFuncs::intersectBb(), treeBoundBox::intersects(), Foam::inv(), Ryxz::jcalc(), Rxyz::jcalc(), Rzyx::jcalc(), cellMDLimitedGrad< Type >::limitFace(), cylindricalCS::localToGlobal(), momentOfInertia::massPropertiesSolid(), conformalVoronoiMesh::maxSurfaceProtrusion(), layeredEngineMesh::move(), NamedEnum< directionType, 3 >::names(), blockDescriptor::nCells(), boundBox::nearest(), twoDPointCorrector::normalDir(), blockDescriptor::nPoints(), Foam::operator &(), treeDataPoint::findNearestOp::operator()(), treeDataEdge::findNearestOp::operator()(), Foam::operator*(), Foam::operator/(), Foam::operator^(), searchablePlate::overlaps(), boundBox::overlaps(), dynamicIndexedOctree< Foam::dynamicTreeDataPoint >::overlaps(), indexedOctree< Foam::treeDataFace >::overlaps(), plane::planeCoeffs(), plane::planeIntersect(), polyTopoChange::pointRemoved(), boundBox::points(), tetrahedron< Point, PointRef >::pointToBarycentric(), treeBoundBox::posBits(), particle< Type >::prepareForInteractionListReferral(), triad::primaryDirection(), quaternion::quaternion(), quaternion::R(), Foam::Ra(), AC3DsurfaceFormat< Face >::read(), Foam::readUpto(), coordSet::scalarCoord(), treeBoundBox::searchOrder(), triad::sortxyz(), SpatialVector< scalar >::SpatialVector(), Foam::sqr(), treeBoundBox::subBbox(), treeBoundBox::subOctant(), surfaceDisplacementPointPatchVectorField::surfaceDisplacementPointPatchVectorField(), Tensor< scalar >::Tensor(), Foam::toPoint(), coordinateRotation::transformPrincipal(), triad::triad(), joint::unitQuaternion(), blockDescriptor::vertex(), vtkInsertNextOpenFOAMPoint(), wallLayerCells::wallLayerCells(), vtkSetWriter< Type >::write(), X3DsurfaceFormat< Face >::write(), WRLsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), OBJedgeFormat::write(), OBJstream::write(), meshToMeshMethod::writeConnectivity(), VTKsurfaceFormatCore::writeHeader(), VTKedgeFormat::writeHeader(), Foam::meshTools::writeOBJ(), coupledPolyPatch::writeOBJ(), triSurfaceTools::writeOBJ(), cellCuts::writeOBJ(), blockMesh::writeTopology(), and moleculeCloud::writeXYZ().

◆ x() [2/2]

Cmpt & x ( )
inline

Definition at line 94 of file VectorI.H.

◆ y() [2/2]

Cmpt & y ( )
inline

Definition at line 100 of file VectorI.H.

◆ z() [2/2]

Cmpt & z ( )
inline

Definition at line 106 of file VectorI.H.

◆ centre()

const Foam::Vector< Cmpt > & centre ( const Foam::List< Vector< Cmpt >> &  ) const
inline

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

Definition at line 116 of file VectorI.H.

Referenced by cyclicPolyPatch::coupledEdges(), treeDataPrimitivePatch< PatchType >::overlaps(), surfaceFeatures::setFromStatus(), extendedEdgeMesh::sortPointsAndEdges(), and Vector< vector >::z().

Here is the caller graph for this function:

Member Data Documentation

◆ rank

const direction rank = 1
static

Rank of Vector is 1.

Definition at line 71 of file Vector.H.


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