dimensionedType.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-2016 OpenFOAM Foundation
9  Copyright (C) 2016-2020 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 Class
28  Foam::dimensioned
29 
30 Description
31  Generic dimensioned Type class
32 
33 SourceFiles
34  dimensionedType.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef dimensionedType_H
39 #define dimensionedType_H
40 
41 #include "word.H"
42 #include "direction.H"
43 #include "dimensionSet.H"
44 #include "VectorSpace.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 // Forward Declarations
52 class one;
53 class zero;
54 class dictionary;
55 class primitiveEntry;
56 
57 template<class Type> class dimensioned;
58 
59 template<class Type>
60 Istream& operator>>(Istream& is, dimensioned<Type>& dt);
61 
62 /*---------------------------------------------------------------------------*\
63  Class dimensioned Declaration
64 \*---------------------------------------------------------------------------*/
65 
66 template<class Type>
67 class dimensioned
68 {
69  // Private Data
70 
71  //- The variable name
72  word name_;
73 
74  //- The dimension set
75  dimensionSet dimensions_;
76 
77  //- The data value
78  Type value_;
79 
80 
81  // Private Member Functions
82 
83  //- Read helper.
84  // Requires a value, optional preceded with name and/or dimensions.
85  // \verbatim
86  // [name] [dims] value
87  // \endverbatim
88  // If the name is present, it is used to rename.
89  // If dimensions are present, they are read.
90  // With checkDims = true, the dimensions read are verified
91  // against the current (expected) dimensions.
92  void initialize(Istream& is, const bool checkDims);
93 
94  //- Find entry and assign to dimensioned Type
95  //- FatalIOError if it is found and the number of tokens is incorrect,
96  //- or it is mandatory and not found.
97  //
98  // Requires a value, optional preceded with name and/or dimensions.
99  // \verbatim
100  // [name] [dims] value
101  // \endverbatim
102  // If the name is present, it is used to rename.
103  // If dimensions are present, they are read.
104  // With checkDims = true, the dimensions read are verified
105  // against the current (expected) dimensions.
106  bool readEntry
107  (
108  const word& key,
109  const dictionary& dict,
110  const bool mandatory = true,
111  const bool checkDims = true,
112  enum keyType::option matchOpt = keyType::REGEX
113  );
114 
115 public:
116 
117  //- The underlying data type
118  typedef Type value_type;
119 
120  //- Component type
121  typedef typename pTraits<Type>::cmptType cmptType;
122 
123 
124  // Constructors
125 
126  //- A dimensionless Zero, named "0"
127  dimensioned();
128 
129  //- A dimensioned Zero, named "0"
130  explicit dimensioned(const dimensionSet& dims);
131 
132  //- A dimensioned Zero, named "0"
133  explicit dimensioned(const dimensionSet& dims, const Foam::zero);
134 
135  //- A dimensioned pTraits::one, named "1"
136  explicit dimensioned(const dimensionSet& dims, const Foam::one);
137 
138  //- Implicit construct dimensionless from given value.
139  dimensioned(const Type& val)
140  :
141  name_(::Foam::name(val)),
142  dimensions_(dimless),
143  value_(val)
144  {}
145 
146  //- Construct dimensioned from given value
147  dimensioned(const dimensionSet& dims, const Type& val);
148 
149  //- Construct from components (name, dimensions, value).
151  (
152  const word& name,
153  const dimensionSet& dims,
154  const Type& val
155  );
156 
157  //- Copy construct dimensioned Type with a new name
158  dimensioned(const word& name, const dimensioned<Type>& dt);
159 
160  //- Construct from primitive entry with given name.
161  // The entry may contain optional name and dimensions.
162  // \verbatim
163  // [name] [dims] value
164  // \endverbatim
165  // If the optional name is found, it is used for renaming.
166  // If the optional dimensions are present, they are read and
167  // used without further verification.
168  // If no dimensions are found, the quantity is dimensionless.
169  // Fatal if not primitiveEntry or if number of tokens is incorrect.
170  explicit dimensioned(const primitiveEntry& e);
171 
172  //- Construct from primitive entry with given name and dimensions.
173  // The entry may contain optional name and dimensions.
174  // \verbatim
175  // [name] [dims] value
176  // \endverbatim
177  // If the optional name is found, it is used for renaming.
178  // If the optional dimensions are present, they are read and
179  // verified against the expected dimensions.
180  // Fatal if not primitiveEntry or if number of tokens is incorrect.
181  explicit dimensioned(const primitiveEntry& e, const dimensionSet& dims);
182 
183  //- Construct from dictionary lookup with a given name.
184  // The entry may contain optional name and dimensions.
185  // \verbatim
186  // [name] [dims] value
187  // \endverbatim
188  // If the optional name is found, it is used for renaming.
189  // If the optional dimensions are present, they are read and
190  // used without further verification.
191  // If no dimensions are found, the quantity is dimensionless.
192  dimensioned(const word& name, const dictionary& dict);
193 
194  //- Construct from dictionary lookup with a given name and dimensions.
195  // The entry may contain optional name and dimensions.
196  // \verbatim
197  // [name] [dims] value
198  // \endverbatim
199  // If the optional name is found, it is used for renaming.
200  // If the optional dimensions are present, they are read and
201  // verified against the expected dimensions.
203  (
204  const word& name,
205  const dimensionSet& dims,
206  const dictionary& dict
207  );
208 
209  //- Construct from dictionary lookup with a given name and dimensions.
210  // The entry may contain optional name and dimensions.
211  // \verbatim
212  // [name] [dims] value
213  // \endverbatim
214  // If the optional name is found, it is used for renaming.
215  // If the optional dimensions are present, they are read and
216  // verified against the expected dimensions.
218  (
219  const word& name,
220  const dimensionSet& dims,
221  const dictionary& dict,
222  const word& entryName
223  );
224 
225  //- Construct from components (name, dimensions, value) with
226  //- optional dictionary override.
227  // The entry may contain optional name and dimensions.
228  // \verbatim
229  // [name] [dims] value
230  // \endverbatim
232  (
233  const word& name,
234  const dimensionSet& dims,
235  const Type& val,
236  const dictionary& dict
237  );
238 
239 
240  // Static Member Functions
241 
242  //- Construct dimensioned from dictionary, with default value.
243  // FatalIOError if there are excess tokens.
245  (
246  const word& name,
247  const dictionary& dict,
248  const dimensionSet& dims = dimless,
249  const Type& deflt = Type(Zero)
250  );
251 
252  //- Construct dimensionless from dictionary, with default value.
253  // FatalIOError if it is found and there are excess tokens.
255  (
256  const word& name,
257  const dictionary& dict,
258  const Type& deflt = Type(Zero)
259  );
260 
261  //- Construct dimensioned from dictionary, with default value.
262  // If the value is not found, it is added into the dictionary.
263  // FatalIOError if it is found and there are excess tokens.
265  (
266  const word& name,
267  dictionary& dict,
268  const dimensionSet& dims = dimless,
269  const Type& deflt = Type(Zero)
270  );
271 
272  //- Construct dimensionless from dictionary, with default value.
273  // If the value is not found, it is added into the dictionary.
274  // FatalIOError if it is found and there are excess tokens.
276  (
277  const word& name,
278  dictionary& dict,
279  const Type& deflt = Type(Zero)
280  );
281 
282 
283  // Member Functions
284 
285  //- Return const reference to name.
286  const word& name() const;
287 
288  //- Return non-const reference to name.
289  word& name();
290 
291  //- Return const reference to dimensions.
292  const dimensionSet& dimensions() const;
293 
294  //- Return non-const reference to dimensions.
296 
297  //- Return const reference to value.
298  const Type& value() const;
299 
300  //- Return non-const reference to value.
301  Type& value();
302 
303  //- Return a component as a dimensioned<cmptType>
305 
306  //- Return a component with a dimensioned<cmptType>
307  void replace(const direction d, const dimensioned<cmptType>& dc);
308 
309  //- Return transpose.
310  dimensioned<Type> T() const;
311 
312  //- Update the value of dimensioned<Type>,
313  //- lookup in dictionary with the name().
314  bool read(const dictionary& dict);
315 
316  //- Update the value of dimensioned<Type> if found in the dictionary,
317  //- lookup in dictionary with the name().
318  bool readIfPresent(const dictionary& dict);
319 
320  //- Update the value of dimensioned<Type>,
321  //- using an alternative entry name
322  bool read(const word& entryName, const dictionary& dict);
323 
324  //- Update the value of dimensioned<Type> if found in the dictionary,
325  //- using an alternative entry name
326  bool readIfPresent(const word& entryName, const dictionary& dict);
327 
328 
329  // IO
330 
331  //- Read (name, dimensions, value) from stream,
332  //- using units from system table.
333  // Optionally skip reading the name
334  Istream& read(Istream& is, const bool readName = true);
335 
336  //- Read (name, dimensions, value) from stream,
337  //- using units from dictionary
338  Istream& read(Istream& is, const dictionary& readSet);
339 
340  //- Read (name, dimensions, value) from stream,
341  //- using units from table
342  Istream& read(Istream& is, const HashTable<dimensionedScalar>& readSet);
343 
344  //- Write as a dictionary entry with keyword.
345  // The name is not written when it is identical to keyword.
346  // The dimensions are always written.
347  void writeEntry(const word& keyword, Ostream& os) const;
348 
349 
350  // Member Operators
351 
352  //- Return a component as a dimensioned<cmptType>
354 
355  void operator+=(const dimensioned<Type>& dt);
356  void operator-=(const dimensioned<Type>& dt);
357  void operator*=(const scalar s);
358  void operator/=(const scalar s);
359 
360 
361  // IOstream Operators
362 
363  //- Read from stream. The name and dimensions are optional.
364  // If the optional dimensions are present,
365  // they are used without further verification.
366  friend Istream& operator>> <Type>
367  (
368  Istream& is,
370  );
371 
372 
373  // Housekeeping
374 
375  //- Deprecated(2018-11) Construct from Istream
376  //- (expects name, dimensions, value)
377  // \deprecated(2018-11) - should generally use construct from
378  // dictionary or primitiveEntry instead
379  // (additional checks on the input stream).
380  FOAM_DEPRECATED(2018-11)
381  explicit dimensioned(Istream& is);
382 
383  //- Deprecated(2018-11) Construct from Istream with given name
384  //- (expects dimensions, value)
385  // \deprecated(2018-11) - should generally use construct from
386  // dictionary or primitiveEntry instead
387  // (additional checks on the input stream).
388  FOAM_DEPRECATED(2018-11)
389  dimensioned(const word& name, Istream& is);
390 
391  //- Deprecated(2018-11) Construct from Istream with given name
392  //- and expected dimensions.
393  // Expects value, but supports optional name and dimensions.
394  // If the optional dimensions are present, they are read and
395  // verified against the expected dimensions.
396  // \deprecated(2018-11) - should generally use construct from
397  // dictionary or primitiveEntry instead
398  // (additional checks on the input stream).
399  FOAM_DEPRECATED(2018-11)
400  dimensioned(const word& name, const dimensionSet& dims, Istream& is);
401 
402 
403  //- Construct dimensioned from dictionary, with default value.
404  //- FatalIOError if there are excess tokens.
406  (
407  const word& name,
408  const dictionary& dict,
409  const dimensionSet& dims = dimless,
410  const Type& deflt = Type(Zero)
411  )
412  {
413  return getOrDefault(name, dict, dims, deflt);
414  }
415 
416  //- Construct dimensionless from dictionary, with default value.
417  // FatalIOError if it is found and there are excess tokens.
419  (
420  const word& name,
421  const dictionary& dict,
422  const Type& deflt = Type(Zero)
423  )
424  {
425  return getOrDefault(name, dict, deflt);
426  }
427 
428  //- Construct dimensioned from dictionary, with default value.
429  // If the value is not found, it is added into the dictionary.
430  // FatalIOError if it is found and there are excess tokens.
432  (
433  const word& name,
434  dictionary& dict,
435  const dimensionSet& dims = dimless,
436  const Type& deflt = Type(Zero)
437  )
438  {
439  return getOrAddToDict(name, dict, dims, deflt);
440  }
441 
442  //- Construct dimensionless from dictionary, with default value.
443  // If the value is not found, it is added into the dictionary.
444  // FatalIOError if it is found and there are excess tokens.
446  (
447  const word& name,
448  dictionary& dict,
449  const Type& deflt = Type(Zero)
450  )
451  {
452  return getOrAddToDict(name, dict, deflt);
453  }
454 };
455 
456 
457 // * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
458 
459 //- Output operator
460 template<class Type>
461 Ostream& operator<<(Ostream& os, const dimensioned<Type>& dt);
462 
463 template<class Type, direction r>
465 pow
466 (
467  const dimensioned<Type>&,
469  = pTraits<typename powProduct<Type, r>::type>::zero
470 );
471 
472 template<class Type>
474 sqr(const dimensioned<Type>&);
475 
476 template<class Type>
478 magSqr(const dimensioned<Type>& dt);
479 
480 template<class Type>
482 mag(const dimensioned<Type>& dt);
483 
484 template<class Type>
485 dimensioned<Type> cmptMultiply
486 (
487  const dimensioned<Type>&,
488  const dimensioned<Type>&
489 );
490 
491 template<class Type>
492 dimensioned<Type> cmptDivide
493 (
494  const dimensioned<Type>&,
495  const dimensioned<Type>&
496 );
497 
498 template<class Type>
499 dimensioned<Type> max(const dimensioned<Type>&, const dimensioned<Type>&);
500 
501 template<class Type>
502 dimensioned<Type> min(const dimensioned<Type>&, const dimensioned<Type>&);
503 
504 template<class Type>
505 bool operator<(const dimensioned<Type>&, const dimensioned<Type>&);
506 
507 template<class Type>
508 bool operator>(const dimensioned<Type>&, const dimensioned<Type>&);
509 
510 template<class Type>
511 dimensioned<Type> operator+(const dimensioned<Type>&, const dimensioned<Type>&);
512 
513 template<class Type>
514 dimensioned<Type> operator-(const dimensioned<Type>&);
515 
516 template<class Type>
517 dimensioned<Type> operator-(const dimensioned<Type>&, const dimensioned<Type>&);
518 
519 template<class Type>
520 dimensioned<Type> operator*
521 (
522  const dimensioned<scalar>&,
523  const dimensioned<Type>&
524 );
525 
526 template<class Type>
527 dimensioned<Type> operator/
528 (
529  const dimensioned<Type>&,
530  const dimensioned<scalar>&
531 );
532 
533 
534 #define PRODUCT_OPERATOR(product, op, opFunc) \
535  \
536 template<class Type1, class Type2> \
537 dimensioned<typename product<Type1, Type2>::type> \
538 operator op(const dimensioned<Type1>&, const dimensioned<Type2>&); \
539  \
540 template<class Type, class Form, class Cmpt, direction nCmpt> \
541 dimensioned<typename product<Type, Form>::type> \
542 operator op \
543 ( \
544  const dimensioned<Type>&, \
545  const VectorSpace<Form,Cmpt,nCmpt>& \
546 ); \
547  \
548 template<class Type, class Form, class Cmpt, direction nCmpt> \
549 dimensioned<typename product<Form, Type>::type> \
550 operator op \
551 ( \
552  const VectorSpace<Form,Cmpt,nCmpt>&, \
553  const dimensioned<Type>& \
554 );
555 
556 PRODUCT_OPERATOR(outerProduct, *, outer)
557 PRODUCT_OPERATOR(crossProduct, ^, cross)
558 PRODUCT_OPERATOR(innerProduct, &, dot)
559 PRODUCT_OPERATOR(scalarProduct, &&, dotdot)
560 
561 #undef PRODUCT_OPERATOR
562 
563 
564 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
565 
566 } // End namespace Foam
567 
568 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
569 
570 #ifdef NoRepository
571  #include "dimensionedType.C"
572 #endif
573 
574 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
575 
576 #endif
577 
578 // ************************************************************************* //
VectorSpace.H
Foam::dimensioned::operator[]
dimensioned< cmptType > operator[](const direction d) const
Return a component as a dimensioned<cmptType>
Definition: dimensionedType.C:609
Foam::primitiveEntry
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
Definition: primitiveEntry.H:63
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:65
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::cmptMultiply
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::Zero
static constexpr const zero Zero
Global zero (0)
Definition: zero.H:131
Foam::dimensioned::read
bool read(const dictionary &dict)
Definition: dimensionedType.C:476
Foam::operator-
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
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::glTF::key
auto key(const Type &t) -> typename std::enable_if< std::is_enum< Type >::value, typename std::underlying_type< Type >::type >::type
Definition: foamGltfBase.H:108
Foam::dimensioned::name
const word & name() const
Return const reference to name.
Definition: dimensionedType.C:406
Foam::one
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Definition: one.H:61
Foam::powProduct::type
symmTypeOfRank< typename pTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank) >::type type
Definition: products.H:170
Foam::dimensioned::operator+=
void operator+=(const dimensioned< Type > &dt)
Definition: dimensionedType.C:619
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:230
Foam::dimensioned::value
const Type & value() const
Return const reference to value.
Definition: dimensionedType.C:434
Foam::dimensionSet
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Definition: dimensionSet.H:108
Foam::dimensioned::T
dimensioned< Type > T() const
Return transpose.
Definition: dimensionedSphericalTensor.C:38
Foam::min
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:33
dimensionedType.C
Foam::magSqr
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::dimensioned::operator*=
void operator*=(const scalar s)
Definition: dimensionedType.C:641
Foam::dimensioned::readIfPresent
bool readIfPresent(const dictionary &dict)
Definition: dimensionedType.C:483
Foam::dimensioned::lookupOrDefault
static dimensioned< Type > lookupOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Definition: dimensionedType.H:405
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::dimensioned::operator/=
void operator/=(const scalar s)
Definition: dimensionedType.C:651
Foam::dimensioned::writeEntry
void writeEntry(const word &keyword, Ostream &os) const
Write as a dictionary entry with keyword.
Definition: dimensionedType.C:580
Foam::dimensioned::dimensioned
dimensioned(const Type &val)
Implicit construct dimensionless from given value.
Definition: dimensionedType.H:138
Foam::pow
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Definition: dimensionedScalar.C:75
Foam::max
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition: hashSets.C:47
dimensionSet.H
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
os
OBJstream os(runTime.globalPath()/outputName)
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:42
Foam::dimensioned::value_type
Type value_type
The underlying data type.
Definition: dimensionedType.H:117
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::dimensioned::getOrDefault
static dimensioned< Type > getOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Construct dimensioned from dictionary, with default value.
Definition: dimensionedType.C:348
Foam::dimensioned::getOrAddToDict
static dimensioned< Type > getOrAddToDict(const word &name, dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Construct dimensioned from dictionary, with default value.
Definition: dimensionedType.C:374
direction.H
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Foam::cmptDivide
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
Foam::dimensioned::lookupOrAddToDict
static dimensioned< Type > lookupOrAddToDict(const word &name, dictionary &dict, const dimensionSet &dims=dimless, const Type &deflt=Type(Zero))
Construct dimensioned from dictionary, with default value.
Definition: dimensionedType.H:431
FOAM_DEPRECATED
#define FOAM_DEPRECATED(since)
Definition: stdFoam.H:65
Foam::sqr
dimensionedSymmTensor sqr(const dimensionedVector &dv)
Definition: dimensionedSymmTensor.C:51
Foam::dimensioned::replace
void replace(const direction d, const dimensioned< cmptType > &dc)
Return a component with a dimensioned<cmptType>
Definition: dimensionedType.C:465
Foam::dimensioned::component
dimensioned< cmptType > component(const direction d) const
Return a component as a dimensioned<cmptType>
Definition: dimensionedType.C:450
Foam::dimensioned::dimensioned
dimensioned()
A dimensionless Zero, named "0".
Definition: dimensionedType.C:113
Foam::pTraits
A traits class, which is primarily used for primitives.
Definition: pTraits.H:56
Foam::operator+
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
Foam::mag
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::keyType::REGEX
Regular expression.
Definition: keyType.H:82
Foam::dimensioned::operator-=
void operator-=(const dimensioned< Type > &dt)
Definition: dimensionedType.C:630
Foam::outer
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:942
Foam::direction
uint8_t direction
Definition: direction.H:52
Foam::roots::type
type
Types of root.
Definition: Roots.H:54
Foam::operator<
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A older than B.
Definition: IOstreamOption.H:398
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
word.H
Foam::dimensioned::dimensions
const dimensionSet & dimensions() const
Return const reference to dimensions.
Definition: dimensionedType.C:420
PRODUCT_OPERATOR
#define PRODUCT_OPERATOR(product, op, opFunc)
Definition: dimensionedType.H:533
Foam::cross
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:943
Foam::dimensioned::cmptType
pTraits< Type >::cmptType cmptType
Component type.
Definition: dimensionedType.H:120
Foam::checkDims
static bool checkDims(const char *what, const dimensionSet &a, const dimensionSet &b)
Definition: dimensionSet.C:48
Foam::dimless
const dimensionSet dimless
Dimensionless.
Definition: dimensionSets.C:189
Foam::keyType::option
option
Enumeration for the data type and search/match modes (bitmask)
Definition: keyType.H:78
Foam::operator>
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.
Definition: IOstreamOption.H:418
Foam::zero
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition: zero.H:62
Foam::dotdot
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Definition: FieldFieldFunctions.C:945