37template<
class Form,
class Cmpt, Foam::direction Ncmpts>
44template<
class Form,
class Cmpt, Foam::direction Ncmpts>
54template<
class Form,
class Cmpt, Foam::direction Ncmpts>
55template<
class Form2,
class Cmpt2>
65template<
class Form,
class Cmpt, Foam::direction Ncmpts>
66template<
class SubVector, Foam::direction BStart>
78 "Requested block size > VectorSpace size"
85template<
class Form,
class Cmpt, Foam::direction Ncmpts>
95 <<
"index out of range"
104template<
class Form,
class Cmpt, Foam::direction Ncmpts>
114 <<
"index out of range"
123template<
class Form,
class Cmpt, Foam::direction Ncmpts>
134 <<
"index out of range"
143template<
class Form,
class Cmpt, Foam::direction Ncmpts>
154 <<
"index out of range"
163template<
class Form,
class Cmpt, Foam::direction Ncmpts>
172template<
class Form,
class Cmpt, Foam::direction Ncmpts>
173template<
class SubVector, Foam::direction BStart>
175 ConstBlock<SubVector, BStart>
184template<
class Form,
class Cmpt, Foam::direction Ncmpts>
191template<
class Form,
class Cmpt, Foam::direction Ncmpts>
198template<
class Form,
class Cmpt, Foam::direction Ncmpts>
205template<
class Form,
class Cmpt, Foam::direction Ncmpts>
208 return (
v_ + Ncmpts);
212template<
class Form,
class Cmpt, Foam::direction Ncmpts>
220template<
class Form,
class Cmpt, Foam::direction Ncmpts>
224 return (
v_ + Ncmpts);
228template<
class Form,
class Cmpt, Foam::direction Ncmpts>
236template<
class Form,
class Cmpt, Foam::direction Ncmpts>
240 return (
v_ + Ncmpts);
246template<
class Form,
class Cmpt, Foam::direction Ncmpts>
256 <<
"index out of range"
265template<
class Form,
class Cmpt, Foam::direction Ncmpts>
275 <<
"index out of range"
284template<
class Form,
class Cmpt, Foam::direction Ncmpts>
285template<
class SubVector, Foam::direction BStart>
297 <<
"index out of range"
302 return vs_[BStart + d];
306template<
class Form,
class Cmpt, Foam::direction Ncmpts>
307template<
class SubVector, Foam::direction BStart>
320 <<
"index " << i <<
" out of range"
327 <<
"index " << j <<
" != 0"
332 return vs_[BStart + i];
336template<
class Form,
class Cmpt, Foam::direction Ncmpts>
346template<
class Form,
class Cmpt, Foam::direction Ncmpts>
356template<
class Form,
class Cmpt, Foam::direction Ncmpts>
366template<
class Form,
class Cmpt, Foam::direction Ncmpts>
373template<
class Form,
class Cmpt, Foam::direction Ncmpts>
383template<
class Form,
class Cmpt, Foam::direction Ncmpts>
400template<
class Form,
class Cmpt, direction Ncmpts>
411template<
class Form,
class Cmpt, direction Ncmpts>
425template<
class Form,
class Cmpt, direction Ncmpts>
438template<
class Form,
class Cmpt, direction Ncmpts>
446 return static_cast<const Form&
>(v);
451template<
class Form,
class Cmpt, direction Ncmpts>
459 return sqr(
static_cast<const Form&
>(v));
463template<
class Form,
class Cmpt, direction Ncmpts>
475template<
class Form,
class Cmpt, direction Ncmpts>
481 return ::sqrt(
magSqr(
static_cast<const Form&
>(vs)));
487template<
class Form,
class Cmpt, direction Ncmpts>
493 const scalar
s(
mag(vs));
494 return s < ROOTVSMALL ?
Zero : vs/
s;
498template<
class Form,
class Cmpt, direction Ncmpts>
511template<
class Form,
class Cmpt, direction Ncmpts>
524template<
class Form,
class Cmpt, direction Ncmpts>
537template<
class Form,
class Cmpt, direction Ncmpts>
550template<
class Form,
class Cmpt, direction Ncmpts>
556 Cmpt cMax = vs.
v_[0];
562template<
class Form,
class Cmpt, direction Ncmpts>
568 Cmpt cMin = vs.
v_[0];
574template<
class Form,
class Cmpt, direction Ncmpts>
586template<
class Form,
class Cmpt, direction Ncmpts>
596template<
class Form,
class Cmpt, direction Ncmpts>
602 Cmpt product = vs.
v_[0];
608template<
class Form,
class Cmpt, direction Ncmpts>
620template<
class Form,
class Cmpt, direction Ncmpts>
632template<
class Form,
class Cmpt, direction Ncmpts>
644template<
class Form,
class Cmpt, direction Ncmpts>
657template<
class Form,
class Cmpt, direction Ncmpts>
670template<
class Form,
class Cmpt, direction Ncmpts>
684inline Type
dot(
const scalar
s,
const Type& t)
691inline Type
dot(
const Type& t,
const scalar
s)
699 class Form1,
class Cmpt1,
direction Ncmpts1,
700 class Form2,
class Cmpt2,
direction Ncmpts2
708 return static_cast<const Form1&
>(t1) &
static_cast<const Form2&
>(t2);
714template<
class Form,
class Cmpt, direction Ncmpts>
726template<
class Form,
class Cmpt, direction Ncmpts>
738template<
class Form,
class Cmpt, direction Ncmpts>
751template<
class Form,
class Cmpt, direction Ncmpts>
764template<
class Form,
class Cmpt, direction Ncmpts>
777template<
class Form,
class Cmpt, direction Ncmpts>
817template<
class Form,
class Cmpt, direction Ncmpts>
818inline Cmpt
operator&&
824 Cmpt ddProd = vs1.v_[0]*vs2.v_[0];
827 ddProd += vs1.v_[i]*vs2.v_[i];
833template<
class Form,
class Cmpt, direction Ncmpts>
834inline bool operator==
842 if (!
equal(vs1.v_[i], vs2.v_[i]))
return false;
848template<
class Form,
class Cmpt, direction Ncmpts>
849inline bool operator!=
855 return !(vs1 == vs2);
859template<
class Form,
class Cmpt, direction Ncmpts>
868 if (!(vs1.v_[i] > vs2.v_[i]))
return false;
874template<
class Form,
class Cmpt, direction Ncmpts>
883 if (!(vs1.v_[i] < vs2.v_[i]))
return false;
889template<
class Form,
class Cmpt, direction Ncmpts>
890inline bool operator>=
900template<
class Form,
class Cmpt, direction Ncmpts>
901inline bool operator<=
static const direction nComponents
Number of components in this vector space.
const Cmpt & component(const direction) const
Cmpt * data() noexcept
Return pointer to the first data element.
void operator=(const VectorSpace< Form, Cmpt, Ncmpts > &)
void replace(const direction, const Cmpt &)
const ConstBlock< SubVector, BStart > block() const
static constexpr direction nComponents
Number of components in this vector space.
const Cmpt * cdata() const noexcept
Return const pointer to the first data element.
iterator end() noexcept
Return an iterator to end of VectorSpace.
Cmpt v_[Ncmpts]
The components of this vector space.
friend Ostream & operator(Ostream &, const VectorSpace< Form, Cmpt, Ncmpts > &)
const_iterator cend() const noexcept
Return const_iterator to end of VectorSpace.
VectorSpace()=default
Default construct.
iterator begin() noexcept
Return an iterator to begin of VectorSpace.
const_iterator cbegin() const noexcept
Return const_iterator to begin of VectorSpace.
friend Ostream & operator(Ostream &, const faMatrix< Type > &)
A traits class, which is primarily used for primitives.
type
Volume classification types.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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))
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
quaternion normalised(const quaternion &q)
Return the normalised (unit) quaternion of the given quaternion.
Scalar minMod(const Scalar s1, const Scalar s2)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Scalar cmptPow(const Scalar s1, const Scalar s2)
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
label & setComponent(label &val, const direction) noexcept
Non-const access to integer-type (has no components)
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Scalar cmptSqr(const Scalar s)
Cmpt cmptProduct(const VectorSpace< Form, Cmpt, Ncmpts > &vs)
Cmpt cmptSum(const SphericalTensor< Cmpt > &st)
Return the sum of components of a SphericalTensor.
void cmptMagSqr(Field< Type > &res, const UList< Type > &f)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
bool equal(const T &s1, const T &s2)
Compare two values for equality.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
errorManip< error > abort(error &err)
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
static constexpr const zero Zero
Global zero (0)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh > > cmptAv(const DimensionedField< Type, GeoMesh > &df)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Various functors for unary and binary operations. Can be used for parallel combine-reduce operations ...
Traits classes for inner and outer products of primitives.
General looping form. Executing at index <I> with termination at <N>
static void opVS(V &vs, const V1 &vs1, const S &s, Op o)
static void opSV(V &vs, const S &s, const V1 &vs1, Op o)
static void SeqOp(S &s, const V &vs, EqOp eo)
static void eqOpS(V &vs, const S &s, EqOp eo)
static void op(V &vs, const V1 &vs1, const V1 &vs2, Op o)