calculatedFvsPatchField.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-2016 OpenFOAM Foundation
9  Copyright (C) 2024 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::calculatedFvsPatchField
29 
30 Description
31  This boundary condition is not designed to be evaluated; it is assumed
32  that the value is assigned via field assignment.
33 
34  The "value" entry is MUST_READ.
35 
36 Usage
37  \table
38  Property | Description | Required | Default
39  value | Patch face values | yes |
40  \endtable
41 
42  Example of the boundary condition specification:
43  \verbatim
44  <patchName>
45  {
46  type calculated;
47  value uniform (0 0 0); // Required value entry
48  }
49  \endverbatim
50 
51 SourceFiles
52  calculatedFvsPatchField.C
53 
54 \*---------------------------------------------------------------------------*/
55 
56 #ifndef Foam_calculatedFvsPatchField_H
57 #define Foam_calculatedFvsPatchField_H
58 
59 #include "fvsPatchField.H"
60 
61 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
62 
63 namespace Foam
64 {
65 
66 /*---------------------------------------------------------------------------*\
67  Class calculatedFvsPatch Declaration
68 \*---------------------------------------------------------------------------*/
69 
70 template<class Type>
71 class calculatedFvsPatchField
72 :
73  public fvsPatchField<Type>
74 {
75 public:
76 
77  //- Runtime type information
78  TypeName("calculated"); // fieldTypes::calculatedTypeName_()
79 
80 
81  // Constructors
82 
83  //- Construct from patch and internal field
85  (
86  const fvPatch&,
88  );
89 
90  //- Construct from patch, internal field and dictionary
91  //- The "value" entry is MUST_READ.
93  (
94  const fvPatch&,
96  const dictionary&
97  );
98 
99  //- Construct by mapping given patch field onto a new patch
101  (
103  const fvPatch&,
105  const fvPatchFieldMapper&
106  );
107 
108  //- Construct as copy
110  (
112  );
113 
114  //- Construct as copy setting internal field reference
116  (
119  );
120 
121  //- Return clone
122  virtual tmp<fvsPatchField<Type>> clone() const
123  {
124  return fvsPatchField<Type>::Clone(*this);
125  }
126 
127  //- Clone with an internal field reference
129  (
131  ) const
132  {
133  return fvsPatchField<Type>::Clone(*this, iF);
134  }
135 
136 
137  // Member Functions
138 
139  //- True: this patch field fixes a value.
140  virtual bool fixesValue() const { return true; }
142  //- Write includes "value" entry
143  virtual void write(Ostream&) const;
144 };
145 
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 } // End namespace Foam
151 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
152 
153 #ifdef NoRepository
154  #include "calculatedFvsPatchField.C"
155 #endif
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 #endif
160 
161 // ************************************************************************* //
virtual tmp< fvsPatchField< Type > > clone() const
Return clone.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
static tmp< fvsPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
calculatedFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
TypeName("calculated")
Runtime type information.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
virtual void write(Ostream &) const
Write includes "value" entry.
virtual bool fixesValue() const
True: this patch field fixes a value.
A FieldMapper for finite-volume patch fields.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
This boundary condition is not designed to be evaluated; it is assumed that the value is assigned via...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
Namespace for OpenFOAM.