faceZone.C
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2011-2025 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 \*---------------------------------------------------------------------------*/
25 
26 #include "faceZone.H"
27 #include "faceZoneList.H"
28 #include "polyMesh.H"
29 #include "polyTopoChangeMap.H"
30 #include "syncTools.H"
31 
32 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
33 
34 namespace Foam
35 {
37 }
38 
39 const char* const Foam::faceZone::labelsName = "faceLabels";
40 
41 
42 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
43 
44 void Foam::faceZone::calcFaceZonePatch() const
45 {
46  if (debug)
47  {
48  InfoInFunction << "Calculating primitive patch" << endl;
49  }
50 
51  if (patchPtr_)
52  {
54  << "primitive face zone patch already calculated"
55  << abort(FatalError);
56  }
57 
58  patchPtr_ =
60  (
61  faceList(size()),
62  zones().mesh().points()
63  );
64 
65  primitiveFacePatch& patch = *patchPtr_;
66 
67  const faceList& f = zones().mesh().faces();
68 
69  const labelList& addr = *this;
70 
71  if (oriented_)
72  {
73  forAll(addr, facei)
74  {
75  if (flipMap_[facei])
76  {
77  patch[facei] = f[addr[facei]].reverseFace();
78  }
79  else
80  {
81  patch[facei] = f[addr[facei]];
82  }
83  }
84  }
85  else
86  {
87  forAll(addr, facei)
88  {
89  patch[facei] = f[addr[facei]];
90  }
91  }
92 
93  if (debug)
94  {
95  InfoInFunction << "Finished calculating primitive patch" << endl;
96  }
97 }
98 
99 
100 void Foam::faceZone::calcCellLayers() const
101 {
102  if (debug)
103  {
104  InfoInFunction << "Calculating master cells" << endl;
105  }
106 
107  // It is an error to attempt to recalculate edgeCells
108  // if the pointer is already set
109  if (masterCellsPtr_ || slaveCellsPtr_)
110  {
112  << "cell layers already calculated"
113  << abort(FatalError);
114  }
115  else
116  {
117  // Go through all the faces in the master zone. Choose the
118  // master or slave cell based on the face flip
119 
120  const labelList& own = zones().mesh().faceOwner();
121  const labelList& nei = zones().mesh().faceNeighbour();
122 
123  const labelList& mf = *this;
124 
125  masterCellsPtr_ = new labelList(mf.size());
126  labelList& mc = *masterCellsPtr_;
127 
128  slaveCellsPtr_ = new labelList(mf.size());
129  labelList& sc = *slaveCellsPtr_;
130 
131  forAll(mf, facei)
132  {
133  label ownCelli = own[mf[facei]];
134  label neiCelli =
135  (
136  zones().mesh().isInternalFace(mf[facei])
137  ? nei[mf[facei]]
138  : -1
139  );
140 
141  if (!oriented_ || !flipMap_[facei])
142  {
143  // Face is oriented correctly, no flip needed
144  mc[facei] = neiCelli;
145  sc[facei] = ownCelli;
146  }
147  else
148  {
149  mc[facei] = ownCelli;
150  sc[facei] = neiCelli;
151  }
152  }
153  }
154 }
155 
156 
157 void Foam::faceZone::checkAddressing() const
158 {
159  if (oriented_ && size() != flipMap_.size())
160  {
162  << "Size of addressing: " << size()
163  << " size of flip map: " << flipMap_.size()
164  << abort(FatalError);
165  }
166 
167  const labelList& mf = *this;
168 
169  // Note: nFaces, nCells might not be set yet on mesh so use owner size
170  const label nFaces = zones().mesh().faceOwner().size();
171 
172  bool hasWarned = false;
173  forAll(mf, i)
174  {
175  if (!hasWarned && (mf[i] < 0 || mf[i] >= nFaces))
176  {
178  << "Illegal face index " << mf[i] << " outside range 0.."
179  << nFaces-1 << endl;
180  hasWarned = true;
181  }
182  }
183 }
184 
185 
186 void Foam::faceZone::reset(const Map<bool>& newIndices)
187 {
188  clearAddressing();
189  oriented_ = true;
190 
191  labelList& indices = *this;
192 
193  indices.setSize(newIndices.size());
194  flipMap_.setSize(newIndices.size());
195 
196  const List<Map<bool>::const_iterator> sortedNewIndices(newIndices.sorted());
197 
198  forAll(sortedNewIndices, i)
199  {
200  indices[i] = sortedNewIndices[i].key();
201  flipMap_[i] = sortedNewIndices[i]();
202  }
203 }
204 
205 
206 void Foam::faceZone::reset(const labelHashSet& newIndices)
207 {
208  clearAddressing();
209  oriented_ = false;
210  flipMap_.clear();
211  labelList::operator=(newIndices.sortedToc());
212 }
213 
214 
215 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
216 
218 (
219  const word& name,
220  const labelUList& addr,
221  const boolList& fm,
222  const faceZoneList& mz,
223  const bool moveUpdate,
224  const bool topoUpdate
225 )
226 :
227  Zone<faceZone, faceZoneList>(name, addr, mz, moveUpdate, topoUpdate),
228  oriented_(true),
229  flipMap_(fm),
230  patchPtr_(nullptr),
231  masterCellsPtr_(nullptr),
232  slaveCellsPtr_(nullptr),
233  mePtr_(nullptr)
234 {
235  checkAddressing();
236 }
237 
238 
240 (
241  const word& name,
242  const labelUList& addr,
243  const faceZoneList& mz,
244  const bool moveUpdate,
245  const bool topoUpdate
246 )
247 :
248  Zone<faceZone, faceZoneList>(name, addr, mz, moveUpdate, topoUpdate),
249  oriented_(false),
250  patchPtr_(nullptr),
251  masterCellsPtr_(nullptr),
252  slaveCellsPtr_(nullptr),
253  mePtr_(nullptr)
254 {
255  checkAddressing();
256 }
257 
258 
260 (
261  const word& name,
262  labelList&& addr,
263  boolList&& fm,
264  const faceZoneList& mz,
265  const bool moveUpdate,
266  const bool topoUpdate
267 )
268 :
269  Zone<faceZone, faceZoneList>(name, move(addr), mz, moveUpdate, topoUpdate),
270  oriented_(true),
271  flipMap_(move(fm)),
272  patchPtr_(nullptr),
273  masterCellsPtr_(nullptr),
274  slaveCellsPtr_(nullptr),
275  mePtr_(nullptr)
276 {
277  checkAddressing();
278 }
279 
280 
282 (
283  const word& name,
284  labelList&& addr,
285  const faceZoneList& mz,
286  const bool moveUpdate,
287  const bool topoUpdate
288 )
289 :
290  Zone<faceZone, faceZoneList>(name, move(addr), mz, moveUpdate, topoUpdate),
291  oriented_(false),
292  patchPtr_(nullptr),
293  masterCellsPtr_(nullptr),
294  slaveCellsPtr_(nullptr),
295  mePtr_(nullptr)
296 {
297  checkAddressing();
298 }
299 
300 
302 (
303  const word& name,
304  const dictionary& dict,
305  const faceZoneList& mz
306 )
307 :
309  oriented_(dict.found("flipMap")),
310  flipMap_(dict.lookupOrDefault("flipMap", boolList::null())),
311  patchPtr_(nullptr),
312  masterCellsPtr_(nullptr),
313  slaveCellsPtr_(nullptr),
314  mePtr_(nullptr)
315 {
316  checkAddressing();
317 }
318 
319 
321 (
322  const faceZone& fz,
323  const word& name,
324  const labelUList& addr,
325  const boolList& fm,
326  const faceZoneList& mz
327 )
328 :
329  Zone<faceZone, faceZoneList>(fz, name, addr, mz),
330  oriented_(true),
331  flipMap_(fm),
332  patchPtr_(nullptr),
333  masterCellsPtr_(nullptr),
334  slaveCellsPtr_(nullptr),
335  mePtr_(nullptr)
336 {
337  checkAddressing();
338 }
339 
340 
342 (
343  const faceZone& fz,
344  const word& name,
345  const labelUList& addr,
346  const faceZoneList& mz
347 )
348 :
349  Zone<faceZone, faceZoneList>(fz, name, addr, mz),
350  oriented_(false),
351  patchPtr_(nullptr),
352  masterCellsPtr_(nullptr),
353  slaveCellsPtr_(nullptr),
354  mePtr_(nullptr)
355 {
356  checkAddressing();
357 }
358 
359 
361 (
362  const faceZone& fz,
363  labelList&& addr,
364  boolList&& fm,
365  const faceZoneList& mz
366 )
367 :
368  Zone<faceZone, faceZoneList>(fz, fz.name(), move(addr), mz),
369  oriented_(true),
370  flipMap_(move(fm)),
371  patchPtr_(nullptr),
372  masterCellsPtr_(nullptr),
373  slaveCellsPtr_(nullptr),
374  mePtr_(nullptr)
375 {
376  checkAddressing();
377 }
378 
379 
381 (
382  const faceZone& fz,
383  labelList&& addr,
384  const faceZoneList& mz
385 )
386 :
387  Zone<faceZone, faceZoneList>(fz, fz.name(), move(addr), mz),
388  oriented_(false),
389  patchPtr_(nullptr),
390  masterCellsPtr_(nullptr),
391  slaveCellsPtr_(nullptr),
392  mePtr_(nullptr)
393 {
394  checkAddressing();
395 }
396 
397 
399 {
400  if (oriented_)
401  {
402  return autoPtr<faceZone>
403  (
404  new faceZone(*this, name(), *this, flipMap(), zones())
405  );
406  }
407  else
408  {
409  return autoPtr<faceZone>
410  (
411  new faceZone(*this, name(), *this, zones())
412  );
413  }
414 }
415 
416 
418 {
419  if (oriented_)
420  {
421  return autoPtr<faceZone>
422  (
423  new faceZone(*this, name, *this, flipMap(), zones())
424  );
425  }
426  else
427  {
428  return autoPtr<faceZone>
429  (
430  new faceZone(*this, name, *this, zones())
431  );
432  }
433 }
434 
435 
438 {
439  if (oriented_)
440  {
441  return autoPtr<faceZone>
442  (
443  new faceZone(*this, name(), *this, flipMap(), mz)
444  );
445  }
446  else
447  {
448  return autoPtr<faceZone>
449  (
450  new faceZone(*this, name(), *this, mz)
451  );
452  }
453 }
454 
455 
457 (
458  const labelUList& addr,
459  const boolList& fm,
460  const faceZoneList& mz
461 ) const
462 {
463  return autoPtr<faceZone>
464  (
465  new faceZone(*this, name(), addr, fm, mz)
466  );
467 }
468 
469 
471 (
472  const labelUList& addr,
473  const faceZoneList& mz
474 ) const
475 {
476  return autoPtr<faceZone>
477  (
478  new faceZone(*this, name(), addr, mz)
479  );
480 }
481 
482 
483 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
484 
486 {
487  clearAddressing();
488 }
489 
490 
491 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
492 
494 {
495  if (!patchPtr_)
496  {
497  calcFaceZonePatch();
498  }
499 
500  return *patchPtr_;
501 }
502 
503 
505 {
506  if (!masterCellsPtr_)
507  {
508  calcCellLayers();
509  }
510 
511  return *masterCellsPtr_;
512 }
513 
514 
516 {
517  if (!slaveCellsPtr_)
518  {
519  calcCellLayers();
520  }
521 
522  return *slaveCellsPtr_;
523 }
524 
525 
527 {
528  if (!mePtr_)
529  {
530  mePtr_ =
531  new labelList
532  (
533  patch().meshEdges
534  (
535  zones().mesh().edges(),
536  zones().mesh().pointEdges()
537  )
538  );
539  }
540 
541  return *mePtr_;
542 }
543 
544 
546 {
548 
549  deleteDemandDrivenData(patchPtr_);
550 
551  deleteDemandDrivenData(masterCellsPtr_);
552  deleteDemandDrivenData(slaveCellsPtr_);
553 
554  deleteDemandDrivenData(mePtr_);
555 }
556 
557 
559 (
560  const labelUList& addr,
561  const boolList& flipMap
562 )
563 {
564  clearAddressing();
565  labelList::operator=(addr);
566  oriented_ = true;
567  flipMap_ = flipMap;
568 }
569 
570 
572 (
573  const labelUList& addr
574 )
575 {
576  clearAddressing();
577  labelList::operator=(addr);
578  oriented_ = false;
579  flipMap_.clear();
580 }
581 
582 
583 bool Foam::faceZone::checkDefinition(const bool report) const
584 {
585  return Zone::checkDefinition
586  (
587  zones().mesh().faces().size(),
588  report
589  );
590 }
591 
592 
593 bool Foam::faceZone::checkParallelSync(const bool report) const
594 {
595  const polyMesh& mesh = zones().mesh();
596  const polyBoundaryMesh& bm = mesh.boundaryMesh();
597 
598  bool hasError = false;
599 
600 
601  // Check that zone faces are synced
602  // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
603 
604  {
605  boolList neiZoneFace(mesh.nFaces() - mesh.nInternalFaces(), false);
606  boolList neiZoneFlip(mesh.nFaces() - mesh.nInternalFaces(), false);
607 
608  if (oriented_)
609  {
610  forAll(*this, i)
611  {
612  const label facei = operator[](i);
613 
614  if (!mesh.isInternalFace(facei))
615  {
616  neiZoneFace[facei - mesh.nInternalFaces()] = true;
617  neiZoneFlip[facei - mesh.nInternalFaces()] = flipMap_[i];
618  }
619  }
620  }
621  else
622  {
623  forAll(*this, i)
624  {
625  const label facei = operator[](i);
626 
627  if (!mesh.isInternalFace(facei))
628  {
629  neiZoneFace[facei - mesh.nInternalFaces()] = true;
630  }
631  }
632  }
633 
634  boolList myZoneFace(neiZoneFace);
636 
637  boolList myZoneFlip(neiZoneFlip);
638  if (oriented_)
639  {
641  }
642 
643  forAll(*this, i)
644  {
645  const label facei = operator[](i);
646  const label patchi = bm.whichPatch(facei);
647 
648  if (patchi != -1 && bm[patchi].coupled())
649  {
650  const label bFacei = facei - mesh.nInternalFaces();
651 
652  // Check face in zone on both sides
653  if (myZoneFace[bFacei] != neiZoneFace[bFacei])
654  {
655  hasError = true;
656 
657  if (report)
658  {
659  Pout<< " ***Problem with faceZone " << name()
660  << ". Face " << facei
661  << " on coupled patch "
662  << bm[patchi].name()
663  << " is not consistent with its coupled neighbour."
664  << endl;
665  }
666  else
667  {
668  // w/o report - can stop checking now
669  break;
670  }
671  }
672  else if (oriented_ && myZoneFlip[bFacei] == neiZoneFlip[bFacei])
673  {
674  // Flip state should be opposite.
675  hasError = true;
676 
677  if (report)
678  {
679  Pout<< " ***Problem with faceZone " << name()
680  << ". Face " << facei
681  << " on coupled patch "
682  << bm[patchi].name()
683  << " does not have consistent flipMap"
684  << " across coupled faces."
685  << endl;
686  }
687  else
688  {
689  // w/o report - can stop checking now
690  break;
691  }
692  }
693  }
694  }
695  }
696 
697  return returnReduce(hasError, orOp<bool>());
698 }
699 
700 
701 void Foam::faceZone::insert(const Map<bool>& newIndices)
702 {
703  if (!oriented_)
704  {
706  << "Attempt to insert oriented faces into the unoriented faceZone "
707  << name()
708  << exit(FatalError);
709  }
710 
711  Map<bool> indices(*this, flipMap_);
712  indices.insert(newIndices);
713  reset(indices);
714 }
715 
716 
717 void Foam::faceZone::insert(const labelHashSet& newIndices)
718 {
719  if (oriented_)
720  {
722  << "Attempt to insert unoriented faces into the oriented faceZone "
723  << name()
724  << exit(FatalError);
725  }
726 
727  labelHashSet indices(*this);
728  indices.insert(newIndices);
729  reset(indices);
730 }
731 
732 
734 {
735  Zone::swap(fz);
736  Swap(oriented_, fz.oriented_);
737  flipMap_.swap(fz.flipMap_);
738 }
739 
740 
742 {
743  if (!topoUpdate_)
744  {
745  clearAddressing();
746 
747  if (oriented_)
748  {
749  const labelList& faceMap = map.faceMap();
750  const labelList& reverseFaceMap = map.reverseFaceMap();
751  const labelHashSet& flipFaceFlux = map.flipFaceFlux();
752 
753  Map<bool> newIndicesMap;
754 
755  forAll(faceMap, facei)
756  {
757  const label i = localIndex(faceMap[facei]);
758  if (faceMap[facei] >= 0 && i != -1)
759  {
760  newIndicesMap.insert
761  (
762  facei,
763  flipFaceFlux.found(facei)
764  ? !flipMap_[i]
765  : flipMap_[i]
766  );
767  }
768  }
769 
770  forAll(reverseFaceMap, facei)
771  {
772  const label i = localIndex(facei);
773  if (reverseFaceMap[facei] >= 0 && i != -1)
774  {
775  newIndicesMap.insert
776  (
777  reverseFaceMap[facei],
778  flipFaceFlux.found(reverseFaceMap[facei])
779  ? !flipMap_[i]
780  : flipMap_[i]
781  );
782  }
783  }
784 
785  reset(newIndicesMap);
786  }
787  else
788  {
790  }
791  }
792 }
793 
794 
796 {
797  if (patchPtr_)
798  {
799  patchPtr_->clearGeom();
800  }
801 }
802 
803 
805 {
806  os << nl << name() << nl << token::BEGIN_BLOCK << nl;
807  writeEntry(os, this->labelsName, *this);
808  if (oriented_)
809  {
810  writeEntry(os, "flipMap", flipMap_);
811  }
812  os << token::END_BLOCK << endl;
813 }
814 
815 
816 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
817 
819 {
820  Zone::operator=(zn);
821  oriented_ = zn.oriented_;
822  if (oriented_)
823  {
824  flipMap_ = zn.flipMap_;
825  }
826 }
827 
828 
830 {
831  Zone::operator=(move(zn));
832  oriented_ = zn.oriented_;
833  if (oriented_)
834  {
835  flipMap_ = move(zn.flipMap_);
836  }
837 }
838 
839 
841 {
842  Zone::operator=(lst);
843  oriented_ = false;
844  flipMap_.clear();
845 }
846 
847 
849 {
850  Zone::operator=(move(lst));
851  oriented_ = false;
852  flipMap_.clear();
853 }
854 
855 
856 // ************************************************************************* //
bool found
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:433
bool insert(const Key &key)
Insert a new entry.
Definition: HashSet.H:109
bool insert(const Key &, const T &newElmt)
Insert a new hashedEntry.
Definition: HashTableI.H:80
bool found(const Key &) const
Return true if hashedEntry is found in table.
Definition: HashTable.C:138
const word & name() const
Return name.
Definition: IOobject.H:307
label size() const
Return the number of elements in the UList.
Definition: ListI.H:171
void operator=(const UList< label > &)
Assignment to UList operator. Takes linear time.
Definition: List.C:376
void setSize(const label)
Reset size of List.
Definition: List.C:281
A HashTable to objects of type <T> with a label key.
Definition: Map.H:52
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
A list of faces which address into the list of points.
const T * const_iterator
Random access iterator for traversing UList.
Definition: UList.H:283
const MeshType & mesh() const
Return the mesh reference.
Definition: ZoneList.H:117
Base class for zones.
Definition: Zone.H:68
void swap(Zone &)
Swap two zones.
Definition: Zone.C:319
void topoChange(const labelList &map, const labelList &reverseMap)
Update the addressing using the maps provided.
Definition: Zone.C:79
bool checkDefinition(const label maxSize, const bool report=false) const
Check zone definition with max size given. Return true if in error.
Definition: Zone.C:261
void clearAddressing()
Clear addressing.
Definition: Zone.C:253
void operator=(const Zone &)
Assignment operator.
Definition: Zone.C:343
const faceZoneList & zones() const
Return ZonesType reference.
Definition: Zone.C:213
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: autoPtr.H:51
A list of keywords followed by any number of values (e.g. words and numbers) or sub-dictionaries.
Definition: dictionary.H:162
Named list of face indices representing a sub-set of the mesh faces.
Definition: faceZone.H:66
bool checkDefinition(const bool report=false) const
Check zone definition. Return true if in error.
Definition: faceZone.C:583
void swap(faceZone &)
Swap two faceZones.
Definition: faceZone.C:733
void operator=(const faceZone &)
Assignment to zone, clearing demand-driven data.
Definition: faceZone.C:818
faceZone(const word &name, const labelUList &addr, const boolList &fm, const faceZoneList &mz, const bool moveUpdate=false, const bool topoUpdate=false)
Construct from components.
Definition: faceZone.C:218
const primitiveFacePatch & patch() const
Return reference to primitive patch.
Definition: faceZone.C:493
autoPtr< faceZone > clone() const
Construct and return a clone.
Definition: faceZone.C:398
const labelList & masterCells() const
Return labels of master cells (cells next to the master face.
Definition: faceZone.C:504
void topoChange(const polyTopoChangeMap &)
Update zone using the given map.
Definition: faceZone.C:741
void resetAddressing(const labelUList &, const boolList &)
Reset addressing and flip map (clearing demand-driven data)
Definition: faceZone.C:559
static const char *const labelsName
The name associated with the zone-labels dictionary entry.
Definition: faceZone.H:121
void writeDict(Ostream &) const
Write dictionary.
Definition: faceZone.C:804
void insert(const Map< bool > &newIndices)
Insert given indices and corresponding face flips into zone.
Definition: faceZone.C:701
void clearAddressing()
Clear addressing.
Definition: faceZone.C:545
~faceZone()
Destructor.
Definition: faceZone.C:485
void movePoints(const pointField &)
Correct patch after moving points.
Definition: faceZone.C:795
bool checkParallelSync(const bool report=false) const
Check whether all procs have faces synchronised. Return.
Definition: faceZone.C:593
const labelList & slaveCells() const
Return labels of slave cells.
Definition: faceZone.C:515
const labelList & meshEdges() const
Return global edge index for local edges.
Definition: faceZone.C:526
const polyMesh & mesh() const
Return reference to polyMesh.
Definition: fvMesh.H:443
Foam::polyBoundaryMesh.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:80
virtual const faceList & faces() const
Return raw faces.
Definition: polyMesh.C:1344
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Definition: polyMesh.H:401
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const labelHashSet & flipFaceFlux() const
Map of flipped face flux faces.
const labelList & reverseFaceMap() const
Reverse face map.
const labelList & faceMap() const
Old face map.
label nInternalFaces() const
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
label nFaces() const
static void swapBoundaryFaceList(const polyMesh &mesh, UList< T > &l)
Swap coupled boundary face values.
Definition: syncTools.H:436
@ BEGIN_BLOCK
Definition: token.H:113
@ END_BLOCK
Definition: token.H:114
A class for handling words, derived from string.
Definition: word.H:62
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:334
Foam::faceZoneList.
label patchi
const pointField & points
#define WarningInFunction
Report a warning using Foam::Warning.
#define InfoInFunction
Report an information message using Foam::Info.
Namespace for OpenFOAM.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
List< label > labelList
A List of labels.
Definition: labelList.H:56
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:59
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:258
void deleteDemandDrivenData(DataType *&dataPtr)
errorManip< error > abort(error &err)
Definition: errorManip.H:131
void writeEntry(Ostream &os, const HashTable< T, Key, Hash > &ht)
Definition: HashTableIO.C:96
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
defineTypeNameAndDebug(combustionModel, 0)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
prefixOSstream Pout(cout, "Pout")
Definition: IOstreams.H:53
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys.
Definition: HashSet.H:213
PrimitivePatch< List< face >, const pointField & > primitiveFacePatch
Foam::primitiveFacePatch.
error FatalError
void Swap(T &a, T &b)
Definition: Swap.H:43
List< face > faceList
Definition: faceListFwd.H:41
static const char nl
Definition: Ostream.H:267
labelList f(nPoints)
dictionary dict
volScalarField & p