FreeFOAM The Cross-Platform CFD Toolkit
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 <OpenFOAM/Vector_.H>


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 58 of file Vector_.H.

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

List of all members.

Public Types

enum  { rank = 1 }
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 >
enum  
typedef Cmpt cmptType
 Component type.

Public Member Functions

 Vector ()
 Construct null.
 Vector (const VectorSpace< Vector< Cmpt >, Cmpt, 3 > &)
 Construct given VectorSpace.
 Vector (const Cmpt &vx, const Cmpt &vy, const Cmpt &vz)
 Construct given three components.
 Vector (Istream &)
 Construct from Istream.
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>.
- Public Member Functions inherited from VectorSpace< Vector< Cmpt >, Cmpt, 3 >
 VectorSpace ()
 Construct null.
 VectorSpace (Istream &)
 Construct from Istream.
 VectorSpace (const VectorSpace< Vector< Cmpt >, Cmpt, nCmpt > &)
 Construct as copy.
label size () const
 Return the number of elements in the VectorSpace = nCmpt.
const Cmpt & component (const direction) const
Cmpt & component (const direction)
void component (Cmpt &, const direction) const
void replace (const direction, const Cmpt &)
const Cmpt & operator[] (const direction) const
Cmpt & operator[] (const direction)
void operator= (const VectorSpace< Vector< Cmpt >, Cmpt, nCmpt > &)
void operator+= (const VectorSpace< Vector< Cmpt >, Cmpt, nCmpt > &)
void operator-= (const VectorSpace< Vector< Cmpt >, Cmpt, nCmpt > &)
void operator*= (const scalar)
void operator/= (const scalar)

Static Public Attributes

static const char *const typeName = "complexVector"
static const char * componentNames [] = {"x", "y", "z"}
static const Vector zero
static const Vector one
static const Vector max
static const Vector min

Additional Inherited Members

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

Member Typedef Documentation

typedef Vector<label> labelType

Equivalent type of labels used for valid component indexing.

Definition at line 66 of file Vector_.H.


Member Enumeration Documentation

anonymous enum
Enumerator:
rank 

Definition at line 71 of file Vector_.H.

enum components

Component labeling enumeration.

Enumerator:
X 
Y 
Z 

Definition at line 88 of file Vector_.H.


Constructor & Destructor Documentation

Vector ( )
inline

Construct null.

Definition at line 35 of file VectorI_.H.

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

Construct given VectorSpace.

Definition at line 41 of file VectorI_.H.

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

Construct given three components.

Definition at line 49 of file VectorI_.H.

References Y.

Vector ( Istream is)
inline

Construct from Istream.

Definition at line 59 of file VectorI_.H.


Member Function Documentation

const Cmpt & x ( ) const
inline

