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-2019 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  //- Component type
74  typedef Scalar cmptType;
75 
76  //- Magnitude type
77  typedef Scalar magType;
78 
79  //- Equivalent type of labels used for valid component indexing
80  typedef label labelType;
81 
82 
83 
84  // Member constants
85 
86  //- Dimensionality of space
87  static constexpr direction dim = 3;
88 
89  //- Rank of Scalar is 0
90  static constexpr direction rank = 0;
91 
92  //- Number of components in Scalar is 1
93  static constexpr direction nComponents = 1;
94 
95 
96  // Static data members
97 
98  static const char* const typeName;
99  static const char* const componentNames[];
100  static const Scalar zero;
101  static const Scalar one;
102  static const Scalar max;
103  static const Scalar min;
104  static const Scalar rootMax;
105  static const Scalar rootMin;
106  static const Scalar vsmall;
107 
108 
109  // Constructors
110 
111  //- Construct from primitive
112  explicit pTraits(const Scalar& val);
113 
114  //- Construct from Istream
115  pTraits(Istream& is);
116 
117 
118  // Member Functions
119 
120  //- Access to the value
121  operator Scalar() const
122  {
123  return p_;
124  }
125 
126  //- Access to the value
127  operator Scalar&()
128  {
129  return p_;
130  }
131 };
132 
133 
134 // * * * * * * * * * * * * * * * IO/Conversion * * * * * * * * * * * * * * * //
135 
136 //- A word representation of a floating-point value.
137 // Uses stringstream instead of std::to_string for more consistent formatting.
138 word name(const Scalar val);
139 
140 
141 //- A word representation of a floating-point value.
142 template<>
143 struct nameOp<Scalar>
144 {
145  inline word operator()(const Scalar val) const
146  {
147  return Foam::name(val);
148  }
149 };
150 
151 
152 //- Parse entire buffer as a float/double, skipping leading/trailing whitespace.
153 // \return Parsed value or FatalIOError on any problem
154 Scalar ScalarRead(const char* buf);
155 
156 //- Parse entire buffer as a float/double, skipping leading/trailing whitespace.
157 // \return True if successful.
158 bool ScalarRead(const char* buf, Scalar& val);
159 
160 //- Parse entire string as a float/double, skipping leading/trailing whitespace.
161 // \return Parsed value or FatalIOError on any problem
162 inline Scalar ScalarRead(const std::string& str)
163 {
164  return ScalarRead(str.c_str());
165 }
166 
167 //- Parse entire string as a float/double, skipping leading/trailing whitespace.
168 // \return True if successful.
169 inline bool ScalarRead(const std::string& str, Scalar& val)
170 {
171  return ScalarRead(str.c_str(), val);
172 }
173 
174 
175 Scalar ScalarRead(Istream& is);
176 Istream& operator>>(Istream& is, Scalar& val);
177 Ostream& operator<<(Ostream& os, const Scalar val);
178 
179 
180 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
181 
182 // Standard C++ transcendental functions
184 
186 transFunc(exp)
187 transFunc(log)
189 transFunc(sin)
190 transFunc(cos)
191 transFunc(tan)
201 
202 // Standard ANSI-C (but not in <cmath>) transcendental functions
203 
204 transFunc(erf)
207 transFunc(tgamma)
208 
209 besselFunc(j0)
210 besselFunc(j1)
211 besselFunc(y0)
212 besselFunc(y1)
215 
216 
217 inline Scalar& setComponent(Scalar& s, const direction)
218 {
219  return s;
220 }
221 
222 
223 inline Scalar component(const Scalar s, const direction)
224 {
225  return s;
226 }
227 
228 
229 //- Return 1 if s is greater_equal zero, or otherwise -1
230 inline Scalar sign(const Scalar s)
231 {
232  return (s >= 0)? 1: -1;
233 }
234 
235 
236 //- Return 1 if s is greater than zero, otherwise 1
237 inline Scalar pos(const Scalar s)
238 {
239  return (s > 0)? 1: 0;
240 }
241 
242 
243 //- Return 1 if s is greater_equal zero, or otherwise 0
244 inline Scalar pos0(const Scalar s)
245 {
246  return (s >= 0)? 1: 0;
247 }
248 
249 
250 //- Return 1 if s is less than zero, or otherwise 0
251 inline Scalar neg(const Scalar s)
252 {
253  return (s < 0)? 1: 0;
254 }
255 
256 
257 //- Return 1 if s is less_equal zero, or otherwise 0
258 inline Scalar neg0(const Scalar s)
259 {
260  return (s <= 0)? 1: 0;
261 }
262 
263 
264 //- Return the positive part of s, otherwise zero. Same as max(0, s).
265 inline Scalar posPart(const Scalar s)
266 {
267  return (s > 0)? s: 0;
268 }
269 
270 
271 //- Return the negative part of s, otherwise zero. Same as min(0, s).
272 // Does not change the sign
273 inline Scalar negPart(const Scalar s)
274 {
275  return (s < 0)? s: 0;
276 }
277 
278 
279 inline bool equal(const Scalar& s1, const Scalar& s2)
280 {
281  return mag(s1 - s2) <= ScalarVSMALL;
282 }
283 
284 
285 inline bool notEqual(const Scalar s1, const Scalar s2)
286 {
287  return mag(s1 - s2) > ScalarVSMALL;
288 }
289 
290 
291 inline Scalar limit(const Scalar s1, const Scalar s2)
292 {
293  return (mag(s1) < mag(s2)) ? s1: 0.0;
294 }
295 
296 
297 inline Scalar minMod(const Scalar s1, const Scalar s2)
298 {
299  return (mag(s1) < mag(s2)) ? s1: s2;
300 }
301 
302 
303 inline Scalar magSqr(const Scalar s)
304 {
305  return s*s;
306 }
307 
308 
309 inline Scalar sqr(const Scalar s)
310 {
311  return s*s;
312 }
313 
314 
315 inline Scalar pow3(const Scalar s)
316 {
317  return s*sqr(s);
318 }
319 
320 
321 inline Scalar pow4(const Scalar s)
322 {
323  return sqr(sqr(s));
324 }
325 
326 
327 inline Scalar pow5(const Scalar s)
328 {
329  return s*pow4(s);
330 }
331 
332 
333 inline Scalar pow6(const Scalar s)
334 {
335  return pow3(sqr(s));
336 }
337 
338 
339 inline Scalar pow025(const Scalar s)
340 {
341  return sqrt(sqrt(s));
342 }
343 
344 
345 inline Scalar inv(const Scalar s)
346 {
347  return 1.0/s;
348 }
349 
350 
351 inline Scalar dot(const Scalar s1, const Scalar s2)
352 {
353  return s1*s2;
354 }
355 
356 
357 inline Scalar cmptMultiply(const Scalar s1, const Scalar s2)
358 {
359  return s1*s2;
360 }
361 
362 
363 inline Scalar cmptPow(const Scalar s1, const Scalar s2)
364 {
365  return pow(s1, s2);
366 }
367 
368 
369 inline Scalar cmptDivide(const Scalar s1, const Scalar s2)
370 {
371  return s1/s2;
372 }
373 
374 
375 inline Scalar cmptMax(const Scalar s)
376 {
377  return s;
378 }
379 
380 
381 inline Scalar cmptMin(const Scalar s)
382 {
383  return s;
384 }
385 
386 
387 inline Scalar cmptAv(const Scalar s)
388 {
389  return s;
390 }
391 
392 
393 inline Scalar cmptSqr(const Scalar s)
394 {
395  return sqr(s);
396 }
397 
398 
399 inline Scalar cmptMag(const Scalar s)
400 {
401  return mag(s);
402 }
403 
404 
405 inline Scalar cmptMagSqr(const Scalar s)
406 {
407  return magSqr(s);
408 }
409 
410 
411 inline Scalar sqrtSumSqr(const Scalar a, const Scalar b)
412 {
413  const Scalar maga = mag(a);
414  const Scalar magb = mag(b);
415 
416  if (maga > magb)
417  {
418  return maga*sqrt(1.0 + sqr(magb/maga));
419  }
420  else
421  {
422  return magb < ScalarVSMALL ? 0.0 : magb*sqrt(1.0 + sqr(maga/magb));
423  }
424 }
425 
426 
427 //- Stabilisation around zero for division
428 inline Scalar stabilise(const Scalar s, const Scalar tol)
429 {
430  if (s >= 0)
431  {
432  return s + tol;
433  }
434  else
435  {
436  return s - tol;
437  }
438 }
439 
440 
441 // Specializations
442 
443 // Default definition in ops.H
444 template<class T> struct compareOp;
445 
446 //- Compare scalar values
447 template<>
449 {
451 
452  //- Construct with specified tolerance (non-negative value)
454  :
455  tolerance(tol)
456  {}
457 
458  Scalar operator()(const Scalar& a, const Scalar& b) const
459  {
460  return (mag(a - b) <= tolerance) ? 0 : (a - b);
461  }
462 };
463 
464 
465 // Default definition in ops.H
466 template<class T> struct equalOp;
467 
468 //- Compare scalar values for equality
469 template<>
471 {
473 
474  //- Construct with specified tolerance (non-negative value)
476  :
477  tolerance(tol)
478  {}
479 
480  bool operator()(const Scalar& a, const Scalar& b) const
481  {
482  return mag(a - b) <= tolerance;
483  }
484 };
485 
486 
487 // Default definition in ops.H
488 template<class T> struct notEqualOp;
489 
490 //- Compare scalar values for inequality
491 template<>
493 {
495 
496  //- Construct with specified tolerance (non-negative value)
498  :
499  tolerance(tol)
500  {}
501 
502  bool operator()(const Scalar& a, const Scalar& b) const
503  {
504  return mag(a - b) > tolerance;
505  }
506 };
507 
508 
509 
510 // Default definition in ops.H (future?)
511 template<class T> struct floorOp;
512 
513 //- Round scalar downwards - functor version of std::floor
514 template<>
516 {
517  Scalar operator()(const Scalar& x) const
518  {
519  return std::floor(x);
520  }
521 };
522 
523 
524 // Default definition in ops.H (future?)
525 template<class T> struct ceilOp;
526 
527 //- Round scalar upwards - functor version of std::ceil
528 template<>
529 struct ceilOp<Scalar>
530 {
531  Scalar operator()(const Scalar& x) const
532  {
533  return std::ceil(x);
534  }
535 };
536 
537 
538 // Default definition in ops.H (future?)
539 template<class T> struct roundOp;
540 
541 //- Round scalar - functor version of std::round
542 template<>
544 {
545  Scalar operator()(const Scalar& x) const
546  {
547  return std::round(x);
548  }
549 };
550 
551 
552 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
553 
554 } // End namespace Foam
555 
556 // ************************************************************************* //
Foam::pTraits< Scalar >::magType
Scalar magType
Magnitude type.
Definition: Scalar.H:77
Foam::sqrtSumSqr
Scalar sqrtSumSqr(const Scalar a, const Scalar b)
Definition: Scalar.H:411
Foam::pTraits< Scalar >::vsmall
static const Scalar vsmall
Definition: Scalar.H:106
Foam::notEqualOp< Scalar >::tolerance
const Scalar tolerance
Definition: Scalar.H:494
Foam::cmptMagSqr
void cmptMagSqr(Field< Type > &res, const UList< Type > &f)
Definition: FieldFunctions.C:327
Foam::val
label ListType::const_reference val
Definition: ListOps.H:407
Foam::nameOp< Scalar >::operator()
word operator()(const Scalar val) const
Definition: Scalar.H:145
Foam::setComponent
label & setComponent(label &l, const direction)
Definition: label.H:127
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:80
Foam::tan
dimensionedScalar tan(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:266
Foam::cmptPow
Scalar cmptPow(const Scalar s1, const Scalar s2)
Definition: Scalar.H:363
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
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:71
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:74
Foam::ceilOp< Scalar >::operator()
Scalar operator()(const Scalar &x) const
Definition: Scalar.H:531
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:103
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:228
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:450
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:130
Foam::roundOp< Scalar >::operator()
Scalar operator()(const Scalar &x) const
Definition: Scalar.H:545
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::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::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
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:98
Foam::pTraits::pTraits
pTraits(const PrimitiveType &p)
Construct from primitive.
Definition: pTraits.H:62
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::notEqualOp< Scalar >::operator()
bool operator()(const Scalar &a, const Scalar &b) const
Definition: Scalar.H:502
Foam::ceilOp
Definition: Scalar.H:525
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:480
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:238
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:104
Foam::pow5
dimensionedScalar pow5(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:111
Foam::log
dimensionedScalar log(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:262
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:453
Foam::cmptSqr
Scalar cmptSqr(const Scalar s)
Definition: Scalar.H:393
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:101
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:297
Foam::pTraits< Scalar >::max
static const Scalar max
Definition: Scalar.H:102
Foam::sqrt
dimensionedScalar sqrt(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:144
Foam::j0
dimensionedScalar j0(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:279
Foam::pTraits
Traits class for primitives.
Definition: pTraits.H:52
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:270
besselFunc
#define besselFunc(func)
Definition: doubleScalar.H:125
Foam::direction
uint8_t direction
Definition: direction.H:47
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:517
Foam::equalOp< Scalar >::tolerance
const Scalar tolerance
Definition: Scalar.H:472
Foam::equalOp< Scalar >::equalOp
equalOp(Scalar tol=ScalarVSMALL)
Construct with specified tolerance (non-negative value)
Definition: Scalar.H:475
Foam::roundOp
Definition: Scalar.H:539
Foam::pTraits< Scalar >::rootMin
static const Scalar rootMin
Definition: Scalar.H:105
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:285
Foam::floorOp
Definition: Scalar.H:511
Foam::neg
dimensionedScalar neg(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:199
Foam::pTraits< Scalar >::zero
static const Scalar zero
Definition: Scalar.H:100
Foam::asin
dimensionedScalar asin(const dimensionedScalar &ds)
Definition: dimensionedScalar.C:267
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &)
Definition: boundaryPatch.C:102
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:497
Foam::compareOp< Scalar >::operator()
Scalar operator()(const Scalar &a, const Scalar &b) const
Definition: Scalar.H:458