59#ifndef Foam_use_scalarImpl_header
60#error "scalarImpl.H" is only to be included internally
138 operator Scalar&()
noexcept {
return p_; }
243 return (
s >= 0)? 1: -1;
250 return (
s > 0)? 1: 0;
257 return (
s >= 0)? 1: 0;
264 return (
s < 0)? 1: 0;
271 return (
s <= 0)? 1: 0;
278 return (
s > 0)?
s: 0;
286 return (
s < 0)?
s: 0;
305 return (val < 0) ? 0 : (1 < val) ? 1 : val;
312 return (val < lower) ? lower : (upper < val) ? upper : val;
324 return (
mag(s1) <
mag(s2)) ? s1: s2;
452 return maga*
sqrt(1.0 +
sqr(magb/maga));
494 return (
mag(a -
b) <= tolerance) ? 0 : (a -
b);
500template<
class T>
struct equalOp;
516 return mag(a -
b) <= tolerance;
522template<
class T>
struct notEqualOp;
538 return mag(a -
b) > tolerance;
553 return std::floor(
x);
559template<
class T>
struct ceilOp;
581 return std::round(
x);
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
static const char *const typeName
Scalar cmptType
Component type.
pTraits(Scalar val) noexcept
Copy construct from primitive.
static const char *const componentNames[]
static const Scalar rootMax
static const Scalar rootMin
static constexpr Scalar vsmall_
static constexpr direction nComponents
Number of components in Scalar is 1.
static constexpr direction rank
Rank of Scalar is 0.
static constexpr direction dim
Dimensionality of space.
Scalar magType
Magnitude type.
pTraits(Istream &is)
Read construct from Istream (uses tokenizer).
label labelType
Equivalent type of labels used for valid component indexing.
static const Scalar vsmall
static constexpr Scalar max_
static constexpr Scalar min_
pTraits(const Base &obj)
Copy construct from base class.
A class for handling words, derived from Foam::string.
Represents 0/1 range or concept. Used for tagged dispatch or clamping.
#define besselFunc2(func)
OBJstream os(runTime.globalPath()/outputName)
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))
dimensionedScalar pow6(const dimensionedScalar &ds)
dimensionedScalar pos(const dimensionedScalar &ds)
dimensionedScalar pow5(const dimensionedScalar &ds)
dimensionedScalar erfc(const dimensionedScalar &ds)
dimensionedScalar asin(const dimensionedScalar &ds)
dimensionedScalar exp(const dimensionedScalar &ds)
dimensionedScalar tan(const dimensionedScalar &ds)
dimensionedScalar pos0(const dimensionedScalar &ds)
dimensionedScalar sign(const dimensionedScalar &ds)
dimensionedScalar lgamma(const dimensionedScalar &ds)
dimensionedSymmTensor sqr(const dimensionedVector &dv)
complex limit(const complex &c1, const complex &c2)
dimensionedScalar j1(const dimensionedScalar &ds)
dimensionedScalar pow3(const dimensionedScalar &ds)
dimensionedScalar y0(const dimensionedScalar &ds)
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)
dimensionedScalar cosh(const dimensionedScalar &ds)
Scalar cmptPow(const Scalar s1, const Scalar s2)
dimensionedScalar sin(const dimensionedScalar &ds)
bool equal(const T &a, const T &b)
Compare two values for equality.
label & setComponent(label &val, const direction) noexcept
Non-const access to integer-type (has no components).
dimensionedScalar tanh(const dimensionedScalar &ds)
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
dimensionedScalar erf(const dimensionedScalar &ds)
Scalar cmptSqr(const Scalar s)
dimensionedScalar sinh(const dimensionedScalar &ds)
dimensionSet clamp(const dimensionSet &a, const dimensionSet &range)
dimensionedScalar log10(const dimensionedScalar &ds)
dimensionedScalar yn(const int n, const dimensionedScalar &ds)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
dimensionedScalar log(const dimensionedScalar &ds)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensionedScalar y1(const dimensionedScalar &ds)
dimensionedScalar negPart(const dimensionedScalar &ds)
dimensionedScalar acosh(const dimensionedScalar &ds)
dimensionedScalar sqrt(const dimensionedScalar &ds)
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh > > cmptAv(const DimensionedField< Type, GeoMesh > &f1)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Istream & operator>>(Istream &, directionInfo &)
void cmptMagSqr(Field< Type > &result, const UList< Type > &f1)
dimensionedScalar pow4(const dimensionedScalar &ds)
dimensionedScalar jn(const int n, const dimensionedScalar &ds)
dimensionedScalar neg(const dimensionedScalar &ds)
dimensionedScalar atanh(const dimensionedScalar &ds)
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
dimensionedScalar stabilise(const dimensionedScalar &x, const dimensionedScalar &y)
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
transFunc(sqrt) transFunc(cbrt) transFunc(exp) transFunc(log) transFunc(log10) transFunc(sin) transFunc(cos) transFunc(tan) transFunc(asin) transFunc(acos) transFunc(atan) transFunc(sinh) transFunc(cosh) transFunc(tanh) transFunc(asinh) transFunc(acosh) transFunc(atanh) transFunc(erf) transFunc(erfc) transFunc(lgamma) transFunc(tgamma) besselFunc(j0) besselFunc(j1) besselFunc(y0) besselFunc(y1) besselFunc2(jn) besselFunc2(yn) inline Scalar &setComponent(Scalar &val
Non-const access to scalar-type (has no components).
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
dimensionedScalar neg0(const dimensionedScalar &ds)
dimensionedScalar cbrt(const dimensionedScalar &ds)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
bool notEqual(const Scalar a, const Scalar b)
dimensionedScalar atan(const dimensionedScalar &ds)
Scalar sqrtSumSqr(const Scalar a, const Scalar b)
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
dimensionedScalar cos(const dimensionedScalar &ds)
dimensionedScalar posPart(const dimensionedScalar &ds)
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
dimensionedScalar acos(const dimensionedScalar &ds)
dimensionedScalar j0(const dimensionedScalar &ds)
dimensionedScalar pow025(const dimensionedScalar &ds)
dimensionedScalar asinh(const dimensionedScalar &ds)
Scalar operator()(const Scalar &x) const
Scalar operator()(const Scalar &a, const Scalar &b) const
compareOp(Scalar tol=ScalarVSMALL)
Construct with specified tolerance (non-negative value).
Three-way comparison operation of two parameters,.
int operator()(const T &a, const T &b) const
equalOp(Scalar tol=ScalarVSMALL)
Construct with specified tolerance (non-negative value).
bool operator()(const Scalar &a, const Scalar &b) const
bool operator()(const T &x, const T &y) const
Scalar operator()(const Scalar &x) const
word operator()(const Scalar val) const
Extract name (as a word) from an object, typically using its name() method.
word operator()(const T &obj) const
notEqualOp(Scalar tol=ScalarVSMALL)
Construct with specified tolerance (non-negative value).
bool operator()(const Scalar &a, const Scalar &b) const
bool operator()(const T &x, const T &y) const
Scalar operator()(const Scalar &x) const