56 template<
class T>
class List;
103 template<
class Cmpt2>
107 inline Vector(
const Cmpt& vx,
const Cmpt& vy,
const Cmpt& vz);
145 inline scalar
mag()
const;
148 inline scalar
magSqr()
const;
207 struct is_contiguous_label<Vector<Cmpt>> : is_contiguous_label<Cmpt> {};
211 struct is_contiguous_scalar<Vector<Cmpt>> : is_contiguous_scalar<Cmpt> {};
215 class typeOfRank<Cmpt, 1>
219 typedef Vector<Cmpt>
type;
224 class symmTypeOfRank<Cmpt, 1>
228 typedef Vector<Cmpt>
type;
233 class typeOfSolve<Vector<Cmpt>>
237 typedef Vector<solveScalar>
type;
static bool less_yzx(const Vector< Cmpt > &a, const Vector< Cmpt > &b)
Lexicographically compare a and b with order (y:z:x)
Vector< label > labelType
Equivalent type of labels used for valid component indexing.
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.
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.
static constexpr direction rank
Rank of Vector is 1.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
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.
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)
const Cmpt & z() const noexcept
Access to the vector z component.
A template class to specify that a data type can be considered as being contiguous in memory...
Vector & operator=(const Vector &)=default
Copy assignment.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
components
Component labeling enumeration.
Vector< Cmpt > cross(const Vector< Cmpt > &v2) const
Cross-product of this with another Vector.
Vector< Cmpt > & removeCollinear(const Vector< Cmpt > &unitVec)
Inplace removal of components that are collinear to the given unit vector.
scalar dist(const Vector< Cmpt > &v2) const
The L2-norm distance from another vector. The mag() of the difference.
Cmpt v_[Ncmpts]
The components of this vector space.