105 const scalar
s = this->
mag();
124 *
this -= (*
this & unitVec) * unitVec;
138 || (!(
b.x() < a.
x()) && (a.
y() <
b.y()))
150 || (!(
b.y() < a.
y()) && (a.
x() <
b.x()))
165 return Cmpt(v1.
x()*v2.
x() + v1.
y()*v2.
y());
172 return x()*
b.y() -
y()*
b.x();
195 inline Vector2D<Cmpt>
operator*(
const Vector2D<Cmpt>& v,
const Cmpt&
s)
Vector2D< Cmpt > & removeCollinear(const Vector2D< Cmpt > &unitVec)
Inplace removal of components that are collinear to the given unit vector.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const Cmpt & y() const noexcept
Access to the vector y component.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
dimensionedScalar sqrt(const dimensionedScalar &ds)
static bool less_yx(const Vector2D< Cmpt > &a, const Vector2D< Cmpt > &b)
Lexicographically compare a and b with order (y:x)
scalar perp(const Vector2D< Cmpt > &b) const
Perp dot product (dot product with perpendicular vector)
tmp< faMatrix< Type > > operator*(const areaScalarField::Internal &, const faMatrix< Type > &)
scalar distSqr(const Vector2D< Cmpt > &v2) const
The L2-norm distance squared from another vector. The magSqr() of the difference. ...
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
scalar dist(const Vector2D< Cmpt > &v2) const
The L2-norm distance from another vector. The mag() of the difference.
scalar magSqr() const
The length (L2-norm) squared of the vector.
Vector2D< Cmpt > & normalise(const scalar tol=ROOTVSMALL)
Normalise the vector by its magnitude.
const Cmpt & x() const noexcept
Access to the vector x component.
scalar mag() const
The length (L2-norm) of the vector.
static bool less_xy(const Vector2D< Cmpt > &a, const Vector2D< Cmpt > &b)
Lexicographically compare a and b with order (x:y)
bool isClose(const Vector2D< Cmpt > &b, const scalar tol=1e-10) const
Return true if vector is within tol.
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 ...
Vector2D()=default
Default construct.
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))
Templated 2D Vector derived from VectorSpace adding construction from 2 components, element access using x() and y() member functions and the inner-product (dot-product).
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
static constexpr const zero Zero
Global zero (0)