fvPatchField.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) 2019-2023 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::fvPatchField
29 
30 Description
31  Abstract base class with a fat-interface to all derived classes
32  covering all possible ways in which they might be used.
33 
34  The first level of derivation is to basic patchFields which cover
35  zero-gradient, fixed-gradient, fixed-value and mixed conditions.
36 
37  The next level of derivation covers all the specialised types with
38  specific evaluation procedures, particularly with respect to specific
39  fields.
40 
41 SourceFiles
42  fvPatchField.C
43  fvPatchFieldBase.C
44  fvPatchFieldNew.C
45 
46 \*---------------------------------------------------------------------------*/
47 
48 #ifndef Foam_fvPatchField_H
49 #define Foam_fvPatchField_H
50 
51 #include "fvPatch.H"
52 #include "DimensionedField.H"
53 #include "fieldTypes.H"
54 #include "scalarField.H"
55 
56 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
57 
58 namespace Foam
59 {
60 
61 // Forward Declarations
62 class dictionary;
63 class objectRegistry;
65 class volMesh;
66 
67 template<class Type> class fvPatchField;
68 template<class Type> class calculatedFvPatchField;
69 template<class Type> class fvMatrix;
70 
71 template<class Type>
72 Ostream& operator<<(Ostream&, const fvPatchField<Type>&);
73 
74 
75 /*---------------------------------------------------------------------------*\
76  Class fvPatchFieldBase Declaration
77 \*---------------------------------------------------------------------------*/
78 
79 //- Template invariant parts for fvPatchField
80 class fvPatchFieldBase
81 {
82  // Private Data
83 
84  //- Reference to patch
85  const fvPatch& patch_;
86 
87  //- Update index used so that updateCoeffs is called only once during
88  //- the construction of the matrix
89  bool updated_;
90 
91  //- Update index used so that manipulateMatrix is called only once
92  //- during the construction of the matrix
93  bool manipulatedMatrix_;
94 
95  //- Use implicit formulation
96  bool useImplicit_;
97 
98  //- Optional patch type
99  // Used to allow specified boundary conditions to be applied
100  // to constraint patches by providing the constraint
101  // patch type as 'patchType'
102  word patchType_;
103 
104 
105 protected:
106 
107  // Protected Member Functions
108 
109  //- Read dictionary entries.
110  // Useful when initially constructed without a dictionary
111  virtual void readDict(const dictionary& dict);
112 
113  //- Set updated state
114  void setUpdated(bool state) noexcept
115  {
116  updated_ = state;
117  }
118 
119  //- Set matrix manipulated state
120  void setManipulated(bool state) noexcept
121  {
122  manipulatedMatrix_ = state;
123  }
124 
125 
126 public:
128  //- Debug switch to disallow the use of generic fvPatchField
129  static int disallowGenericPatchField;
130 
131  //- Runtime type information
132  TypeName("fvPatchField");
133 
134 
135  // Constructors
136 
137  //- Construct from patch
138  explicit fvPatchFieldBase(const fvPatch& p);
139 
140  //- Construct from patch and patch type
141  explicit fvPatchFieldBase(const fvPatch& p, const word& patchType);
142 
143  //- Construct from patch and dictionary
144  fvPatchFieldBase(const fvPatch& p, const dictionary& dict);
145 
146  //- Copy construct with new patch
147  fvPatchFieldBase(const fvPatchFieldBase& rhs, const fvPatch& p);
148 
149  //- Copy construct
151 
152 
153  //- Destructor
154  virtual ~fvPatchFieldBase() = default;
155 
156 
157  // Static Member Functions
158 
159  //- The type name for \c empty patch fields
160  static const word& emptyType() noexcept
161  {
163  }
164 
165  //- The type name for \c calculated patch fields
166  static const word& calculatedType() noexcept
167  {
169  }
170 
171  //- The type name for \c extrapolatedCalculated patch fields
172  //- combines \c zero-gradient and \c calculated
173  static const word& extrapolatedCalculatedType() noexcept
174  {
176  }
177 
178  //- The type name for \c zeroGradient patch fields
179  static const word& zeroGradientType() noexcept
180  {
182  }
183 
184 
185  // Member Functions
186 
187  // Attributes
188 
189  //- True if the value of the patch field is altered by assignment
190  virtual bool assignable() const
191  {
192  return true;
193  }
194 
195  //- True if the patch field fixes a value.
196  // Needed to check if a level has to be specified while solving
197  // Poissons equations.
198  virtual bool fixesValue() const
199  {
200  return false;
201  }
202 
203  //- True if the patch field is coupled
204  virtual bool coupled() const
205  {
206  return false;
207  }
208 
209 
210  // Access
211 
212  //- The associated objectRegistry
213  const objectRegistry& db() const;
214 
215  //- Return the patch
216  const fvPatch& patch() const noexcept
217  {
218  return patch_;
219  }
220 
221  //- The optional patch type
222  const word& patchType() const noexcept
223  {
224  return patchType_;
225  }
226 
227  //- The optional patch type
228  word& patchType() noexcept
229  {
230  return patchType_;
231  }
232 
233 
234  // Solution
235 
236  //- True if the boundary condition has already been updated
237  bool updated() const noexcept
238  {
239  return updated_;
240  }
241 
242  //- True if the matrix has already been manipulated
243  bool manipulatedMatrix() const noexcept
244  {
245  return manipulatedMatrix_;
246  }
247 
248  //- Use implicit formulation for coupled patches only
249  bool useImplicit() const noexcept
250  {
251  return useImplicit_;
252  }
253 
254  //- Set useImplicit on/off
255  // \return old value
256  bool useImplicit(bool on) noexcept
257  {
258  bool old(useImplicit_);
259  useImplicit_ = on;
260  return old;
261  }
262 
263 
264  // Check
265 
266  //- Check that patches are identical
267  void checkPatch(const fvPatchFieldBase& rhs) const;
268 };
269 
270 
271 /*---------------------------------------------------------------------------*\
272  Class fvPatchField Declaration
273 \*---------------------------------------------------------------------------*/
275 template<class Type>
276 class fvPatchField
277 :
278  public fvPatchFieldBase,
279  public Field<Type>
280 {
281  // Private Data
283  //- Reference to internal field
284  const DimensionedField<Type, volMesh>& internalField_;
285 
286 protected:
287 
288  // Protected Member Functions
289 
290  //- Read the "value" entry into \c *this.
291  // The reading can be optional (default), mandatory etc.
292  // \returns True on success
294  (
295  const dictionary& dict,
297  );
298 
299  //- Write \c *this field as a "value" entry
300  void writeValueEntry(Ostream& os) const
301  {
302  Field<Type>::writeEntry("value", os);
303  }
304 
305  //- Assign the patch field from the internal field
306  void extrapolateInternal();
307 
308 
309 public:
310 
311  //- The internal field type associated with the patch field
313 
314  //- The patch type for the patch field
315  typedef fvPatch Patch;
316 
317  //- Type for a \em calculated patch
320 
321  // Declare run-time constructor selection tables
322 
324  (
325  tmp,
326  fvPatchField,
327  patch,
328  (
329  const fvPatch& p,
331  ),
332  (p, iF)
333  );
334 
336  (
337  tmp,
338  fvPatchField,
339  patchMapper,
340  (
341  const fvPatchField<Type>& ptf,
342  const fvPatch& p,
344  const fvPatchFieldMapper& m
345  ),
346  (dynamic_cast<const fvPatchFieldType&>(ptf), p, iF, m)
347  );
348 
350  (
351  tmp,
352  fvPatchField,
353  dictionary,
354  (
355  const fvPatch& p,
357  const dictionary& dict
358  ),
359  (p, iF, dict)
360  );
361 
362 
363  // Constructors
364 
365  //- Construct from patch and internal field
367  (
368  const fvPatch&,
370  );
371 
372  //- Construct from patch, internal field and patch type
374  (
375  const fvPatch&,
377  const word& patchType
378  );
379 
380  //- Construct from patch, internal field and value
382  (
383  const fvPatch&,
385  const Type& value
386  );
387 
388  //- Construct from patch, internal field and patch field
390  (
391  const fvPatch&,
393  const Field<Type>& pfld
394  );
395 
396  //- Construct from patch, internal field and patch field
398  (
399  const fvPatch&,
401  Field<Type>&& pfld
402  );
403 
404  //- Construct from patch, internal field and dictionary
406  (
407  const fvPatch&,
409  const dictionary& dict,
412  );
413 
414  //- Construct, forwarding to readOption variant
416  (
417  const fvPatch& p,
419  const dictionary& dict,
420  const bool valueReqd
421  )
422  :
424  (
425  p, iF, dict,
426  (valueReqd? IOobjectOption::MUST_READ : IOobjectOption::NO_READ)
427  )
428  {}
429 
430  //- Construct by mapping the given fvPatchField onto a new patch
432  (
433  const fvPatchField<Type>&,
434  const fvPatch&,
436  const fvPatchFieldMapper&
437  );
438 
439  //- Construct as copy
441 
442  //- Construct as copy setting internal field reference
444  (
445  const fvPatchField<Type>&,
447  );
448 
449  //- Construct and return a clone
450  virtual tmp<fvPatchField<Type>> clone() const
451  {
452  return tmp<fvPatchField<Type>>::New(*this);
453  }
454 
455  //- Construct and return a clone setting internal field reference
456  virtual tmp<fvPatchField<Type>> clone
457  (
458  const DimensionedField<Type, volMesh>& iF
459  ) const
460  {
461  return tmp<fvPatchField<Type>>::New(*this, iF);
462  }
463 
464 
465  // Selectors
466 
467  //- Return a pointer to a new patchField created on freestore given
468  // patch and internal field
469  // (does not set the patch field values)
470  static tmp<fvPatchField<Type>> New
471  (
472  const word& patchFieldType,
473  const fvPatch&,
474  const DimensionedField<Type, volMesh>&
475  );
476 
477  //- Return a pointer to a new patchField created on freestore given
478  // patch and internal field
479  // (does not set the patch field values).
480  // Allows override of constraint type
481  static tmp<fvPatchField<Type>> New
482  (
483  const word& patchFieldType,
484  const word& actualPatchType,
485  const fvPatch&,
486  const DimensionedField<Type, volMesh>&
487  );
488 
489  //- Return a pointer to a new patchField created on freestore from
490  // a given fvPatchField mapped onto a new patch
491  static tmp<fvPatchField<Type>> New
492  (
493  const fvPatchField<Type>&,
494  const fvPatch&,
495  const DimensionedField<Type, volMesh>&,
496  const fvPatchFieldMapper&
497  );
498 
499  //- Return a pointer to a new patchField created on freestore
500  // from dictionary
501  static tmp<fvPatchField<Type>> New
502  (
503  const fvPatch&,
504  const DimensionedField<Type, volMesh>&,
505  const dictionary&
506  );
507 
508  //- Return a pointer to a new calculatedFvPatchField created on
509  // freestore without setting patchField values
511  (
512  const fvPatch&
513  );
514 
515  //- Return a pointer to a new calculatedFvPatchField created on
516  // freestore without setting patchField values
517  template<class Type2>
519  (
520  const fvPatchField<Type2>&
521  );
522 
523 
524  //- Destructor
525  virtual ~fvPatchField() = default;
526 
527 
528  // Member Functions
529 
530  // Access
531 
532  //- Return const-reference to the dimensioned internal field
534  {
535  return internalField_;
536  }
537 
538  //- Return const-reference to the internal field values
539  const Field<Type>& primitiveField() const noexcept
540  {
541  return internalField_;
542  }
543 
544 
545  // Mapping Functions
546 
547  //- Map (and resize as needed) from self given a mapping object
548  virtual void autoMap
549  (
550  const fvPatchFieldMapper&
551  );
553  //- Reverse map the given fvPatchField onto this fvPatchField
554  virtual void rmap
555  (
556  const fvPatchField<Type>&,
557  const labelList&
558  );
559 
560 
561  // Evaluation Functions
562 
563  //- Return patch-normal gradient
564  virtual tmp<Field<Type>> snGrad() const;
565 
566  //- Return patch-normal gradient for coupled-patches
567  // using the deltaCoeffs provided
568  virtual tmp<Field<Type>> snGrad
569  (
570  const scalarField& deltaCoeffs
571  ) const
572  {
574  return *this;
575  }
576 
577  //- Update the coefficients associated with the patch field
578  // Sets Updated to true
579  virtual void updateCoeffs();
580 
581  //- Update the coefficients associated with the patch field
582  // with a weight field (0..1). This weight field is usually
583  // provided as the amount of geometric overlap for 'duplicate'
584  // patches. Sets Updated to true
585  virtual void updateWeightedCoeffs(const scalarField& weights);
586 
587  //- Return internal field next to patch
588  virtual tmp<Field<Type>> patchInternalField() const;
589 
590  //- Extract internal field next to patch
591  // \param [out] pfld The extracted patch field.
592  virtual void patchInternalField(Field<Type>& pfld) const;
593 
594  //- Return patchField on the opposite patch of a coupled patch
595  virtual tmp<Field<Type>> patchNeighbourField() const
596  {
598  return *this;
599  }
600 
601  //- Initialise the evaluation of the patch field
602  virtual void initEvaluate
603  (
604  const Pstream::commsTypes commsType =
606  )
607  {}
608 
609  //- Evaluate the patch field, sets updated() to false
610  virtual void evaluate
611  (
612  const Pstream::commsTypes commsType =
614  );
615 
616 
617  //- Return the matrix diagonal coefficients corresponding to the
618  // evaluation of the value of this patchField with given weights
619  virtual tmp<Field<Type>> valueInternalCoeffs
620  (
621  const tmp<Field<scalar>>&
622  ) const
623  {
625  return *this;
626  }
627 
628  //- Return the matrix source coefficients corresponding to the
629  // evaluation of the value of this patchField with given weights
630  virtual tmp<Field<Type>> valueBoundaryCoeffs
631  (
632  const tmp<Field<scalar>>&
633  ) const
634  {
636  return *this;
637  }
638 
639  //- Return the matrix diagonal coefficients corresponding to the
640  // evaluation of the gradient of this patchField
641  virtual tmp<Field<Type>> gradientInternalCoeffs() const
642  {
644  return *this;
645  }
646 
647  //- Return the matrix diagonal coefficients corresponding to the
648  // evaluation of the gradient of this coupled patchField
649  // using the deltaCoeffs provided
650  virtual tmp<Field<Type>> gradientInternalCoeffs
651  (
652  const scalarField& deltaCoeffs
653  ) const
654  {
656  return *this;
657  }
658 
659  //- Return the matrix source coefficients corresponding to the
660  // evaluation of the gradient of this patchField
661  virtual tmp<Field<Type>> gradientBoundaryCoeffs() const
662  {
664  return *this;
665  }
666 
667  //- Return the matrix source coefficients corresponding to the
668  // evaluation of the gradient of this coupled patchField
669  // using the deltaCoeffs provided
671  (
672  const scalarField& deltaCoeffs
673  ) const
674  {
676  return *this;
677  }
678 
679 
680  //- Manipulate matrix
681  virtual void manipulateMatrix(fvMatrix<Type>& matrix);
682 
683  //- Manipulate matrix with given weights
684  virtual void manipulateMatrix
685  (
686  fvMatrix<Type>& matrix,
687  const scalarField& weights
688  );
689 
690  //- Manipulate fvMatrix
691  virtual void manipulateMatrix
692  (
693  fvMatrix<Type>& matrix,
694  const label iMatrix,
695  const direction cmp
696  );
697 
698 
699  // Other
700 
701  //- Write
702  virtual void write(Ostream&) const;
703 
704  //- Check against given patch field
705  void check(const fvPatchField<Type>&) const;
707 
708  // Member Operators
709 
710  virtual void operator=(const UList<Type>&);
711 
712  virtual void operator=(const fvPatchField<Type>&);
713  virtual void operator+=(const fvPatchField<Type>&);
714  virtual void operator-=(const fvPatchField<Type>&);
715  virtual void operator*=(const fvPatchField<scalar>&);
716  virtual void operator/=(const fvPatchField<scalar>&);
717 
718  virtual void operator+=(const Field<Type>&);
719  virtual void operator-=(const Field<Type>&);
720 
721  virtual void operator*=(const Field<scalar>&);
722  virtual void operator/=(const Field<scalar>&);
723 
724  virtual void operator=(const Type&);
725  virtual void operator+=(const Type&);
726  virtual void operator-=(const Type&);
727  virtual void operator*=(const scalar);
728  virtual void operator/=(const scalar);
729 
730 
731  // Force an assignment irrespective of form of patch
732 
733  virtual void operator==(const fvPatchField<Type>&);
734  virtual void operator==(const Field<Type>&);
735  virtual void operator==(const Type&);
736 
737 
738  // Ostream Operator
739 
740  friend Ostream& operator<< <Type>(Ostream&, const fvPatchField<Type>&);
741 };
742 
743 
744 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
746 } // End namespace Foam
747 
748 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
749 
750 #ifdef NoRepository
751  #include "fvPatchField.C"
752  #include "fvPatchFieldNew.C"
753  #include "calculatedFvPatchField.H"
754  #include "zeroGradientFvPatchField.H"
755 #endif
756 
757 // Runtime selection macros
758 #include "fvPatchFieldMacros.H"
759 
760 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
761 
762 #endif
763 
764 // ************************************************************************* //
static const word & zeroGradientType() noexcept
The type name for zeroGradient patch fields.
Definition: fvPatchField.H:218
bool readValueEntry(const dictionary &dict, IOobjectOption::readOption readOpt=IOobjectOption::LAZY_READ)
Read the "value" entry into *this.
Definition: fvPatchField.C:32
dictionary dict
virtual bool coupled() const
True if the patch field is coupled.
Definition: fvPatchField.H:250
const objectRegistry & db() const
The associated objectRegistry.
"blocking" : (MPI_Bsend, MPI_Recv)
uint8_t direction
Definition: direction.H:48
const word zeroGradientType
A zeroGradient patch field type.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: fvPatchField.C:236
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
Definition: fvPatchField.C:213
declareRunTimeSelectionTable(tmp, fvPatchField, patch,(const fvPatch &p, const DimensionedField< Type, volMesh > &iF),(p, iF))
commsTypes
Communications types.
Definition: UPstream.H:74
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:120
const fvPatch & patch() const noexcept
Return the patch.
Definition: fvPatchField.H:266
static const word & emptyType() noexcept
The type name for empty patch fields.
Definition: fvPatchField.H:193
virtual ~fvPatchField()=default
Destructor.
virtual void operator*=(const fvPatchField< scalar > &)
Definition: fvPatchField.C:434
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
void extrapolateInternal()
Assign the patch field from the internal field.
Definition: fvPatchField.C:62
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
void writeEntry(const word &keyword, Ostream &os) const
Write the field as a dictionary entry.
Definition: Field.C:720
virtual void initEvaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Initialise the evaluation of the patch field.
Definition: fvPatchField.H:755
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< Field< scalar >> &) const
Return the matrix source coefficients corresponding to the.
Definition: fvPatchField.H:791
Template invariant parts for fvPatchField.
Definition: fvPatchField.H:77
void writeValueEntry(Ostream &os) const
Write *this field as a "value" entry.
Definition: fvPatchField.H:372
virtual void write(Ostream &) const
Write.
Definition: fvPatchField.C:372
virtual void readDict(const dictionary &dict)
Read dictionary entries.
virtual void operator==(const fvPatchField< Type > &)
Definition: fvPatchField.C:546
bool useImplicit() const noexcept
Use implicit formulation for coupled patches only.
Definition: fvPatchField.H:309
const word calculatedType
A calculated patch field type.
bool manipulatedMatrix() const noexcept
True if the matrix has already been manipulated.
Definition: fvPatchField.H:301
Mesh data needed to do the Finite Volume discretisation.
Definition: volMesh.H:45
Macros for creating fvPatchField types.
bool updated() const noexcept
True if the boundary condition has already been updated.
Definition: fvPatchField.H:293
Generic templated field type.
Definition: Field.H:62
A class for handling words, derived from Foam::string.
Definition: word.H:63
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
Definition: fvPatchField.H:745
fvPatch Patch
The patch type for the patch field.
Definition: fvPatchField.H:393
virtual void operator/=(const fvPatchField< scalar > &)
Definition: fvPatchField.C:445
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
Definition: fvPatchField.H:804
A FieldMapper for finite-volume patch fields.
void setUpdated(bool state) noexcept
Set updated state.
Definition: fvPatchField.H:127
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: fvPatchField.C:299
virtual bool assignable() const
True if the value of the patch field is altered by assignment.
Definition: fvPatchField.H:231
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
Definition: fvPatchField.H:64
virtual void manipulateMatrix(fvMatrix< Type > &matrix)
Manipulate matrix.
Definition: fvPatchField.C:342
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< Field< scalar >> &) const
Return the matrix diagonal coefficients corresponding to the.
Definition: fvPatchField.H:777
const Field< Type > & primitiveField() const noexcept
Return const-reference to the internal field values.
Definition: fvPatchField.H:667
void check(const fvPatchField< Type > &) const
Check against given patch field.
Definition: fvPatchField.C:206
fvPatchFieldBase(const fvPatch &p)
Construct from patch.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:55
const direction noexcept
Definition: Scalar.H:258
virtual void operator-=(const fvPatchField< Type > &)
Definition: fvPatchField.C:423
static int disallowGenericPatchField
Debug switch to disallow the use of generic fvPatchField.
Definition: fvPatchField.H:146
virtual tmp< Field< Type > > patchInternalField() const
Return internal field next to patch.
Definition: fvPatchField.C:221
const word emptyType
An empty patch field type.
OBJstream os(runTime.globalPath()/outputName)
virtual void operator+=(const fvPatchField< Type > &)
Definition: fvPatchField.C:412
virtual ~fvPatchFieldBase()=default
Destructor.
virtual void evaluate(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking)
Evaluate the patch field, sets updated() to false.
Definition: fvPatchField.C:329
const word & patchType() const noexcept
The optional patch type.
Definition: fvPatchField.H:274
calculatedFvPatchField< Type > Calculated
Type for a calculated patch.
Definition: fvPatchField.H:398
virtual void updateCoeffs()
Update the coefficients associated with the patch field.
Definition: fvPatchField.C:309
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
Definition: fvPatchField.H:830
virtual bool fixesValue() const
True if the patch field fixes a value.
Definition: fvPatchField.H:242
virtual void operator=(const UList< Type > &)
Definition: fvPatchField.C:391
A simple container of IOobject preferences. Can also be used for general handling of read/no-read/rea...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: areaFieldsFwd.H:42
static tmp< fvPatchField< Type > > NewCalculatedType(const fvPatch &)
Return a pointer to a new calculatedFvPatchField created on.
static const word & calculatedType() noexcept
The type name for calculated patch fields.
Definition: fvPatchField.H:201
const DimensionedField< Type, volMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
Definition: fvPatchField.H:659
Reading is optional [identical to READ_IF_PRESENT].
virtual void updateWeightedCoeffs(const scalarField &weights)
Update the coefficients associated with the patch field.
Definition: fvPatchField.C:316
volScalarField & p
A class for managing temporary objects.
Definition: HashPtrTable.H:50
void checkPatch(const fvPatchFieldBase &rhs) const
Check that patches are identical.
Registry of regIOobjects.
static const word & extrapolatedCalculatedType() noexcept
The type name for extrapolatedCalculated patch fields combines zero-gradient and calculated.
Definition: fvPatchField.H:210
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:666
TypeName("fvPatchField")
Runtime type information.
const word extrapolatedCalculatedType
A combined zero-gradient and calculated patch field type.
fvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: fvPatchField.C:72
void setManipulated(bool state) noexcept
Set matrix manipulated state.
Definition: fvPatchField.H:135
Namespace for OpenFOAM.
static tmp< fvPatchField< Type > > New(const word &patchFieldType, const fvPatch &, const DimensionedField< Type, volMesh > &)
Return a pointer to a new patchField created on freestore given.
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: fvPatchField.H:552
DimensionedField< Type, volMesh > Internal
The internal field type associated with the patch field.
Definition: fvPatchField.H:388
readOption
Enumeration defining read preferences.