DimensionedField.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2026 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 \*---------------------------------------------------------------------------*/
25 
26 #include "DimensionedField.H"
27 #include "dimensionedType.H"
28 #include "Time.H"
29 
30 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
31 
32 namespace Foam
33 {
34 
35 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
36 
37 #define checkFieldAssignment(df1, df2) \
38  \
39  if \
40  ( \
41  static_cast<const regIOobject*>(&df1) \
42  == static_cast<const regIOobject*>(&df2) \
43  ) \
44  { \
45  FatalErrorInFunction \
46  << "attempted assignment to self for field " \
47  << (df1).name() << abort(FatalError); \
48  }
49 
50 
51 #define checkFieldOperation(df1, df2, op) \
52  \
53  if (&(df1).mesh() != &(df2).mesh()) \
54  { \
55  FatalErrorInFunction \
56  << "different mesh for fields " \
57  << (df1).name() << " and " << (df2).name() \
58  << " during operation " << op \
59  << abort(FatalError); \
60  }
61 
62 
63 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
64 
65 template<class Type, class GeoMesh, template<class> class PrimitiveField>
67 (
68  const IOobject& io,
69  const GeoMesh& mesh,
70  const dimensionSet& dims,
71  const PrimitiveField<Type>& field
72 )
73 :
74  regIOobject(io),
75  PrimitiveField<Type>(field),
77  mesh_(mesh),
78  dimensions_(dims)
79 {
80  if (field.size() && field.size() != mesh.size())
81  {
83  << "size of field = " << field.size()
84  << " is not the same as the size of mesh = "
85  << mesh.size()
86  << abort(FatalError);
87  }
88 }
89 
90 
91 template<class Type, class GeoMesh, template<class> class PrimitiveField>
93 (
94  const IOobject& io,
95  const GeoMesh& mesh,
96  const dimensionSet& dims,
97  const tmp<PrimitiveField<Type>>& tfield
98 )
99 :
100  regIOobject(io),
101  PrimitiveField<Type>(tfield),
103  mesh_(mesh),
104  dimensions_(dims)
105 {
106  if (this->size() && this->size() != mesh.size())
107  {
109  << "size of field = " << this->size()
110  << " is not the same as the size of mesh = "
111  << mesh.size()
112  << abort(FatalError);
113  }
114 }
115 
116 
117 template<class Type, class GeoMesh, template<class> class PrimitiveField>
119 (
120  const IOobject& io,
121  const GeoMesh& mesh,
122  const dimensionSet& dims,
123  const bool checkIOFlags
124 )
125 :
126  regIOobject(io),
127  PrimitiveField<Type>(mesh.size()),
129  mesh_(mesh),
130  dimensions_(dims)
131 {
132  // Expand dynamic primitive fields to their full size
134 
135  if (checkIOFlags)
136  {
137  readIfPresent();
138  }
139 }
140 
141 
142 template<class Type, class GeoMesh, template<class> class PrimitiveField>
144 (
145  const IOobject& io,
146  const GeoMesh& mesh,
147  const dimensioned<Type>& dt,
148  const bool checkIOFlags
149 )
150 :
151  regIOobject(io),
152  PrimitiveField<Type>(mesh.size(), dt.value()),
154  mesh_(mesh),
155  dimensions_(dt.dimensions())
156 {
157  if (checkIOFlags)
158  {
159  readIfPresent();
160  }
161 }
162 
163 
164 template<class Type, class GeoMesh, template<class> class PrimitiveField>
166 (
168 )
169 :
170  regIOobject(df),
171  PrimitiveField<Type>(df),
173  mesh_(df.mesh_),
174  dimensions_(df.dimensions_)
175 {}
176 
177 
178 template<class Type, class GeoMesh, template<class> class PrimitiveField>
180 (
182 )
183 :
184  regIOobject(move(df)),
185  PrimitiveField<Type>(move(df)),
186  OldTimeField<DimensionedField>(move(df)),
187  mesh_(df.mesh_),
188  dimensions_(move(df.dimensions_))
189 {}
190 
191 
192 template<class Type, class GeoMesh, template<class> class PrimitiveField>
193 template<template<class> class PrimitiveField2>
195 (
197 )
198 :
199  regIOobject(df),
200  PrimitiveField<Type>(df),
202  mesh_(df.mesh()),
203  dimensions_(df.dimensions())
204 {}
205 
206 
207 template<class Type, class GeoMesh, template<class> class PrimitiveField>
208 template<template<class> class PrimitiveField2>
210 (
212  const bool reuse
213 )
214 :
215  regIOobject(df, reuse),
216  PrimitiveField<Type>(df, reuse),
218  mesh_(df.mesh()),
219  dimensions_(df.dimensions())
220 {}
221 
222 
223 template<class Type, class GeoMesh, template<class> class PrimitiveField>
225 (
227 )
228 :
229  regIOobject(tdf(), tdf.isTmp()),
230  PrimitiveField<Type>
231  (
233  tdf.isTmp()
234  ),
236  mesh_(tdf().mesh_),
237  dimensions_(tdf().dimensions_)
238 {
239  tdf.clear();
240 }
241 
242 
243 template<class Type, class GeoMesh, template<class> class PrimitiveField>
244 template<template<class> class PrimitiveField2>
246 (
247  const IOobject& io,
249  const bool checkIOFlags
250 )
251 :
252  regIOobject(io),
253  PrimitiveField<Type>(df),
255  mesh_(df.mesh_),
256  dimensions_(df.dimensions_)
257 {
258  if (!checkIOFlags || !readIfPresent())
259  {
260  copyOldTimes(io, df);
261  }
262 }
263 
264 
265 template<class Type, class GeoMesh, template<class> class PrimitiveField>
266 template<template<class> class PrimitiveField2>
268 (
269  const IOobject& io,
271  const bool reuse,
272  const bool checkIOFlags
273 )
274 :
276  PrimitiveField<Type>(df, reuse),
278  mesh_(df.mesh_),
279  dimensions_(df.dimensions_)
280 {
281  if (checkIOFlags)
282  {
283  readIfPresent();
284  }
285 }
286 
287 
288 template<class Type, class GeoMesh, template<class> class PrimitiveField>
290 (
291  const IOobject& io,
293  const bool checkIOFlags
294 )
295 :
297  PrimitiveField<Type>
298  (
299  const_cast<DimensionedField<Type, GeoMesh, PrimitiveField>&>(tdf()),
300  tdf.isTmp()
301  ),
303  mesh_(tdf().mesh_),
304  dimensions_(tdf().dimensions_)
305 {
306  tdf.clear();
307 
308  if (checkIOFlags)
309  {
310  readIfPresent();
311  }
312 }
313 
314 
315 template<class Type, class GeoMesh, template<class> class PrimitiveField>
316 template<template<class> class PrimitiveField2>
318 (
319  const word& newName,
321 )
322 :
323  regIOobject(newName, df, newName != df.name()),
324  PrimitiveField<Type>(df),
326  mesh_(df.mesh_),
327  dimensions_(df.dimensions_)
328 {
329  copyOldTimes(newName, df);
330 }
331 
332 
333 template<class Type, class GeoMesh, template<class> class PrimitiveField>
334 template<template<class> class PrimitiveField2>
336 (
337  const word& newName,
339  const bool reuse
340 )
341 :
342  regIOobject(newName, df, true),
343  PrimitiveField<Type>(df, reuse),
345  mesh_(df.mesh_),
346  dimensions_(df.dimensions_)
347 {}
348 
349 
350 template<class Type, class GeoMesh, template<class> class PrimitiveField>
352 (
353  const word& newName,
355 )
356 :
357  regIOobject(newName, tdf(), true),
358  PrimitiveField<Type>
359  (
360  const_cast<DimensionedField<Type, GeoMesh, PrimitiveField>&>(tdf()),
361  tdf.isTmp()
362  ),
364  mesh_(tdf().mesh_),
365  dimensions_(tdf().dimensions_)
366 {
367  tdf.clear();
368 }
369 
370 
371 template<class Type, class GeoMesh, template<class> class PrimitiveField>
374 {
376  (
378  );
379 }
380 
381 
382 template<class Type, class GeoMesh, template<class> class PrimitiveField>
385 (
386  const word& name,
387  const GeoMesh& mesh,
388  const dimensionSet& ds,
389  const PrimitiveField<Type>& field
390 )
391 {
392  const bool cacheTmp = mesh.db().temporaryObjectCached(name);
393 
395  (
397  (
398  IOobject
399  (
400  name,
401  mesh.db().time().name(),
402  mesh.db(),
403  IOobject::NO_READ,
404  IOobject::NO_WRITE,
405  cacheTmp
406  ),
407  mesh,
408  ds,
409  field
410  ),
411  cacheTmp
412  );
413 }
414 
415 
416 template<class Type, class GeoMesh, template<class> class PrimitiveField>
419 (
420  const word& name,
421  const GeoMesh& mesh,
422  const dimensionSet& ds,
423  const tmp<PrimitiveField<Type>>& tfield
424 )
425 {
426  const bool cacheTmp = mesh.db().temporaryObjectCached(name);
427 
429  (
431  (
432  IOobject
433  (
435  mesh.db().time().name(),
436  mesh.db(),
437  IOobject::NO_READ,
438  IOobject::NO_WRITE,
439  cacheTmp
440  ),
441  mesh,
442  ds,
443  tfield
444  ),
445  cacheTmp
446  );
447 }
448 
449 
450 template<class Type, class GeoMesh, template<class> class PrimitiveField>
453 (
454  const word& name,
455  const GeoMesh& mesh,
456  const dimensionSet& ds
457 )
458 {
459  const bool cacheTmp = mesh.db().temporaryObjectCached(name);
460 
462  (
464  (
466  (
467  name,
468  mesh.db().time().name(),
469  mesh.db(),
470  IOobject::NO_READ,
471  IOobject::NO_WRITE,
472  cacheTmp
473  ),
474  mesh,
475  ds,
476  false
477  ),
478  cacheTmp
479  );
480 }
481 
482 
483 template<class Type, class GeoMesh, template<class> class PrimitiveField>
486 (
487  const word& name,
488  const GeoMesh& mesh,
489  const dimensioned<Type>& dt
490 )
491 {
492  const bool cacheTmp = mesh.db().temporaryObjectCached(name);
493 
495  (
497  (
499  (
500  name,
501  mesh.db().time().name(),
502  mesh.db(),
503  IOobject::NO_READ,
504  IOobject::NO_WRITE,
505  cacheTmp
506  ),
508  dt,
509  false
510  ),
511  cacheTmp
512  );
513 }
514 
515 
516 template<class Type, class GeoMesh, template<class> class PrimitiveField>
517 template<template<class> class PrimitiveField2>
520 (
521  const word& newName,
523 )
524 {
525  const bool cacheTmp = df.db().temporaryObjectCached(newName);
526 
528  (
530  (
532  (
533  newName,
534  df.instance(),
535  df.local(),
536  df.db(),
537  IOobject::NO_READ,
538  IOobject::NO_WRITE,
539  cacheTmp
540  ),
541  df
542  ),
543  cacheTmp
544  );
545 }
546 
547 
548 template<class Type, class GeoMesh, template<class> class PrimitiveField>
551 (
552  const word& newName,
554 )
555 {
556  const bool cacheTmp = tdf().db().temporaryObjectCached(newName);
557 
559  (
561  (
562  IOobject
563  (
564  newName,
565  tdf().instance(),
566  tdf().local(),
567  tdf().db(),
568  IOobject::NO_READ,
569  IOobject::NO_WRITE,
570  cacheTmp
571  ),
572  tdf
573  ),
574  cacheTmp
575  );
576 }
577 
578 
579 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
580 
581 template<class Type, class GeoMesh, template<class> class PrimitiveField>
583 {
584  db().cacheTemporaryObject(*this);
585 }
586 
587 
588 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
589 
590 template<class Type, class GeoMesh, template<class> class PrimitiveField>
591 PrimitiveField<Type>&
593 {
594  this->setUpToDate();
595  storeOldTimes();
596  return *this;
597 }
598 
599 
600 template<class Type, class GeoMesh, template<class> class PrimitiveField>
601 tmp
602 <
604  <
606  GeoMesh,
607  Field
608  >
609 >
611 (
612  const direction d
613 ) const
614 {
616  (
618  (
619  name() + ".component(" + ::Foam::name(d) + ')',
620  mesh_,
621  dimensions_
622  )
623  );
624 
625  Foam::component(result.ref(), *this, d);
626 
627  return result;
628 }
629 
630 
631 template<class Type, class GeoMesh, template<class> class PrimitiveField>
632 template<template<class> class PrimitiveField2>
634 (
635  const direction d,
636  const DimensionedField
637  <
639  GeoMesh,
640  PrimitiveField2
641  >& df
642 )
643 {
644  PrimitiveField<Type>::replace(d, df);
645 }
646 
647 
648 template<class Type, class GeoMesh, template<class> class PrimitiveField>
649 template<template<class> class PrimitiveField2>
651 (
652  const direction d,
653  const tmp
654  <
656  <
658  GeoMesh,
659  PrimitiveField2
660  >
661  >& tdf
662 )
663 {
664  replace(d, tdf());
665  tdf.clear();
666 }
667 
668 
669 template<class Type, class GeoMesh, template<class> class PrimitiveField>
672 {
674  (
676  (
677  name() + ".T()",
678  mesh_,
679  dimensions_
680  )
681  );
682 
683  Foam::T(result.ref(), *this);
684 
685  return result;
686 }
687 
688 
689 template<class Type, class GeoMesh, template<class> class PrimitiveField>
692 {
693  dimensioned<Type> Average
694  (
695  this->name() + ".average()",
696  this->dimensions(),
697  gAverage(primitiveField())
698  );
699 
700  return Average;
701 }
702 
703 
704 template<class Type, class GeoMesh, template<class> class PrimitiveField>
705 template<template<class> class PrimitiveField2>
708 (
710 ) const
711 {
712  return
713  (
715  (
716  this->name() + ".weightedAverage(weights)",
717  this->dimensions(),
718  gSum(weightField*primitiveField())/gSum(weightField)
719  )
720  );
721 }
722 
723 
724 template<class Type, class GeoMesh, template<class> class PrimitiveField>
725 template<template<class> class PrimitiveField2>
728 (
730 ) const
731 {
732  dimensioned<Type> wa = weightedAverage(tweightField());
733  tweightField.clear();
734  return wa;
735 }
736 
737 
738 template<class Type, class GeoMesh, template<class> class PrimitiveField>
739 template<template<class> class PrimitiveField2>
741 (
743 )
744 {
745  checkFieldAssignment(*this, df);
746 
747  dimensions_ = df.dimensions();
748  PrimitiveField<Type>::operator=(df.primitiveField());
749 }
750 
751 
752 template<class Type, class GeoMesh, template<class> class PrimitiveField>
754 (
756 )
757 {
759 
760  checkFieldAssignment(*this, df);
761 
762  dimensions_ = df.dimensions();
763 
764  if (tdf.isTmp())
765  {
766  transfer(tdf.ref());
767  }
768  else
769  {
770  PrimitiveField<Type>::operator=(df.primitiveField());
771  }
772 
773  tdf.clear();
774 }
775 
776 
777 template<class Type, class GeoMesh, template<class> class PrimitiveField>
778 template<template<class> class PrimitiveField2>
780 (
782 )
783 {
784  reset(tdf());
785 
786  tdf.clear();
787 }
788 
789 
790 template<class Type, class GeoMesh, template<class> class PrimitiveField>
792 (
793  const dimensioned<Type>& dt
794 )
795 {
796  Foam::max(primitiveFieldRef(), primitiveField(), dt.value());
797 }
798 
799 
800 template<class Type, class GeoMesh, template<class> class PrimitiveField>
802 (
803  const dimensioned<Type>& dt
804 )
805 {
806  Foam::min(primitiveFieldRef(), primitiveField(), dt.value());
807 }
808 
809 
810 template<class Type, class GeoMesh, template<class> class PrimitiveField>
812 (
813  const dimensioned<Type>& minDt,
814  const dimensioned<Type>& maxDt
815 )
816 {
817  Foam::max(primitiveFieldRef(), primitiveField(), minDt.value());
818  Foam::min(primitiveFieldRef(), primitiveField(), maxDt.value());
819 }
820 
821 
822 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
823 
824 template<class Type, class GeoMesh, template<class> class PrimitiveField>
826 (
828 )
829 {
830  checkFieldAssignment(*this, df);
831  checkFieldOperation(*this, df, "=");
832 
833  dimensions_ = df.dimensions();
834  PrimitiveField<Type>::operator=(df);
835 }
836 
837 
838 template<class Type, class GeoMesh, template<class> class PrimitiveField>
840 (
842 )
843 {
844  checkFieldAssignment(*this, df);
845  checkFieldOperation(*this, df, "=");
846 
847  dimensions_ = move(df.dimensions());
848  PrimitiveField<Type>::operator=(move(df));
849 }
850 
851 
852 template<class Type, class GeoMesh, template<class> class PrimitiveField>
854 (
856 )
857 {
859 
860  checkFieldAssignment(*this, df);
861  checkFieldOperation(*this, df, "=");
862 
863  dimensions_ = df.dimensions();
864 
865  if (tdf.isTmp())
866  {
867  transfer(tdf.ref());
868  }
869  else
870  {
871  PrimitiveField<Type>::operator=(df.primitiveField());
872  }
873 
874  tdf.clear();
875 }
876 
877 
878 template<class Type, class GeoMesh, template<class> class PrimitiveField>
879 template<template<class> class PrimitiveField2>
881 (
883 )
884 {
885  checkFieldOperation(*this, df, "=");
886 
887  dimensions_ = df.dimensions();
888  PrimitiveField<Type>::operator=(df);
889 }
890 
891 
892 template<class Type, class GeoMesh, template<class> class PrimitiveField>
893 template<template<class> class PrimitiveField2>
895 (
897 )
898 {
900 
901  checkFieldOperation(*this, df, "=");
902 
903  dimensions_ = df.dimensions();
904  PrimitiveField<Type>::operator=(df);
905  tdf.clear();
906 }
907 
908 
909 template<class Type, class GeoMesh, template<class> class PrimitiveField>
911 (
912  const dimensioned<Type>& dt
913 )
914 {
915  dimensions_ = dt.dimensions();
916  PrimitiveField<Type>::operator=(dt.value());
917 }
918 
919 
920 template<class Type, class GeoMesh, template<class> class PrimitiveField>
922 {
923  PrimitiveField<Type>::operator=(Zero);
924 }
925 
926 
927 template<class Type, class GeoMesh, template<class> class PrimitiveField>
928 template<template<class> class PrimitiveField2>
930 (
932 )
933 {
934  this->operator=(df);
935 }
936 
937 
938 template<class Type, class GeoMesh, template<class> class PrimitiveField>
939 template<template<class> class PrimitiveField2>
941 (
943 )
944 {
945  this->operator=(tdf);
946 }
947 
948 
949 template<class Type, class GeoMesh, template<class> class PrimitiveField>
951 (
952  const dimensioned<Type>& dt
953 )
954 {
955  this->operator=(dt);
956 }
957 
958 
959 template<class Type, class GeoMesh, template<class> class PrimitiveField>
961 {
962  this->operator=(Zero);
963 }
964 
965 
966 #define COMPUTED_ASSIGNMENT(TYPE, op) \
967  \
968 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
969 template<template<class> class PrimitiveField2> \
970 void DimensionedField<Type, GeoMesh, PrimitiveField>::operator op \
971 ( \
972  const DimensionedField<TYPE, GeoMesh, PrimitiveField2>& df \
973 ) \
974 { \
975  checkFieldOperation(*this, df, #op); \
976  \
977  dimensions_ op df.dimensions(); \
978  PrimitiveField<Type>::operator op(df); \
979 } \
980  \
981 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
982 template<template<class> class PrimitiveField2> \
983 void DimensionedField<Type, GeoMesh, PrimitiveField>::operator op \
984 ( \
985  const tmp<DimensionedField<TYPE, GeoMesh, PrimitiveField2>>& tdf \
986 ) \
987 { \
988  operator op(tdf()); \
989  tdf.clear(); \
990 } \
991  \
992 template<class Type, class GeoMesh, template<class> class PrimitiveField> \
993 void DimensionedField<Type, GeoMesh, PrimitiveField>::operator op \
994 ( \
995  const dimensioned<TYPE>& dt \
996 ) \
997 { \
998  dimensions_ op dt.dimensions(); \
999  PrimitiveField<Type>::operator op(dt.value()); \
1000 }
1001 
1006 
1007 #undef COMPUTED_ASSIGNMENT
1008 
1009 
1010 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
1011 
1012 #undef checkFieldAssignment
1013 #undef checkFieldOperation
1014 
1015 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
1016 
1017 } // End namespace Foam
1018 
1019 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
1020 
1021 #include "DimensionedFieldIO.C"
1022 #include "DimensionedFieldFunctions.C"
1023 
1024 // ************************************************************************* //
#define checkFieldOperation(df1, df2, op)
#define COMPUTED_ASSIGNMENT(TYPE, op)
#define checkFieldAssignment(df1, df2)
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
PrimitiveField< Type >::cmptType cmptType
Component type of the elements of the field.
friend class DimensionedField
Declare friendship with other dimensioned fields.
const dimensionSet & dimensions() const
Return dimensions.
PrimitiveField< Type > & primitiveFieldRef()
Return a reference to the internal field.
const GeoMesh & mesh() const
Return mesh.
const PrimitiveField< Type > & primitiveField() const
Return a const-reference to the primitive field.
Pre-declare SubField and related Field type.
Definition: Field.H:83
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
Definition: IOobject.H:99
const fileName & local() const
Definition: IOobject.H:400
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
Definition: IOobject.C:352
const objectRegistry & db() const
Return the local objectRegistry.
Definition: IOobject.C:309
Class to add into field types to provide old-time storage and retrieval.
Definition: OldTimeField.H:115
void copyOldTimes(const IOobject &io, const OtherOldTime< OtherPrimitiveField > &)
Copy the old-times from the given field.
Definition: OldTimeField.C:162
Dimension set for the base types.
Definition: dimensionSet.H:125
Generic dimensioned Type class.
const dimensionSet & dimensions() const
Return const reference to dimensions.
const Type & value() const
Return const reference to value.
const word & name() const
Return const reference to name.
virtual const objectRegistry & db() const
Return the object registry - resolve conflict polyMesh/lduMesh.
Definition: fvMesh.H:439
label size() const
Return fvMesh size.
Definition: fvMesh.H:468
const Time & time() const
Return time.
bool temporaryObjectCached(const word &name) const
Return true if given name is in the cacheTemporaryObjects set.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
A class for managing temporary objects.
Definition: tmp.H:55
T & ref() const
Return non-const reference or generate a fatal error.
Definition: tmpI.H:197
A class for handling words, derived from string.
Definition: word.H:63
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
Definition: zero.H:50
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
const dimensionSet time
Namespace for OpenFOAM.
static const zero Zero
Definition: zero.H:97
Type gAverage(const UList< Type > &f, const label comm)
tmp< fvMatrix< Type > > operator==(const fvMatrix< Type > &, const fvMatrix< Type > &)
errorManip< error > abort(error &err)
Definition: errorManip.H:131
dimensioned< Type > average(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
Type gSum(const UList< Type > &f, const label comm)
void component(GeometricField< typename GeometricField< Type, GeoMesh, PrimitiveField1 >::cmptType, GeoMesh, PrimitiveField1 > &gcf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf, const direction d)
dimensioned< Type > min(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
T clone(const T &t)
Definition: List.H:55
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
error FatalError
tmp< DimensionedField< TypeR, GeoMesh, Field > > New(const tmp< DimensionedField< TypeR, GeoMesh, Field >> &tdf1, const word &name, const dimensionSet &dimensions)
void T(GeometricField< Type, GeoMesh, PrimitiveField1 > &gf, const GeometricField< Type, GeoMesh, PrimitiveField2 > &gf1)
uint8_t direction
Definition: direction.H:45
dimensioned< Type > max(const DimensionedField< Type, GeoMesh, PrimitiveField > &df)
label timeIndex
Definition: getTimeIndex.H:4
points setSize(newPointi)
conserve primitiveFieldRef()+