GeometricField.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2015-2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::GeometricField
29 
30 Description
31  Generic GeometricField class.
32 
33 SourceFiles
34  GeometricFieldI.H
35  GeometricField.C
36  GeometricBoundaryField.C
37  GeometricFieldFunctions.H
38  GeometricFieldFunctions.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef GeometricField_H
43 #define GeometricField_H
44 
45 #include "regIOobject.H"
46 #include "dimensionedTypes.H"
47 #include "DimensionedField.H"
48 #include "FieldField.H"
51 
52 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
53 
54 namespace Foam
55 {
56 
57 // Forward declarations
58 class dictionary;
59 
60 template<class Type, template<class> class PatchField, class GeoMesh>
61 class GeometricField;
62 
63 template<class Type, template<class> class PatchField, class GeoMesh>
64 Ostream& operator<<
65 (
66  Ostream&,
67  const GeometricField<Type, PatchField, GeoMesh>&
68 );
69 
70 template<class Type, template<class> class PatchField, class GeoMesh>
71 Ostream& operator<<
72 (
73  Ostream&,
74  const tmp<GeometricField<Type, PatchField, GeoMesh>>&
75 );
76 
77 
78 /*---------------------------------------------------------------------------*\
79  Class GeometricField Declaration
80 \*---------------------------------------------------------------------------*/
81 
82 template<class Type, template<class> class PatchField, class GeoMesh>
83 class GeometricField
84 :
85  public DimensionedField<Type, GeoMesh>
86 {
87  // Private Member Functions
88 
89  //- Read from file if it is present
90  bool readIfPresent();
91 
92  //- Read old time field from file if it is present
93  bool readOldTimeIfPresent();
94 
95 
96 public:
97 
98  // Public typedefs
99 
100  //- Type of mesh on which this GeometricField is instantiated
101  typedef typename GeoMesh::Mesh Mesh;
102 
103  //- Type of boundary mesh on which this
104  // GeometricField::Boundary is instantiated
105  typedef typename GeoMesh::BoundaryMesh BoundaryMesh;
106 
107  //- Type of the internal field from which this GeometricField is derived
109 
110  //- Type of the patch field of which the
111  // GeometricField::Boundary is composed
112  typedef PatchField<Type> Patch;
113 
114 
115  class Boundary
116  :
117  public FieldField<PatchField, Type>
118  {
119  // Private data
120 
121  //- Reference to BoundaryMesh for which this field is defined
122  const BoundaryMesh& bmesh_;
123 
124 
125  public:
126 
127  // Constructors
128 
129  //- Construct from a BoundaryMesh
130  Boundary(const BoundaryMesh& bmesh);
131 
132  //- Construct from a BoundaryMesh,
133  // reference to the internal field
134  // and a patch type
135  Boundary
136  (
137  const BoundaryMesh& bmesh,
138  const Internal& field,
139  const word& patchFieldType
140  );
141 
142  //- Construct from a BoundaryMesh,
143  // reference to the internal field
144  // and a wordList of patch types and optional the actual patch
145  // types (to override constraint patches)
146  Boundary
147  (
148  const BoundaryMesh& bmesh,
149  const Internal& field,
150  const wordList& wantedPatchTypes,
151  const wordList& actualPatchTypes = wordList()
152  );
153 
154  //- Construct from a BoundaryMesh,
155  // reference to the internal field
156  // and a PtrList<PatchField<Type>>
157  Boundary
158  (
159  const BoundaryMesh& bmesh,
160  const Internal& field,
161  const PtrList<PatchField<Type>>&
162  );
163 
164  //- Construct as copy setting the reference to the internal field
165  Boundary
166  (
167  const Internal& field,
168  const Boundary& btf
169  );
170 
171  //- Construct as copy
172  // Dangerous because Field may be set to a field which gets deleted
173  // Need new type of BoundaryField, one which is part of a geometric
174  // field for which snGrad etc. may be called and a free standing
175  // BoundaryField for which such operations are unavailable.
176  Boundary
177  (
178  const Boundary& btf
179  );
180 
181  //- Construct from dictionary
182  Boundary
183  (
184  const BoundaryMesh& bmesh,
185  const Internal& field,
186  const dictionary& dict
187  );
188 
189 
190  // Member Functions
191 
192  //- Read the boundary field
193  void readField
194  (
195  const Internal& field,
196  const dictionary& dict
197  );
198 
199  //- Update the boundary condition coefficients
200  void updateCoeffs();
201 
202  //- Evaluate boundary conditions
203  void evaluate();
204 
205  //- Return a list of the patch types
206  wordList types() const;
207 
208  //- Return BoundaryField of the cell values neighbouring
209  // the boundary
211 
212  //- Return a list of pointers for each patch field with only those
213  // pointing to interfaces being set
215 
216  //- Return a list of pointers for each patch field with only those
217  // pointing to interfaces being set
219 
220  //- Write boundary field as dictionary entry
221  void writeEntry(const word& keyword, Ostream& os) const;
222 
223  //- Write dictionary entries of the individual boundary fields.
224  void writeEntries(Ostream& os) const;
225 
226 
227  // Member operators
228 
229  //- Assignment to BoundaryField<Type, PatchField, BoundaryMesh>
230  void operator=(const Boundary&);
231 
232  //- Assignment to FieldField<PatchField, Type>
234 
235  //- Assignment to Type
236  void operator=(const Type&);
237 
238 
239  //- Forced assignment to
240  // BoundaryField<Type, PatchField, BoundaryMesh>
241  void operator==(const Boundary&);
242 
243  //- Forced assignment to FieldField<PatchField, Type>
245 
246  //- Forced assignment to Type
247  void operator==(const Type&);
248  };
249 
250 
251 private:
252 
253  // Private data
254 
255  //- Current time index.
256  // Used to trigger the storing of the old-time value
257  mutable label timeIndex_;
258 
259  //- Pointer to old time field
260  mutable GeometricField<Type, PatchField, GeoMesh>* field0Ptr_;
261 
262  //- Pointer to previous iteration (used for under-relaxation)
263  mutable GeometricField<Type, PatchField, GeoMesh>* fieldPrevIterPtr_;
264 
265  //- Boundary Type field containing boundary field values
266  Boundary boundaryField_;
267 
268 
269  // Private Member Functions
270 
271  //- Read the field from the dictionary
272  void readFields(const dictionary& dict);
273 
274  //- Read the field - create the field dictionary on-the-fly
275  void readFields();
276 
277 
278 public:
279 
280  //- Runtime type information
281  TypeName("GeometricField");
282 
283 
284  // Public typedefs
285 
286  typedef typename Field<Type>::cmptType cmptType;
287 
288  // Static Member Functions
289 
290  //- Return a null geometric field
291  inline static const GeometricField<Type, PatchField, GeoMesh>& null();
292 
293 
294  // Constructors
295 
296  //- Construct given IOobject, mesh, dimensions and patch type.
297  // This allocates storage for the field but does not set values.
298  // Used only within this class to create TEMPORARY variables
300  (
301  const IOobject& io,
302  const Mesh& mesh,
303  const dimensionSet& ds,
304  const word& patchFieldType = PatchField<Type>::calculatedType()
305  );
306 
307  //- Construct given IOobject, mesh, dimensions and patch types.
308  // This allocates storage for the field but does not set values.
309  // Used only within this class to create TEMPORARY variables
311  (
312  const IOobject& io,
313  const Mesh& mesh,
314  const dimensionSet& ds,
315  const wordList& wantedPatchTypes,
316  const wordList& actualPatchTypes = wordList()
317  );
318 
319  //- Construct given IOobject, mesh, dimensioned<Type> and patch type.
320  // This assigns both dimensions and values.
321  // The internal name for the dimensioned<Type> has no influence.
323  (
324  const IOobject& io,
325  const Mesh& mesh,
326  const dimensioned<Type>& dt,
327  const word& patchFieldType = PatchField<Type>::calculatedType()
328  );
329 
330  //- Construct given IOobject, mesh, dimensioned<Type> and patch types.
331  // This assigns both dimensions and values.
332  // The internal name for the dimensioned<Type> has no influence.
334  (
335  const IOobject& io,
336  const Mesh& mesh,
337  const dimensioned<Type>& dt,
338  const wordList& wantedPatchTypes,
339  const wordList& actualPatchTypes = wordList()
340  );
341 
342  //- Copy construct from components
344  (
345  const IOobject& io,
346  const Internal& diField,
347  const PtrList<PatchField<Type>>& ptfl
348  );
349 
350  //- Copy construct from internal field, with specified patch type
352  (
353  const IOobject& io,
354  const Mesh& mesh,
355  const dimensionSet& ds,
356  const Field<Type>& iField,
357  const word& patchFieldType = PatchField<Type>::calculatedType()
358  );
359 
360  //- Move construct from internal field, with specified patch type
362  (
363  const IOobject& io,
364  const Mesh& mesh,
365  const dimensionSet& ds,
366  Field<Type>&& iField,
367  const word& patchFieldType = PatchField<Type>::calculatedType()
368  );
369 
370  //- Copy construct from components
372  (
373  const IOobject& io,
374  const Mesh& mesh,
375  const dimensionSet& ds,
376  const Field<Type>& iField,
377  const PtrList<PatchField<Type>>& ptfl
378  );
379 
380  //- Construct and read given IOobject
382  (
383  const IOobject& io,
384  const Mesh& mesh,
385  const bool readOldTime = true
386  );
387 
388  //- Construct from dictionary
390  (
391  const IOobject& io,
392  const Mesh& mesh,
393  const dictionary& dict
394  );
395 
396  //- Copy construct
398  (
400  );
401 
402  //- Construct from tmp<GeometricField> deleting argument
404  (
406  );
407 
408  //- Construct as copy resetting IO parameters
410  (
411  const IOobject& io,
413  );
414 
415  //- Construct as copy of tmp<GeometricField> resetting IO parameters
417  (
418  const IOobject& io,
420  );
421 
422  //- Copy construct with a new name
424  (
425  const word& newName,
427  );
428 
429  //- Construct with a new name from tmp<GeometricField>
431  (
432  const word& newName,
434  );
435 
436  //- Construct as copy resetting IO parameters and patch type
438  (
439  const IOobject& io,
441  const word& patchFieldType
442  );
443 
444  //- Construct as copy resetting IO parameters and boundary types
446  (
447  const IOobject& io,
449  const wordList& patchFieldTypes,
450  const wordList& actualPatchTypes = wordList()
451  );
452 
453  //- Construct as copy resetting IO parameters and boundary types
455  (
456  const IOobject& io,
458  const wordList& patchFieldTypes,
459  const wordList& actualPatchTypes = wordList()
460  );
461 
462  //- Clone
464 
465 
466  // Static Constructors
467 
468  //- Return tmp field from name, mesh, dimensions and patch type.
469  // The field is NO_READ, NO_WRITE, unregistered and uses the
470  // current timeName from the mesh registry
472  (
473  const word& name,
474  const Mesh& mesh,
475  const dimensionSet& ds,
476  const word& patchFieldType = PatchField<Type>::calculatedType()
477  );
478 
479  //- Return tmp field from name, mesh, dimensions,
480  //- copy of internal field, with specified patch type.
481  // The field is NO_READ, NO_WRITE, unregistered and uses the
482  // current timeName from the mesh registry
484  (
485  const word& name,
486  const Mesh& mesh,
487  const dimensionSet& ds,
488  const Field<Type>& iField,
489  const word& patchFieldType = PatchField<Type>::calculatedType()
490  );
491 
492  //- Return tmp field from name, mesh, dimensions,
493  //- moved internal field contents, with specified patch type.
494  // The field is NO_READ, NO_WRITE, unregistered and uses the
495  // current timeName from the mesh registry
497  (
498  const word& name,
499  const Mesh& mesh,
500  const dimensionSet& ds,
501  Field<Type>&& iField,
502  const word& patchFieldType = PatchField<Type>::calculatedType()
503  );
504 
505  //- Return tmp field from name, mesh, dimensioned<Type>
506  //- and patch type.
507  // The field is NO_READ, NO_WRITE, unregistered and uses the
508  // current timeName from the mesh registry
510  (
511  const word& name,
512  const Mesh& mesh,
513  const dimensioned<Type>& dt,
514  const word& patchFieldType = PatchField<Type>::calculatedType()
515  );
516 
517  //- Return tmp field from name, mesh, dimensioned<Type>
518  //- and patch types.
519  // The field is NO_READ, NO_WRITE, unregistered and uses the
520  // current timeName from the mesh registry
522  (
523  const word& name,
524  const Mesh& mesh,
525  const dimensioned<Type>& dt,
526  const wordList& patchFieldTypes,
527  const wordList& actualPatchTypes = wordList()
528  );
529 
530  //- Return renamed tmp field
531  // The field is NO_READ, NO_WRITE, unregistered and uses the
532  // current timeName from the mesh registry
534  (
535  const word& newName,
537  );
538 
539  //- Rename tmp field and reset patch field types and return
540  // The field is NO_READ, NO_WRITE, unregistered and uses the
541  // current timeName from the mesh registry
543  (
544  const word& newName,
546  const wordList& patchFieldTypes,
547  const wordList& actualPatchTypes = wordList()
548  );
549 
550 
551  //- Destructor
552  virtual ~GeometricField();
553 
554 
555  // Member Functions
556 
557  //- Return a reference to the dimensioned internal field
558  // \param updateAccessTime update event counter and check
559  // old-time fields
560  //
561  // \note Should avoid using updateAccessTime = true within loops.
562  Internal& ref(const bool updateAccessTime = true);
563 
564  //- Return a const-reference to the dimensioned internal field
565  inline const Internal& internalField() const;
566 
567  //- Return a const-reference to the dimensioned internal field
568  //- of a "vol" field.
569  // Useful in the formulation of source-terms for FV equations
570  //
571  // \note definition in finiteVolume/fields/volFields/volFieldsI.H
572  inline const Internal& v() const;
573 
574  //- Return a reference to the internal field
575  // \param updateAccessTime update event counter and check
576  // old-time fields
577  //
578  // \note Should avoid using updateAccessTime = true within loops.
580  (
581  const bool updateAccessTime = true
582  );
583 
584  //- Return a const-reference to the internal field
585  inline const typename Internal::FieldType& primitiveField() const;
586 
587  //- Return a reference to the boundary field
588  // \param updateAccessTime update event counter and check
589  // old-time fields
590  //
591  // \note Should avoid using updateAccessTime = true within loops.
592  Boundary& boundaryFieldRef(const bool updateAccessTime = true);
593 
594  //- Return const-reference to the boundary field
595  inline const Boundary& boundaryField() const;
596 
597  //- Return the time index of the field
598  inline label timeIndex() const;
599 
600  //- Return the time index of the field
601  inline label& timeIndex();
602 
603  //- Store the old-time fields
604  void storeOldTimes() const;
605 
606  //- Store the old-time field
607  void storeOldTime() const;
608 
609  //- Return the number of old time fields stored
610  label nOldTimes() const;
611 
612  //- Return old time field
614 
615  //- Return non-const old time field
616  // (Not a good idea but it is used for sub-cycling)
618 
619  //- Store the field as the previous iteration value
620  void storePrevIter() const;
621 
622  //- Return previous iteration field
624 
625  //- Correct boundary field
627 
628  //- Does the field need a reference level for solution
629  bool needReference() const;
630 
631  //- Return a component of the field
633  (
634  const direction
635  ) const;
636 
637  //- WriteData member function required by regIOobject
638  bool writeData(Ostream&) const;
639 
640  //- Return transpose (only if it is a tensor field)
642 
643  //- Relax field (for steady-state solution).
644  // alpha = 1 : no relaxation
645  // alpha < 1 : relaxation
646  // alpha = 0 : do nothing
647  void relax(const scalar alpha);
648 
649  //- Relax field (for steady-state solution).
650  // alpha is read from controlDict
651  void relax();
652 
653  //- Select the final iteration parameters if `final' is true
654  // by returning the field name + "Final"
655  // otherwise the standard parameters by returning the field name
656  word select(bool final) const;
657 
658  //- Helper function to write the min and max to an Ostream
659  void writeMinMax(Ostream& os) const;
660 
661 
662  // Member Function *this Operators
663 
664  //- Negate the field inplace
665  void negate();
666 
667  //- Replace specified field component with content from another field
668  void replace
669  (
670  const direction d,
672  );
673 
674  //- Replace specified field component with specified value
675  void replace
676  (
677  const direction d,
678  const dimensioned<cmptType>& ds
679  );
680 
681  //- Use the minimum of the field and specified value
682  // This sets the \em ceiling on the field values
683  void min(const dimensioned<Type>& dt);
684 
685  //- Use the maximum of the field and specified value
686  // This sets the \em floor on the field values
687  void max(const dimensioned<Type>& dt);
688 
689  //- Clip the field to be bounded within the specified range
690  void clip(const dimensioned<MinMax<Type>>& range);
691 
692  //- Clip the field to be bounded within the specified range
693  void clip
694  (
695  const dimensioned<Type>& minVal,
696  const dimensioned<Type>& maxVal
697  );
698 
699  //- Deprecated(2019-01) identical to clip()
700  // \deprecated(2019-01) identical to clip()
701  void maxMin
702  (
703  const dimensioned<Type>& minVal,
704  const dimensioned<Type>& maxVal
705  ) FOAM_DEPRECATED_FOR(2019-01, "clip() method");
706 
707 
708  // Member Operators
709 
710  //- Return a const-reference to the dimensioned internal field
711  // Useful in the formulation of source-terms for FV equations
712  inline const Internal& operator()() const;
713 
716  void operator=(const dimensioned<Type>&);
717 
719  void operator==(const dimensioned<Type>&);
720 
723 
726 
729 
732 
733  void operator+=(const dimensioned<Type>&);
734  void operator-=(const dimensioned<Type>&);
735 
736  void operator*=(const dimensioned<scalar>&);
737  void operator/=(const dimensioned<scalar>&);
738 
739 
740  // Ostream operators
741 
742  friend Ostream& operator<< <Type, PatchField, GeoMesh>
743  (
744  Ostream&,
746  );
747 
748  friend Ostream& operator<< <Type, PatchField, GeoMesh>
749  (
750  Ostream&,
752  );
753 };
754 
755 
756 template<class Type, template<class> class PatchField, class GeoMesh>
757 Ostream& operator<<
758 (
759  Ostream&,
761  Boundary&
762 );
763 
764 
765 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
766 
767 } // End namespace Foam
768 
769 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
770 
771 #include "GeometricFieldI.H"
772 
773 #ifdef NoRepository
774  #include "GeometricField.C"
775 #endif
776 
777 #include "GeometricFieldFunctions.H"
778 
779 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
780 
781 #endif
782 
783 // ************************************************************************* //
regIOobject.H
GeometricFieldFunctions.H
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::GeometricField::component
tmp< GeometricField< cmptType, PatchField, GeoMesh > > component(const direction) const
Return a component of the field.
Foam::GeometricField::replace
void replace(const direction d, const GeometricField< cmptType, PatchField, GeoMesh > &gcf)
Replace specified field component with content from another field.
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::GeometricField::writeData
bool writeData(Ostream &) const
WriteData member function required by regIOobject.
Definition: GeometricField.C:1004
FieldField.H
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:59
DimensionedField.H
Foam::GeometricField::Boundary::Boundary
Boundary(const BoundaryMesh &bmesh)
Construct from a BoundaryMesh.
Definition: GeometricBoundaryField.C:187
Foam::GeometricField::operator/=
void operator/=(const GeometricField< scalar, PatchField, GeoMesh > &)
Definition: GeometricField.C:1301
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
FOAM_DEPRECATED_FOR
#define FOAM_DEPRECATED_FOR(since, replacement)
Definition: stdFoam.H:65
Foam::GeometricField::primitiveField
const Internal::FieldType & primitiveField() const
Return a const-reference to the internal field.
Definition: GeometricFieldI.H:53
Foam::GeometricField::Boundary::writeEntries
void writeEntries(Ostream &os) const
Write dictionary entries of the individual boundary fields.
Definition: GeometricBoundaryField.C:544
Foam::GeometricField::TypeName
TypeName("GeometricField")
Runtime type information.
Foam::GeometricField::Boundary::operator=
void operator=(const Boundary &)
Assignment to BoundaryField<Type, PatchField, BoundaryMesh>
Foam::GeometricField::oldTime
const GeometricField< Type, PatchField, GeoMesh > & oldTime() const
Return old time field.
Definition: GeometricField.C:819
Foam::GeometricField::GeometricField
GeometricField(const IOobject &io, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=PatchField< Type >::calculatedType())
Construct given IOobject, mesh, dimensions and patch type.
Definition: GeometricField.C:197
Foam::GeometricField::v
const Internal & v() const
Definition: volFieldsI.H:33
Foam::GeometricField::BoundaryMesh
GeoMesh::BoundaryMesh BoundaryMesh
Type of boundary mesh on which this.
Definition: GeometricField.H:104
Foam::dimensionSet
Dimension set for the base types.
Definition: dimensionSet.H:65
Foam::GeometricField::select
word select(bool final) const
Select the final iteration parameters if `final' is true.
Definition: GeometricField.C:976
Foam::GeometricField::internalField
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
Definition: GeometricFieldI.H:43
lduInterfaceFieldPtrsList.H
Foam::GeometricField::Boundary::evaluate
void evaluate()
Evaluate boundary conditions.
Definition: GeometricBoundaryField.C:381
Foam::GeometricField::operator=
void operator=(const GeometricField< Type, PatchField, GeoMesh > &)
Definition: GeometricField.C:1169
Foam::GeometricField::cmptType
Field< Type >::cmptType cmptType
Definition: GeometricField.H:285
Foam::GeometricField::min
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
Definition: GeometricField.C:1101
Foam::GeometricField::Boundary::updateCoeffs
void updateCoeffs()
Update the boundary condition coefficients.
Definition: GeometricBoundaryField.C:368
Foam::GeometricField::needReference
bool needReference() const
Does the field need a reference level for solution.
Definition: GeometricField.C:918
Foam::GeometricField::nOldTimes
label nOldTimes() const
Return the number of old time fields stored.
Definition: GeometricField.C:806
Foam::GeometricField::New
static tmp< GeometricField< Type, PatchField, GeoMesh > > New(const word &name, const Mesh &mesh, const dimensionSet &ds, const word &patchFieldType=PatchField< Type >::calculatedType())
Return tmp field from name, mesh, dimensions and patch type.
Definition: GeometricFieldNew.C:34
Foam::GeometricField::maxMin
void maxMin(const dimensioned< Type > &minVal, const dimensioned< Type > &maxVal) FOAM_DEPRECATED_FOR(2019-01
Deprecated(2019-01) identical to clip()
Definition: GeometricField.C:1148
Foam::wordList
List< word > wordList
A List of words.
Definition: fileName.H:59
Foam::GeometricField::Boundary::interfaces
LduInterfaceFieldPtrsList< Type > interfaces() const
Return a list of pointers for each patch field with only those.
Definition: GeometricBoundaryField.C:481
Foam::GeometricField::storeOldTimes
void storeOldTimes() const
Store the old-time fields.
Definition: GeometricField.C:766
Foam::GeometricField::Mesh
GeoMesh::Mesh Mesh
Type of mesh on which this GeometricField is instantiated.
Definition: GeometricField.H:100
Foam::Field::cmptType
pTraits< Type >::cmptType cmptType
Component type.
Definition: Field.H:87
Foam::GeometricField::negate
void negate()
Negate the field inplace.
Definition: GeometricField.C:1158
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::Field
Generic templated field type.
Definition: Field.H:63
Foam::GeometricField::Boundary::readField
void readField(const Internal &field, const dictionary &dict)
Read the boundary field.
Definition: GeometricBoundaryField.C:37
Foam::GeometricField::Boundary::operator==
void operator==(const Boundary &)
Forced assignment to.
Foam::GeometricField::operator+=
void operator+=(const GeometricField< Type, PatchField, GeoMesh > &)
Definition: GeometricField.C:1298
Foam::GeometricField::writeMinMax
void writeMinMax(Ostream &os) const
Helper function to write the min and max to an Ostream.
Definition: GeometricField.C:991
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::GeometricField::Internal
DimensionedField< Type, GeoMesh > Internal
Type of the internal field from which this GeometricField is derived.
Definition: GeometricField.H:107
LduInterfaceFieldPtrsList.H
List of coupled interface fields to be used in coupling.
Foam::GeometricField::prevIter
const GeometricField< Type, PatchField, GeoMesh > & prevIter() const
Return previous iteration field.
Definition: GeometricField.C:892
Foam::UPtrList< const lduInterfaceField >
Foam::GeometricField::Boundary::types
wordList types() const
Return a list of the patch types.
Definition: GeometricBoundaryField.C:445
field
rDeltaTY field()
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:65
Foam::GeoMesh::BoundaryMesh
MESH::BoundaryMesh BoundaryMesh
Definition: GeoMesh.H:64
Foam::GeometricField::storeOldTime
void storeOldTime() const
Store the old-time field.
Definition: GeometricField.C:785
Foam::GeometricField::operator*=
void operator*=(const GeometricField< scalar, PatchField, GeoMesh > &)
Definition: GeometricField.C:1300
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:121
Foam::GeometricField::operator-=
void operator-=(const GeometricField< Type, PatchField, GeoMesh > &)
Definition: GeometricField.C:1299
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
GeometricField.C
Foam::dimensioned
Generic dimensioned Type class.
Definition: dimensionedScalarFwd.H:43
Foam::GeoMesh
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition: GeoMesh.H:48
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::GeometricField::timeIndex
label timeIndex() const
Return the time index of the field.
Definition: GeometricFieldI.H:70
Foam::GeometricField::primitiveFieldRef
Internal::FieldType & primitiveFieldRef(const bool updateAccessTime=true)
Return a reference to the internal field.
Definition: GeometricField.C:735
Foam::GeometricField::clone
tmp< GeometricField< Type, PatchField, GeoMesh > > clone() const
Clone.
Definition: GeometricField.C:696
Foam::GeometricField::correctBoundaryConditions
void correctBoundaryConditions()
Correct boundary field.
Definition: GeometricField.C:909
Foam::GeometricField::T
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
Definition: GeometricField.C:1015
Foam::GeometricField::storePrevIter
void storePrevIter() const
Store the field as the previous iteration value.
Definition: GeometricField.C:869
Foam::GeometricField::Boundary
Definition: GeometricField.H:114
range
scalar range
Definition: LISASMDCalcMethod1.H:12
Foam::GeometricField::clip
void clip() method")
Foam::GeometricField::ref
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
Definition: GeometricField.C:718
Foam::GeometricField::boundaryFieldRef
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Definition: GeometricField.C:752
Foam::List< word >
Foam::GeometricField::relax
void relax()
Relax field (for steady-state solution).
Definition: GeometricField.C:951
Foam::direction
uint8_t direction
Definition: direction.H:47
dimensionedTypes.H
Foam::GeometricField::~GeometricField
virtual ~GeometricField()
Destructor.
Definition: GeometricField.C:705
Foam::GeometricField::max
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
Definition: GeometricField.C:1112
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::GeometricField::operator()
const Internal & operator()() const
Return a const-reference to the dimensioned internal field.
Definition: GeometricFieldI.H:91
Foam::LduInterfaceFieldPtrsList
Definition: LduInterfaceFieldPtrsList.H:50
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::GeoMesh::Mesh
MESH Mesh
Definition: GeoMesh.H:63
Foam::GeometricField::Patch
PatchField< Type > Patch
Type of the patch field of which the.
Definition: GeometricField.H:111
Foam::GeometricField::operator==
void operator==(const tmp< GeometricField< Type, PatchField, GeoMesh >> &)
Definition: GeometricField.C:1236
Foam::MinMax
A min/max value pair with additional methods. In addition to conveniently storing values,...
Definition: HashSet.H:76
Foam::GeometricField::Boundary::writeEntry
void writeEntry(const word &keyword, Ostream &os) const
Write boundary field as dictionary entry.
Definition: GeometricBoundaryField.C:532
Foam::GeometricField::boundaryField
const Boundary & boundaryField() const
Return const-reference to the boundary field.
Definition: GeometricFieldI.H:62
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
GeometricFieldI.H
Foam::GeometricField::Boundary::scalarInterfaces
lduInterfaceFieldPtrsList scalarInterfaces() const
Return a list of pointers for each patch field with only those.
Definition: GeometricBoundaryField.C:507
Foam::GeometricField::Boundary::boundaryInternalField
Boundary boundaryInternalField() const
Return BoundaryField of the cell values neighbouring.
Definition: GeometricBoundaryField.C:463