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-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::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 GeometricField::Boundary is
104  //- 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 GeometricField::Boundary is
111  //- 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, reference to the internal field
133  //- and a patch type
134  Boundary
135  (
136  const BoundaryMesh& bmesh,
137  const Internal& field,
138  const word& patchFieldType
139  );
140 
141  //- Construct from a BoundaryMesh, reference to the internal field
142  //- and a wordList of patch types and optional the actual patch
143  //- types (to override constraint patches)
144  Boundary
145  (
146  const BoundaryMesh& bmesh,
147  const Internal& field,
148  const wordList& wantedPatchTypes,
149  const wordList& actualPatchTypes = wordList()
150  );
151 
152  //- Construct from a BoundaryMesh, reference to the internal field
153  //- and a PtrList<PatchField<Type>>
154  Boundary
155  (
156  const BoundaryMesh& bmesh,
157  const Internal& field,
158  const PtrList<PatchField<Type>>&
159  );
160 
161  //- Construct as copy setting the reference to the internal field
162  Boundary
163  (
164  const Internal& field,
165  const Boundary& btf
166  );
167 
168  //- Construct as copy setting the reference to the internal field
169  //- and resetting type of field for given patch IDs
170  Boundary
171  (
172  const Internal& field,
173  const Boundary& btf,
174  const labelList& patchIDs,
175  const word& patchFieldName
176  );
177 
178  //- Construct as copy
179  // Dangerous because Field may be set to a field which gets deleted
180  // Need new type of BoundaryField, one which is part of a geometric
181  // field for which snGrad etc. may be called and a free standing
182  // BoundaryField for which such operations are unavailable.
183  Boundary
184  (
185  const Boundary& btf
186  );
187 
188  //- Construct from dictionary
189  Boundary
190  (
191  const BoundaryMesh& bmesh,
192  const Internal& field,
193  const dictionary& dict
194  );
195 
196 
197  // Member Functions
198 
199  //- Read the boundary field
200  void readField
201  (
202  const Internal& field,
203  const dictionary& dict
204  );
205 
206  //- Update the boundary condition coefficients
207  void updateCoeffs();
208 
209  //- Evaluate boundary conditions
210  void evaluate();
211 
212  //- Return a list of the patch types
213  wordList types() const;
214 
215  //- Return BoundaryField of the cell values neighbouring
216  //- the boundary
218 
219  //- Return a list of pointers for each patch field with only those
220  //- pointing to interfaces being set
222 
223  //- Return a list of pointers for each patch field with only those
224  //- pointing to interfaces being set
226 
227  //- Write boundary field as dictionary entry
228  void writeEntry(const word& keyword, Ostream& os) const;
229 
230  //- Write dictionary entries of the individual boundary fields.
231  void writeEntries(Ostream& os) const;
232 
233 
234  // Member operators
235 
236  //- Assignment to BoundaryField<Type, PatchField, BoundaryMesh>
237  void operator=(const Boundary&);
238 
239  //- Assignment to FieldField<PatchField, Type>
241 
242  //- Assignment to Type
243  void operator=(const Type&);
244 
245 
246  //- Forced assignment to
247  // BoundaryField<Type, PatchField, BoundaryMesh>
248  void operator==(const Boundary&);
249 
250  //- Forced assignment to FieldField<PatchField, Type>
252 
253  //- Forced assignment to Type
254  void operator==(const Type&);
255  };
256 
257 
258 private:
259 
260  // Private data
261 
262  //- Current time index.
263  // Used to trigger the storing of the old-time value
264  mutable label timeIndex_;
265 
266  //- Pointer to old time field
267  mutable GeometricField<Type, PatchField, GeoMesh>* field0Ptr_;
268 
269  //- Pointer to previous iteration (used for under-relaxation)
270  mutable GeometricField<Type, PatchField, GeoMesh>* fieldPrevIterPtr_;
271 
272  //- Boundary Type field containing boundary field values
273  Boundary boundaryField_;
274 
275 
276  // Private Member Functions
277 
278  //- Read the field from the dictionary
279  void readFields(const dictionary& dict);
280 
281  //- Read the field - create the field dictionary on-the-fly
282  void readFields();
283 
284 
285 public:
286 
287  //- Runtime type information
288  TypeName("GeometricField");
289 
290 
291  // Public typedefs
292 
293  typedef typename Field<Type>::cmptType cmptType;
294 
295  // Static Member Functions
296 
297  //- Return a null geometric field
298  inline static const GeometricField<Type, PatchField, GeoMesh>& null();
299 
300 
301  // Constructors
302 
303  //- Construct given IOobject, mesh, dimensions and patch type.
304  // This allocates storage for the field but does not set values.
305  // Used only within this class to create TEMPORARY variables
307  (
308  const IOobject& io,
309  const Mesh& mesh,
310  const dimensionSet& ds,
311  const word& patchFieldType = PatchField<Type>::calculatedType()
312  );
313 
314  //- Construct given IOobject, mesh, dimensions and patch types.
315  // This allocates storage for the field but does not set values.
316  // Used only within this class to create TEMPORARY variables
318  (
319  const IOobject& io,
320  const Mesh& mesh,
321  const dimensionSet& ds,
322  const wordList& wantedPatchTypes,
323  const wordList& actualPatchTypes = wordList()
324  );
325 
326  //- Construct given IOobject, mesh, dimensioned<Type> and patch type.
327  // This assigns both dimensions and values.
328  // The internal name for the dimensioned<Type> has no influence.
330  (
331  const IOobject& io,
332  const Mesh& mesh,
333  const dimensioned<Type>& dt,
334  const word& patchFieldType = PatchField<Type>::calculatedType()
335  );
336 
337  //- Construct given IOobject, mesh, dimensioned<Type> and patch types.
338  // This assigns both dimensions and values.
339  // The internal name for the dimensioned<Type> has no influence.
341  (
342  const IOobject& io,
343  const Mesh& mesh,
344  const dimensioned<Type>& dt,
345  const wordList& wantedPatchTypes,
346  const wordList& actualPatchTypes = wordList()
347  );
348 
349  //- Copy construct from components
351  (
352  const IOobject& io,
353  const Internal& diField,
354  const PtrList<PatchField<Type>>& ptfl
355  );
356 
357  //- Copy construct from internal field, with specified patch type
359  (
360  const IOobject& io,
361  const Mesh& mesh,
362  const dimensionSet& ds,
363  const Field<Type>& iField,
364  const word& patchFieldType = PatchField<Type>::calculatedType()
365  );
366 
367  //- Move construct from internal field, with specified patch type
369  (
370  const IOobject& io,
371  const Mesh& mesh,
372  const dimensionSet& ds,
373  Field<Type>&& iField,
374  const word& patchFieldType = PatchField<Type>::calculatedType()
375  );
376 
377  //- Copy construct from components
379  (
380  const IOobject& io,
381  const Mesh& mesh,
382  const dimensionSet& ds,
383  const Field<Type>& iField,
384  const PtrList<PatchField<Type>>& ptfl
385  );
386 
387  //- Construct and read given IOobject
389  (
390  const IOobject& io,
391  const Mesh& mesh,
392  const bool readOldTime = true
393  );
394 
395  //- Construct from dictionary
397  (
398  const IOobject& io,
399  const Mesh& mesh,
400  const dictionary& dict
401  );
402 
403  //- Copy construct
405  (
407  );
408 
409  //- Construct from tmp<GeometricField> deleting argument
411  (
413  );
414 
415  //- Construct as copy resetting IO parameters
417  (
418  const IOobject& io,
420  );
421 
422  //- Construct as copy of tmp<GeometricField> resetting IO parameters
424  (
425  const IOobject& io,
427  );
428 
429  //- Copy construct with a new name
431  (
432  const word& newName,
434  );
435 
436  //- Construct with a new name from tmp<GeometricField>
438  (
439  const word& newName,
441  );
442 
443  //- Construct as copy resetting IO parameters and patch type
445  (
446  const IOobject& io,
448  const word& patchFieldType
449  );
450 
451  //- Construct as copy resetting IO parameters and boundary type
452  //- for selected patchIDs
454  (
455  const IOobject& io,
457  const labelList& patchIDs,
458  const word& patchFieldType
459  );
460 
461  //- Construct as copy resetting IO parameters and boundary types
463  (
464  const IOobject& io,
466  const wordList& patchFieldTypes,
467  const wordList& actualPatchTypes = wordList()
468  );
469 
470  //- Construct as copy resetting IO parameters and boundary types
472  (
473  const IOobject& io,
475  const wordList& patchFieldTypes,
476  const wordList& actualPatchTypes = wordList()
477  );
478 
479  //- Clone
481 
482 
483  // Static Constructors
484 
485  //- Return tmp field from name, mesh, dimensions and patch type.
486  // The field is NO_READ, NO_WRITE, unregistered and uses the
487  // current timeName from the mesh registry
489  (
490  const word& name,
491  const Mesh& mesh,
492  const dimensionSet& ds,
493  const word& patchFieldType = PatchField<Type>::calculatedType()
494  );
495 
496  //- Return tmp field from name, mesh, dimensions,
497  //- copy of internal field, with specified patch type.
498  // The field is NO_READ, NO_WRITE, unregistered and uses the
499  // current timeName from the mesh registry
501  (
502  const word& name,
503  const Mesh& mesh,
504  const dimensionSet& ds,
505  const Field<Type>& iField,
506  const word& patchFieldType = PatchField<Type>::calculatedType()
507  );
508 
509  //- Return tmp field from name, mesh, dimensions,
510  //- moved internal field contents, with specified patch type.
511  // The field is NO_READ, NO_WRITE, unregistered and uses the
512  // current timeName from the mesh registry
514  (
515  const word& name,
516  const Mesh& mesh,
517  const dimensionSet& ds,
518  Field<Type>&& iField,
519  const word& patchFieldType = PatchField<Type>::calculatedType()
520  );
521 
522  //- Return tmp field from name, mesh, dimensioned<Type>
523  //- and patch type.
524  // The field is NO_READ, NO_WRITE, unregistered and uses the
525  // current timeName from the mesh registry
527  (
528  const word& name,
529  const Mesh& mesh,
530  const dimensioned<Type>& dt,
531  const word& patchFieldType = PatchField<Type>::calculatedType()
532  );
533 
534  //- Return tmp field from name, mesh, dimensioned<Type>
535  //- and patch types.
536  // The field is NO_READ, NO_WRITE, unregistered and uses the
537  // current timeName from the mesh registry
539  (
540  const word& name,
541  const Mesh& mesh,
542  const dimensioned<Type>& dt,
543  const wordList& patchFieldTypes,
544  const wordList& actualPatchTypes = wordList()
545  );
546 
547  //- Return renamed tmp field
548  // The field is NO_READ, NO_WRITE, unregistered and uses the
549  // current timeName from the mesh registry
551  (
552  const word& newName,
554  );
555 
556  //- Rename tmp field and reset patch field types and return
557  // The field is NO_READ, NO_WRITE, unregistered and uses the
558  // current timeName from the mesh registry
560  (
561  const word& newName,
563  const wordList& patchFieldTypes,
564  const wordList& actualPatchTypes = wordList()
565  );
566 
567 
568  //- Destructor
569  virtual ~GeometricField();
570 
571 
572  // Member Functions
573 
574  //- Return a reference to the dimensioned internal field
575  // \param updateAccessTime update event counter and check
576  // old-time fields
577  //
578  // \note Should avoid using updateAccessTime = true within loops.
579  Internal& ref(const bool updateAccessTime = true);
580 
581  //- Return a const-reference to the dimensioned internal field
582  inline const Internal& internalField() const;
583 
584  //- Return a const-reference to the dimensioned internal field
585  //- of a "vol" field.
586  // Useful in the formulation of source-terms for FV equations
587  //
588  // \note definition in finiteVolume/fields/volFields/volFieldsI.H
589  inline const Internal& v() const;
590 
591  //- Return a reference to the internal field
592  // \param updateAccessTime update event counter and check
593  // old-time fields
594  //
595  // \note Should avoid using updateAccessTime = true within loops.
597  (
598  const bool updateAccessTime = true
599  );
600 
601  //- Return a const-reference to the internal field
602  inline const typename Internal::FieldType& primitiveField() const;
603 
604  //- Return a reference to the boundary field
605  // \param updateAccessTime update event counter and check
606  // old-time fields
607  //
608  // \note Should avoid using updateAccessTime = true within loops.
609  Boundary& boundaryFieldRef(const bool updateAccessTime = true);
610 
611  //- Return const-reference to the boundary field
612  inline const Boundary& boundaryField() const;
613 
614  //- Return the time index of the field
615  inline label timeIndex() const;
616 
617  //- Return the time index of the field
618  inline label& timeIndex();
619 
620  //- Store the old-time fields
621  void storeOldTimes() const;
622 
623  //- Store the old-time field
624  void storeOldTime() const;
625 
626  //- Return the number of old time fields stored
627  label nOldTimes() const;
628 
629  //- Return old time field
631 
632  //- Return non-const old time field
633  // (Not a good idea but it is used for sub-cycling)
635 
636  //- Store the field as the previous iteration value
637  void storePrevIter() const;
638 
639  //- Return previous iteration field
641 
642  //- Correct boundary field
644 
645  //- Does the field need a reference level for solution
646  bool needReference() const;
647 
648  //- Return a component of the field
650  (
651  const direction
652  ) const;
653 
654  //- WriteData member function required by regIOobject
655  bool writeData(Ostream&) const;
656 
657  //- Return transpose (only if it is a tensor field)
659 
660  //- Relax field (for steady-state solution).
661  // alpha = 1 : no relaxation
662  // alpha < 1 : relaxation
663  // alpha = 0 : do nothing
664  void relax(const scalar alpha);
665 
666  //- Relax field (for steady-state solution).
667  // alpha is read from controlDict
668  void relax();
669 
670  //- Select the final iteration parameters if `final' is true
671  // by returning the field name + "Final"
672  // otherwise the standard parameters by returning the field name
673  word select(bool final) const;
674 
675  //- Helper function to write the min and max to an Ostream
676  void writeMinMax(Ostream& os) const;
677 
678 
679  // Member Function *this Operators
680 
681  //- Negate the field inplace
682  void negate();
683 
684  //- Replace specified field component with content from another field
685  void replace
686  (
687  const direction d,
689  );
690 
691  //- Replace specified field component with specified value
692  void replace
693  (
694  const direction d,
695  const dimensioned<cmptType>& ds
696  );
697 
698  //- Use the minimum of the field and specified value
699  // This sets the \em ceiling on the field values
700  void min(const dimensioned<Type>& dt);
701 
702  //- Use the maximum of the field and specified value
703  // This sets the \em floor on the field values
704  void max(const dimensioned<Type>& dt);
705 
706  //- Clip the field to be bounded within the specified range
707  void clip(const dimensioned<MinMax<Type>>& range);
708 
709  //- Clip the field to be bounded within the specified range
710  void clip
711  (
712  const dimensioned<Type>& minVal,
713  const dimensioned<Type>& maxVal
714  );
715 
716  //- Deprecated(2019-01) identical to clip()
717  // \deprecated(2019-01) identical to clip()
718  FOAM_DEPRECATED_FOR(2019-01, "clip() method")
719  void maxMin
720  (
721  const dimensioned<Type>& minVal,
722  const dimensioned<Type>& maxVal
723  );
724 
725 
726  // Member Operators
727 
728  //- Return a const-reference to the dimensioned internal field
729  // Useful in the formulation of source-terms for FV equations
730  inline const Internal& operator()() const;
731 
732  void operator=(const GeometricField<Type, PatchField, GeoMesh>&);
733  void operator=(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
734  void operator=(const dimensioned<Type>&);
735 
736  void operator==(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
737  void operator==(const dimensioned<Type>&);
738 
739  void operator+=(const GeometricField<Type, PatchField, GeoMesh>&);
740  void operator+=(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
741 
742  void operator-=(const GeometricField<Type, PatchField, GeoMesh>&);
743  void operator-=(const tmp<GeometricField<Type, PatchField, GeoMesh>>&);
744 
745  void operator*=(const GeometricField<scalar, PatchField, GeoMesh>&);
746  void operator*=(const tmp<GeometricField<scalar,PatchField,GeoMesh>>&);
747 
748  void operator/=(const GeometricField<scalar, PatchField, GeoMesh>&);
749  void operator/=(const tmp<GeometricField<scalar,PatchField,GeoMesh>>&);
750 
751  void operator+=(const dimensioned<Type>&);
752  void operator-=(const dimensioned<Type>&);
753 
754  void operator*=(const dimensioned<scalar>&);
755  void operator/=(const dimensioned<scalar>&);
756 
757 
758  // Ostream operators
759 
760  friend Ostream& operator<< <Type, PatchField, GeoMesh>
761  (
762  Ostream&,
763  const GeometricField<Type, PatchField, GeoMesh>&
764  );
765 
766  friend Ostream& operator<< <Type, PatchField, GeoMesh>
767  (
768  Ostream&,
769  const tmp<GeometricField<Type, PatchField, GeoMesh>>&
770  );
771 };
772 
773 
774 template<class Type, template<class> class PatchField, class GeoMesh>
775 Ostream& operator<<
776 (
777  Ostream&,
778  const typename GeometricField<Type, PatchField, GeoMesh>::
779  Boundary&
780 );
781 
782 
783 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
784 
785 } // End namespace Foam
786 
787 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
788 
789 #include "GeometricFieldI.H"
790 
791 #ifdef NoRepository
792  #include "GeometricField.C"
793 #endif
794 
795 #include "GeometricFieldFunctions.H"
796 
797 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
798 
799 #endif
800 
801 // ************************************************************************* //
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:1035
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:185
Foam::constant::atomic::alpha
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
Definition: readThermalProperties.H:212
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:571
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:850
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
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:1007
Foam::GeometricField::internalField
const Internal & internalField() const
Return a const-reference to the dimensioned internal field.
Definition: GeometricFieldI.H:43
Foam::GeometricField::clip
void clip(const dimensioned< MinMax< Type >> &range)
Clip the field to be bounded within the specified range.
Definition: GeometricField.C:1154
lduInterfaceFieldPtrsList.H
Foam::GeometricField::Boundary::evaluate
void evaluate()
Evaluate boundary conditions.
Definition: GeometricBoundaryField.C:407
Foam::GeometricField::cmptType
Field< Type >::cmptType cmptType
Definition: GeometricField.H:292
Foam::GeometricField::min
void min(const dimensioned< Type > &dt)
Use the minimum of the field and specified value.
Definition: GeometricField.C:1132
Foam::GeometricField::Boundary::updateCoeffs
void updateCoeffs()
Update the boundary condition coefficients.
Definition: GeometricBoundaryField.C:395
Foam::GeometricField::needReference
bool needReference() const
Does the field need a reference level for solution.
Definition: GeometricField.C:949
Foam::GeometricField::maxMin
void maxMin(const dimensioned< Type > &minVal, const dimensioned< Type > &maxVal)
Deprecated(2019-01) identical to clip()
Definition: GeometricField.C:1179
Foam::GeometricField::nOldTimes
label nOldTimes() const
Return the number of old time fields stored.
Definition: GeometricField.C:837
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::wordList
List< word > wordList
A List of words.
Definition: fileName.H:59
Foam::GeometricField::Boundary::interfaces
LduInterfaceFieldPtrsList< Type > interfaces() const
Definition: GeometricBoundaryField.C:505
Foam::GeometricField::storeOldTimes
void storeOldTimes() const
Store the old-time fields.
Definition: GeometricField.C:797
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:1189
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:36
Foam::GeometricField::Boundary::operator==
void operator==(const Boundary &)
Forced assignment to.
Foam::GeometricField::writeMinMax
void writeMinMax(Ostream &os) const
Helper function to write the min and max to an Ostream.
Definition: GeometricField.C:1022
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:923
Foam::UPtrList< const lduInterfaceField >
Foam::GeometricField::Boundary::types
wordList types() const
Return a list of the patch types.
Definition: GeometricBoundaryField.C:470
field
rDeltaTY field()
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:62
Foam::GeoMesh::BoundaryMesh
MESH::BoundaryMesh BoundaryMesh
Definition: GeoMesh.H:64
Foam::GeometricField::storeOldTime
void storeOldTime() const
Store the old-time field.
Definition: GeometricField.C:816
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
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:766
Foam::GeometricField::clone
tmp< GeometricField< Type, PatchField, GeoMesh > > clone() const
Clone.
Definition: GeometricField.C:727
Foam::GeometricField::correctBoundaryConditions
void correctBoundaryConditions()
Correct boundary field.
Definition: GeometricField.C:940
Foam::GeometricField::T
tmp< GeometricField< Type, PatchField, GeoMesh > > T() const
Return transpose (only if it is a tensor field)
Definition: GeometricField.C:1046
Foam::GeometricField::storePrevIter
void storePrevIter() const
Store the field as the previous iteration value.
Definition: GeometricField.C:900
Foam::GeometricField::Boundary
Definition: GeometricField.H:114
range
scalar range
Definition: LISASMDCalcMethod1.H:12
Foam::GeometricField::ref
Internal & ref(const bool updateAccessTime=true)
Return a reference to the dimensioned internal field.
Definition: GeometricField.C:749
Foam::GeometricField::boundaryFieldRef
Boundary & boundaryFieldRef(const bool updateAccessTime=true)
Return a reference to the boundary field.
Definition: GeometricField.C:783
Foam::List< word >
Foam::GeometricField::relax
void relax()
Relax field (for steady-state solution).
Definition: GeometricField.C:982
Foam::direction
uint8_t direction
Definition: direction.H:47
dimensionedTypes.H
Foam::FOAM_DEPRECATED_FOR
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
Definition: NamedEnum.H:69
Foam::GeometricField::~GeometricField
virtual ~GeometricField()
Destructor.
Definition: GeometricField.C:736
Foam::GeometricField::max
void max(const dimensioned< Type > &dt)
Use the maximum of the field and specified value.
Definition: GeometricField.C:1143
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::LduInterfaceFieldPtrsList
Definition: LduInterfaceFieldPtrsList.H:50
Foam::GeometricField::operator
friend Ostream & operator(Ostream &, const GeometricField< Type, PatchField, GeoMesh > &)
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::GeoMesh::Mesh
MESH Mesh
Definition: GeoMesh.H:63
Foam::GeometricField::Patch
PatchField< Type > Patch
Definition: GeometricField.H:111
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:556
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
Foam::GeometricField::Boundary::scalarInterfaces
lduInterfaceFieldPtrsList scalarInterfaces() const
Definition: GeometricBoundaryField.C:531
Foam::GeometricField::Boundary::boundaryInternalField
Boundary boundaryInternalField() const
Definition: GeometricBoundaryField.C:488