Scalar.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2016-2021 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Typedef
28  Foam::Scalar
29 
30 Description
31  Floating-point number (float or double)
32 
33 Note
34  The floor/ceil/round operations could easily be extended to handle
35  VectorSpace when the need arises. For example,
36 
37  \code
38  template<class T>
39  struct floorOp
40  {
41  T operator()(const T& x) const WARNRETURN
42  {
43  T ret;
44  for (direction cmpt=0; cmpt < pTraits<T>::nComponents; ++cmpt)
45  {
46  component(ret, cmpt) = std::floor(component(x, cmpt));
47  }
48  return ret;
49  }
50  };
51  \endcode
52 
53 SourceFiles
54  Scalar.C
55 
56 \*---------------------------------------------------------------------------*/
57 
58 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
59 
60 namespace Foam
61 {
62 
63 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
64 
65 // Template specialisation for pTraits<Scalar>
66 template<>
68 {
69  Scalar p_;
70 
71 public:
72 
73  // Typedefs
74 
75  //- Component type
76  typedef Scalar cmptType;
77 
78  //- Magnitude type
79  typedef Scalar magType;
80 
81  //- Equivalent type of labels used for valid component indexing
82  typedef label labelType;
83 
84 
85  // Member Constants
86 
87  //- Dimensionality of space
88  static constexpr direction dim = 3;
89 
90  //- Rank of Scalar is 0
91  static constexpr direction rank = 0;
92 
93  //- Number of components in Scalar is 1
94  static constexpr direction nComponents = 1;
95 
96 
97  // Static Data Members
98 
99  static const char* const typeName;
100  static const char* const componentNames[];
101  static const Scalar zero;
102  static const Scalar one;
103  static const Scalar max;
104  static const Scalar min;
105  static const Scalar rootMax;
106  static const Scalar rootMin;
107  static const Scalar vsmall;
108 
109 
110  // Constructors
111 
112  //- Copy construct from primitive
113  explicit pTraits(const Scalar& val) noexcept;
114 
115  //- Read construct from Istream
116  explicit pTraits(Istream& is);
117 
118 
119  // Member Functions
120 
121  //- Access to the value
122  operator Scalar() const noexcept
123  {
124  return p_;
125  }
126 
127  //- Access to the value
128  operator Scalar&() noexcept
129  {
130  return p_;
131  }
132 };
133 
134 
135 // * * * * * * * * * * * * * * * IO/Conversion * * * * * * * * * * * * * * * //
136 
137 //- A word representation of a floating-point value.
138 // Uses stringstream instead of std::to_string for more consistent formatting.
139 word name(const Scalar val);
140 
141 
142 //- A word representation of a floating-point value.
143 template<>
144 struct nameOp<Scalar>
145 {
146  word operator()(const Scalar val) const
147  {
148  return Foam::name(val);
149  }
150 };
151 
152 
153 //- Parse entire buffer as a float/double, skipping leading/trailing whitespace.
154 // \return Parsed value or FatalIOError on any problem
155 Scalar ScalarRead(const char* buf);
156 
157 //- Parse entire buffer as a float/double, skipping leading/trailing whitespace.
158 // \return True if successful.
159 bool ScalarRead(const char* buf, Scalar& val);
160 
161 //- Parse entire string as a float/double, skipping leading/trailing whitespace.
162 // \return Parsed value or FatalIOError on any problem
163 inline Scalar ScalarRead(const std::string& str)
164 {
165  return ScalarRead(str.c_str());
166 }
167 
168 //- Parse entire string as a float/double, skipping leading/trailing whitespace.
169 // \return True if successful.
170 inline bool ScalarRead(const std::string& str, Scalar& val)
171 {
172  return ScalarRead(str.c_str(), val);
173 }
174 
175 
176 Scalar ScalarRead(Istream& is);
177 Istream& operator>>(Istream& is, Scalar& val);
178 Ostream& operator<<(Ostream& os, const Scalar val);
179 
180 
181 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
182 
183 // Standard C++ transcendental functions
185 
187 transFunc(exp)
188 transFunc(log)
190 transFunc(sin)
191 transFunc(cos)
192 transFunc(tan)
202 
203 // Standard ANSI-C (but not in <cmath>) transcendental functions
204 
205 transFunc(erf)
208 transFunc(tgamma)
209 
210 besselFunc(j0)
211 besselFunc(j1)
212 besselFunc(y0)
213 besselFunc(y1)
216 
217 
218 inline Scalar& setComponent(Scalar& s, const direction)
219 {
220  return s;
221 }
222 
223 
224 inline Scalar component(const Scalar s, const direction)
225 {
226  return s;
227 }
228 
229 
230 //- Return 1 if s is greater_equal zero, or otherwise -1
231 inline Scalar sign(const Scalar s)
232 {
233  return (s >= 0)? 1: -1;
234 }
235 
236 
237 //- Return 1 if s is greater than zero, otherwise 1
238 inline Scalar pos(const Scalar s)
239 {
240  return (s > 0)? 1: 0;
241 }
242 
243 
244 //- Return 1 if s is greater_equal zero, or otherwise 0
245 inline Scalar pos0(const Scalar s)
246 {
247  return (s >= 0)? 1: 0;
248 }
249 
250 
251 //- Return 1 if s is less than zero, or otherwise 0
252 inline Scalar neg(const Scalar s)
253 {
254  return (s < 0)? 1: 0;
255 }
256 
257 
258 //- Return 1 if s is less_equal zero, or otherwise 0
259 inline Scalar neg0(const Scalar s)
260 {
261  return (s <= 0)? 1: 0;
262 }
263 
264 
265 //- Return the positive part of s, otherwise zero. Same as max(0, s).
266 inline Scalar posPart(const Scalar s)
267 {
268  return (s > 0)? s: 0;
269 }
270 
271 
272 //- Return the negative part of s, otherwise zero. Same as min(0, s).
273 // Does not change the sign
274 inline Scalar negPart(const Scalar s)
275 {
276  return (s < 0)? s: 0;
277 }
278 
279 
280 inline bool equal(const Scalar& s1, const Scalar& s2)
281 {
282  return mag(s1 - s2) <= ScalarVSMALL;
283 }
284 
285 
286 inline bool notEqual(const Scalar s1, const Scalar s2)
287 {
288  return mag(s1 - s2) > ScalarVSMALL;
289 }
290 
291 
292 inline Scalar limit(const Scalar s1, const Scalar s2)
293 {
294  return (mag(s1) < mag(s2)) ? s1: 0.0;
295 }
296 
297 
298 inline Scalar minMod(const Scalar s1, const Scalar s2)
299 {
300  return (mag(s1) < mag(s2)) ? s1: s2;
301 }
302 
303 
304 inline Scalar magSqr(const Scalar s)
305 {
306  return s*s;
307 }
308 
309 
310 inline Scalar sqr(const Scalar s)
311 {
312  return s*s;
313 }
314 
315 
316 inline Scalar pow3(const Scalar s)
317 {
318  return s*sqr(s);
319 }
320 
321 
322 inline Scalar pow4(const Scalar s)
323 {
324  return sqr(sqr(s));
325 }
326 
327 
328 inline Scalar pow5(const Scalar s)
329 {
330  return s*pow4(s);
331 }
332 
333 
334 inline Scalar pow6(const Scalar s)
335 {
336  return pow3(sqr(s));
337 }
338 
339 
340 inline Scalar pow025(const Scalar s)
341 {
342  return sqrt(sqrt(s));
343 }
344 
345 
346 inline Scalar inv(const Scalar s)
347 {
348  return 1.0/s;
349 }
350 
351 
352 inline Scalar dot(const Scalar s1, const Scalar s2)
353 {
354  return s1*s2;
355 }
356 
357 
358 inline Scalar cmptMultiply(const Scalar s1, const Scalar s2)
359 {
360  return s1*s2;
361 }
362 
363 
364 inline Scalar cmptPow(const Scalar s1, const Scalar s2)
365 {
366  return pow(s1, s2);
367 }
368 
369 
370 inline Scalar cmptDivide(const Scalar s1, const Scalar s2)
371 {
372  return s1/s2;
373 }
374 
375 
376 inline Scalar cmptMax(const Scalar s)
377 {
378  return s;
379 }
380 
381 
382 inline Scalar cmptMin(const Scalar s)
383 {
384  return s;
385 }
386 
387 
388 inline Scalar cmptAv(const Scalar s)
389 {
390  return s;
391 }
392 
393 
394 inline Scalar cmptSqr(const Scalar s)
395 {
396  return sqr(s);
397 }
398 
399 
400 inline Scalar cmptMag(const Scalar s)
401 {
402  return mag(s);
403 }
404 
405 
406 inline Scalar cmptMagSqr(const Scalar s)
407 {
408  return magSqr(s);
409 }
410 
411 
412 inline Scalar sqrtSumSqr(const Scalar a, const Scalar b)
413 {
414  const Scalar maga = mag(a);
415  const Scalar magb = mag(b);
416 
417  if (maga > magb)
418  {
419  return maga*sqrt(1.0 + sqr(magb/maga));
420  }
421  else
422  {
423  return magb < ScalarVSMALL ? 0.0 : magb*sqrt(1.0 + sqr(maga/magb));
424  }
425 }
426 
427 
428 //- Stabilisation around zero for division
429 inline Scalar stabilise(const Scalar s, const Scalar tol)
430 {
431  if (s >= 0)
432  {
433  return s + tol;
434  }
435  else
436  {
437  return s - tol;
438  }
439 }
440 
441 
442 // Specializations
443 
444 // Default definition in ops.H
445 template<class T> struct compareOp;
446 
447 //- Compare scalar values
448 template<>
450 {
452 
453  //- Construct with specified tolerance (non-negative value)
455  :
456  tolerance(tol)
457  {}
458 
459  Scalar operator()(const Scalar& a, const Scalar& b) const
460  {
461  return (mag(a - b) <= tolerance) ? 0 : (a - b);
462  }
463 };
464 
465 
466 // Default definition in ops.H
467 template<class T> struct equalOp;
468 
469 //- Compare scalar values for equality
470 template<>
472 {
474 
475  //- Construct with specified tolerance (non-negative value)
477  :
478  tolerance(tol)
479  {}
480 
481  bool operator()(const Scalar& a, const Scalar& b) const
482  {
483  return mag(a - b) <= tolerance;
484  }
485 };
486 
487 
488 // Default definition in ops.H
489 template<class T> struct notEqualOp;
490 
491 //- Compare scalar values for inequality
492 template<>
494 {
496 
497  //- Construct with specified tolerance (non-negative value)
499  :
500  tolerance(tol)
501  {}
502 
503  bool operator()(const Scalar& a, const Scalar& b) const
504  {
505  return mag(a - b) > tolerance;
506  }
507 };
508 
509 
510 
511 // Default definition in ops.H (future?)
512 template<class T> struct floorOp;
513 
514 //- Round scalar downwards - functor version of std::floor
515 template<>
517 {
518  Scalar operator()(const Scalar& x) const
519  {
520  return std::floor(x);
521  }
522 };
523 
524 
525 // Default definition in ops.H (future?)
526 template<class T> struct ceilOp;
527 
528 //- Round scalar upwards - functor version of std::ceil
529 template<>
530 struct ceilOp<Scalar>
531 {
532  Scalar operator()(const Scalar& x) const
533  {
534  return std::ceil(x);
535  }
536 };
537 
538 
539 // Default definition in ops.H (future?)
540 template<class T> struct roundOp;
541 
542 //- Round scalar - functor version of std::round
543 template<>
545 {
546  Scalar operator()(const Scalar& x) const
547  {
548  return std::round(x);
549  }
550 };
551 
552 
553 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
554 
555 } // End namespace Foam
556 
557 // ************************************************************************* //
Foam::pTraits< Scalar >::magType
Scalar magType
Magnitude type.
Definition: Scalar.H:79
Foam::sqrtSumSqr
Scalar sqrtSumSqr(const Scalar a, const Scalar b)
Definition: Scalar.H:412
Foam::pTraits< Scalar >::vsmall
static const Scalar vsmall
Definition: Scalar.H:107
Foam::notEqualOp< Scalar >::tolerance
const Scalar tolerance
Definition: Scalar.H:495
Foam::pTraits::pTraits
pTraits(const Base &obj)
Copy construct from base class.
Definition: pTraits.H:65
Foam::cmptMagSqr
void cmptMagSqr(Field< Type > &res, const UList< Type > &f)
Definition: FieldFunctions.C:327
Foam::nameOp< Scalar >::operator()
word operator()(const Scalar val) const
Definition: Scalar.H:146
Foam::setComponent
label & setComponent(label &l, const direction)
Definition: label.H:123
Foam::component
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
Definition: FieldFieldFunctions.C:44
Foam::pTraits< Scalar >::labelType
label labelType
Equivalent type of labels used for valid component indexing.
Definition: Scalar.H:82
Foam::tan
dimensionedScalar tan(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:266
Foam::cmptPow
Scalar cmptPow(const Scalar s1, const Scalar s2)
Definition: Scalar.H:364
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
Foam::notEqualOp
Definition: ops.H:237
s
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))
Definition: gmvOutputSpray.H:25
Foam::ScalarRead
Scalar ScalarRead(const char *buf)
Parse entire buffer as a float/double, skipping leading/trailing whitespace.
Definition: Scalar.C:73
Foam::cosh
dimensionedScalar cosh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:271
Foam::cmptMultiply
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::y1
dimensionedScalar y1(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:282
Foam::pTraits< Scalar >::cmptType
Scalar cmptType
Component type.
Definition: Scalar.H:76
Foam::ceilOp< Scalar >::operator()
Scalar operator()(const Scalar &x) const
Definition: Scalar.H:532
Foam::compareOp
Three-way comparison operation of two parameters,.
Definition: ops.H:265
Foam::sin
dimensionedScalar sin(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:264
Foam::jn
dimensionedScalar jn(const int n, const dimensionedScalar &ds)
Definition: dimensionedScalar.C:305
Foam::posPart
dimensionedScalar posPart(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:221
Foam::neg0
dimensionedScalar neg0(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:210
Foam::dot
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:944
Foam::pTraits< Scalar >::min
static const Scalar min
Definition: Scalar.H:104
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:230
Foam::pos0
dimensionedScalar pos0(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:188
Foam::exp
dimensionedScalar exp(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:261
Foam::sign
dimensionedScalar sign(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:166
Foam::compareOp< Scalar >::tolerance
const Scalar tolerance
Definition: Scalar.H:451
Foam::erf
dimensionedScalar erf(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:276
Scalar
#define Scalar
Definition: doubleScalar.C:41
besselFunc2
#define besselFunc2(func)
Definition: doubleScalar.H:132
Foam::roundOp< Scalar >::operator()
Scalar operator()(const Scalar &x) const
Definition: Scalar.H:546
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::pow025
dimensionedScalar pow025(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:133
Foam::cmptMin
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:302
Foam::cmptMag
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:400
Foam::atanh
dimensionedScalar atanh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:275
Foam::cmptMax
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
Definition: FieldFieldFunctions.C:253
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::lgamma
dimensionedScalar lgamma(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:278
Foam::pow4
dimensionedScalar pow4(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:100
Foam::pow6
dimensionedScalar pow6(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:122
ScalarVSMALL
#define ScalarVSMALL
Definition: doubleScalar.C:43
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
Foam::tanh
dimensionedScalar tanh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:272
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::pow3
dimensionedScalar pow3(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:89
Foam::stabilise
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
Definition: DimensionedScalarField.C:43
Foam::inv
dimensionedSphericalTensor inv(const dimensionedSphericalTensor &dt)
Definition: dimensionedSphericalTensor.C:73
Foam::pTraits< Scalar >::typeName
static const char *const typeName
Definition: Scalar.H:99
Foam::notEqualOp< Scalar >::operator()
bool operator()(const Scalar &a, const Scalar &b) const
Definition: Scalar.H:503
Foam::ceilOp
Definition: Scalar.H:526
Foam::log10
dimensionedScalar log10(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:263
Foam::y0
dimensionedScalar y0(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:281
Foam::cmptAv
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
Definition: DimensionedFieldFunctions.C:246
Foam::equalOp< Scalar >::operator()
bool operator()(const Scalar &a, const Scalar &b) const
Definition: Scalar.H:481
Foam::erfc
dimensionedScalar erfc(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:277
Foam::nameOp
Extract name (as a word) from an object, typically using its name() method.
Definition: word.H:237
Foam::asinh
dimensionedScalar asinh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:273
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
Foam::pTraits< Scalar >::rootMax
static const Scalar rootMax
Definition: Scalar.H:105
Foam::pow5
dimensionedScalar pow5(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:111
Foam::log
dimensionedScalar log(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:262
os
OBJstream os(runTime.globalPath()/outputName)
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::compareOp< Scalar >::compareOp
compareOp(Scalar tol=ScalarVSMALL)
Construct with specified tolerance (non-negative value)
Definition: Scalar.H:454
Foam::cmptSqr
Scalar cmptSqr(const Scalar s)
Definition: Scalar.H:394
Foam::yn
dimensionedScalar yn(const int n, const dimensionedScalar &ds)
Definition: dimensionedScalar.C:306
Foam::cmptDivide
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::pTraits< Scalar >::one
static const Scalar one
Definition: Scalar.H:102
Foam::acosh
dimensionedScalar acosh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:274
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:51
Foam::negPart
dimensionedScalar negPart(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:232
Foam::minMod
Scalar minMod(const Scalar s1, const Scalar s2)
Definition: Scalar.H:298
Foam::pTraits< Scalar >::max
static const Scalar max
Definition: Scalar.H:103
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:144
Foam::j0
dimensionedScalar j0(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:279
Foam::pTraits
A traits class, which is primarily used for primitives.
Definition: pTraits.H:56
Foam::acos
dimensionedScalar acos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:268
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::limit
complex limit(const complex &, const complex &)
Definition: complexI.H:263
besselFunc
#define besselFunc(func)
Definition: doubleScalar.H:127
Foam::direction
uint8_t direction
Definition: direction.H:52
x
x
Definition: LISASMDCalcMethod2.H:52
Foam::transFunc
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 &s
Foam::atan
dimensionedScalar atan(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:269
Foam::floorOp< Scalar >::operator()
Scalar operator()(const Scalar &x) const
Definition: Scalar.H:518
Foam::name
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Definition: exprTraits.C:59
Foam::equalOp< Scalar >::tolerance
const Scalar tolerance
Definition: Scalar.H:473
Foam::equalOp< Scalar >::equalOp
equalOp(Scalar tol=ScalarVSMALL)
Construct with specified tolerance (non-negative value)
Definition: Scalar.H:476
Foam::roundOp
Definition: Scalar.H:540
Foam::pTraits< Scalar >::rootMin
static const Scalar rootMin
Definition: Scalar.H:106
Foam::cbrt
dimensionedScalar cbrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:155
Foam::j1
dimensionedScalar j1(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:280
Foam::equal
bool equal(const T &s1, const T &s2)
Compare two values for equality.
Definition: doubleFloat.H:46
Foam::notEqual
bool notEqual(const Scalar s1, const Scalar s2)
Definition: Scalar.H:286
Foam::floorOp
Definition: Scalar.H:512
Foam::neg
dimensionedScalar neg(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:199
Foam::pTraits< Scalar >::zero
static const Scalar zero
Definition: Scalar.H:101
Foam::asin
dimensionedScalar asin(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:267
Foam::equalOp
Definition: ops.H:236
Foam::cos
dimensionedScalar cos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:265
Foam::pos
dimensionedScalar pos(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:177
Foam::sinh
dimensionedScalar sinh(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:270
Foam::notEqualOp< Scalar >::notEqualOp
notEqualOp(Scalar tol=ScalarVSMALL)
Construct with specified tolerance (non-negative value)
Definition: Scalar.H:498
Foam::compareOp< Scalar >::operator()
Scalar operator()(const Scalar &a, const Scalar &b) const
Definition: Scalar.H:459