FreeFOAM The Cross-Platform CFD Toolkit
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 | Copyright (C) 1991-2010 OpenCFD Ltd.
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::genericFvPatchField
26 
27 Description
28  Foam::genericFvPatchField
29 
30 SourceFiles
31  genericFvPatchField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef genericFvPatchField_H
36 #define genericFvPatchField_H
37 
39 #include <OpenFOAM/HashPtrTable.H>
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class genericFvPatch Declaration
48 \*---------------------------------------------------------------------------*/
49 
50 template<class Type>
52 :
53  public calculatedFvPatchField<Type>
54 {
55  // Private data
56 
57  word actualTypeName_;
58  dictionary dict_;
59 
60  HashPtrTable<scalarField> scalarFields_;
61  HashPtrTable<vectorField> vectorFields_;
62  HashPtrTable<sphericalTensorField> sphericalTensorFields_;
63  HashPtrTable<symmTensorField> symmTensorFields_;
64  HashPtrTable<tensorField> tensorFields_;
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 as copy
101  (
103  );
104 
105  //- Construct and return a clone
106  virtual tmp<fvPatchField<Type> > clone() const
107  {
108  return tmp<fvPatchField<Type> >
109  (
110  new genericFvPatchField<Type>(*this)
111  );
112  }
113 
114  //- Construct as copy setting internal field reference
116  (
119  );
120 
121  //- Construct and return a clone setting internal field reference
122  virtual tmp<fvPatchField<Type> > clone
123  (
125  ) const
126  {
127  return tmp<fvPatchField<Type> >
128  (
129  new genericFvPatchField<Type>(*this, iF)
130  );
131  }
132 
133 
134  // Member functions
135 
136  // Mapping functions
137 
138  //- Map (and resize as needed) from self given a mapping object
139  virtual void autoMap
140  (
141  const fvPatchFieldMapper&
142  );
143 
144  //- Reverse map the given fvPatchField onto this fvPatchField
145  virtual void rmap
146  (
147  const fvPatchField<Type>&,
148  const labelList&
149  );
150 
151 
152  // Evaluation functions
153 
154  //- Return the matrix diagonal coefficients corresponding to the
155  // evaluation of the value of this patchField with given weights
157  (
158  const tmp<scalarField>&
159  ) const;
160 
161  //- Return the matrix source coefficients corresponding to the
162  // evaluation of the value of this patchField with given weights
164  (
165  const tmp<scalarField>&
166  ) const;
167 
168  //- Return the matrix diagonal coefficients corresponding to the
169  // evaluation of the gradient of this patchField
171 
172  //- Return the matrix source coefficients corresponding to the
173  // evaluation of the gradient of this patchField
175 
176 
177  //- Write
178  virtual void write(Ostream&) const;
179 };
180 
181 
182 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
183 
184 } // End namespace Foam
185 
186 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
187 
188 #ifdef NoRepository
189 # include "genericFvPatchField.C"
190 #endif
191 
192 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
193 
194 #endif
195 
196 // ************************ vim: set sw=4 sts=4 et: ************************ //