transformFvPatchField.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 | Copyright (C) 2011-2016 OpenFOAM Foundation
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8 License
9  This file is part of OpenFOAM.
10 
11  OpenFOAM is free software: you can redistribute it and/or modify it
12  under the terms of the GNU General Public License as published by
13  the Free Software Foundation, either version 3 of the License, or
14  (at your option) any later version.
15 
16  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
19  for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
23 
24 Class
25  Foam::transformFvPatchField
26 
27 Group
28  grpGenericBoundaryConditions
29 
30 Description
31  Foam::transformFvPatchField
32 
33 SourceFiles
34  transformFvPatchField.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef transformFvPatchField_H
39 #define transformFvPatchField_H
40 
41 #include "fvPatchField.H"
42 
43 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 
45 namespace Foam
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class transformFvPatch Declaration
50 \*---------------------------------------------------------------------------*/
51 
52 template<class Type>
54 :
55  public fvPatchField<Type>
56 {
57 
58 public:
59 
60  //- Runtime type information
61  TypeName("transform");
62 
63 
64  // Constructors
65 
66  //- Construct from patch and internal field
68  (
69  const fvPatch&,
71  );
72 
73  //- Construct from patch, internal field and dictionary
75  (
76  const fvPatch&,
78  const dictionary&
79  );
80 
81  //- Construct by mapping the given transformFvPatchField<Type>
82  // onto a new patch
84  (
86  const fvPatch&,
88  const fvPatchFieldMapper&
89  );
90 
91  //- Construct as copy
93  (
95  );
96 
97  //- Construct and return a clone
98  virtual tmp<fvPatchField<Type>> clone() const = 0;
99 
100  //- Construct as copy setting internal field reference
102  (
105  );
106 
107  //- Construct and return a clone setting internal field reference
109  (
111  ) const = 0;
112 
113 
114  // Member functions
115 
116  // Attributes
117 
118  //- Return true if the value of the patch field
119  // is altered by assignment
120  virtual bool assignable() const
121  {
122  return true;
123  }
124 
125 
126  // Evaluation functions
127 
128  //- Return gradient at boundary
129  virtual tmp<Field<Type>> snGrad() const = 0;
130 
131  //- Return face-gradient transform diagonal
132  virtual tmp<Field<Type>> snGradTransformDiag() const = 0;
133 
134  //- Return the matrix diagonal coefficients corresponding to the
135  // evaluation of the value of this patchField with given weights
137  (
138  const tmp<scalarField>&
139  ) const;
140 
141  //- Return the matrix source coefficients corresponding to the
142  // evaluation of the value of this patchField with given weights
144  (
145  const tmp<scalarField>&
146  ) const;
147 
148  //- Return the matrix diagonal coefficients corresponding to the
149  // evaluation of the gradient of this patchField
150  virtual tmp<Field<Type>> gradientInternalCoeffs() const;
151 
152  //- Return the matrix source coefficients corresponding to the
153  // evaluation of the gradient of this patchField
154  virtual tmp<Field<Type>> gradientBoundaryCoeffs() const;
155 
156 
157  // Member operators
158 
159  virtual void operator=(const fvPatchField<Type>&);
160 };
161 
162 
163 // * * * * * * * * * * * Template Specialisations * * * * * * * * * * * * * //
164 
165 template<>
167 (
168  const tmp<scalarField>&
169 ) const;
170 
171 template<>
173 
174 
175 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
176 
177 } // End namespace Foam
178 
179 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
180 
181 #ifdef NoRepository
182  #include "transformFvPatchField.C"
183 #endif
184 
185 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
186 
187 #endif
188 
189 // ************************************************************************* //
virtual tmp< Field< Type > > valueInternalCoeffs(const tmp< scalarField > &) const
Return the matrix diagonal coefficients corresponding to the.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
virtual tmp< Field< Type > > gradientInternalCoeffs() const
Return the matrix diagonal coefficients corresponding to the.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
Definition: fvPatch.H:61
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
Definition: fvPatchField.H:65
virtual bool assignable() const
Return true if the value of the patch field.
virtual tmp< Field< Type > > gradientBoundaryCoeffs() const
Return the matrix source coefficients corresponding to the.
transformFvPatchField(const fvPatch &, const DimensionedField< Type, volMesh > &)
Construct from patch and internal field.
virtual void operator=(const fvPatchField< Type > &)
Foam::fvPatchFieldMapper.
virtual tmp< Field< Type > > snGradTransformDiag() const =0
Return face-gradient transform diagonal.
virtual tmp< fvPatchField< Type > > clone() const =0
Construct and return a clone.
virtual tmp< Field< Type > > valueBoundaryCoeffs(const tmp< scalarField > &) const
Return the matrix source coefficients corresponding to the.
Foam::transformFvPatchField.
TypeName("transform")
Runtime type information.
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: PtrList.H:54
virtual tmp< Field< Type > > snGrad() const =0
Return gradient at boundary.
Namespace for OpenFOAM.