genericFvPatchField.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) 2019-2021 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::genericFvPatchField
29 
30 Description
31  This boundary condition provides a generic version of the \c calculated
32  condition, useful as a fallback for handling unknown patch types. Not
33  generally applicable as a user-specified condition.
34 
35 See also
36  Foam::calculatedFvPatchField
37 
38 SourceFiles
39  genericFvPatchField.C
40 
41 \*---------------------------------------------------------------------------*/
42 
43 #ifndef genericFvPatchField_H
44 #define genericFvPatchField_H
45 
46 #include "calculatedFvPatchField.H"
47 #include "genericPatchFieldBase.H"
48 
49 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
50 
51 namespace Foam
52 {
53 
54 /*---------------------------------------------------------------------------*\
55  Class genericFvPatch Declaration
56 \*---------------------------------------------------------------------------*/
57 
58 template<class Type>
60 :
61  public calculatedFvPatchField<Type>,
63 {
64  //- The parent boundary condition type
66 
67 
68 public:
69 
70  //- Runtime type information
71  TypeName("generic");
72 
73 
74  // Constructors
75 
76  //- Construct from patch and internal field
78  (
79  const fvPatch&,
81  );
82 
83  //- Construct from patch, internal field and dictionary
85  (
86  const fvPatch&,
88  const dictionary&
89  );
90 
91  //- Construct by mapping given patchField<Type> onto a new patch
93  (
95  const fvPatch&,
97  const fvPatchFieldMapper&
98  );
99 
100  //- Construct and return a clone
101  virtual tmp<fvPatchField<Type>> clone() const
102  {
103  return tmp<fvPatchField<Type>>
104  (
105  new genericFvPatchField<Type>(*this)
106  );
107  }
108 
109  //- Default copy construct
111 
112  //- Construct as copy setting internal field reference
114  (
117  );
118 
119  //- Construct and return a clone setting internal field reference
121  (
123  ) const
124  {
125  return tmp<fvPatchField<Type>>
126  (
127  new genericFvPatchField<Type>(*this, iF)
128  );
129  }
130 
131 
132  // Member Functions
133 
134  //- Write
135  virtual void write(Ostream&) const;
136 
137 
138  // Mapping Functions
139 
140  //- Map (and resize as needed) from self given a mapping object
141  virtual void autoMap(const fvPatchFieldMapper&);
142 
143  //- Reverse map the given fvPatchField onto this fvPatchField
144  virtual void rmap
145  (
146  const fvPatchField<Type>&,
147  const labelList&
148  );
149 
150 
151  // Evaluation Functions
152 
153  //- Fatal
154  virtual tmp<Field<Type>>
156 
157  //- Fatal
158  virtual tmp<Field<Type>>
160 
161  //- Fatal
163 
164  //- Fatal
166 };
167 
168 
169 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170 
171 } // End namespace Foam
172 
173 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
174 
175 #ifdef NoRepository
176  #include "genericFvPatchField.C"
177 #endif
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #endif
182 
183 // ************************************************************************* //
Foam::fvPatchField
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: volSurfaceMapping.H:51
Foam::genericFvPatchField
This boundary condition provides a generic version of the calculated condition, useful as a fallback ...
Definition: genericFvPatchField.H:58
Foam::genericFvPatchField::gradientInternalCoeffs
tmp< Field< Type > > gradientInternalCoeffs() const
Fatal.
Definition: genericFvPatchField.C:187
Foam::genericFvPatchField::genericFvPatchField
genericFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
Definition: genericFvPatchField.C:36
Foam::genericPatchFieldBase
Generic infrastructure for reading/writing unknown patch types.
Definition: genericPatchFieldBase.H:54
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
calculatedFvPatchField.H
genericFvPatchField.C
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
Foam::genericFvPatchField::rmap
virtual void rmap(const fvPatchField< Type > &, const labelList &)
Reverse map the given fvPatchField onto this fvPatchField.
Definition: genericFvPatchField.C:128
Foam::genericFvPatchField::write
virtual void write(Ostream &) const
Write.
Definition: genericFvPatchField.C:107
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam::calculatedFvPatchField
This boundary condition is not designed to be evaluated; it is assmued that the value is assigned via...
Definition: calculatedFvPatchField.H:66
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::genericFvPatchField::valueInternalCoeffs
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Fatal.
Definition: genericFvPatchField.C:146
Foam::genericFvPatchField::TypeName
TypeName("generic")
Runtime type information.
Foam::genericFvPatchField::gradientBoundaryCoeffs
tmp< Field< Type > > gradientBoundaryCoeffs() const
Fatal.
Definition: genericFvPatchField.C:204
Foam::List< label >
Foam::genericFvPatchField::valueBoundaryCoeffs
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Fatal.
Definition: genericFvPatchField.C:167
Foam::genericFvPatchField::clone
virtual tmp< fvPatchField< Type > > clone() const
Construct and return a clone.
Definition: genericFvPatchField.H:100
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
Foam::genericFvPatchField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: genericFvPatchField.C:117
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
genericPatchFieldBase.H
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54