All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups
GaussVolPointBase3D.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) 2011-2016 OpenFOAM Foundation
9  Copyright (C) 2019 OpenCFD Ltd.
10  Copyright (C) 2016-2019 ISP RAS (www.ispras.ru) UniCFD Group (www.unicfd.ru)
11 -------------------------------------------------------------------------------
12 License
13  This file is part of QGDsolver library, based on OpenFOAM+.
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  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  You should have received a copy of the GNU General Public License
23  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 Group
25  grpGaussVolPoint
26 Class
27  Foam::fvsc::GaussVolPoint::GaussVolPointBase3D
28 SourceFile
29  GaussVolPointBase3D.C
30 \*---------------------------------------------------------------------------*/
31 
32 #include "surfaceFieldsFwd.H"
33 #include "volFieldsFwd.H"
34 #include "pointFieldsFwd.H"
35 #include "tmp.H"
36 #include "List.H"
37 #include "DynamicList.H"
38 #include "label.H"
39 #include "scalar.H"
40 #include "autoPtr.H"
41 
42 #ifndef GaussVolPointBase3D_H
43 #define GaussVolPointBase3D_H
44 
45 namespace Foam
46 {
47 
48 class fvMesh;
49 class face;
50 class volPointInterpolation;
51 
52 typedef List<face> faceList;
53 
54 namespace fvsc
55 {
56 
58 {
59 
60  //-
61  const volPointInterpolation& volPoint_;
62 
63  //+
64  tmp<surfaceVectorField> nfRef_;
65 
66  //+
67  List<List<label> > bgfid_;
68 
69  //+
70  List<bool> processorPatch_;
71 
72  /* coefficients for quad faces */
73 
74  //+
75  List<label> qf_;
76 
77  //+
78  List<List<scalar> > aqx_;
79 
80  //+
81  List<List<scalar> > aqy_;
82 
83  //+
84  List<List<scalar> > aqz_;
85 
86  //+
87  List<scalar> vq_;
88 
89  //+
90  List<List<label> > bqf_;
91 
92  //+
93  List<List<List<scalar> > > baqx_;
94 
95  //+
96  List<List<List<scalar> > > baqy_;
97 
98  //+
99  List<List<List<scalar> > > baqz_;
100 
101  //+
102  List<List<scalar> > bvq_;
103 
104  /* coefficients for tri faces */
105  //
106  List<label> tf_;
107 
108  //
109  List<List<scalar> > atx_;
110 
111  //
112  List<List<scalar> > aty_;
113 
114  //
115  List<List<scalar> > atz_;
116 
117  //
118  List<scalar> vt_;
119 
120  //
121  List<List<label> > btf_;
122 
123  //
124  List<List<List<scalar> > > batx_;
125 
126  //
127  List<List<List<scalar> > > baty_;
128 
129  //
130  List<List<List<scalar> > > batz_;
131 
132  //-
133  List<List<scalar> > bvt_;
134 
135  /* coefficients for other faces */
136 
137  //-
138  List<List<scalar> > bmvON_;
139 
140  //+
141  DynamicList<label> of_;
142 
143  //+
144  List<List<label> > bof_;
145 
146 protected:
147 
148  //-
149  void calcGradfIF
150  (
151  const volScalarField& sf,
152  const pointScalarField& pf,
153  const faceList& faces,
154  surfaceVectorField& gradf,
155  const surfaceVectorField& dfdn
156  );
157 
158  //-
159  void calcGradfBF
160  (
161  const volScalarField& sf,
162  const pointScalarField& pf,
163  const faceList& faces,
164  surfaceVectorField& gradf,
165  const surfaceVectorField& dfdn
166  );
167 
168  //-
169  void calcGradfIF
170  (
171  const volVectorField& sf,
172  const pointVectorField& pf,
173  const faceList& faces,
174  surfaceTensorField& gradf,
175  const surfaceTensorField& dfdn
176  );
177 
178  //-
179  void calcGradfBF
180  (
181  const volVectorField& sf,
182  const pointVectorField& pf,
183  const faceList& faces,
184  surfaceTensorField& gradf,
185  const surfaceTensorField& dfdn
186  );
187 
188  //-
189  void calcDivfIF
190  (
191  const volVectorField& sf,
192  const pointVectorField& pf,
193  const faceList& faces,
194  surfaceScalarField& divf,
195  const surfaceScalarField& dfdn
196  );
197 
198  //-
199  void calcDivfBF
200  (
201  const volVectorField& sf,
202  const pointVectorField& pf,
203  const faceList& faces,
204  surfaceScalarField& divf,
205  const surfaceScalarField& dfdn
206  );
207 
208  //-
209  void calcDivfIF
210  (
211  const volTensorField& tf,
212  const pointTensorField& pf,
213  const faceList& faces,
214  surfaceVectorField& divf,
215  const surfaceVectorField& dfdn
216  );
217 
218  //-
219  void calcDivfBF
220  (
221  const volTensorField& sf,
222  const pointTensorField& pf,
223  const faceList& faces,
224  surfaceVectorField& divf,
225  const surfaceVectorField& dfdn
226  );
227 
228  //- Calculate weights for triangles
229  void triCalcWeights
230  (
231  const fvMesh& m
232  );
233 
234  //- Calcualte weights for quads
235  void quaCalcWeights
236  (
237  const fvMesh& m
238  );
239 
240 public:
241 
242  //-
243  GaussVolPointBase3D(const fvMesh& mesh);
244 
245  //-
247 
248  //-
249  void faceGrad(const volScalarField& f, surfaceVectorField& gradf);
250 
251  //-
252  void faceGrad(const volVectorField& f, surfaceTensorField& gradf);
253 
254  //-
255  void faceDiv(const volVectorField& f, surfaceScalarField& divf);
256 
257  //-
258  void faceDiv(const volTensorField& f, surfaceVectorField& divf);
259 
260 };
261 
262 }
263 
264 }
265 
266 #endif
267 
268 //
269 //END-OF-FILE
270 //
271 
void faceDiv(const volVectorField &f, surfaceScalarField &divf)
pf
Definition: updateFields.H:21
void faceGrad(const volScalarField &f, surfaceVectorField &gradf)
void triCalcWeights(const fvMesh &m)
Calculate weights for triangles.
List< face > faceList
void calcDivfBF(const volVectorField &sf, const pointVectorField &pf, const faceList &faces, surfaceScalarField &divf, const surfaceScalarField &dfdn)
void calcGradfBF(const volScalarField &sf, const pointScalarField &pf, const faceList &faces, surfaceVectorField &gradf, const surfaceVectorField &dfdn)
Methods calculating of differential operators.
GaussVolPointBase3D(const fvMesh &mesh)
void calcGradfIF(const volScalarField &sf, const pointScalarField &pf, const faceList &faces, surfaceVectorField &gradf, const surfaceVectorField &dfdn)
void quaCalcWeights(const fvMesh &m)
Calcualte weights for quads.
void calcDivfIF(const volVectorField &sf, const pointVectorField &pf, const faceList &faces, surfaceScalarField &divf, const surfaceScalarField &dfdn)