coupledFvsPatchField.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::coupledFvsPatchField
29 
30 Description
31  Abstract base class for coupled patches.
32 
33  The "value" entry is usually MUST_READ and always WRITE.
34 
35 SourceFiles
36  coupledFvsPatchField.C
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_coupledFvsPatchField_H
41 #define Foam_coupledFvsPatchField_H
42 
43 #include "fvsPatchField.H"
44 #include "coupledFvPatch.H"
45 
46 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50 
51 /*---------------------------------------------------------------------------*\
52  Class coupledFvsPatchField Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 template<class Type>
57 :
58  public fvsPatchField<Type>
59 {
60 public:
61 
62  //- Runtime type information
63  TypeName(coupledFvPatch::typeName_());
64 
65 
66  // Constructors
67 
68  //- Construct from patch and internal field
70  (
71  const fvPatch&,
73  );
74 
75  //- Construct from patch and internal field and patch field
77  (
78  const fvPatch&,
80  const Field<Type>&
81  );
82 
83  //- Construct from patch, internal field and dictionary
85  (
86  const fvPatch&,
88  const dictionary&,
90  );
91 
92  //- Construct by mapping the given coupledFvsPatchField onto a new patch
94  (
96  const fvPatch&,
98  const fvPatchFieldMapper&
99  );
100 
101  //- Construct as copy
103  (
105  );
106 
107  //- Construct as copy setting internal field reference
109  (
112  );
113 
114  //- Return clone
115  virtual tmp<fvsPatchField<Type>> clone() const = 0;
116 
117  //- Construct and return a clone
119  (
121  ) const = 0;
122 
123 
124  // Member Functions
125 
126  //- True: this patch field is derived from coupledFvsPatchField
127  virtual bool coupled() const
128  {
129  return true;
130  }
131 
132  //- Write includes "value" entry
133  virtual void write(Ostream&) const;
134 };
135 
136 
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
138 
139 } // End namespace Foam
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
143 #ifdef NoRepository
144  #include "coupledFvsPatchField.C"
145 #endif
146 
147 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
148 
149 #endif
150 
151 // ************************************************************************* //
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:129
virtual void write(Ostream &) const
Write includes "value" entry.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
TypeName(coupledFvPatch::typeName_())
Runtime type information.
Generic templated field type.
Definition: Field.H:62
coupledFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
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
virtual tmp< fvsPatchField< Type > > clone() const =0
Return clone.
Abstract base class for coupled patches.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class for managing temporary objects.
Definition: HashPtrTable.H:50
virtual bool coupled() const
True: this patch field is derived from coupledFvsPatchField.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Namespace for OpenFOAM.
readOption
Enumeration defining read preferences.