126 const scalar
s = this->
mag();
145 *
this -= (*
this & unitVec) * unitVec;
157 return (v1.
x()*v2.
x() + v1.
y()*v2.
y() + v1.
z()*v2.
z());
169 (v1.
y()*v2.
z() - v1.
z()*v2.
y()),
170 (v1.
z()*v2.
x() - v1.
x()*v2.
z()),
171 (v1.
x()*v2.
y() - v1.
y()*v2.
x())
266 const scalar onet = (1-t);
270 onet*a.
x() + t*
b.x(),
271 onet*a.
y() + t*
b.y(),
static bool less_yzx(const Vector< Cmpt > &a, const Vector< Cmpt > &b)
Lexicographically compare a and b with order (y:z:x)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
scalar distSqr(const Vector< Cmpt > &v2) const
The L2-norm distance squared from another vector. The magSqr() of the difference. ...
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Vector()=default
Default construct.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Cmpt inner(const Vector< Cmpt > &v2) const
Scalar-product of this with another Vector.
const Cmpt & y() const noexcept
Access to the vector y component.
Vector< Cmpt > & normalise(const scalar tol=ROOTVSMALL)
Inplace normalise the vector by its magnitude.
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
static bool less_zxy(const Vector< Cmpt > &a, const Vector< Cmpt > &b)
Lexicographically compare a and b with order (z:x:y)
scalar magSqr() const
The length (L2-norm) squared of the vector.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
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.
const Cmpt & x() const noexcept
Access to the vector x component.
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
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.
static bool less_xyz(const Vector< Cmpt > &a, const Vector< Cmpt > &b)
Lexicographically compare a and b with order (x:y:z)
bitSet operator^(const bitSet &a, const bitSet &b)
Bitwise-XOR of two bitsets to form a unique bit-set.
const Cmpt & z() const noexcept
Access to the vector z component.
tmp< GeometricField< Type, faPatchField, areaMesh > > operator &(const faMatrix< Type > &, const DimensionedField< Type, areaMesh > &)
PtrList< volScalarField > & Y
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Vector< Cmpt > cross(const Vector< Cmpt > &v2) const
Cross-product of this with another Vector.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Vector< Cmpt > & removeCollinear(const Vector< Cmpt > &unitVec)
Inplace removal of components that are collinear to the given unit vector.
typeOfRank< typename pTraits< arg1 >::cmptType, direction(pTraits< arg1 >::rank)+direction(pTraits< arg2 >::rank) - 2 >::type type
scalar dist(const Vector< Cmpt > &v2) const
The L2-norm distance from another vector. The mag() of the difference.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)