Definition at line 68 of file VectorI_.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), Foam::meshTools::calcBoxPointNormals(), treeBoundBox::calcExtremities(), FitData< FitDataType, ExtendedStencil, Polynomial >::calcFit(), triangle< Point, PointRef >::classify(), molecule::constantProperties::constantProperties(), boundBox::contains(), boundBox::containsInside(), MaxwellianThermal< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), treeBoundBox::distanceCmp(), Foam::eigenVectors(), pitchForkRing::energy(), treeBoundBox::faceBits(), treeLeaf< Type >::findNearest(), treeDataPoint::findNearest(), treeDataEdge::findNearest(), cellPointWeight::findTetrahedron(), octreeDataCell::findTightest(), octreeDataEdges::findTightest(), octreeDataFaceList::findTightest(), octreeDataTriSurface::findTightest(), octreeDataFace::findTightest(), pitchForkRing::force(), boundaryMesh::getNearest(), sphericalCS::globalToLocal(), cylindricalCS::globalToLocal(), triangleFuncs::intersectBb(), treeBoundBox::intersects(), Foam::inv(), cellMDLimitedGrad< Type >::limitFace(), parabolicCylindricalCS::localToGlobal(), sphericalCS::localToGlobal(), cylindricalCS::localToGlobal(), molecule::move(), twoDPointCorrector::normalDir(), Foam::operator&(), Foam::operator*(), Foam::operator/(), Foam::operator^(), boundBox::overlaps(), plane::planeIntersect(), polyTopoChange::pointRemoved(), porousZone::porousZone(), treeBoundBox::posBits(), AC3DsurfaceFormat< Face >::read(), coordSet::scalarCoord(), treeBoundBox::searchOrder(), KinematicLookupTableInjection< CloudType >::setPositionAndCell(), ThermoLookupTableInjection< CloudType >::setPositionAndCell(), ReactingLookupTableInjection< CloudType >::setPositionAndCell(), ReactingMultiphaseLookupTableInjection< CloudType >::setPositionAndCell(), Foam::sqr(), treeBoundBox::subBbox(), treeBoundBox::subOctant(), Tensor< Cmpt >::Tensor(), globalMeshData::updateMesh(), wallLayerCells::wallLayerCells(), X3DsurfaceFormat< Face >::write(), WRLsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), VTKsurfaceFormatCore::writeHeader(), Foam::meshTools::writeOBJ(), coupledPolyPatch::writeOBJ(), triSurfaceTools::writeOBJ(), treeLeaf< Type >::writeOBJ(), treeNode< Type >::writeOBJ(), cellCuts::writeOBJ(), moleculeCloud::writeXYZ(), Foam::Xinterpolate(), and Foam::XstepForwardsToNextPoint().

const Cmpt & y ( ) const
inline

Definition at line 74 of file VectorI_.H.

References Y.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), Foam::meshTools::calcBoxPointNormals(), treeBoundBox::calcExtremities(), FitData< FitDataType, ExtendedStencil, Polynomial >::calcFit(), triangle< Point, PointRef >::classify(), molecule::constantProperties::constantProperties(), boundBox::contains(), boundBox::containsInside(), MaxwellianThermal< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), treeBoundBox::distanceCmp(), Foam::eigenVectors(), pitchForkRing::energy(), treeBoundBox::faceBits(), treeLeaf< Type >::findNearest(), treeDataPoint::findNearest(), treeDataEdge::findNearest(), cellPointWeight::findTetrahedron(), octreeDataCell::findTightest(), octreeDataEdges::findTightest(), octreeDataFaceList::findTightest(), octreeDataTriSurface::findTightest(), octreeDataFace::findTightest(), pitchForkRing::force(), boundaryMesh::getNearest(), sphericalCS::globalToLocal(), cylindricalCS::globalToLocal(), triangleFuncs::intersectBb(), treeBoundBox::intersects(), Foam::inv(), cellMDLimitedGrad< Type >::limitFace(), parabolicCylindricalCS::localToGlobal(), sphericalCS::localToGlobal(), cylindricalCS::localToGlobal(), twoDPointCorrector::normalDir(), Foam::operator&(), Foam::operator*(), Foam::operator/(), Foam::operator^(), boundBox::overlaps(), plane::planeIntersect(), polyTopoChange::pointRemoved(), porousZone::porousZone(), treeBoundBox::posBits(), AC3DsurfaceFormat< Face >::read(), coordSet::scalarCoord(), treeBoundBox::searchOrder(), Foam::sqr(), treeBoundBox::subBbox(), treeBoundBox::subOctant(), Tensor< Cmpt >::Tensor(), globalMeshData::updateMesh(), wallLayerCells::wallLayerCells(), X3DsurfaceFormat< Face >::write(), WRLsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), VTKsurfaceFormatCore::writeHeader(), Foam::meshTools::writeOBJ(), coupledPolyPatch::writeOBJ(), treeLeaf< Type >::writeOBJ(), triSurfaceTools::writeOBJ(), treeNode< Type >::writeOBJ(), cellCuts::writeOBJ(), moleculeCloud::writeXYZ(), and Foam::Xinterpolate().

const Cmpt & z ( ) const
inline

Definition at line 80 of file VectorI_.H.

