34 #include "volFields.H"
35 #include "surfaceFields.H"
36 #include "fvcSnGrad.H"
37 #include "volPointInterpolation.H"
38 #include "processorFvPatch.H"
39 #include "processorFvPatchFields.H"
45 volPointInterpolation::New(mesh)
47 nfRef_(mesh.thisDb().lookupObject<surfaceVectorField>(
"nf")),
48 bgfid_(mesh.boundary().size()),
49 processorPatch_(mesh.boundary().size(), false),
55 bqf_(mesh.boundary().size()),
56 baqx_(mesh.boundary().size()),
57 baqy_(mesh.boundary().size()),
58 baqz_(mesh.boundary().size()),
59 bvq_(mesh.boundary().size()),
65 btf_(mesh.boundary().size()),
66 batx_(mesh.boundary().size()),
67 baty_(mesh.boundary().size()),
68 batz_(mesh.boundary().size()),
69 bvt_(mesh.boundary().size()),
70 bmvON_(mesh.boundary().size()),
72 bof_(mesh.boundary().size())
76 if (isA<processorFvPatch>(mesh.boundary()[iPatch]))
78 processorPatch_[iPatch] =
true;
80 const fvPatch& fvp = mesh.boundary()[iPatch];
81 bgfid_[iPatch].resize(fvp.size());
84 bgfid_[iPatch][i] = mesh.boundary()[iPatch].start() + i;
89 const faceList& faces = mesh.faces();
93 if (mesh.isInternalFace(i))
95 if (faces[i].size() == 3)
99 else if (faces[i].size() == 4)
111 const fvPatch& fvp = mesh.boundary()[iPatch];
114 if (faces[bgfid_[iPatch][i]].size() == 3)
116 btf_[iPatch].append(i);
118 else if (faces[bgfid_[iPatch][i]].size() == 4)
120 bqf_[iPatch].append(i);
124 bof_[iPatch].append(i);
131 vectorField vO(mesh.boundary()[iPatch].size(), vector::zero);
132 vectorField vN(mesh.boundary()[iPatch].size(), vector::zero);
134 vO = mesh.boundary()[iPatch].Cn();
135 if (processorPatch_[iPatch])
137 vN = refCast<const processorFvPatch>(mesh.boundary()[iPatch]).
138 procPolyPatch().neighbFaceCellCentres();
144 mesh.boundary()[iPatch].Cf()
163 const pointField& points = mesh.points();
164 const faceList& faces = mesh.faces();
166 atx_.resize(tf_.size());
167 aty_.resize(tf_.size());
168 atz_.resize(tf_.size());
169 vt_.resize(tf_.size());
172 label p1 = -1, p2 = -1, p3 = -1;
173 const scalar OneBySix = (1.0 / 6.0);
178 own = mesh.owner()[facei];
179 nei = mesh.neighbour()[facei];
180 p1 = faces[facei][0];
181 p2 = faces[facei][1];
182 p3 = faces[facei][2];
188 (points[p2] - points[p1]) ^ (points[p3] - points[p1])
189 ) & (mesh.C()[own] - mesh.C()[nei]);
194 atx_[i][0] = OneBySix*((mesh.C()[own].z() - mesh.C()[nei].z())*(points[p2].y() - points[p3].y()) +
195 (mesh.C()[nei].y() - mesh.C()[own].y())*(points[p2].z() - points[p3].z()));
196 atx_[i][1] = OneBySix*((mesh.C()[nei].y() - mesh.C()[own].y())*(points[p3].z() - points[p1].z()) +
197 (mesh.C()[own].z() - mesh.C()[nei].z())*(points[p3].y() - points[p1].y()));
198 atx_[i][2] = OneBySix*((mesh.C()[nei].y() - mesh.C()[own].y())*(points[p1].z() - points[p2].z()) +
199 (mesh.C()[own].z() - mesh.C()[nei].z())*(points[p1].y() - points[p2].y()));
200 atx_[i][3] = OneBySix*(points[p1].z()*(points[p2].y() - points[p3].y()) +
201 points[p2].z()*(points[p3].y() - points[p1].y()) +
202 points[p3].z()*(points[p1].y() - points[p2].y()));
203 atx_[i][4] = -atx_[i][3];
207 aty_[i][0] = OneBySix*((mesh.C()[own].x() - mesh.C()[nei].x())*(points[p2].z() - points[p3].z()) +
208 (mesh.C()[nei].z() - mesh.C()[own].z())*(points[p2].x() - points[p3].x()));
209 aty_[i][1] = OneBySix*((mesh.C()[nei].z() - mesh.C()[own].z())*(points[p3].x() - points[p1].x()) +
210 (mesh.C()[own].x() - mesh.C()[nei].x())*(points[p3].z() - points[p1].z()));
211 aty_[i][2] = OneBySix*((mesh.C()[nei].z() - mesh.C()[own].z())*(points[p1].x() - points[p2].x()) +
212 (mesh.C()[own].x() - mesh.C()[nei].x())*(points[p1].z() - points[p2].z()));
213 aty_[i][3] = OneBySix*(points[p1].x()*(points[p2].z() - points[p3].z()) +
214 points[p2].x()*(points[p3].z() - points[p1].z()) +
215 points[p3].x()*(points[p1].z() - points[p2].z()));
216 aty_[i][4] = -aty_[i][3];
220 atz_[i][0] = OneBySix*((mesh.C()[own].y() - mesh.C()[nei].y())*(points[p2].x() - points[p3].x()) +
221 (mesh.C()[nei].x() - mesh.C()[own].x())*(points[p2].y() - points[p3].y()));
222 atz_[i][1] = OneBySix*((mesh.C()[nei].x() - mesh.C()[own].x())*(points[p3].y() - points[p1].y()) +
223 (mesh.C()[own].y() - mesh.C()[nei].y())*(points[p3].x() - points[p1].x()));
224 atz_[i][2] = OneBySix*((mesh.C()[nei].x() - mesh.C()[own].x())*(points[p1].y() - points[p2].y()) +
225 (mesh.C()[own].y() - mesh.C()[nei].y())*(points[p1].x() - points[p2].x()));
226 atz_[i][3] = OneBySix*(points[p1].y()*(points[p2].x() - points[p3].x()) +
227 points[p2].y()*(points[p3].x() - points[p1].x()) +
228 points[p3].y()*(points[p1].x() - points[p2].x()));
229 atz_[i][4] = -atz_[i][3];
234 batx_[iPatch].resize(btf_[iPatch].size());
235 baty_[iPatch].resize(btf_[iPatch].size());
236 batz_[iPatch].resize(btf_[iPatch].size());
237 bvt_[iPatch].resize(btf_[iPatch].size());
239 vectorField v5(mesh.boundary()[iPatch].size(), vector::zero);
240 vectorField v4(mesh.boundary()[iPatch].size(), vector::zero);
242 v5 = mesh.boundary()[iPatch].Cn();
243 if (processorPatch_[iPatch])
245 v4 = refCast<const processorFvPatch>(mesh.boundary()[iPatch]).
246 procPolyPatch().neighbFaceCellCentres();
252 mesh.boundary()[iPatch].Cf()
262 facei = btf_[iPatch][k];
263 gFaceId = bgfid_[iPatch][facei];
265 p1 = faces[gFaceId][0];
266 p2 = faces[gFaceId][1];
267 p3 = faces[gFaceId][2];
273 ((points[p2] - points[p1]) ^ (points[p3] - points[p1]))
274 & (v5[facei] - v4[facei]);
276 bvt_[iPatch][k] *= OneBySix;
279 batx_[iPatch][k].resize(5);
280 batx_[iPatch][k][0] = OneBySix*((v5[facei].z() - v4[facei].z())*(points[p2].y() - points[p3].y()) +
281 (v4[facei].y() - v5[facei].y())*(points[p2].z() - points[p3].z()));
282 batx_[iPatch][k][1] = OneBySix*((v4[facei].y() - v5[facei].y())*(points[p3].z() - points[p1].z()) +
283 (v5[facei].z() - v4[facei].z())*(points[p3].y() - points[p1].y()));
284 batx_[iPatch][k][2] = OneBySix*((v4[facei].y() - v5[facei].y())*(points[p1].z() - points[p2].z()) +
285 (v5[facei].z() - v4[facei].z())*(points[p1].y() - points[p2].y()));
286 batx_[iPatch][k][3] = OneBySix*(points[p1].z()*(points[p2].y() - points[p3].y()) +
287 points[p2].z()*(points[p3].y() - points[p1].y()) +
288 points[p3].z()*(points[p1].y() - points[p2].y()));
289 batx_[iPatch][k][4] = -batx_[iPatch][k][3];
292 baty_[iPatch][k].resize(5);
293 baty_[iPatch][k][0] = OneBySix*((v5[facei].x() - v4[facei].x())*(points[p2].z() - points[p3].z()) +
294 (v4[facei].z() - v5[facei].z())*(points[p2].x() - points[p3].x()));
295 baty_[iPatch][k][1] = OneBySix*((v4[facei].z() - v5[facei].z())*(points[p3].x() - points[p1].x()) +
296 (v5[facei].x() - v4[facei].x())*(points[p3].z() - points[p1].z()));
297 baty_[iPatch][k][2] = OneBySix*((v4[facei].z() - v5[facei].z())*(points[p1].x() - points[p2].x()) +
298 (v5[facei].x() - v4[facei].x())*(points[p1].z() - points[p2].z()));
299 baty_[iPatch][k][3] = OneBySix*(points[p1].x()*(points[p2].z() - points[p3].z()) +
300 points[p2].x()*(points[p3].z() - points[p1].z()) +
301 points[p3].x()*(points[p1].z() - points[p2].z()));
302 baty_[iPatch][k][4] = -baty_[iPatch][k][3];
305 batz_[iPatch][k].resize(5);
306 batz_[iPatch][k][0] = OneBySix*((v5[facei].y() - v4[facei].y())*(points[p2].x() - points[p3].x()) +
307 (v4[facei].x() - v5[facei].x())*(points[p2].y() - points[p3].y()));
308 batz_[iPatch][k][1] = OneBySix*((v4[facei].x() - v5[facei].x())*(points[p3].y() - points[p1].y()) +
309 (v5[facei].y() - v4[facei].y())*(points[p3].x() - points[p1].x()));
310 batz_[iPatch][k][2] = OneBySix*((v4[facei].x() - v5[facei].x())*(points[p1].y() - points[p2].y()) +
311 (v5[facei].y() - v4[facei].y())*(points[p1].x() - points[p2].x()));
312 batz_[iPatch][k][3] = OneBySix*(points[p1].y()*(points[p2].x() - points[p3].x()) +
313 points[p2].y()*(points[p3].x() - points[p1].x()) +
314 points[p3].y()*(points[p1].x() - points[p2].x()));
315 batz_[iPatch][k][4] = -batz_[iPatch][k][3];
322 const pointField& points = mesh.points();
323 const faceList& faces = mesh.faces();
324 const scalar OneBySix = (1.0 / 6.0);
326 aqx_.resize(qf_.size());
327 aqy_.resize(qf_.size());
328 aqz_.resize(qf_.size());
329 vq_.resize(qf_.size());
332 label p4 = -1, p1 = -1, p2 = -1, p3 = -1;
337 own = mesh.owner()[facei];
338 nei = mesh.neighbour()[facei];
339 p1 = faces[facei][0];
340 p2 = faces[facei][1];
341 p3 = faces[facei][2];
342 p4 = faces[facei][3];
346 vq_[i] = (points[p3] - points[p1]) &
348 (points[p4] - points[p2]) ^ (mesh.C()[own] - mesh.C()[nei])
354 aqx_[i][0] = OneBySix*((mesh.C()[nei].y() - mesh.C()[own].y())*(points[p2].z() - points[p4].z())
355 - (mesh.C()[nei].z() - mesh.C()[own].z())*(points[p2].y() - points[p4].y()));
356 aqx_[i][1] = OneBySix*((mesh.C()[nei].y() - mesh.C()[own].y())*(points[p3].z() - points[p1].z())
357 - (mesh.C()[nei].z() - mesh.C()[own].z())*(points[p3].y() - points[p1].y()));
358 aqx_[i][5] = OneBySix*((points[p1].y() - points[p3].y())*(points[p2].z() - points[p4].z())
359 - (points[p1].z() - points[p3].z())*(points[p2].y() - points[p4].y()));
361 aqx_[i][2] = -aqx_[i][0];
362 aqx_[i][3] = -aqx_[i][1];
363 aqx_[i][4] = -aqx_[i][5];
367 aqy_[i][0] = OneBySix*((mesh.C()[nei].z() - mesh.C()[own].z())*(points[p2].x() - points[p4].x())
368 - (mesh.C()[nei].x() - mesh.C()[own].x())*(points[p2].z() - points[p4].z()));
369 aqy_[i][1] = OneBySix*((mesh.C()[nei].z() - mesh.C()[own].z())*(points[p3].x() - points[p1].x())
370 - (mesh.C()[nei].x() - mesh.C()[own].x())*(points[p3].z() - points[p1].z()));
371 aqy_[i][5] = OneBySix*((points[p1].z() - points[p3].z())*(points[p2].x() - points[p4].x())
372 - (points[p1].x() - points[p3].x())*(points[p2].z() - points[p4].z()));
374 aqy_[i][2] = -aqy_[i][0];
375 aqy_[i][3] = -aqy_[i][1];
376 aqy_[i][4] = -aqy_[i][5];
380 aqz_[i][0] = OneBySix*((mesh.C()[nei].x() - mesh.C()[own].x())*(points[p2].y() - points[p4].y())
381 - (mesh.C()[nei].y() - mesh.C()[own].y())*(points[p2].x() - points[p4].x()));
382 aqz_[i][1] = OneBySix*((mesh.C()[nei].x() - mesh.C()[own].x())*(points[p3].y() - points[p1].y())
383 - (mesh.C()[nei].y() - mesh.C()[own].y())*(points[p3].x() - points[p1].x()));
384 aqz_[i][5] = OneBySix*((points[p1].x() - points[p3].x())*(points[p2].y() - points[p4].y())
385 - (points[p1].y() - points[p3].y())*(points[p2].x() - points[p4].x()));
387 aqz_[i][2] = -aqz_[i][0];
388 aqz_[i][3] = -aqz_[i][1];
389 aqz_[i][4] = -aqz_[i][5];
393 baqx_[iPatch].resize(bqf_[iPatch].size());
394 baqy_[iPatch].resize(bqf_[iPatch].size());
395 baqz_[iPatch].resize(bqf_[iPatch].size());
396 bvq_[iPatch].resize(bqf_[iPatch].size());
398 vectorField v6(mesh.boundary()[iPatch].size(), vector::zero);
399 vectorField v5(mesh.boundary()[iPatch].size(), vector::zero);
401 v6 = mesh.boundary()[iPatch].Cn();
402 if (processorPatch_[iPatch])
404 v5 = refCast<const processorFvPatch>(mesh.boundary()[iPatch]).
405 procPolyPatch().neighbFaceCellCentres();
411 mesh.boundary()[iPatch].Cf()
420 facei = bqf_[iPatch][k];
421 gFaceId = bgfid_[iPatch][facei];
423 p1 = faces[gFaceId][0];
424 p2 = faces[gFaceId][1];
425 p3 = faces[gFaceId][2];
426 p4 = faces[gFaceId][3];
430 bvq_[iPatch][k] = (points[p3] - points[p1]) &
432 (points[p4] - points[p2]) ^ (v6[facei] - v5[facei])
434 bvq_[iPatch][k] *= OneBySix;
437 baqx_[iPatch][k].resize(6);
438 baqx_[iPatch][k][0] = OneBySix*((v5[facei].y() - v6[facei].y())*(points[p2].z() - points[p4].z())
439 - (v5[facei].z() - v6[facei].z())*(points[p2].y() - points[p4].y()));
440 baqx_[iPatch][k][1] = OneBySix*((v5[facei].y() - v6[facei].y())*(points[p3].z() - points[p1].z())
441 - (v5[facei].z() - v6[facei].z())*(points[p3].y() - points[p1].y()));
442 baqx_[iPatch][k][5] = OneBySix*((points[p1].y() - points[p3].y())*(points[p2].z() - points[p4].z())
443 - (points[p1].z() - points[p3].z())*(points[p2].y() - points[p4].y()));
445 baqx_[iPatch][k][2] = -baqx_[iPatch][k][0];
446 baqx_[iPatch][k][3] = -baqx_[iPatch][k][1];
447 baqx_[iPatch][k][4] = -baqx_[iPatch][k][5];
450 baqy_[iPatch][k].resize(6);
451 baqy_[iPatch][k][0] = OneBySix*((v5[facei].z() - v6[facei].z())*(points[p2].x() - points[p4].x())
452 - (v5[facei].x() - v6[facei].x())*(points[p2].z() - points[p4].z()));
453 baqy_[iPatch][k][1] = OneBySix*((v5[facei].z() - v6[facei].z())*(points[p3].x() - points[p1].x())
454 - (v5[facei].x() - v6[facei].x())*(points[p3].z() - points[p1].z()));
455 baqy_[iPatch][k][5] = OneBySix*((points[p1].z() - points[p3].z())*(points[p2].x() - points[p4].x())
456 - (points[p1].x() - points[p3].x())*(points[p2].z() - points[p4].z()));
458 baqy_[iPatch][k][2] = -baqy_[iPatch][k][0];
459 baqy_[iPatch][k][3] = -baqy_[iPatch][k][1];
460 baqy_[iPatch][k][4] = -baqy_[iPatch][k][5];
463 baqz_[iPatch][k].resize(6);
464 baqz_[iPatch][k][0] = OneBySix*((v5[facei].x() - v6[facei].x())*(points[p2].y() - points[p4].y())
465 - (v5[facei].y() - v6[facei].y())*(points[p2].x() - points[p4].x()));
466 baqz_[iPatch][k][1] = OneBySix*((v5[facei].x() - v6[facei].x())*(points[p3].y() - points[p1].y())
467 - (v5[facei].y() - v6[facei].y())*(points[p3].x() - points[p1].x()));
468 baqz_[iPatch][k][5] = OneBySix*((points[p1].x() - points[p3].x())*(points[p2].y() - points[p4].y())
469 - (points[p1].y() - points[p3].y())*(points[p2].x() - points[p4].x()));
471 baqz_[iPatch][k][2] = -baqz_[iPatch][k][0];
472 baqz_[iPatch][k][3] = -baqz_[iPatch][k][1];
473 baqz_[iPatch][k][4] = -baqz_[iPatch][k][5];
482 #define VEC_CMPT(V,CMPT)\
485 #define SCA_CMPT(V,CMPT)\
488 #define dfdxif(vf,pf,dfdxfield,fi,vi,ai,icmpt,ocmpt,iop,oop) \
492 const label iown = (ai.size() > 0) ? ai[0].size() - 1 : 0; \
493 const label inei = (ai.size() > 0) ? iown - 1 : 0; \
494 scalar dfdxface = 0.0; \
498 celll = vf.mesh().neighbour()[facei]; \
500 iop(vf.primitiveField()[celll],icmpt) * ai[i][inei]; \
501 celll = vf.mesh().owner()[facei]; \
503 iop(vf.primitiveField()[celll],icmpt) * ai[i][iown]; \
505 forAll(faces[facei], k) \
508 iop(pf[faces[facei][k]],icmpt) * ai[i][k]; \
510 oop(dfdxfield.primitiveFieldRef()[facei],ocmpt) \
511 += (dfdxface / vi[i]); \
515 #define dfdxbf(vf,pf,patchi,dfdxfield,bfi,bvfi,bai,icmpt,ocmpt,iop,oop) \
518 const label iown = (bai[patchi].size() > 0) ? bai[patchi][0].size() - 1 : 0; \
519 const label inei = (bai[patchi].size() > 0) ? iown - 1 : 0; \
520 label gFaceId = -1; \
521 scalar dfdxface = 0.0; \
522 forAll(bfi[patchi], i) \
524 ifacei = bfi[patchi][i]; \
525 gFaceId = bgfid_[patchi][ifacei]; \
527 iop(psin[patchi][ifacei],icmpt) * bai[patchi][i][inei]; \
529 iop(psio[ifacei],icmpt) * bai[patchi][i][iown]; \
530 forAll(faces[gFaceId], k) \
533 iop(pf[faces[gFaceId][k]],icmpt) * \
536 oop(dfdxfield.boundaryFieldRef()[patchi][ifacei],ocmpt) += \
537 dfdxface / bvfi[patchi][i]; \
545 const volVectorField& vf,
546 const pointVectorField&
pf,
548 surfaceScalarField& divf,
549 const surfaceScalarField& dfdn
568 divf.primitiveFieldRef()[facei] =
569 dfdn.primitiveField()[facei];
576 const volVectorField& vf,
577 const pointVectorField& pf,
579 surfaceScalarField& divf,
580 const surfaceScalarField& dfdn
583 List<List<vector> > psin (vf.boundaryField().size());
586 if (processorPatch_[iPatch])
588 psin[iPatch] = refCast<const processorFvPatchField<vector> >
589 (vf.boundaryField()[iPatch]).patchNeighbourField();
593 psin[iPatch] = vf.boundaryField()[iPatch] +
594 vf.boundaryField()[iPatch].snGrad()
599 vectorField psio (vf.boundaryField()[iPatch].patchInternalField());
602 dfdxbf(vf,pf,iPatch,divf,bqf_,bvq_,baqx_,0,0,
VEC_CMPT,
SCA_CMPT)
603 dfdxbf(vf,pf,iPatch,divf,bqf_,bvq_,baqy_,1,0,
VEC_CMPT,
SCA_CMPT)
604 dfdxbf(vf,pf,iPatch,divf,bqf_,bvq_,baqz_,2,0,VEC_CMPT,
SCA_CMPT)
607 dfdxbf(vf,pf,iPatch,divf,btf_,bvt_,batx_,0,0,VEC_CMPT,
SCA_CMPT)
608 dfdxbf(vf,pf,iPatch,divf,btf_,bvt_,baty_,1,0,VEC_CMPT,
SCA_CMPT)
609 dfdxbf(vf,pf,iPatch,divf,btf_,bvt_,batz_,2,0,VEC_CMPT,
SCA_CMPT)
616 facei = bof_[iPatch][i];
617 divf.boundaryFieldRef()[iPatch][facei] =
618 dfdn.boundaryField()[iPatch][facei];
626 const volTensorField& tf,
627 const pointTensorField& pf,
629 surfaceVectorField& divf,
630 const surfaceVectorField& dfdn
668 divf.primitiveFieldRef()[facei] =
669 dfdn.primitiveField()[facei];
676 const volTensorField& tf,
677 const pointTensorField& pf,
679 surfaceVectorField& divf,
680 const surfaceVectorField& dfdn
683 List<List<tensor> > psin (tf.boundaryField().size());
686 if (processorPatch_[iPatch])
688 psin[iPatch] = refCast<const processorFvPatchField<tensor> >
689 (tf.boundaryField()[iPatch]).patchNeighbourField();
693 psin[iPatch] = tf.boundaryField()[iPatch] +
694 tf.boundaryField()[iPatch].snGrad()
699 tensorField psio (tf.boundaryField()[iPatch].patchInternalField());
702 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqx_,0,0,
VEC_CMPT,
VEC_CMPT)
703 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqy_,3,0,
VEC_CMPT,VEC_CMPT)
704 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqz_,6,0,VEC_CMPT,VEC_CMPT)
706 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqx_,1,1,VEC_CMPT,VEC_CMPT)
707 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqy_,4,1,VEC_CMPT,VEC_CMPT)
708 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqz_,7,1,VEC_CMPT,VEC_CMPT)
710 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqx_,2,2,VEC_CMPT,VEC_CMPT)
711 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqy_,5,2,VEC_CMPT,VEC_CMPT)
712 dfdxbf(tf,pf,iPatch,divf,bqf_,bvq_,baqz_,8,2,VEC_CMPT,VEC_CMPT)
715 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,batx_,0,0,VEC_CMPT,VEC_CMPT)
716 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,baty_,3,0,VEC_CMPT,VEC_CMPT)
717 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,batz_,6,0,VEC_CMPT,VEC_CMPT)
719 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,batx_,1,1,VEC_CMPT,VEC_CMPT)
720 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,baty_,4,1,VEC_CMPT,VEC_CMPT)
721 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,batz_,7,1,VEC_CMPT,VEC_CMPT)
723 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,batx_,2,2,VEC_CMPT,VEC_CMPT)
724 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,baty_,5,2,VEC_CMPT,VEC_CMPT)
725 dfdxbf(tf,pf,iPatch,divf,btf_,bvt_,batz_,8,2,VEC_CMPT,VEC_CMPT)
732 facei = bof_[iPatch][i];
733 divf.boundaryFieldRef()[iPatch][facei] =
734 dfdn.boundaryField()[iPatch][facei];
742 const volScalarField& sf,
743 const pointScalarField& pf,
745 surfaceVectorField& gradf,
746 const surfaceVectorField& dfdn
765 gradf.primitiveFieldRef()[facei] =
766 dfdn.primitiveField()[facei];
773 const volScalarField& sf,
774 const pointScalarField& pf,
776 surfaceVectorField& gradf,
777 const surfaceVectorField& dfdn
780 List<List<scalar> > psin (sf.boundaryField().size());
783 if (processorPatch_[iPatch])
785 psin[iPatch] = refCast<const processorFvPatchField<scalar> >
786 (sf.boundaryField()[iPatch]).patchNeighbourField();
790 psin[iPatch] = sf.boundaryField()[iPatch] +
791 sf.boundaryField()[iPatch].snGrad()
796 scalarField psio (sf.boundaryField()[iPatch].patchInternalField());
799 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqx_,0,0,
SCA_CMPT,
VEC_CMPT)
800 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqy_,0,1,
SCA_CMPT,
VEC_CMPT)
801 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqz_,0,2,SCA_CMPT,
VEC_CMPT)
804 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batx_,0,0,SCA_CMPT,
VEC_CMPT)
805 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,baty_,0,1,SCA_CMPT,
VEC_CMPT)
806 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batz_,0,2,SCA_CMPT,
VEC_CMPT)
813 facei = bof_[iPatch][i];
814 gradf.boundaryFieldRef()[iPatch][facei] =
815 dfdn.boundaryField()[iPatch][facei];
823 const volVectorField& vf,
824 const pointVectorField& pf,
826 surfaceTensorField& gradf,
827 const surfaceTensorField& dfdn
862 gradf.primitiveFieldRef()[facei] =
863 dfdn.primitiveField()[facei];
870 const volVectorField& sf,
871 const pointVectorField& pf,
873 surfaceTensorField& gradf,
874 const surfaceTensorField& dfdn
877 List<List<vector> > psin (sf.boundaryField().size());
880 if (processorPatch_[iPatch])
882 psin[iPatch] = refCast<const processorFvPatchField<vector> >
883 (sf.boundaryField()[iPatch]).patchNeighbourField();
887 psin[iPatch] = sf.boundaryField()[iPatch] +
888 sf.boundaryField()[iPatch].snGrad()
893 vectorField psio (sf.boundaryField()[iPatch].patchInternalField());
896 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqx_,0,0,
VEC_CMPT,
VEC_CMPT)
897 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqx_,1,1,
VEC_CMPT,VEC_CMPT)
898 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqx_,2,2,VEC_CMPT,VEC_CMPT)
900 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqy_,0,3,VEC_CMPT,VEC_CMPT)
901 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqy_,1,4,VEC_CMPT,VEC_CMPT)
902 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqy_,2,5,VEC_CMPT,VEC_CMPT)
904 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqz_,0,6,VEC_CMPT,VEC_CMPT)
905 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqz_,1,7,VEC_CMPT,VEC_CMPT)
906 dfdxbf(sf,pf,iPatch,gradf,bqf_,bvq_,baqz_,2,8,VEC_CMPT,VEC_CMPT)
909 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batx_,0,0,VEC_CMPT,VEC_CMPT)
910 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batx_,1,1,VEC_CMPT,VEC_CMPT)
911 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batx_,2,2,VEC_CMPT,VEC_CMPT)
913 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,baty_,0,3,VEC_CMPT,VEC_CMPT)
914 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,baty_,1,4,VEC_CMPT,VEC_CMPT)
915 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,baty_,2,5,VEC_CMPT,VEC_CMPT)
917 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batz_,0,6,VEC_CMPT,VEC_CMPT)
918 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batz_,1,7,VEC_CMPT,VEC_CMPT)
919 dfdxbf(sf,pf,iPatch,gradf,btf_,bvt_,batz_,2,8,VEC_CMPT,VEC_CMPT)
926 facei = bof_[iPatch][i];
927 gradf.boundaryFieldRef()[iPatch][facei] =
928 dfdn.boundaryField()[iPatch][facei];
938 volPoint_.interpolate
944 const surfaceVectorField& nf = nfRef_();
945 surfaceVectorField dfdn
950 const faceList& faces = sf.mesh().faces();
956 calcGradfIF(sf, pF, faces, gradf, dfdn);
962 calcGradfBF(sf, pF, faces, gradf, dfdn);
969 volPoint_.interpolate
975 const surfaceVectorField& nf = nfRef_();
976 surfaceTensorField dfdn
981 const faceList& faces = vf.mesh().faces();
987 calcGradfIF(vf, pF, faces, gradf, dfdn);
993 calcGradfBF(vf, pF, faces, gradf, dfdn);
1000 volPoint_.interpolate
1006 surfaceScalarField divfn (nfRef_() & fvc::snGrad(vf));
1007 const faceList& faces = vf.mesh().faces();
1013 calcDivfIF(vf, pF, faces, divf, divfn);
1019 calcDivfBF(vf, pF, faces, divf, divfn);
1026 volPoint_.interpolate
1032 surfaceVectorField divfn (nfRef_() & fvc::snGrad(tf));
1033 const faceList& faces = tf.mesh().faces();
1039 calcDivfIF(tf, pF, faces, divf, divfn);
1045 calcDivfBF(tf, pF, faces, divf, divfn);
void faceDiv(const volVectorField &f, surfaceScalarField &divf)
void faceGrad(const volScalarField &f, surfaceVectorField &gradf)
#define VEC_CMPT(V, CMPT)
void triCalcWeights(const fvMesh &m)
Calculate weights for triangles.
#define dfdxif(vf, pf, dfdxfield, fi, vi, ai, icmpt, ocmpt, iop, oop)
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)
GaussVolPointBase3D(const fvMesh &mesh)
void calcGradfIF(const volScalarField &sf, const pointScalarField &pf, const faceList &faces, surfaceVectorField &gradf, const surfaceVectorField &dfdn)
#define SCA_CMPT(V, CMPT)
void quaCalcWeights(const fvMesh &m)
Calcualte weights for quads.
#define dfdxbf(vf, pf, patchi, dfdxfield, bfi, bvfi, bai, icmpt, ocmpt, iop, oop)
void calcDivfIF(const volVectorField &sf, const pointVectorField &pf, const faceList &faces, surfaceScalarField &divf, const surfaceScalarField &dfdn)