Loading...
Searching...
No Matches
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-2022 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::dimensioned
29
30Description
31 Generic dimensioned Type class
32
33SourceFiles
34 dimensionedType.C
35
36\*---------------------------------------------------------------------------*/
37
38#ifndef Foam_dimensionedType_H
39#define Foam_dimensionedType_H
40
41#include "word.H"
42#include "direction.H"
43#include "dimensionSet.H"
44#include "VectorSpace.H"
45#include "IOobjectOption.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52// Forward Declarations
53class one;
54class zero;
55class dictionary;
57
58template<class Type> class dimensioned;
59
60template<class Type>
62
63namespace Expression
64{
65template<class T> class UniformListWrap;
66template<class GeoField, class Type> class UniformGeometricFieldWrap;
67}
68
69/*---------------------------------------------------------------------------*\
70 Class dimensioned Declaration
71\*---------------------------------------------------------------------------*/
72
73template<class Type>
74class dimensioned
75{
76 // Private Data
77
78 //- The variable name
79 word name_;
80
81 //- The dimension set
82 dimensionSet dimensions_;
83
84 //- The data value
85 Type value_;
86
87
88 // Private Member Functions
89
90 //- Read helper.
91 // Requires a value, optional preceded with name and/or dimensions.
92 // \verbatim
93 // [name] [dims] value
94 // \endverbatim
95 // If the name is present, it is used to rename.
96 // If dimensions are present, they are read.
97 // With checkDims = true, the dimensions read are verified
98 // against the current (expected) dimensions.
99 void initialize(Istream& is, const bool checkDims);
100
101 //- Find entry and assign to dimensioned Type
102 //- FatalIOError if it is found and the number of tokens is incorrect,
103 //- or it is mandatory and not found.
104 //
105 // Requires a value, optional preceded with name and/or dimensions.
106 // \verbatim
107 // [name] [dims] value
108 // \endverbatim
109 // If the name is present, it is used to rename.
110 // If dimensions are present, they are read.
111 // With checkDims = true, the dimensions read are verified
112 // against the current (expected) dimensions.
113 bool readEntry
114 (
115 const word& key,
116 const dictionary& dict,
118 const bool checkDims = true,
119 enum keyType::option matchOpt = keyType::REGEX
120 );
121
122public:
123
124 //- The underlying data type
125 typedef Type value_type;
126
127 //- Component type
128 typedef typename pTraits<Type>::cmptType cmptType;
129
130
131 // Constructors
132
133 //- A dimensionless Zero, named "0"
135
136 //- A dimensioned Zero, named "0"
137 explicit dimensioned(const dimensionSet& dims);
138
139 //- A dimensioned Zero, named "0"
140 explicit dimensioned(const dimensionSet& dims, const Foam::zero);
141
142 //- A dimensioned pTraits::one, named "1"
143 explicit dimensioned(const dimensionSet& dims, const Foam::one);
144
145 //- Implicit construct dimensionless from given value.
146 dimensioned(const Type& val)
148 name_(::Foam::name(val)),
149 dimensions_(dimless),
150 value_(val)
151 {}
153 //- Construct dimensioned from given value
154 dimensioned(const dimensionSet& dims, const Type& val);
155
156 //- Construct from components (name, dimensions, value).
158 (
159 const word& name,
160 const dimensionSet& dims,
161 const Type& val
162 );
163
164 //- Copy construct dimensioned Type with a new name
165 dimensioned(const word& name, const dimensioned<Type>& dt);
166
167 //- Construct from primitive entry with given name.
168 // The entry may contain optional name and dimensions.
169 // \verbatim
170 // [name] [dims] value
171 // \endverbatim
172 // If the optional name is found, it is used for renaming.
173 // If the optional dimensions are present, they are read and
174 // used without further verification.
175 // If no dimensions are found, the quantity is dimensionless.
176 // Fatal if not primitiveEntry or if number of tokens is incorrect.
177 explicit dimensioned(const primitiveEntry& e);
178
179 //- Construct from primitive entry with given name and dimensions.
180 // The entry may contain optional name and dimensions.
181 // \verbatim
182 // [name] [dims] value
183 // \endverbatim
184 // If the optional name is found, it is used for renaming.
185 // If the optional dimensions are present, they are read and
186 // verified against the expected dimensions.
187 // Fatal if not primitiveEntry or if number of tokens is incorrect.
188 explicit dimensioned(const primitiveEntry& e, const dimensionSet& dims);
189
190 //- Construct from dictionary lookup with a given name.
191 // The entry may contain optional name and dimensions.
192 // \verbatim
193 // [name] [dims] value
194 // \endverbatim
195 // If the optional name is found, it is used for renaming.
196 // If the optional dimensions are present, they are read and
197 // used without further verification.
198 // If no dimensions are found, the quantity is dimensionless.
199 dimensioned(const word& name, const dictionary& dict);
200
201 //- Construct from dictionary lookup with a given name and dimensions.
202 // The entry may contain optional name and dimensions.
203 // \verbatim
204 // [name] [dims] value
205 // \endverbatim
206 // If the optional name is found, it is used for renaming.
207 // If the optional dimensions are present, they are read and
208 // verified against the expected dimensions.
210 (
211 const word& name,
212 const dimensionSet& dims,
213 const dictionary& dict
214 );
215
216 //- Construct from dictionary lookup with a given name and dimensions.
217 // The entry may contain optional name and dimensions.
218 // \verbatim
219 // [name] [dims] value
220 // \endverbatim
221 // If the optional name is found, it is used for renaming.
222 // If the optional dimensions are present, they are read and
223 // verified against the expected dimensions.
225 (
226 const word& name,
227 const dimensionSet& dims,
228 const dictionary& dict,
229 const word& entryName
230 );
231
232 //- Construct from components (name, dimensions, value) with
233 //- optional dictionary override.
234 // The entry may contain optional name and dimensions.
235 // \verbatim
236 // [name] [dims] value
237 // \endverbatim
239 (
240 const word& name,
241 const dimensionSet& dims,
242 const Type& val,
243 const dictionary& dict
244 );
245
246
247 // Static Member Functions
249 //- Construct dimensioned from dictionary, with default value.
250 // FatalIOError if there are excess tokens.
252 (
253 const word& name,
254 const dictionary& dict,
255 const dimensionSet& dims = dimless,
256 const Type& deflt = Type(Zero)
257 );
258
259 //- Construct dimensionless from dictionary, with default value.
260 // FatalIOError if it is found and there are excess tokens.
262 (
263 const word& name,
264 const dictionary& dict,
265 const Type& deflt = Type(Zero)
266 );
267
268 //- Construct dimensioned from dictionary, with default value.
269 // If the value is not found, it is added into the dictionary.
270 // FatalIOError if it is found and there are excess tokens.
272 (
273 const word& name,
275 const dimensionSet& dims = dimless,
276 const Type& deflt = Type(Zero)
277 );
278
279 //- Construct dimensionless from dictionary, with default value.
280 // If the value is not found, it is added into the dictionary.
281 // FatalIOError if it is found and there are excess tokens.
284 const word& name,
286 const Type& deflt = Type(Zero)
287 );
288
289
290 // Member Functions
291
292 //- Return const reference to name.
293 const word& name() const noexcept { return name_; }
294
295 //- Return non-const reference to name.
296 word& name() noexcept { return name_; }
297
298 //- Return const reference to dimensions.
299 const dimensionSet& dimensions() const noexcept { return dimensions_; }
300
301 //- Return non-const reference to dimensions.
302 dimensionSet& dimensions() noexcept { return dimensions_; }
303
304 //- Return const reference to value.
305 const Type& value() const noexcept { return value_; }
306
307 //- Return non-const reference to value.
308 Type& value() noexcept { return value_; }
309
310 //- Return a component as a dimensioned<cmptType>
313 //- Return a component with a dimensioned<cmptType>
314 void replace(const direction d, const dimensioned<cmptType>& dc);
315
316 //- Return transpose.
317 dimensioned<Type> T() const;
318
319 //- Update the value of dimensioned<Type>,
320 //- lookup in dictionary with the name().
321 bool read(const dictionary& dict);
322
323 //- Update the value of dimensioned<Type> if found in the dictionary,
324 //- lookup in dictionary with the name().
326
327 //- Update the value of dimensioned<Type>,
328 //- using an alternative entry name
329 bool read(const word& entryName, const dictionary& dict);
330
331 //- Update the value of dimensioned<Type> if found in the dictionary,
332 //- using an alternative entry name
333 bool readIfPresent(const word& entryName, const dictionary& dict);
334
335
336 // IO
337
338 //- Read (name, dimensions, value) from stream,
339 //- using units from system table.
340 // Optionally skip reading the name
341 Istream& read(Istream& is, const bool readName = true);
342
343 //- Read (name, dimensions, value) from stream,
344 //- using units from dictionary
345 Istream& read(Istream& is, const dictionary& readSet);
346
347 //- Read (name, dimensions, value) from stream,
348 //- using units from table
349 Istream& read(Istream& is, const HashTable<dimensionedScalar>& readSet);
350
351 //- Write as a dictionary entry with keyword.
352 // The name is not written when it is identical to keyword.
353 // The dimensions are always written.
354 void writeEntry(const word& keyword, Ostream& os) const;
355
356
357 // Member Operators
358
359 //- Return a component as a dimensioned<cmptType>
361
363 void operator-=(const dimensioned<Type>& dt);
364 void operator*=(const scalar s);
365 void operator/=(const scalar s);
366
368 // IOstream Operators
369
370 //- Read from stream. The name and dimensions are optional.
371 // If the optional dimensions are present,
372 // they are used without further verification.
373 friend Istream& operator>> <Type>
374 (
375 Istream& is,
377 );
378
379
380 // Housekeeping
381
382 //- Deprecated(2018-11) Construct from Istream
383 //- (expects name, dimensions, value)
384 // \deprecated(2018-11) - should generally use construct from
385 // dictionary or primitiveEntry instead
386 // (additional checks on the input stream).
387 FOAM_DEPRECATED_FOR(2018-11, "construct from dictionary or entry")
388 explicit dimensioned(Istream& is);
389
390 //- Deprecated(2018-11) Construct from Istream with given name
391 //- (expects dimensions, value)
392 // \deprecated(2018-11) - should generally use construct from
393 // dictionary or primitiveEntry instead
394 // (additional checks on the input stream).
395 FOAM_DEPRECATED_FOR(2018-11, "construct from dictionary or entry")
396 dimensioned(const word& name, Istream& is);
397
398 //- Deprecated(2018-11) Construct from Istream with given name
399 //- and expected dimensions.
400 // Expects value, but supports optional name and dimensions.
401 // If the optional dimensions are present, they are read and
402 // verified against the expected dimensions.
403 // \deprecated(2018-11) - should generally use construct from
404 // dictionary or primitiveEntry instead
405 // (additional checks on the input stream).
406 FOAM_DEPRECATED_FOR(2018-11, "construct from dictionary or entry")
407 dimensioned(const word& name, const dimensionSet& dims, Istream& is);
408
409 //- Same as getOrDefault()
410 FOAM_DEPRECATED_STRICT(2019-06, "getOrDefault()")
411 static dimensioned<Type> lookupOrDefault
412 (
413 const word& name,
414 const dictionary& dict,
415 const dimensionSet& dims = dimless,
416 const Type& deflt = Type(Zero)
417 )
418 {
419 return getOrDefault(name, dict, dims, deflt);
420 }
421
422 //- Same as getOrDefault()
423 FOAM_DEPRECATED_STRICT(2019-06, "getOrDefault()")
424 static dimensioned<Type> lookupOrDefault
425 (
426 const word& name,
428 const Type& deflt = Type(Zero)
429 )
430 {
431 return getOrDefault(name, dict, deflt);
432 }
434 //- Same as getOrAddToDict()
435 FOAM_DEPRECATED_STRICT(2019-06, "getOrAddToDict()")
436 static dimensioned<Type> lookupOrAddToDict
437 (
438 const word& name,
440 const dimensionSet& dims = dimless,
441 const Type& deflt = Type(Zero)
442 )
443 {
444 return getOrAddToDict(name, dict, dims, deflt);
445 }
446
447 //- Same as getOrAddToDict()
448 FOAM_DEPRECATED_STRICT(2019-06, "getOrAddToDict()")
449 static dimensioned<Type> lookupOrAddToDict
450 (
451 const word& name,
453 const Type& deflt = Type(Zero)
454 )
456 return getOrAddToDict(name, dict, deflt);
460 // Expression templates
461
462 //- Wrap value as constant-value List expression
463 auto expr(const label size) const
464 {
465 return Expression::UniformListWrap<Type>(size, value_);
466 }
467
468 //- Wrap value as constant-value GeometricField expression. Supplied
469 // fields is used for sizing only and needs to be valid at time of
470 // evaluation.
471 template<class GeoField>
472 auto expr(const GeoField& fld) const
473 {
475 (
476 fld,
477 *this
478 );
479 }
480};
481
482
483// * * * * * * * * * * * * * * * Global Operators * * * * * * * * * * * * * //
484
485//- Output operator
486template<class Type>
487Ostream& operator<<(Ostream& os, const dimensioned<Type>& dt);
488
489template<class Type, direction r>
491pow
492(
493 const dimensioned<Type>&,
496);
497
498template<class Type>
501
502template<class Type>
504magSqr(const dimensioned<Type>& dt);
505
506template<class Type>
508mag(const dimensioned<Type>& dt);
509
510template<class Type>
512(
513 const dimensioned<Type>&,
515);
516
517template<class Type>
519(
521 const dimensioned<Type>&
522);
523
524template<class Type>
526
527template<class Type>
529
530template<class Type>
532(
533 const dimensioned<Type>& a,
534 const dimensioned<Type>& b,
535 const scalar t
536);
537
538template<class Type>
540
541template<class Type>
543
544template<class Type>
546
547template<class Type>
550template<class Type>
552
553template<class Type>
554dimensioned<Type> operator*
555(
556 const dimensioned<scalar>&,
557 const dimensioned<Type>&
558);
559
560template<class Type>
561dimensioned<Type> operator/
562(
563 const dimensioned<Type>&,
565);
566
567
568#define PRODUCT_OPERATOR(product, op, opFunc) \
569 \
570template<class Type1, class Type2> \
571dimensioned<typename product<Type1, Type2>::type> \
572operator op(const dimensioned<Type1>&, const dimensioned<Type2>&); \
573 \
574template<class Type, class Form, class Cmpt, direction nCmpt> \
575dimensioned<typename product<Type, Form>::type> \
576operator op \
577( \
578 const dimensioned<Type>&, \
579 const VectorSpace<Form,Cmpt,nCmpt>& \
580); \
581 \
582template<class Type, class Form, class Cmpt, direction nCmpt> \
583dimensioned<typename product<Form, Type>::type> \
584operator op \
585( \
586 const VectorSpace<Form,Cmpt,nCmpt>&, \
587 const dimensioned<Type>& \
588);
589
594
595#undef PRODUCT_OPERATOR
596
597
598// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
599
600} // End namespace Foam
601
602// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
603
604#ifdef NoRepository
605 #include "dimensionedType.C"
606#endif
607
608// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
610#endif
611
612// ************************************************************************* //
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Expression wrap of a List with a uniform value.
A HashTable similar to std::unordered_map.
Definition HashTable.H:124
readOption
Enumeration defining read preferences.
@ MUST_READ
Reading required.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition Istream.H:60
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
Generic dimensioned Type class.
bool read(const word &entryName, const dictionary &dict)
Update the value of dimensioned<Type>, using an alternative entry name.
dimensioned< cmptType > component(const direction d) const
Return a component as a dimensioned<cmptType>.
dimensionSet & dimensions() noexcept
Return non-const reference to dimensions.
word & name() noexcept
Return non-const reference to name.
void replace(const direction d, const dimensioned< cmptType > &dc)
Return a component with a dimensioned<cmptType>.
void operator*=(const scalar s)
dimensioned(const word &name, const dimensionSet &dims, const Type &val, const dictionary &dict)
Construct from components (name, dimensions, value) with optional dictionary override.
void operator-=(const dimensioned< Type > &dt)
static dimensioned< Type > getOrDefault(const word &name, const dictionary &dict, const Type &deflt=Type(Zero))
Construct dimensionless from dictionary, with default value.
dimensioned()
A dimensionless Zero, named "0".
dimensioned(const primitiveEntry &e, const dimensionSet &dims)
Construct from primitive entry with given name and dimensions.
dimensioned(const Type &val)
Implicit construct dimensionless from given value.
dimensioned(const dimensionSet &dims)
A dimensioned Zero, named "0".
dimensioned(const word &name, const dimensionSet &dims, const dictionary &dict, const word &entryName)
Construct from dictionary lookup with a given name and dimensions.
static dimensioned< label > lookupOrAddToDict(const word &name, dictionary &dict, const dimensionSet &dims=dimless, const label &deflt=label(Zero))
dimensioned(const dimensionSet &dims, const Type &val)
Construct dimensioned from given value.
Istream & read(Istream &is, const bool readName=true)
Read (name, dimensions, value) from stream, using units from system table.
dimensioned< cmptType > operator[](const direction d) const
Return a component as a dimensioned<cmptType>.
dimensioned(const word &name, const dimensioned< Type > &dt)
Copy construct dimensioned Type with a new name.
bool readIfPresent(const word &entryName, const dictionary &dict)
Update the value of dimensioned<Type> if found in the dictionary, using an alternative entry name.
bool read(const dictionary &dict)
Update the value of dimensioned<Type>, lookup in dictionary with the name().
auto expr(const label size) const
Wrap value as constant-value List expression.
const dimensionSet & dimensions() const noexcept
Return const reference to dimensions.
pTraits< label >::cmptType cmptType
dimensioned(const word &name, const dimensionSet &dims, const dictionary &dict)
Construct from dictionary lookup with a given name and dimensions.
void writeEntry(const word &keyword, Ostream &os) const
Write as a dictionary entry with keyword.
static dimensioned< Type > getOrAddToDict(const word &name, dictionary &dict, const Type &deflt=Type(Zero))
Construct dimensionless from dictionary, with default value.
auto expr(const GeoField &fld) const
Wrap value as constant-value GeometricField expression. Supplied.
dimensioned< Type > T() const
Return transpose.
dimensioned(const dimensionSet &dims, const Foam::one)
A dimensioned pTraits::one, named "1".
const word & name() const noexcept
dimensioned(const word &name, const dictionary &dict)
Construct from dictionary lookup with a given name.
Istream & read(Istream &is, const HashTable< dimensionedScalar > &readSet)
Read (name, dimensions, value) from stream, using units from table.
dimensioned(const dimensionSet &dims, const Foam::zero)
A dimensioned Zero, named "0".
Type & value() noexcept
Return non-const reference to value.
dimensioned(const primitiveEntry &e)
Construct from primitive entry with given name.
bool readIfPresent(const dictionary &dict)
Update the value of dimensioned<Type> if found in the dictionary, lookup in dictionary with the name(...
static dimensioned< label > lookupOrDefault(const word &name, const dictionary &dict, const dimensionSet &dims=dimless, const label &deflt=label(Zero))
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.
dimensioned(const word &name, const dimensionSet &dims, const Type &val)
Construct from components (name, dimensions, value).
void operator+=(const dimensioned< Type > &dt)
Istream & read(Istream &is, const dictionary &readSet)
Read (name, dimensions, value) from stream, using units from dictionary.
void operator/=(const scalar s)
const Type & value() const noexcept
Return const reference to value.
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.
option
Enumeration for the data type and search/match modes (bitmask).
Definition keyType.H:80
@ REGEX
Regular expression.
Definition keyType.H:83
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Definition one.H:57
A traits class, which is primarily used for primitives and vector-space.
Definition pTraits.H:64
symmTypeOfRank< typenamepTraits< arg1 >::cmptType, arg2 *direction(pTraits< arg1 >::rank)>::type type
Definition products.H:176
A keyword and a list of tokens comprise a primitiveEntry. A primitiveEntry can be read,...
A class for handling words, derived from Foam::string.
Definition word.H:66
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
#define PRODUCT_OPERATOR(product, op, opFunc)
Direction is an 8-bit unsigned integer type used to represent Cartesian directions,...
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))
A namespace for expression templates.
Namespace for OpenFOAM.
tmp< faMatrix< Type > > operator-(const faMatrix< Type > &)
Unary negation.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
Definition hashSets.C:40
const dimensionSet dimless
Dimensionless.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
tmp< faMatrix< Type > > operator+(const faMatrix< Type > &, const faMatrix< Type > &)
dimensioned< Type > cmptDivide(const dimensioned< Type > &, const dimensioned< Type > &)
void dot(FieldField< Field1, typename innerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
static bool checkDims(const char *what, const dimensionSet &a, const dimensionSet &b)
Istream & operator>>(Istream &, directionInfo &)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
Definition hashSets.C:26
uint8_t direction
Definition direction.H:49
static constexpr const zero Zero
Global zero (0).
Definition zero.H:127
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
const direction noexcept
Definition scalarImpl.H:265
bool operator<(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A older than B.
void dotdot(FieldField< Field1, typename scalarProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
Definition exprTraits.C:127
void cross(FieldField< Field1, typename crossProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
Definition NamedEnum.H:66
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)
void outer(FieldField< Field1, typename outerProduct< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
bool operator>(const IOstreamOption::versionNumber &a, const IOstreamOption::versionNumber &b) noexcept
Version A newer than B.
dimensioned< Type > lerp(const dimensioned< Type > &a, const dimensioned< Type > &b, const scalar t)
dictionary dict
volScalarField & b
volScalarField & e
#define FOAM_DEPRECATED_FOR(since, replacement)
Definition stdFoam.H:43
#define FOAM_DEPRECATED_STRICT(since, replacement)
Definition stdFoam.H:53