faMesh.C
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 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
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 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 \*---------------------------------------------------------------------------*/
27 
28 #include "faMesh.H"
29 #include "faGlobalMeshData.H"
30 #include "Time.H"
31 #include "polyMesh.H"
32 #include "primitiveMesh.H"
33 #include "demandDrivenData.H"
34 #include "IndirectList.H"
35 #include "areaFields.H"
36 #include "edgeFields.H"
37 #include "faMeshLduAddressing.H"
38 #include "wedgeFaPatch.H"
39 #include "faPatchData.H"
40 #include "SortableList.H"
41 
42 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46  defineTypeNameAndDebug(faMesh, 0);
47 }
48 
50 
51 const int Foam::faMesh::quadricsFit_ = 0;
52 
53 
54 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
55 
56 void Foam::faMesh::setPrimitiveMeshData()
57 {
58  DebugInFunction << "Setting primitive data" << endl;
59 
60  const indirectPrimitivePatch& bp = patch();
61 
62  // Set faMesh edges
63  edges_.setSize(bp.nEdges());
64 
65  label edgeI = -1;
66 
67  label nIntEdges = bp.nInternalEdges();
68 
69  for (label curEdge = 0; curEdge < nIntEdges; ++curEdge)
70  {
71  edges_[++edgeI] = bp.edges()[curEdge];
72  }
73 
74  forAll(boundary(), patchI)
75  {
76  const labelList& curP = boundary()[patchI];
77 
78  forAll(curP, eI)
79  {
80  edges_[++edgeI] = bp.edges()[curP[eI]];
81  }
82  }
83 
84  nEdges_ = edges_.size();
85  nInternalEdges_ = nIntEdges;
86 
87 
88  // Set edge owner and neighbour
89  edgeOwner_.setSize(nEdges());
90  edgeNeighbour_.setSize(nInternalEdges());
91 
92  edgeI = -1;
93 
94  const labelListList& bpef = bp.edgeFaces();
95 
96  for (label curEdge = 0; curEdge < nIntEdges; ++curEdge)
97  {
98  edgeOwner_[++edgeI] = bpef[curEdge][0];
99 
100  edgeNeighbour_[edgeI] = bpef[curEdge][1];
101  }
102 
103  forAll(boundary(), patchI)
104  {
105  const labelList& curP = boundary()[patchI];
106 
107  forAll(curP, eI)
108  {
109  edgeOwner_[++edgeI] = bpef[curP[eI]][0];
110  }
111  }
112 
113  // Set number of faces
114  nFaces_ = bp.size();
115 
116  // Set number of points
117  nPoints_ = bp.nPoints();
118 }
119 
120 
121 void Foam::faMesh::clearGeomNotAreas() const
122 {
123  DebugInFunction << "Clearing geometry" << endl;
124 
125  deleteDemandDrivenData(SPtr_);
126  deleteDemandDrivenData(patchPtr_);
127  deleteDemandDrivenData(patchStartsPtr_);
128  deleteDemandDrivenData(LePtr_);
129  deleteDemandDrivenData(magLePtr_);
130  deleteDemandDrivenData(centresPtr_);
131  deleteDemandDrivenData(edgeCentresPtr_);
132  deleteDemandDrivenData(faceAreaNormalsPtr_);
133  deleteDemandDrivenData(edgeAreaNormalsPtr_);
134  deleteDemandDrivenData(pointAreaNormalsPtr_);
135  deleteDemandDrivenData(faceCurvaturesPtr_);
136  deleteDemandDrivenData(edgeTransformTensorsPtr_);
137 }
138 
139 
140 void Foam::faMesh::clearGeom() const
141 {
142  DebugInFunction << "Clearing geometry" << endl;
143 
144  clearGeomNotAreas();
145  deleteDemandDrivenData(S0Ptr_);
146  deleteDemandDrivenData(S00Ptr_);
147  deleteDemandDrivenData(correctPatchPointNormalsPtr_);
148 }
149 
150 
151 void Foam::faMesh::clearAddressing() const
152 {
153  DebugInFunction << "Clearing addressing" << endl;
154 
155  deleteDemandDrivenData(lduPtr_);
156 }
157 
158 
159 void Foam::faMesh::clearOut() const
160 {
161  clearGeom();
162  clearAddressing();
163  deleteDemandDrivenData(globalMeshDataPtr_);
164 }
165 
166 
167 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
168 
169 Foam::faMesh::faMesh(const polyMesh& pMesh)
170 :
171  GeoMesh<polyMesh>(pMesh),
173  edgeInterpolation(*this),
174  faSchemes(mesh()),
175  faSolution(mesh()),
176  data(mesh()),
177  faceLabels_
178  (
179  IOobject
180  (
181  "faceLabels",
182  time().findInstance(meshDir(), "faceLabels"),
183  meshSubDir,
184  mesh(),
185  IOobject::MUST_READ,
186  IOobject::NO_WRITE
187  )
188  ),
189  boundary_
190  (
191  IOobject
192  (
193  "faBoundary",
194  time().findInstance(meshDir(), "faBoundary"),
195  meshSubDir,
196  mesh(),
197  IOobject::MUST_READ,
198  IOobject::NO_WRITE
199  ),
200  *this
201  ),
202  comm_(Pstream::worldComm),
203  patchPtr_(nullptr),
204  lduPtr_(nullptr),
205  curTimeIndex_(time().timeIndex()),
206  SPtr_(nullptr),
207  S0Ptr_(nullptr),
208  S00Ptr_(nullptr),
209  patchStartsPtr_(nullptr),
210  LePtr_(nullptr),
211  magLePtr_(nullptr),
212  centresPtr_(nullptr),
213  edgeCentresPtr_(nullptr),
214  faceAreaNormalsPtr_(nullptr),
215  edgeAreaNormalsPtr_(nullptr),
216  pointAreaNormalsPtr_(nullptr),
217  faceCurvaturesPtr_(nullptr),
218  edgeTransformTensorsPtr_(nullptr),
219  correctPatchPointNormalsPtr_(nullptr),
220  globalMeshDataPtr_(nullptr)
221 {
222  DebugInFunction << "Creating faMesh from IOobject" << endl;
223 
224  setPrimitiveMeshData();
225 
226  // Create global mesh data
227  if (Pstream::parRun())
228  {
229  globalData();
230  }
231 
232  // Calculate topology for the patches (processor-processor comms etc.)
233  boundary_.updateMesh();
234 
235  // Calculate the geometry for the patches (transformation tensors etc.)
236  boundary_.calcGeometry();
237 
238  if (isFile(pMesh.time().timePath()/mesh().dbDir()/"S0"))
239  {
241  (
242  IOobject
243  (
244  "S0",
245  time().timeName(),
246  meshSubDir,
247  mesh(),
250  ),
251  *this
252  );
253  }
254 }
255 
256 
257 Foam::faMesh::faMesh
258 (
259  const polyMesh& pMesh,
260  const labelList& faceLabels
261 )
262 :
263  GeoMesh<polyMesh>(pMesh),
265  edgeInterpolation(*this),
266  faSchemes(mesh()),
267  faSolution(mesh()),
268  data(mesh()),
269  faceLabels_
270  (
271  IOobject
272  (
273  "faceLabels",
274  mesh().facesInstance(),
275  meshSubDir,
276  mesh(),
279  ),
280  faceLabels
281  ),
282  boundary_
283  (
284  IOobject
285  (
286  "faBoundary",
287  mesh().facesInstance(),
288  meshSubDir,
289  mesh(),
292  ),
293  *this,
294  0
295  ),
296  comm_(Pstream::worldComm),
297  patchPtr_(nullptr),
298  lduPtr_(nullptr),
299  curTimeIndex_(time().timeIndex()),
300  SPtr_(nullptr),
301  S0Ptr_(nullptr),
302  S00Ptr_(nullptr),
303  patchStartsPtr_(nullptr),
304  LePtr_(nullptr),
305  magLePtr_(nullptr),
306  centresPtr_(nullptr),
307  edgeCentresPtr_(nullptr),
308  faceAreaNormalsPtr_(nullptr),
309  edgeAreaNormalsPtr_(nullptr),
310  pointAreaNormalsPtr_(nullptr),
311  faceCurvaturesPtr_(nullptr),
312  edgeTransformTensorsPtr_(nullptr),
313  correctPatchPointNormalsPtr_(nullptr),
314  globalMeshDataPtr_(nullptr)
315 {
316  DebugInFunction << "Creating faMesh from components" << endl;
317 }
318 
319 
320 Foam::faMesh::faMesh
321 (
322  const polyMesh& pMesh,
323  const fileName& defFile
324 )
325 :
326  GeoMesh<polyMesh>(pMesh),
328  edgeInterpolation(*this),
329  faSchemes(mesh()),
330  faSolution(mesh()),
331  data(mesh()),
332  faceLabels_
333  (
334  IOobject
335  (
336  "faceLabels",
337  mesh().facesInstance(),
338  meshSubDir,
339  mesh(),
342  ),
343  List<label>(0)
344  ),
345  boundary_
346  (
347  IOobject
348  (
349  "faBoundary",
350  mesh().facesInstance(),
351  meshSubDir,
352  mesh(),
355  ),
356  *this,
357  0
358  ),
359  comm_(Pstream::worldComm),
360  patchPtr_(nullptr),
361  lduPtr_(nullptr),
362  curTimeIndex_(time().timeIndex()),
363  SPtr_(nullptr),
364  S0Ptr_(nullptr),
365  S00Ptr_(nullptr),
366  patchStartsPtr_(nullptr),
367  LePtr_(nullptr),
368  magLePtr_(nullptr),
369  centresPtr_(nullptr),
370  edgeCentresPtr_(nullptr),
371  faceAreaNormalsPtr_(nullptr),
372  edgeAreaNormalsPtr_(nullptr),
373  pointAreaNormalsPtr_(nullptr),
374  faceCurvaturesPtr_(nullptr),
375  edgeTransformTensorsPtr_(nullptr),
376  correctPatchPointNormalsPtr_(nullptr),
377  globalMeshDataPtr_(nullptr)
378 {
379  DebugInFunction << "Creating faMesh from definition file" << endl;
380 
381  // Reading faMeshDefinition dictionary
382  IOdictionary faMeshDefinition
383  (
384  IOobject
385  (
386  defFile,
387  mesh().time().constant(),
388  meshSubDir,
389  mesh(),
392  )
393  );
394 
395  const wordList polyMeshPatches(faMeshDefinition.lookup("polyMeshPatches"));
396 
397  const dictionary& bndDict = faMeshDefinition.subDict("boundary");
398 
399  const wordList faPatchNames(bndDict.toc());
400 
401  List<faPatchData> faPatches(faPatchNames.size() + 1);
402 
403  const polyBoundaryMesh& pbm = pMesh.boundaryMesh();
404 
405  forAll(faPatchNames, patchI)
406  {
407  dictionary curPatchDict = bndDict.subDict(faPatchNames[patchI]);
408 
409  faPatches[patchI].name_ = faPatchNames[patchI];
410 
411  faPatches[patchI].type_ = curPatchDict.get<word>("type");
412 
413  faPatches[patchI].ownPolyPatchID_ =
414  pbm.findPatchID(curPatchDict.get<word>("ownerPolyPatch"));
415 
416  faPatches[patchI].ngbPolyPatchID_ =
417  pbm.findPatchID(curPatchDict.get<word>("neighbourPolyPatch"));
418  }
419 
420 
421  // Setting faceLabels list size
422  label size = 0;
423 
424  labelList patchIDs(polyMeshPatches.size(), -1);
425 
426  forAll(polyMeshPatches, patchI)
427  {
428  patchIDs[patchI] = pbm.findPatchID(polyMeshPatches[patchI]);
429 
430  size += pbm[patchIDs[patchI]].size();
431  }
432 
433  faceLabels_ = labelList(size, -1);
434 
435 
436  // Filling of faceLabels list
437  label faceI = -1;
438 
439  sort(patchIDs);
440 
441  forAll(polyMeshPatches, patchI)
442  {
443  label start = pbm[patchIDs[patchI]].start();
444  label size = pbm[patchIDs[patchI]].size();
445 
446  for (label i = 0; i < size; ++i)
447  {
448  faceLabels_[++faceI] = start + i;
449  }
450  }
451 
452 
453  // Determination of faPatch ID for each boundary edge.
454  // Result is in the bndEdgeFaPatchIDs list
455  labelList faceCells(faceLabels_.size(), -1);
456 
457  forAll(faceCells, faceI)
458  {
459  label faceID = faceLabels_[faceI];
460 
461  faceCells[faceI] = mesh().faceOwner()[faceID];
462  }
463 
464  labelList meshEdges =
465  patch().meshEdges
466  (
467  mesh().edges(),
468  mesh().cellEdges(),
469  faceCells
470  );
471 
472  const labelListList& edgeFaces = mesh().edgeFaces();
473 
474  const label nTotalEdges = patch().nEdges();
475  const label nInternalEdges = patch().nInternalEdges();
476 
477  labelList bndEdgeFaPatchIDs(nTotalEdges - nInternalEdges, -1);
478 
479  for (label edgeI = nInternalEdges; edgeI < nTotalEdges; ++edgeI)
480  {
481  label curMeshEdge = meshEdges[edgeI];
482 
483  labelList curEdgePatchIDs(2, label(-1));
484 
485  label patchI = -1;
486 
487  forAll(edgeFaces[curMeshEdge], faceI)
488  {
489  label curFace = edgeFaces[curMeshEdge][faceI];
490 
491  label curPatchID = pbm.whichPatch(curFace);
492 
493  if (curPatchID != -1)
494  {
495  curEdgePatchIDs[++patchI] = curPatchID;
496  }
497  }
498 
499  for (label pI = 0; pI < faPatches.size() - 1; ++pI)
500  {
501  if
502  (
503  (
504  curEdgePatchIDs[0] == faPatches[pI].ownPolyPatchID_
505  && curEdgePatchIDs[1] == faPatches[pI].ngbPolyPatchID_
506  )
507  ||
508  (
509  curEdgePatchIDs[1] == faPatches[pI].ownPolyPatchID_
510  && curEdgePatchIDs[0] == faPatches[pI].ngbPolyPatchID_
511  )
512  )
513  {
514  bndEdgeFaPatchIDs[edgeI - nInternalEdges] = pI;
515  break;
516  }
517  }
518  }
519 
520 
521  // Set edgeLabels for each faPatch
522  for (label pI = 0; pI < (faPatches.size() - 1); ++pI)
523  {
524  SLList<label> tmpList;
525 
526  forAll(bndEdgeFaPatchIDs, eI)
527  {
528  if (bndEdgeFaPatchIDs[eI] == pI)
529  {
530  tmpList.append(nInternalEdges + eI);
531  }
532  }
533 
534  faPatches[pI].edgeLabels_ = tmpList;
535  }
536 
537  // Check for undefined edges
538  SLList<label> tmpList;
539 
540  forAll(bndEdgeFaPatchIDs, eI)
541  {
542  if (bndEdgeFaPatchIDs[eI] == -1)
543  {
544  tmpList.append(nInternalEdges + eI);
545  }
546  }
547 
548  if (tmpList.size() > 0)
549  {
550  // Check for processor edges
551  labelList allUndefEdges(tmpList);
552  labelList ngbPolyPatch(allUndefEdges.size(), -1);
553  forAll(ngbPolyPatch, edgeI)
554  {
555  label curEdge = allUndefEdges[edgeI];
556 
557  label curPMeshEdge = meshEdges[curEdge];
558 
559  forAll(edgeFaces[curPMeshEdge], faceI)
560  {
561  label curFace = edgeFaces[curPMeshEdge][faceI];
562 
563  if (faceLabels_.found(curFace))
564  {
565  label polyPatchID = pbm.whichPatch(curFace);
566 
567  if (polyPatchID != -1)
568  {
569  ngbPolyPatch[edgeI] = polyPatchID;
570  }
571  }
572  }
573  }
574 
575  // Count ngb processorPolyPatch-es
576  labelHashSet processorPatchSet;
577  forAll(ngbPolyPatch, edgeI)
578  {
579  if (ngbPolyPatch[edgeI] != -1)
580  {
581  if (isA<processorPolyPatch>(pbm[ngbPolyPatch[edgeI]]))
582  {
583  processorPatchSet.insert(ngbPolyPatch[edgeI]);
584  }
585  }
586  }
587  labelList processorPatches(processorPatchSet.toc());
588  faPatches.setSize(faPatches.size() + processorPatches.size());
589 
590  for (label i = 0; i < processorPatches.size(); ++i)
591  {
592  SLList<label> tmpLst;
593 
594  forAll(ngbPolyPatch, eI)
595  {
596  if (ngbPolyPatch[eI] == processorPatches[i])
597  {
598  tmpLst.append(allUndefEdges[eI]);
599  }
600  }
601 
602  faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst;
603 
604  faPatches[faPatchNames.size() + i].name_ =
605  pbm[processorPatches[i]].name();
606 
607  faPatches[faPatchNames.size() + i].type_ =
608  processorFaPatch::typeName;
609 
610  faPatches[faPatchNames.size() + i].ngbPolyPatchID_ =
611  processorPatches[i];
612  }
613 
614  // Remaining undefined edges
615  SLList<label> undefEdges;
616  forAll(ngbPolyPatch, eI)
617  {
618  if (ngbPolyPatch[eI] == -1)
619  {
620  undefEdges.append(allUndefEdges[eI]);
621  }
622  else if (!isA<processorPolyPatch>(pbm[ngbPolyPatch[eI]]))
623  {
624  undefEdges.append(allUndefEdges[eI]);
625  }
626  }
627 
628  if (undefEdges.size() > 0)
629  {
630  label pI = faPatches.size()-1;
631 
632  faPatches[pI].name_ = "undefined";
633  faPatches[pI].type_ = "patch";
634  faPatches[pI].edgeLabels_ = undefEdges;
635  }
636  else
637  {
638  faPatches.setSize(faPatches.size() - 1);
639  }
640  }
641  else
642  {
643  faPatches.setSize(faPatches.size() - 1);
644  }
645 
646 
647  // Reorder processorFaPatch using
648  // ordering of ngb processorPolyPatch
649  forAll(faPatches, patchI)
650  {
651  if (faPatches[patchI].type_ == processorFaPatch::typeName)
652  {
653  labelList ngbFaces(faPatches[patchI].edgeLabels_.size(), -1);
654 
655  forAll(ngbFaces, edgeI)
656  {
657  label curEdge = faPatches[patchI].edgeLabels_[edgeI];
658 
659  label curPMeshEdge = meshEdges[curEdge];
660 
661  forAll(edgeFaces[curPMeshEdge], faceI)
662  {
663  label curFace = edgeFaces[curPMeshEdge][faceI];
664 
665  label curPatchID = pbm.whichPatch(curFace);
666 
667  if (curPatchID == faPatches[patchI].ngbPolyPatchID_)
668  {
669  ngbFaces[edgeI] = curFace;
670  }
671  }
672  }
673 
674  SortableList<label> sortedNgbFaces(ngbFaces);
675  labelList reorderedEdgeLabels(ngbFaces.size(), -1);
676  for (label i = 0; i < reorderedEdgeLabels.size(); ++i)
677  {
678  reorderedEdgeLabels[i] =
679  faPatches[patchI].edgeLabels_
680  [
681  sortedNgbFaces.indices()[i]
682  ];
683  }
684 
685  faPatches[patchI].edgeLabels_ = reorderedEdgeLabels;
686  }
687  }
688 
689 
690  // Add good patches to faMesh
691  SLList<faPatch*> faPatchLst;
692 
693  for (label pI = 0; pI < faPatches.size(); ++pI)
694  {
695  faPatches[pI].dict_.add("type", faPatches[pI].type_);
696  faPatches[pI].dict_.add("edgeLabels", faPatches[pI].edgeLabels_);
697  faPatches[pI].dict_.add
698  (
699  "ngbPolyPatchIndex",
700  faPatches[pI].ngbPolyPatchID_
701  );
702 
703  if (faPatches[pI].type_ == processorFaPatch::typeName)
704  {
705  if (faPatches[pI].ngbPolyPatchID_ == -1)
706  {
708  << "ngbPolyPatch is not defined for processorFaPatch: "
709  << faPatches[pI].name_
710  << abort(FatalError);
711  }
712 
713  const processorPolyPatch& procPolyPatch =
714  refCast<const processorPolyPatch>
715  (
716  pbm[faPatches[pI].ngbPolyPatchID_]
717  );
718 
719  faPatches[pI].dict_.add("myProcNo", procPolyPatch.myProcNo());
720  faPatches[pI].dict_.add
721  (
722  "neighbProcNo",
723  procPolyPatch.neighbProcNo()
724  );
725  }
726 
727  faPatchLst.append
728  (
730  (
731  faPatches[pI].name_,
732  faPatches[pI].dict_,
733  pI,
734  boundary()
735  ).ptr()
736  );
737  }
738 
739  addFaPatches(List<faPatch*>(faPatchLst));
740 
741  // Create global mesh data
742  if (Pstream::parRun())
743  {
744  globalData();
745  }
746 
747  // Calculate topology for the patches (processor-processor comms etc.)
748  boundary_.updateMesh();
749 
750  // Calculate the geometry for the patches (transformation tensors etc.)
751  boundary_.calcGeometry();
752 
753  if (isFile(mesh().time().timePath()/"S0"))
754  {
756  (
757  IOobject
758  (
759  "S0",
760  time().timeName(),
761  meshSubDir,
762  mesh(),
765  ),
766  *this
767  );
768  }
769 }
770 
771 
772 Foam::faMesh::faMesh
773 (
774  const polyMesh& pMesh,
775  const label polyPatchID
776 )
777 :
778  GeoMesh<polyMesh>(pMesh),
780  edgeInterpolation(*this),
781  faSchemes(mesh()),
782  faSolution(mesh()),
783  data(mesh()),
784  faceLabels_
785  (
786  IOobject
787  (
788  "faceLabels",
789  mesh().facesInstance(),
790  meshSubDir,
791  mesh(),
794  ),
795  labelList(pMesh.boundaryMesh()[polyPatchID].size(), -1)
796  ),
797  boundary_
798  (
799  IOobject
800  (
801  "faBoundary",
802  mesh().facesInstance(),
803  meshSubDir,
804  mesh(),
807  ),
808  *this,
809  0
810  ),
811  comm_(Pstream::worldComm),
812  patchPtr_(nullptr),
813  lduPtr_(nullptr),
814  curTimeIndex_(time().timeIndex()),
815  SPtr_(nullptr),
816  S0Ptr_(nullptr),
817  S00Ptr_(nullptr),
818  patchStartsPtr_(nullptr),
819  LePtr_(nullptr),
820  magLePtr_(nullptr),
821  centresPtr_(nullptr),
822  edgeCentresPtr_(nullptr),
823  faceAreaNormalsPtr_(nullptr),
824  edgeAreaNormalsPtr_(nullptr),
825  pointAreaNormalsPtr_(nullptr),
826  faceCurvaturesPtr_(nullptr),
827  edgeTransformTensorsPtr_(nullptr),
828  correctPatchPointNormalsPtr_(nullptr),
829  globalMeshDataPtr_(nullptr)
830 {
831  DebugInFunction << "Creating faMesh from polyPatch" << endl;
832 
833  const polyBoundaryMesh& pbm = pMesh.boundaryMesh();
834 
835  // Set faceLabels
836  forAll(faceLabels_, faceI)
837  {
838  faceLabels_[faceI] = pbm[polyPatchID].start() + faceI;
839  }
840 
841  // Add one faPatch
842  const indirectPrimitivePatch& bp = patch();
843 
844  const label nTotalEdges = bp.nEdges();
845 
846  const label nInternalEdges = bp.nInternalEdges();
847 
848  labelList edgeLabels(nTotalEdges - nInternalEdges, -1);
849 
850  forAll(edgeLabels, edgeI)
851  {
852  edgeLabels[edgeI] = nInternalEdges + edgeI;
853  }
854 
855  dictionary patchDict;
856 
857  patchDict.add("type", "patch");
858  patchDict.add("edgeLabels", edgeLabels);
859  patchDict.add("ngbPolyPatchIndex", -1);
860 
861  List<faPatch*> faPatchLst(1);
862 
863  faPatchLst[0] = faPatch::New("default", patchDict, 0, boundary()).ptr();
864 
865  addFaPatches(faPatchLst);
866 
867  setPrimitiveMeshData();
868 
869  // Calculate topology for the patches (processor-processor comms etc.)
870  boundary_.updateMesh();
871 
872  // Calculate the geometry for the patches (transformation tensors etc.)
873  boundary_.calcGeometry();
874 }
875 
876 
877 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
878 
880 {
881  clearOut();
882 }
883 
884 
885 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
886 
888 {
889  return mesh().dbDir()/meshSubDir;
890 }
891 
892 
894 {
895  return mesh().time();
896 }
897 
898 
900 {
901  return mesh().pointsInstance();
902 }
903 
904 
906 {
907  return mesh().facesInstance();
908 }
909 
910 
912 {
913  if (!patchPtr_)
914  {
915  patchPtr_ = new indirectPrimitivePatch
916  (
918  (
919  mesh().faces(),
920  faceLabels_
921  ),
922  mesh().points()
923  );
924  }
925 
926  return *patchPtr_;
927 }
928 
929 
931 {
932  if (!patchPtr_)
933  {
934  patchPtr_ = new indirectPrimitivePatch
935  (
937  (
938  mesh().faces(),
939  faceLabels_
940  ),
941  mesh().points()
942  );
943  }
944 
945  return *patchPtr_;
946 }
947 
948 
950 {
951  return patch().localPoints();
952 }
953 
954 
956 {
957  return edges_;
958 }
959 
960 
962 {
963  return patch().localFaces();
964 }
965 
966 
968 {
969  DebugInFunction << "Adding patches to faMesh" << endl;
970 
971  if (boundary().size() > 0)
972  {
974  << "boundary already exists"
975  << abort(FatalError);
976  }
977 
978  boundary_.setSize(p.size());
979 
980  forAll(p, patchI)
981  {
982  boundary_.set(patchI, p[patchI]);
983  }
984 
985  setPrimitiveMeshData();
986 
987  boundary_.checkDefinition();
988 }
989 
990 
992 {
993  return comm_;
994 }
995 
996 
998 {
999  return comm_;
1000 }
1001 
1002 
1004 {
1005  return true;
1006 }
1007 
1008 
1010 {
1011  return mesh().thisDb();
1012 }
1013 
1014 
1016 {
1017  return boundary_;
1018 }
1019 
1020 
1022 {
1023  if (!patchStartsPtr_)
1024  {
1025  calcPatchStarts();
1026  }
1027 
1028  return *patchStartsPtr_;
1029 }
1030 
1031 
1033 {
1034  if (!LePtr_)
1035  {
1036  calcLe();
1037  }
1038 
1039  return *LePtr_;
1040 }
1041 
1042 
1044 {
1045  if (!magLePtr_)
1046  {
1047  calcMagLe();
1048  }
1049 
1050  return *magLePtr_;
1051 }
1052 
1053 
1055 {
1056  if (!centresPtr_)
1057  {
1058  calcAreaCentres();
1059  }
1060 
1061  return *centresPtr_;
1062 }
1063 
1064 
1066 {
1067  if (!edgeCentresPtr_)
1068  {
1069  calcEdgeCentres();
1070  }
1071 
1072  return *edgeCentresPtr_;
1073 }
1074 
1075 
1078 {
1079  if (!SPtr_)
1080  {
1081  calcS();
1082  }
1083 
1084  return *SPtr_;
1085 }
1086 
1087 
1090 {
1091  if (!S0Ptr_)
1092  {
1094  << "S0 is not available"
1095  << abort(FatalError);
1096  }
1097 
1098  return *S0Ptr_;
1099 }
1100 
1101 
1104 {
1105  if (!S00Ptr_)
1106  {
1108  (
1109  IOobject
1110  (
1111  "S00",
1112  time().timeName(),
1113  mesh(),
1116  ),
1117  S0()
1118  );
1119 
1120  S0Ptr_->writeOpt() = IOobject::AUTO_WRITE;
1121  }
1122 
1123  return *S00Ptr_;
1124 }
1125 
1126 
1128 {
1129  if (!faceAreaNormalsPtr_)
1130  {
1131  calcFaceAreaNormals();
1132  }
1133 
1134  return *faceAreaNormalsPtr_;
1135 }
1136 
1137 
1139 {
1140  if (!edgeAreaNormalsPtr_)
1141  {
1142  calcEdgeAreaNormals();
1143  }
1144 
1145  return *edgeAreaNormalsPtr_;
1146 }
1147 
1148 
1150 {
1151  if (!pointAreaNormalsPtr_)
1152  {
1153  calcPointAreaNormals();
1154 
1155  if (quadricsFit_ > 0)
1156  {
1157  calcPointAreaNormalsByQuadricsFit();
1158  }
1159  }
1160 
1161  return *pointAreaNormalsPtr_;
1162 }
1163 
1164 
1166 {
1167  if (!faceCurvaturesPtr_)
1168  {
1169  calcFaceCurvatures();
1170  }
1171 
1172  return *faceCurvaturesPtr_;
1173 }
1174 
1175 
1178 {
1179  if (!edgeTransformTensorsPtr_)
1180  {
1181  calcEdgeTransformTensors();
1182  }
1183 
1184  return *edgeTransformTensorsPtr_;
1185 }
1186 
1187 
1189 {
1190  if (!globalMeshDataPtr_)
1191  {
1192  globalMeshDataPtr_ = new faGlobalMeshData(*this);
1193  }
1194 
1195  return *globalMeshDataPtr_;
1196 }
1197 
1198 
1200 {
1201  if (!lduPtr_)
1202  {
1203  calcLduAddressing();
1204  }
1205 
1206  return *lduPtr_;
1207 }
1208 
1209 
1211 {
1212  // Grab point motion from polyMesh
1213  const vectorField& newPoints = mesh().points();
1214 
1215  // Grab old time areas if the time has been incremented
1216  if (curTimeIndex_ < time().timeIndex())
1217  {
1218  if (S00Ptr_ && S0Ptr_)
1219  {
1220  DebugInfo<< "Copy old-old S" << endl;
1221  *S00Ptr_ = *S0Ptr_;
1222  }
1223 
1224  if (S0Ptr_)
1225  {
1226  DebugInfo<< "Copy old S" << endl;
1227  *S0Ptr_ = S();
1228  }
1229  else
1230  {
1231  DebugInfo<< "Creating old cell volumes." << endl;
1232 
1234  (
1235  IOobject
1236  (
1237  "S0",
1238  time().timeName(),
1239  mesh(),
1242  false
1243  ),
1244  S()
1245  );
1246  }
1247 
1248  curTimeIndex_ = time().timeIndex();
1249  }
1250 
1251  clearGeomNotAreas();
1252 
1253  // To satisfy the motion interface for MeshObject, const cast is needed
1254  if (patchPtr_)
1255  {
1256  patchPtr_->movePoints(newPoints);
1257  }
1258 
1259  // Move boundary points
1260  const_cast<faBoundaryMesh&>(boundary_).movePoints(newPoints);
1261 
1262  // Move interpolation
1263  const edgeInterpolation& cei = *this;
1265 
1266  // Note: Fluxes were dummy?
1267 
1268  return true;
1269 }
1270 
1271 
1273 {
1274  if ((patchID < 0) || (patchID >= boundary().size()))
1275  {
1277  << "patchID is not in the valid range"
1278  << abort(FatalError);
1279  }
1280 
1281  if (correctPatchPointNormalsPtr_)
1282  {
1283  return (*correctPatchPointNormalsPtr_)[patchID];
1284  }
1285 
1286  return false;
1287 }
1288 
1289 
1291 {
1292  if (!correctPatchPointNormalsPtr_)
1293  {
1294  correctPatchPointNormalsPtr_ = new boolList(boundary().size(), false);
1295  }
1296 
1297  return *correctPatchPointNormalsPtr_;
1298 }
1299 
1300 
1301 bool Foam::faMesh::write(const bool valid) const
1302 {
1303  faceLabels_.write();
1304  boundary_.write();
1305 
1306  return false;
1307 }
1308 
1309 
1310 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
1311 
1312 bool Foam::faMesh::operator!=(const faMesh& m) const
1313 {
1314  return &m != this;
1315 }
1316 
1317 
1318 bool Foam::faMesh::operator==(const faMesh& m) const
1319 {
1320  return &m == this;
1321 }
1322 
1323 
1324 // ************************************************************************* //
Foam::lduAddressing
The class contains the addressing required by the lduMatrix: upper, lower and losort.
Definition: lduAddressing.H:114
Foam::LList::append
void append(const T &item)
Add copy at tail of list.
Definition: LList.H:237
Foam::IOobject::NO_WRITE
Definition: IOobject.H:130
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:74
Foam::IOdictionary
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Definition: IOdictionary.H:54
Foam::polyMesh::points
virtual const pointField & points() const
Return raw points.
Definition: polyMesh.C:1038
Foam::faMesh::meshDir
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
Definition: faMesh.C:887
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::faMesh::Le
const edgeVectorField & Le() const
Return edge length vectors.
Definition: faMesh.C:1032
Foam::faBoundaryMesh::updateMesh
void updateMesh()
Correct faBoundaryMesh after topology update.
Definition: faBoundaryMesh.C:407
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::IOobject::AUTO_WRITE
Definition: IOobject.H:129
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::faMesh::faces
const faceList & faces() const
Return faces.
Definition: faMesh.C:961
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::FieldField
A field of fields is a PtrList of fields with reference counting.
Definition: FieldField.H:53
Foam::faMesh::write
virtual bool write(const bool valid=true) const
Write mesh.
Definition: faMesh.C:1301
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::HashTable::toc
List< Key > toc() const
The table of contents (the keys) in unsorted order.
Definition: HashTable.C:121
Foam::faSchemes
Selector class for finite area differencing schemes. faMesh is derived from faShemes so that all fiel...
Definition: faSchemes.H:52
Foam::faMesh::patch
const indirectPrimitivePatch & patch() const
Return constant reference to primitive patch.
Definition: faMesh.C:911
Foam::fvMesh::thisDb
virtual const objectRegistry & thisDb() const
Return the object registry - resolve conflict polyMesh/lduMesh.
Definition: fvMesh.H:258
demandDrivenData.H
Template functions to aid in the implementation of demand driven data.
Foam::primitiveMesh::edgeFaces
const labelListList & edgeFaces() const
Definition: primitiveMeshEdgeFaces.C:33
Foam::polyMesh::dbDir
virtual const fileName & dbDir() const
Override the objectRegistry dbDir for a single-region case.
Definition: polyMesh.C:798
Foam::PrimitivePatch::nEdges
label nEdges() const
Return number of edges in patch.
Definition: PrimitivePatch.H:317
Foam::objectRegistry::time
const Time & time() const
Return time.
Definition: objectRegistry.H:186
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:414
Foam::faBoundaryMesh::calcGeometry
void calcGeometry()
Calculate the geometry for the patches.
Definition: faBoundaryMesh.C:175
Foam::polyMesh::facesInstance
const fileName & facesInstance() const
Return the current instance directory for faces.
Definition: polyMesh.C:821
Foam::processorPolyPatch::neighbProcNo
int neighbProcNo() const
Return neighbour processor number.
Definition: processorPolyPatch.H:274
Foam::faMesh::edges
const edgeList & edges() const
Return edges.
Definition: faMesh.C:955
Foam::boolList
List< bool > boolList
A List of bools.
Definition: List.H:72
Foam::isFile
bool isFile(const fileName &name, const bool checkGzip=true, const bool followLink=true)
Does the name exist as a FILE in the file system?
Definition: MSwindows.C:658
Foam::faGlobalMeshData
Various mesh related information for a parallel run.
Definition: faGlobalMeshData.H:54
Foam::polyMesh::boundaryMesh
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:435
primitiveMesh.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:337
faMesh.H
Foam::faPatch::New
static autoPtr< faPatch > New(const word &name, const dictionary &dict, const label index, const faBoundaryMesh &bm)
Return a pointer to a new patch created.
Definition: faPatchNew.C:35
Foam::faMesh::pointAreaNormals
const vectorField & pointAreaNormals() const
Return point area normals.
Definition: faMesh.C:1149
Foam::dictionary::get
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionaryTemplates.C:81
Foam::faMesh::~faMesh
virtual ~faMesh()
Destructor.
Definition: faMesh.C:879
Foam::faMesh::S00
const DimensionedField< scalar, areaMesh > & S00() const
Return old-old-time face areas.
Definition: faMesh.C:1103
Foam::DynamicID< polyBoundaryMesh >
polyMesh.H
Foam::HashSet< label, Hash< label > >
Foam::UpdateableMeshObject
Definition: MeshObject.H:241
Foam::polyBoundaryMesh::start
label start() const
The start label of the boundary faces in the polyMesh face list.
Definition: polyBoundaryMesh.C:638
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::faMesh::patchStarts
const labelList & patchStarts() const
Return patch starts.
Definition: faMesh.C:1021
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:290
Foam::faMesh::globalData
const faGlobalMeshData & globalData() const
Return parallel info.
Definition: faMesh.C:1188
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:60
Foam::LList
Template class for non-intrusive linked lists.
Definition: LList.H:54
Foam::deleteDemandDrivenData
void deleteDemandDrivenData(DataPtr &dataPtr)
Definition: demandDrivenData.H:42
Foam::polyMesh::pointsInstance
const fileName & pointsInstance() const
Return the current instance directory for points.
Definition: polyMesh.C:815
SortableList.H
Foam::faBoundaryMesh
Finite area boundary mesh.
Definition: faBoundaryMesh.H:66
Foam::faMesh::edgeTransformTensors
const FieldField< Field, tensor > & edgeTransformTensors() const
Return edge transformation tensors.
Definition: faMesh.C:1177
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:62
Foam::faMesh::S0
const DimensionedField< scalar, areaMesh > & S0() const
Return old-time face areas.
Definition: faMesh.C:1089
Foam::Field< vector >
Foam::faMesh::S
const DimensionedField< scalar, areaMesh > & S() const
Return face areas.
Definition: faMesh.C:1077
Foam::faMesh::operator==
bool operator==(const faMesh &m) const
Definition: faMesh.C:1318
Foam::faMesh::lduAddr
virtual const lduAddressing & lduAddr() const
Return ldu addressing.
Definition: faMesh.C:1199
DebugInFunction
#define DebugInFunction
Report an information message using Foam::Info.
Definition: messageStream.H:356
edgeFields.H
Foam::faMesh::addFaPatches
void addFaPatches(const List< faPatch * > &)
Add boundary patches. Constructor helper.
Definition: faMesh.C:967
Foam::Time::timePath
fileName timePath() const
Return current time path.
Definition: Time.H:320
Foam::faMesh::faceAreaNormals
const areaVectorField & faceAreaNormals() const
Return face area normals.
Definition: faMesh.C:1127
Foam::faMesh::time
const Time & time() const
Return reference to time.
Definition: faMesh.C:893
patchID
label patchID
Definition: boundaryProcessorFaPatchPoints.H:5
Foam::polyMesh::faceOwner
virtual const labelList & faceOwner() const
Return face owner.
Definition: polyMesh.C:1076
Foam::dictionary::subDict
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
Definition: dictionary.C:523
Foam::sort
void sort(UList< T > &a)
Definition: UList.C:241
Foam::IndirectList
A List with indirect addressing.
Definition: IndirectList.H:56
IndirectList.H
Foam::processorPolyPatch
Neighbour processor patch.
Definition: processorPolyPatch.H:58
Foam::faSolution
Selector class for finite area solution. faMesh is derived from faSolution so that all fields have ac...
Definition: faSolution.H:53
Foam::faMesh::magLe
const edgeScalarField & magLe() const
Return edge length magnitudes.
Definition: faMesh.C:1043
Foam::faMesh::facesInstance
const fileName & facesInstance() const
Return the current instance directory for faces.
Definition: faMesh.C:905
areaFields.H
timeIndex
label timeIndex
Definition: getTimeIndex.H:4
Foam::dictionary::lookup
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Definition: dictionary.C:419
timeName
word timeName
Definition: getTimeIndex.H:3
Foam::faMesh::nEdges
label nEdges() const
Definition: faMesh.H:356
Foam::faMesh::operator!=
bool operator!=(const faMesh &m) const
Definition: faMesh.C:1312
Foam::FatalError
error FatalError
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
faPatchData.H
Foam::SortableList
A list that is sorted upon construction or when explicitly requested with the sort() method.
Definition: List.H:66
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::faMesh::points
const pointField & points() const
Return mesh points.
Definition: faMesh.C:949
Foam::GeoMesh
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Definition: GeoMesh.H:48
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
Foam::faMesh::nInternalEdges
label nInternalEdges() const
Definition: faMesh.H:361
Foam::edgeInterpolation::movePoints
bool movePoints() const
Do what is necessary if the mesh has moved.
Definition: edgeInterpolation.C:188
Foam::faMesh::edgeAreaNormals
const edgeVectorField & edgeAreaNormals() const
Return edge area normals.
Definition: faMesh.C:1138
Foam::faMesh::mesh
const polyMesh & mesh() const
Return access to polyMesh.
Definition: faMesh.H:323
Foam::faMesh::correctPatchPointNormals
boolList & correctPatchPointNormals() const
Set whether point normals should be corrected for a patch.
Definition: faMesh.C:1290
Foam::indirectPrimitivePatch
PrimitivePatch< face, IndirectList, const pointField & > indirectPrimitivePatch
A PrimitivePatch using an IndirectList for the faces.
Definition: indirectPrimitivePatch.H:47
Foam::PrimitivePatch::nInternalEdges
label nInternalEdges() const
Number of internal edges.
Definition: PrimitivePatch.C:258
Foam::faMesh::thisDb
virtual const objectRegistry & thisDb() const
Return reference to the mesh database.
Definition: faMesh.C:1009
Time.H
Foam::labelListList
List< labelList > labelListList
A List of labelList.
Definition: labelList.H:56
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
Foam::faMesh::hasDb
virtual bool hasDb() const
Return true if thisDb() is a valid DB.
Definition: faMesh.C:1003
DebugInfo
#define DebugInfo
Report an information message using Foam::Info.
Definition: messageStream.H:350
Foam::faMesh::faceCurvatures
const areaScalarField & faceCurvatures() const
Return face curvatures.
Definition: faMesh.C:1165
Foam::foamVersion::patch
const std::string patch
OpenFOAM patch number as a std::string.
Foam::polyPatchID
DynamicID< polyBoundaryMesh > polyPatchID
Foam::polyPatchID.
Definition: polyPatchID.H:39
Foam::Pstream
Inter-processor communications stream.
Definition: Pstream.H:56
Foam::UPstream::worldComm
static label worldComm
Default communicator (all processors)
Definition: UPstream.H:285
Foam::List< label >
faMeshLduAddressing.H
Foam::start
label ListType::const_reference const label start
Definition: ListOps.H:408
Foam::faMesh::meshSubDir
static word meshSubDir
Return the mesh sub-directory name (usually "faMesh")
Definition: faMesh.H:277
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::faMesh::boundary
const faBoundaryMesh & boundary() const
Return constant reference to boundary mesh.
Definition: faMesh.C:1015
Foam::faMesh::edgeCentres
const edgeVectorField & edgeCentres() const
Return edge centres as edgeVectorField.
Definition: faMesh.C:1065
Foam::HashSet::insert
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Definition: HashSet.H:182
Foam::SortableList::indices
const labelList & indices() const
Return the list of sorted indices. Updated every sort.
Definition: SortableList.H:113
Foam::faMesh
Finite area mesh. Used for 2-D non-Euclidian finite area method.
Definition: faMesh.H:77
Foam::fvMesh::time
const Time & time() const
Return the top-level database.
Definition: fvMesh.H:246
Foam::MeshObject
Templated abstract base-class for optional mesh objects used to automate their allocation to the mesh...
Definition: MeshObject.H:88
Foam::dictionary::add
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
Definition: dictionary.C:703
Foam::processorPolyPatch::myProcNo
int myProcNo() const
Return processor number.
Definition: processorPolyPatch.H:268
Foam::faMesh::pointsInstance
const fileName & pointsInstance() const
Return the current instance directory for points.
Definition: faMesh.C:899
Foam::List::setSize
void setSize(const label newSize)
Alias for resize(const label)
Definition: ListI.H:146
Foam::GeometricField
Generic GeometricField class.
Definition: areaFieldsFwd.H:53
Foam::IOobject::NO_READ
Definition: IOobject.H:123
constant
constant condensation/saturation model.
wedgeFaPatch.H
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::faceCells
Smooth ATC in cells next to a set of patches supplied by type.
Definition: faceCells.H:56
Foam::edgeInterpolation
Face to edge interpolation scheme. Included in faMesh.
Definition: edgeInterpolation.H:60
Foam::data
Database for solution data, solver performance and other reduced data.
Definition: data.H:54
boundary
faceListList boundary
Definition: createBlockMesh.H:4
Foam::faMesh::movePoints
virtual bool movePoints()
Update after mesh motion.
Definition: faMesh.C:1210
Foam::faMesh::comm
label comm() const
Return communicator used for parallel communication.
Definition: faMesh.C:991
Foam::DimensionedField
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Definition: DimensionedField.H:54
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:90
Foam::faMesh::areaCentres
const areaVectorField & areaCentres() const
Return face centres as areaVectorField.
Definition: faMesh.C:1054
Foam::IOobject::MUST_READ
Definition: IOobject.H:120
faGlobalMeshData.H