42 #ifndef Foam_VectorSpace_H 43 #define Foam_VectorSpace_H 57 template<
class Form,
class Cmpt, direction Ncmpts>
class VectorSpace;
59 template<
class Form,
class Cmpt, direction Ncmpts>
66 template<
class Form,
class Cmpt, direction Ncmpts>
78 template<
class Form,
class Cmpt, direction Ncmpts>
117 static const Form
one;
118 static const Form
max;
119 static const Form
min;
127 template<
class SubVector, direction BStart>
167 template<
class Form2,
class Cmpt2>
195 inline static Form
uniform(const Cmpt&
s);
197 template<class SubVector,
direction BStart>
198 inline const ConstBlock<SubVector, BStart>
block() const;
211 inline
void operator*=(const scalar);
212 inline
void operator/=(const scalar);
267 template<class Form, class Cmpt,
direction Ncmpts>
276 #include "VectorSpaceI.H" static const char *const typeName
static constexpr direction nCols
const Cmpt * cdata() const noexcept
Return const pointer to the first data element.
static constexpr direction mRows
Cmpt * data() noexcept
Return pointer to the first data element.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static const char *const componentNames[]
static const Form rootMin
Cmpt magType
Magnitude type.
iterator end() noexcept
Return an iterator to end of VectorSpace.
ConstBlock(const vsType &vs)
Construct for a given vector.
::Foam::direction nComponents(const expressions::valueTypeCode) noexcept
The number of components associated with given valueTypeCode.
void replace(const direction, const Cmpt &)
const_iterator cend() const noexcept
Return const_iterator to end of VectorSpace.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
A class for handling words, derived from Foam::string.
VectorSpace()=default
Default construct.
static constexpr direction dim
Dimensionality of space.
const_iterator cbegin() const noexcept
Return const_iterator to begin of VectorSpace.
static constexpr direction nComponents
Number of components in this vector space.
Creates a single block of cells from point coordinates, numbers of cells in each direction and an exp...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
OBJstream os(runTime.globalPath()/outputName)
friend Ostream & operator(Ostream &, const VectorSpace< Form, Cmpt, Ncmpts > &)
static const Form rootMax
Direction is an 8-bit unsigned integer type used to represent Cartesian directions, components etc.
Cmpt cmptType
Component type.
static constexpr direction size() noexcept
The number of elements in the VectorSpace = Ncmpts.
iterator begin() noexcept
Return an iterator to begin of VectorSpace.
const Cmpt & component(const direction) const
VectorSpace< Form, Cmpt, Ncmpts > vsType
VectorSpace type.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
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))
Cmpt v_[Ncmpts]
The components of this vector space.
static const direction nComponents
Number of components in this vector space.
const Cmpt & operator[](const direction i) const
[i] const element access operator