exprResult.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) 2012-2018 Bernhard Gschaider <bgschaid@hfd-research.com>
9  Copyright (C) 2019-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::expressions::exprResult
29 
30 Description
31  A polymorphic field/result from evaluating an expression
32 
33  \heading Dictionary parameters
34  \table
35  Property | Description | Required | Default
36  resultType | The type of result | no | exprResult
37  unsetValue | Create without reading the dictionary | no | false
38  noReset | Suppress reset on time | no | false
39  \endtable
40 
41  When creating with values
42  \table
43  Property | Description | Required | Default
44  valueType | Result value type (scalar, vector,..) | yes |
45  isSingleValue | A single field value | no | false
46  isPointValue | Interpret values as point values | no | false
47  value | The field values | yes |
48  fieldSize | The size of the field (when not single-value) | no |
49  \endtable
50 
51 SourceFiles
52  exprResult.C
53  exprResultI.H
54 
55 \*---------------------------------------------------------------------------*/
56 
57 #ifndef expressions_exprResult_H
58 #define expressions_exprResult_H
59 
60 #include "vector.H"
61 #include "tensor.H"
62 #include "sphericalTensor.H"
63 #include "symmTensor.H"
64 #include "dimensionedType.H"
65 #include "IOField.H"
66 #include "runTimeSelectionTables.H"
67 
68 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
69 
70 namespace Foam
71 {
72 namespace expressions
73 {
74 
75 /*---------------------------------------------------------------------------*\
76  Class exprResult Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 class exprResult
80 :
81  public refCount
82 {
83  // Private Data
84 
85  //- The value type as string,
86  //- normally corresponds to pTraits or typeName
87  word valType_;
88 
89  //- Is single, uniform value (can be a non-field)
90  bool isUniform_;
91 
92  //- Represents point data
93  bool isPointData_;
94 
95  //- Whether or not the variable will be reset
96  bool noReset_;
97 
98  //- Allow override of noReset_, but only accessible for subclasses
99  bool needsReset_;
100 
101  //- Size (length) of field or object
102  label size_;
103 
104  //- A %union of single values, including standard VectorSpace types
105  union singleValue
106  {
107  bool bool_;
108  label label_;
109  scalar scalar_;
110  vector vector_;
111  tensor tensor_;
112  symmTensor symmTensor_;
113  sphericalTensor sphTensor_;
114 
115  //- Default construct, zero-initialized
116  singleValue();
117 
118  //- Copy construct
119  singleValue(const singleValue& val);
120 
121  //- Copy assignment
122  void operator=(const singleValue& val);
123 
124  //- Return current value for specified type.
125  template<class T>
126  inline const T& get() const
127  {
129  << "Not implemented for type "
130  << pTraits<T>::typeName << nl;
131  return pTraits<T>::zero;
132  }
133 
134  //- Set new value for specified type.
135  // \return updated value
136  template<class T>
137  inline const T& set(const T& val)
138  {
140  << "Not implemented for type "
141  << pTraits<T>::typeName << nl;
142  return val;
143  }
144  };
145 
146  //- The single value representation
147  singleValue single_;
148 
149  //- Allocated plain field (eg, scalarField)
150  void *fieldPtr_;
151 
152  //- Alternative storage for non-plain fields (eg, volScalarField)
153  autoPtr<regIOobject> objectPtr_;
154 
155 
156  // Private Member Functions
157 
158  //- Type-checked deletion of the value pointer.
159  // \return True if the type check was satisfied
160  template<class Type>
161  inline bool deleteChecked();
162 
163  //- Dispatch to type-checked pointer deletion
164  void uglyDelete();
165 
166  //- Type-checked creation of field from dictionary
167  // \return True if the type check was satisfied
168  template<class Type>
169  inline bool readChecked
170  (
171  const word& key,
172  const dictionary& dict,
173  const label len,
174  const bool uniform
175  );
176 
177  //- Type-checked retrieval of uniform field from current results
178  // \return True if the type check was satisfied
179  template<class Type>
180  bool getUniformChecked
181  (
182  exprResult& result,
183  const label size,
184  const bool noWarn,
185  const bool parRun
186  ) const;
187 
188  //- Type-checked retrieval of \c bool uniform field from current result
189  // \return True if the type check was satisfied
190  bool getUniformCheckedBool
191  (
192  exprResult& result,
193  const label size,
194  const bool noWarn,
195  const bool parRun
196  ) const;
197 
198  //- Type-checked determination of centre value (min/max)
199  // \return True if the type check was satisfied
200  template<class Type>
201  bool setAverageValueChecked(const bool parRun = Pstream::parRun());
202 
203  //- Type-checked determination of average bool value
204  // \return True if the type check was satisfied
205  bool setAverageValueCheckedBool(const bool parRun = Pstream::parRun());
206 
207  //- Type-checked copy of field
208  // \return True if the type check was satisfied
209  template<class Type>
210  bool duplicateFieldChecked(const void* ptr);
211 
212  //- Type-checked writing of the single value (uniform) entry
213  // \return True if the type check was satisfied
214  template<class Type>
215  bool writeSingleValueChecked(Ostream& os) const;
216 
217  //- Type-checked writing of "value" field entry
218  // \return True if the type check was satisfied
219  template<class Type>
220  bool writeValueFieldChecked(Ostream& os) const;
221 
222  //- Type-checked forwarding to Field::writeEntry
223  // \return True if the type check was satisfied
224  template<class Type>
225  bool writeEntryChecked(const word& keyword, Ostream& os) const;
226 
227  //- Type-checked field addition with another expression field
228  // \return True if the type check was satisfied
229  template<class Type>
230  bool plusEqChecked(const exprResult& b);
231 
232  //- Type-checked field multiplication with a scalar
233  // \return True if the type check was satisfied
234  template<class Type>
235  bool multiplyEqChecked(const scalar& b);
236 
237 
238  template<class Type>
239  inline void setResultImpl(Field<Type>*, bool wantPointData=false);
240 
241  template<class Type>
242  inline void setResultImpl(const Field<Type>&, bool wantPointData=false);
243 
244  template<class Type>
245  inline void setResultImpl(Field<Type>&&, bool wantPointData=false);
246 
247  template<class Type>
248  inline void setResultImpl(const Type& val, const label len);
249 
250  template<class Type>
251  inline void setSingleValueImpl(const Type& val);
252 
253  template<class Type>
254  inline void setObjectResultImpl(Type* ptr);
255 
256 
257 protected:
258 
259  // Protected Member Functions
260 
261  //- Simulate virtual templated methods
262  inline virtual expressions::exprResult& target() { return *this; }
263 
264  //- Reset at new timestep according to the derived class type
265  virtual void resetImpl();
266 
267  //- Reset at new timestep according to type
268  // \return true if it was actually reset
269  bool reset(bool force=false);
270 
271  //- Adjusts the internal needsReset value
272  void needsReset(bool val) { needsReset_ = val; }
273 
274 
275 public:
276 
277  //- An empty result
278  static const exprResult null;
279 
280  //- Friendship with globals
281  friend class exprResultGlobals;
282 
283 
284  //- Runtime type information
285  TypeName("exprResult");
286 
288  (
289  autoPtr,
290  exprResult,
291  dictionary,
292  (
293  const dictionary& dict
294  ),
295  (dict)
296  );
298  (
299  autoPtr,
300  exprResult,
301  empty,
302  (),
303  ()
304  );
305 
306 
307  // Constructors
308 
309  //- Default construct
310  exprResult();
311 
312  //- Copy construct
313  exprResult(const exprResult& expr);
314 
315  //- Move construct
316  exprResult(exprResult&& expr);
317 
318  //- Construct from a dictionary
319  explicit exprResult
320  (
321  const dictionary& dict,
322  const bool uniform = false,
323  const bool needsValue = false
324  );
325 
326  //- Construct by copying a field
327  template<class Type>
328  explicit exprResult(const Field<Type>& fld);
329 
330  //- Construct by moving a field
331  template<class Type>
332  explicit exprResult(Field<Type>&& fld);
333 
334  //- Construct for an IOobject
335  template<class Type>
336  explicit exprResult(autoPtr<Type>&& obj);
337 
338  //- Construct from a dimensioned value
339  template<class Type>
340  explicit exprResult(const dimensioned<Type>& dt);
341 
342  #undef exprResult_Construct
343  #define exprResult_Construct(Type) \
344  \
345  explicit exprResult(const Type& val) : exprResult() \
346  { \
347  setSingleValue(val); \
348  }
349 
350  exprResult_Construct(bool);
351  exprResult_Construct(scalar);
356 
357  #undef exprResult_Construct
358 
359 
360  // Selectors
361 
362  //- Return a reference to the selected value driver
363  static autoPtr<exprResult> New(const dictionary& dict);
364 
365  //- Clone
366  virtual autoPtr<exprResult> clone() const
367  {
368  return autoPtr<exprResult>::New(*this);
369  }
370 
371 
372  //- Destructor
373  virtual ~exprResult();
374 
375 
376  // Member Functions
377 
378  // Access
379 
380  //- Has a value?
381  inline bool hasValue() const;
382 
383  //- Basic type for the field or single value
384  inline const word& valueType() const;
385 
386  //- True if representing point data,
387  //- or test for same value as wantPointData argument
388  inline bool isPointData(const bool wantPointData=true) const;
389 
390  //- True if single, uniform value
391  inline bool isUniform() const;
392 
393  //- True if valueType corresponds to the given Type
394  template<class Type>
395  inline bool isType() const;
396 
397  //- Return a single value when isUniform() is true,
398  //- or Zero when it is non-uniform or if the type mismatches,
399  //- which means that it can generally be considered as failsafe.
400  template<class Type>
401  inline Type getValue() const;
402 
403  //- True if valueType is a bool
404  inline bool isBool() const;
405 
406  //- True if the object pointer is being used
407  inline bool isObject() const;
408 
409  //- The field or object size
410  inline label size() const;
411 
412  //- The address of the field data content.
413  // Fatal for unknown types.
414  // Used, for example, for python integration
415  const void* dataAddress() const;
416 
417 
418  // Edit
419 
420  //- Clear (zero) the result
421  void clear();
422 
423  //- Change reset behaviour
424  void noReset() { noReset_ = true; }
425 
426  //- Change reset behaviour
427  void allowReset() { noReset_ = false; }
428 
429  //- Test if field corresponds to a single-value and thus uniform.
430  // Uses field min/max to establish uniformity.
431  // Test afterwards with isUniform()
432  void testIfSingleValue(const bool parRun = Pstream::parRun());
433 
434 
435  // Set results
436 
437  //- Set result field, taking ownership of the pointer
438  template<class Type>
439  inline void setResult(Field<Type>*, bool wantPointData=false);
440 
441  //- Set result field, taking copy of the field contents
442  template<class Type>
443  inline void setResult(const Field<Type>&, bool wantPointData=false);
444 
445  //- Set result field, moving field contents
446  template<class Type>
447  inline void setResult(Field<Type>&&, bool wantPointData=false);
448 
449  //- Set uniform result field of given size
450  template<class Type>
451  inline void setResult(const Type& val, const label size);
452 
453  //- Set single-value uniform result
454  template<class Type>
455  inline void setSingleValue(const Type& val);
456 
457  //- Set result object
458  template<class Type>
459  inline void setObjectResult(autoPtr<Type>&& obj);
460 
461 
462  // Access/Get results
463 
464  //- Return const reference to the field
465  template<class Type>
466  inline const Field<Type>& cref() const;
467 
468  //- Return non-const reference to the field
469  template<class Type>
470  inline Field<Type>& ref();
471 
472  //- Return non-const reference to the field, casting away constness
473  template<class Type>
474  inline Field<Type>& getRef() const;
475 
476  //- Return tmp field of the contents,
477  //- optionally keeping a copy in cache
478  template<class Type>
479  inline tmp<Field<Type>> getResult(bool cacheCopy=false);
480 
481  //- Get object result (Caution - potentially fragile)
482  //- optionally keeping a copy in cache
483  template<class Type>
484  inline tmp<Type> getObjectResult(bool cacheCopy=false);
485 
486  //- Construct a uniform field from the current results
487  // Uses the field average. Optionally warning if the min/max
488  // deviation is larger than SMALL.
490  (
491  const label size,
492  const bool noWarn,
493  const bool parRun = Pstream::parRun()
494  ) const;
495 
496  //- Get a reduced result
497  template<template<class> class BinaryOp, class Type>
498  inline Type getReduced
499  (
500  const BinaryOp<Type>& bop,
501  const Type& initial = pTraits<Type>::zero
502  );
503 
504 
505  // Write
506 
507  //- Forwarding to Field::writeEntry
508  void writeEntry(const word& keyword, Ostream& os) const;
509 
510  //- Write entry as dictionary contents
511  void writeDict(Ostream& os, const bool subDict=true) const;
512 
513  //- Write the single value, or the first value from field
514  void writeValue(Ostream& os) const;
515 
516 
517  // Member Operators
518 
519  //- Copy assignment
520  virtual void operator=(const exprResult& rhs);
521 
522  //- Move assignment
523  virtual void operator=(exprResult&& rhs);
524 
525 
526  //- Scalar multiplication
527  exprResult& operator*=(const scalar& b);
528 
529  //- Addition of results
531 };
532 
533 
534 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
535 
536 } // End namespace expressions
537 
538 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
539 
540 // Operators
541 
542 expressions::exprResult operator*
543 (
544  const scalar& a,
546 );
547 expressions::exprResult operator*
548 (
549  const expressions::exprResult& a,
550  const scalar& b
551 );
552 expressions::exprResult operator+
553 (
554  const expressions::exprResult& a,
556 );
557 
558 
559 // IO Operator
562 
563 
564 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
565 
566 } // End namespace Foam
567 
568 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
569 
570 #include "exprResultI.H"
571 
572 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
573 
574 #endif
575 
576 // ************************************************************************* //
Foam::autoPtr::New
static autoPtr< T > New(Args &&... args)
Construct autoPtr of T with forwarding arguments.
Foam::Tensor< scalar >
Foam::sphericalTensor
SphericalTensor< scalar > sphericalTensor
SphericalTensor of scalars, i.e. SphericalTensor<scalar>.
Definition: sphericalTensor.H:54
Foam::expressions::exprResult::isObject
bool isObject() const
True if the object pointer is being used.
Definition: exprResultI.H:289
Foam::SymmTensor< scalar >
Foam::BitOps::set
void set(List< bool > &bools, const labelRange &range)
Set the specified range 'on' in a boolList.
Definition: BitOps.C:37
Foam::expressions::exprResult::writeDict
void writeDict(Ostream &os, const bool subDict=true) const
Write entry as dictionary contents.
Definition: exprResult.C:584
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::expressions::exprResult::size
label size() const
The field or object size.
Definition: exprResultI.H:295
Foam::expressions::exprResult::getReduced
Type getReduced(const BinaryOp< Type > &bop, const Type &initial=pTraits< Type >::zero)
Get a reduced result.
Definition: exprResultI.H:782
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::refCount
Reference counter for various OpenFOAM components.
Definition: refCount.H:50
Foam::expressions::exprResult::isPointData
bool isPointData(const bool wantPointData=true) const
Definition: exprResultI.H:250
Foam::expressions::exprResult::testIfSingleValue
void testIfSingleValue(const bool parRun=Pstream::parRun())
Test if field corresponds to a single-value and thus uniform.
Definition: exprResult.C:462
Foam::expressions::exprResult::TypeName
TypeName("exprResult")
Runtime type information.
Foam::expressions::exprResult::valueType
const word & valueType() const
Basic type for the field or single value.
Definition: exprResultI.H:243
Foam::expressions::exprResult::getResult
tmp< Field< Type > > getResult(bool cacheCopy=false)
Foam::UPstream::parRun
static bool & parRun()
Test if this a parallel run, or allow modify access.
Definition: UPstream.H:434
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:230
Foam::expressions::exprResult::isBool
bool isBool() const
True if valueType is a bool.
Definition: exprResultI.H:283
tensor.H
Foam::expressions::exprResult::operator=
virtual void operator=(const exprResult &rhs)
Copy assignment.
Definition: exprResult.C:489
sphericalTensor.H
Foam::expressions::exprResult::reset
bool reset(bool force=false)
Reset at new timestep according to type.
Definition: exprResult.C:374
Foam::expressions::exprResult::operator+=
exprResult & operator+=(const exprResult &b)
Addition of results.
Definition: exprResult.C:717
Foam::expressions::exprResult::setObjectResult
void setObjectResult(autoPtr< Type > &&obj)
Set result object.
Definition: exprResultI.H:372
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Definition: boundaryPatch.C:83
Foam::uniform
Definition: uniform.H:50
Foam::expressions::exprResult::noReset
void noReset()
Change reset behaviour.
Definition: exprResult.H:473
exprResultI.H
Foam::expressions::exprResult
A polymorphic field/result from evaluating an expression.
Definition: exprResult.H:128
Foam::constant::physicoChemical::b
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
Definition: createFields.H:27
symmTensor.H
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::expressions::exprResult::New
static autoPtr< exprResult > New(const dictionary &dict)
Return a reference to the selected value driver.
Definition: exprResult.C:305
Foam::expressions::exprResult::ref
Field< Type > & ref()
Return non-const reference to the field.
Foam::T
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Definition: FieldFieldFunctions.C:58
Foam::expressions::exprResult::writeValue
void writeValue(Ostream &os) const
Write the single value, or the first value from field.
Definition: exprResult.C:642
Foam::expressions::exprResult::setSingleValue
void setSingleValue(const Type &val)
Set single-value uniform result.
Definition: exprResultI.H:461
Foam::symmTensor
SymmTensor< scalar > symmTensor
SymmTensor of scalars, i.e. SymmTensor<scalar>.
Definition: symmTensor.H:59
Foam::expressions::exprResultGlobals
A globally available registry of expression results. These are currently registered on Time (may chan...
Definition: exprResultGlobals.H:61
fld
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;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Definition: gmvOutputLagrangian.H:23
Foam::expressions::exprResult::getObjectResult
tmp< Type > getObjectResult(bool cacheCopy=false)
Foam::expressions::exprResult::hasValue
bool hasValue() const
Has a value?
Definition: exprResultI.H:237
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::expressions::exprResult::isUniform
bool isUniform() const
True if single, uniform value.
Definition: exprResultI.H:258
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
Foam::expressions::exprResult::resetImpl
virtual void resetImpl()
Reset at new timestep according to the derived class type.
Definition: exprResult.C:368
Foam::expressions::exprResult::needsReset
void needsReset(bool val)
Adjusts the internal needsReset value.
Definition: exprResult.H:321
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:43
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::expressions::exprResult::exprResultGlobals
friend class exprResultGlobals
Friendship with globals.
Definition: exprResult.H:330
Foam::expressions::exprResult::cref
const Field< Type > & cref() const
Return const reference to the field.
Foam::expressions::exprResult::isType
bool isType() const
True if valueType corresponds to the given Type.
Definition: exprResultI.H:265
Foam::vector
Vector< scalar > vector
A scalar version of the templated Vector.
Definition: vector.H:51
Foam::SphericalTensor< scalar >
Foam::expressions::exprResult::getRef
Field< Type > & getRef() const
Return non-const reference to the field, casting away constness.
Foam::expressions::exprResult::getUniform
exprResult getUniform(const label size, const bool noWarn, const bool parRun=Pstream::parRun()) const
Construct a uniform field from the current results.
Definition: exprResult.C:427
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::expressions::exprResult::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, exprResult, dictionary,(const dictionary &dict),(dict))
Foam::expressions::exprResult::exprResult
exprResult()
Default construct.
Definition: exprResult.C:205
Foam::nl
constexpr char nl
Definition: Ostream.H:385
Foam::expressions::exprResult::clear
void clear()
Clear (zero) the result.
Definition: exprResult.C:386
IOField.H
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::Vector< scalar >
Foam::expressions::exprResult::allowReset
void allowReset()
Change reset behaviour.
Definition: exprResult.H:476
Foam::expressions::exprResult::target
virtual expressions::exprResult & target()
Simulate virtual templated methods.
Definition: exprResult.H:311
Foam::pTraits
Traits class for primitives.
Definition: pTraits.H:54
Foam::expressions::exprResult::writeEntry
void writeEntry(const word &keyword, Ostream &os) const
Forwarding to Field::writeEntry.
Definition: exprResult.C:560
Foam::expressions::exprResult::~exprResult
virtual ~exprResult()
Destructor.
Definition: exprResult.C:358
Foam::expressions::exprResult::operator*=
exprResult & operator*=(const scalar &b)
Scalar multiplication.
Definition: exprResult.C:676
vector.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
exprResult_Construct
#define exprResult_Construct(Type)
Definition: exprResult.H:392
Foam::expressions::exprResult::setResult
void setResult(Field< Type > *, bool wantPointData=false)
Set result field, taking ownership of the pointer.
Definition: exprResultI.H:397
Foam::expressions::exprResult::clone
virtual autoPtr< exprResult > clone() const
Clone.
Definition: exprResult.H:415
Foam::expressions::exprResult::getValue
Type getValue() const
Definition: exprResultI.H:272
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:303
Foam::tensor
Tensor< scalar > tensor
Tensor of scalars, i.e. Tensor<scalar>.
Definition: symmTensor.H:61
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:55
dimensionedType.H
Foam::expressions::exprResult::dataAddress
const void * dataAddress() const
The address of the field data content.
Definition: exprResult.C:828