Loading...
Searching...
No Matches
emptyFaPatchField.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) 2016-2017 Wikki Ltd
9 Copyright (C) 2019-2025 OpenCFD Ltd.
10-------------------------------------------------------------------------------
11License
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
27Class
28 Foam::emptyFaPatchField
29
30Description
31
32Author
33 Zeljko Tukovic, FMENA
34 Hrvoje Jasak, Wikki Ltd.
35
36SourceFiles
37 emptyFaPatchField.C
38
39\*---------------------------------------------------------------------------*/
40
41#ifndef Foam_emptyFaPatchField_H
42#define Foam_emptyFaPatchField_H
43
44#include "faPatchField.H"
45#include "emptyFaPatch.H"
46
47// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48
49namespace Foam
50{
51
52/*---------------------------------------------------------------------------*\
53 Class emptyFaPatchField Declaration
54\*---------------------------------------------------------------------------*/
55
56template<class Type>
58:
59 public faPatchField<Type>
60{
61
62public:
63
64 //- Runtime type information
65 TypeName(emptyFaPatch::typeName_());
66
67
68 // Constructors
69
70 //- Construct from patch and internal field
72 (
73 const faPatch&,
75 );
76
77 //- Construct from patch, internal field and dictionary.
78 //- The "value" entry is NO_READ.
80 (
81 const faPatch&,
83 const dictionary&
84 );
85
86 //- Construct by mapping given emptyFaPatchField onto a new patch
88 (
90 const faPatch&,
93 );
94
95 //- Construct as copy
97 (
99 );
100
101 //- Construct as copy setting internal field reference
103 (
106 );
107
108 //- Return clone
109 virtual tmp<faPatchField<Type>> clone() const
110 {
111 return faPatchField<Type>::Clone(*this);
112 }
113
114 //- Clone with an internal field reference
116 (
118 ) const
119 {
120 return faPatchField<Type>::Clone(*this, iF);
121 }
122
123
124 //- Destructor
125 virtual ~emptyFaPatchField() = default;
127
128 // Member Functions
129
130 // Mapping functions
131
132 //- Map (and resize as needed) from self given a mapping object
133 virtual void autoMap
134 (
135 const faPatchFieldMapper&
136 )
137 {}
139 //- Reverse map the given faPatchField onto this faPatchField
140 virtual void rmap
141 (
142 const faPatchField<Type>&,
143 const labelList&
144 )
145 {}
146
147
148 // Evaluation Functions
149
150 //- Update the coefficients associated with the patch field
151 // This only checks to see the case is actually 1D or 2D
152 // for which this boundary condition is valid
153 void updateCoeffs();
154
155
156 //- Return the matrix diagonal coefficients corresponding to the
157 //- evaluation of the value of this patchField with given weights
159 (
160 const tmp<scalarField>&
161 ) const
162 {
163 return tmp<Field<Type>>::New();
164 }
165
166 //- Return the matrix source coefficients corresponding to the
167 //- evaluation of the value of this patchField with given weights
169 (
170 const tmp<scalarField>&
171 ) const
172 {
173 return tmp<Field<Type>>::New();
174 }
175
176 //- Return the matrix diagonal coefficients corresponding to the
177 //- evaluation of the gradient of this patchField
178 tmp<Field<Type>> gradientInternalCoeffs() const
179 {
181 }
182
183 //- Return the matrix source coefficients corresponding to the
184 //- evaluation of the gradient of this patchField
186 {
187 return tmp<Field<Type>>::New();
188 }
189
190
191 // Contiguous storage
193 //- Retrieve patch-normal gradient [contiguous storage].
194 //- Placeholder value is zero (treated like zero-gradient).
195 virtual void snGrad(UList<Type>& result) const
196 {
197 // Treat like zero-gradient
198 result = Foam::zero{};
199 }
200
201
202 // Member Functions
203
204 //- Write without "value" entry!
205 virtual void write(Ostream&) const;
206};
207
208
209// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
210
211} // End namespace Foam
212
213// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
214
215#ifdef NoRepository
216 #include "emptyFaPatchField.C"
217#endif
218
219// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
220
221#endif
222
223// ************************************************************************* //
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition Ostream.H:59
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition UList.H:89
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition dictionary.H:133
virtual tmp< faPatchField< Type > > clone() const
Return clone.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the evaluation of the value of this patchField...
emptyFaPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the evaluation of the value of this patchFie...
virtual void rmap(const faPatchField< Type > &, const labelList &)
Reverse map the given faPatchField onto this faPatchField.
virtual ~emptyFaPatchField()=default
Destructor.
void updateCoeffs()
Update the coefficients associated with the patch field.
TypeName(emptyFaPatch::typeName_())
Runtime type information.
tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the evaluation of the gradient of this patchFi...
virtual tmp< faPatchField< Type > > clone(const DimensionedField< Type, areaMesh > &iF) const
Clone with an internal field reference.
virtual void snGrad(UList< Type > &result) const
Retrieve patch-normal gradient [contiguous storage]. Placeholder value is zero (treated like zero-gra...
tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the evaluation of the gradient of this patch...
virtual void autoMap(const faPatchFieldMapper &)
Map (and resize as needed) from self given a mapping object.
A FieldMapper for finite-area patch fields.
faPatchField(const faPatch &, const DimensionedField< Type, areaMesh > &)
Construct from patch and internal field.
static tmp< faPatchField< Type > > Clone(const DerivedPatchField &pf)
Clone a patch field with its own internal field reference.
static tmp< faPatchField< Type > > New(const word &patchFieldType, const word &actualPatchType, const faPatch &, const DimensionedField< Type, areaMesh > &)
Return a pointer to a new patchField created on freestore given patch and internal field.
virtual tmp< Field< Type > > snGrad() const
Return patch-normal gradient.
Finite area patch class. Used for 2-D non-Euclidian finite area method.
Definition faPatch.H:76
A class for managing temporary objects.
Definition tmp.H:75
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
Definition zero.H:58
Namespace for OpenFOAM.
List< label > labelList
A List of labels.
Definition List.H:62
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition typeInfo.H:68