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-2026 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.txx
39 
40 \*---------------------------------------------------------------------------*/
41 
42 #ifndef Foam_genericFvsPatchField_H
43 #define Foam_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 genericPatchFieldBase,
61  public calculatedFvsPatchField<Type>
62 {
65 
66 public:
67 
68  //- Runtime type information
69  TypeName("generic");
70 
71 
72  // Constructors
73 
74  //- Construct from patch and internal field
76  (
77  const fvPatch&,
79  );
80 
81  //- Construct from patch, internal field and dictionary
83  (
84  const fvPatch&,
86  const dictionary&
87  );
88 
89  //- Construct by mapping onto a new patch
91  (
92  const this_bctype&,
93  const fvPatch&,
95  const fvPatchFieldMapper&
96  );
97 
98  //- Copy construct setting internal field reference
100  (
101  const this_bctype&,
103  );
104 
105  //- No copy without an internal field
106  genericFvsPatchField(const this_bctype& pfld)
107  :
108  this_bctype(pfld, pfld.internalField())
109  {}
110 
111  //- Clone with an internal field reference
113  (
115  ) const
116  {
117  return fvsPatchField<Type>::Clone(*this, iF);
118  }
119 
120 
121  // Member Functions
123  //- Write
124  virtual void write(Ostream&) const;
125 
126 
127  // Mapping Functions
128 
129  //- Map (and resize as needed) from self given a mapping object
130  virtual void autoMap(const fvPatchFieldMapper&);
131 
132  //- Reverse map the given fvsPatchField onto this fvsPatchField
133  virtual void rmap(const fvsPatchField<Type>&, const labelList&);
134 
135 
136  // Evaluation Functions
137 
138  //- Fatal
139  virtual tmp<Field<Type>>
141 
142  //- Fatal
143  virtual tmp<Field<Type>>
145 
146  //- Fatal
148 
149  //- Fatal
151 
152 
153  // Member Operators
154 
155  //- Inherit assignment
157 };
158 
159 
160 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
161 
162 } // End namespace Foam
163 
164 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
165 
166 #ifdef NoRepository
167  #include "genericFvsPatchField.txx"
168 #endif
169 
170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
171 
172 #endif
173 
174 // ************************************************************************* //
const DimensionedField< Type, surfaceMesh > & internalField() const noexcept
Return const-reference to the dimensioned internal field.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Definition: dictionary.H:130
static tmp< fvsPatchField< Type > > Clone(const DerivedPatchField &pf, Args &&... args)
Clone a patch field, optionally with internal field reference etc.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:70
friend Ostream & operator(Ostream &, const fvsPatchField< Type > &)
genericFvsPatchField(const fvPatch &, const DimensionedField< Type, surfaceMesh > &)
Construct from patch and internal field.
A FieldMapper for finite-volume patch fields.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Fatal.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Definition: Ostream.H:56
tmp< Field< Type > > gradientInternalCoeffs() const
Fatal.
virtual void write(Ostream &) const
Write.
Generic infrastructure for reading/writing unknown patch types.
tmp< Field< Type > > gradientBoundaryCoeffs() const
Fatal.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Fatal.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
TypeName("generic")
Runtime type information.
virtual void rmap(const fvsPatchField< Type > &, const labelList &)
Reverse map the given fvsPatchField onto this fvsPatchField.
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
This boundary condition provides a generic version of the calculated condition, useful as a fallback ...
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
virtual tmp< fvsPatchField< Type > > clone() const
No clone without an internal field reference.
Namespace for OpenFOAM.
virtual void autoMap(const fvPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.