Referenced by biLinearFitPolynomial::addCoeffs(), cubicUpwindFitPolynomial::addCoeffs(), quadraticLinearUpwindFitPolynomial::addCoeffs(), quadraticUpwindFitPolynomial::addCoeffs(), linearFitPolynomial::addCoeffs(), quadraticFitPolynomial::addCoeffs(), quadraticLinearFitPolynomial::addCoeffs(), Foam::meshTools::calcBoxPointNormals(), treeBoundBox::calcExtremities(), FitData< FitDataType, ExtendedStencil, Polynomial >::calcFit(), triangle< Point, PointRef >::classify(), molecule::constantProperties::constantProperties(), boundBox::contains(), boundBox::containsInside(), MaxwellianThermal< CloudType >::correct(), MixedDiffuseSpecular< CloudType >::correct(), cyclicPolyPatch::coupledEdges(), cyclicPolyPatch::coupledPoints(), treeBoundBox::distanceCmp(), Foam::eigenVectors(), pitchForkRing::energy(), treeBoundBox::faceBits(), treeLeaf< Type >::findNearest(), treeDataPoint::findNearest(), treeDataEdge::findNearest(), cellPointWeight::findTetrahedron(), octreeDataCell::findTightest(), octreeDataEdges::findTightest(), octreeDataFaceList::findTightest(), octreeDataTriSurface::findTightest(), octreeDataFace::findTightest(), pitchForkRing::force(), boundaryMesh::getNearest(), sphericalCS::globalToLocal(), cylindricalCS::globalToLocal(), triangleFuncs::intersectBb(), treeBoundBox::intersects(), Foam::inv(), cellMDLimitedGrad< Type >::limitFace(), parabolicCylindricalCS::localToGlobal(), sphericalCS::localToGlobal(), cylindricalCS::localToGlobal(), layeredEngineMesh::move(), twoDPointCorrector::normalDir(), Foam::operator&(), Foam::operator*(), Foam::operator/(), Foam::operator^(), boundBox::overlaps(), plane::planeIntersect(), polyTopoChange::pointRemoved(), porousZone::porousZone(), treeBoundBox::posBits(), AC3DsurfaceFormat< Face >::read(), coordSet::scalarCoord(), treeBoundBox::searchOrder(), Foam::sqr(), treeBoundBox::subBbox(), treeBoundBox::subOctant(), Tensor< Cmpt >::Tensor(), globalMeshData::updateMesh(), wallLayerCells::wallLayerCells(), X3DsurfaceFormat< Face >::write(), WRLsurfaceFormat< Face >::write(), SMESHsurfaceFormat< Face >::write(), GTSsurfaceFormat< Face >::write(), OBJsurfaceFormat< Face >::write(), AC3DsurfaceFormat< Face >::write(), VTKsurfaceFormatCore::writeHeader(), Foam::meshTools::writeOBJ(), coupledPolyPatch::writeOBJ(), triSurfaceTools::writeOBJ(), treeLeaf< Type >::writeOBJ(), treeNode< Type >::writeOBJ(), cellCuts::writeOBJ(), and moleculeCloud::writeXYZ().

Cmpt & x ( )
inline

Definition at line 87 of file VectorI_.H.

Cmpt & y ( )
inline

Definition at line 93 of file VectorI_.H.

References Y.

Cmpt & z ( )
inline

Definition at line 99 of file VectorI_.H.

const 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 109 of file VectorI_.H.

Referenced by cellShape::centre(), cyclicPolyPatch::coupledEdges(), and surfaceFeatures::findFeatures().


Member Data Documentation

const char *const typeName = "complexVector"
static

Definition at line 79 of file Vector_.H.

const char * componentNames = {"x", "y", "z"}
static

Definition at line 80 of file Vector_.H.

const complexVector one
static

Definition at line 82 of file Vector_.H.

const Vector min
static

Definition at line 84 of file Vector_.H.

Referenced by distributedTriSurfaceMesh::overlappingSurface().


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