genericFvsPatchField.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) 2019-2021 OpenCFD Ltd.
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::genericFvsPatchField
28 
29 Description
30  This boundary condition provides a generic version of the \c calculated
31  condition, useful as a fallback for handling unknown patch types. Not
32  generally applicable as a user-specified condition.
33 
34 See also
35  Foam::calculatedFvsPatchField
36 
37 SourceFiles
38  genericFvsPatchField.C
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef genericFvsPatchField_H
43 #define genericFvsPatchField_H
44 
46 #include "genericPatchFieldBase.H"
47 
48 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
49 
50 namespace Foam
51 {
52 
53 /*---------------------------------------------------------------------------*\
54  Class genericFvsPatch Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 template<class Type>
59 :
60  public calculatedFvsPatchField<Type>,
62 {
63  //- The parent boundary condition type
65 
66 
67 public:
68 
69  //- Runtime type information
70  TypeName("generic");
71 
72 
73  // Constructors
74 
75  //- Construct from patch and internal field
77  (
78  const fvPatch&,
80  );
81 
82  //- Construct from patch, internal field and dictionary
84  (
85  const fvPatch&,
87  const dictionary&
88  );
89 
90  //- Construct by mapping given patchField<Type> onto a new patch
92  (
94  const fvPatch&,
96  const fvPatchFieldMapper&
97  );
98 
99  //- Construct and return a clone
100  virtual tmp<fvsPatchField<Type>> clone() const
101  {
103  (
104  new genericFvsPatchField<Type>(*this)
105  );
106  }
107 
108  //- Default copy construct
110 
111  //- Construct as copy setting internal field reference
113  (
116  );
117 
118  //- Construct and return a clone setting internal field reference
120  (
122  ) const
123  {
125  (
126  new genericFvsPatchField<Type>(*this, iF)
127  );
128  }
129 
130 
131  // Member Functions
132 
133  //- Write
134  virtual void write(Ostream&) const;
135 
136 
137  // Mapping Functions
138 
139  //- Map (and resize as needed) from self given a mapping object
140  virtual void autoMap(const fvPatchFieldMapper&);
141 
142  //- Reverse map the given faPatchField onto this faPatchField
143  virtual void rmap
144  (
145  const fvsPatchField<Type>&,
146  const labelList&
147  );
148 
149 
150  // Evaluation Functions
151 
152  //- Fatal
153  virtual tmp<Field<Type>>
155 
156  //- Fatal
157  virtual tmp<Field<Type>>
159 
160  //- Fatal
162 
163  //- Fatal
165 };
166 
167 
168 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 
170 } // End namespace Foam
171 
172 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 
174 #ifdef NoRepository
175  #include "genericFvsPatchField.C"
176 #endif
177 
178 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
179 
180 #endif
181 
182 // ************************************************************************* //
Foam::genericFvsPatchField::TypeName
TypeName("generic")
Runtime type information.
Foam::genericFvsPatchField
This boundary condition provides a generic version of the calculated condition, useful as a fallback ...
Definition: genericFvsPatchField.H:57
Foam::genericPatchFieldBase
Generic infrastructure for reading/writing unknown patch types.
Definition: genericPatchFieldBase.H:54
Foam::genericFvsPatchField::clone
virtual tmp< fvsPatchField< Type > > clone() const
Construct and return a clone.
Definition: genericFvsPatchField.H:99
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:61
Foam::genericFvsPatchField::valueBoundaryCoeffs
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Fatal.
Definition: genericFvsPatchField.C:167
Foam::fvsPatchField
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Definition: fvsPatchField.H:68
Foam::calculatedFvsPatchField
Foam::calculatedFvsPatchField.
Definition: calculatedFvsPatchField.H:51
genericFvsPatchField.C
Foam::genericFvsPatchField::gradientInternalCoeffs
tmp< Field< Type > > gradientInternalCoeffs() const
Fatal.
Definition: genericFvsPatchField.C:187
Foam::genericFvsPatchField::gradientBoundaryCoeffs
tmp< Field< Type > > gradientBoundaryCoeffs() const
Fatal.
Definition: genericFvsPatchField.C:204
Foam::genericFvsPatchField::write
virtual void write(Ostream &) const
Write.
Definition: genericFvsPatchField.C:107
Foam::genericFvsPatchField::valueInternalCoeffs
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Fatal.
Definition: genericFvsPatchField.C:146
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:65
calculatedFvsPatchField.H
Foam::genericFvsPatchField::rmap
virtual void rmap(const fvsPatchField< Type > &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
Definition: genericFvsPatchField.C:128
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:123
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::genericFvsPatchField::autoMap
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
Definition: genericFvsPatchField.C:117
Foam::List< label >
Foam::genericFvsPatchField::genericFvsPatchField
genericFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
Definition: genericFvsPatchField.C:35
Foam::fvPatchFieldMapper
Foam::fvPatchFieldMapper.
Definition: fvPatchFieldMapper.H:47
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