polyBoundaryMesh.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) 2011-2017 OpenFOAM Foundation
9  Copyright (C) 2018-2019 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
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 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 \*---------------------------------------------------------------------------*/
28 
29 #include "polyBoundaryMesh.H"
30 #include "polyMesh.H"
31 #include "primitiveMesh.H"
32 #include "processorPolyPatch.H"
33 #include "PstreamBuffers.H"
34 #include "lduSchedule.H"
35 #include "globalMeshData.H"
36 #include "stringListOps.H"
37 #include "edgeHashes.H"
38 
39 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43  defineTypeNameAndDebug(polyBoundaryMesh, 0);
44 }
45 
46 // * * * * * * * * * * * * * * * Local Functions * * * * * * * * * * * * * * //
47 
48 namespace Foam
49 {
50  // Templated implementation for types(), names(), etc - file-scope
51  template<class ListType, class GetOp>
52  static ListType getMethodImpl
53  (
54  const polyPatchList& list,
55  const GetOp& getop
56  )
57  {
58  const label len = list.size();
59 
60  ListType output(len);
61 
62  for (label i = 0; i < len; ++i)
63  {
64  output[i] = getop(list[i]);
65  }
66 
67  return output;
68  }
69 
70 
71  // Templated implementation for indices() - file-scope
72  template<class UnaryMatchPredicate>
73  static labelList indicesImpl
74  (
75  const polyPatchList& list,
76  const UnaryMatchPredicate& matcher
77  )
78  {
79  const label len = list.size();
80 
81  labelList output(len);
82 
83  label count = 0;
84  for (label i = 0; i < len; ++i)
85  {
86  if (matcher(list[i].name()))
87  {
88  output[count++] = i;
89  }
90  }
91 
92  output.resize(count);
93 
94  return output;
95  }
96 
97 
98  // Templated implementation for findIndex() - file-scope
99  template<class UnaryMatchPredicate>
101  (
102  const polyPatchList& list,
103  const UnaryMatchPredicate& matcher
104  )
105  {
106  const label len = list.size();
107 
108  for (label i = 0; i < len; ++i)
109  {
110  if (matcher(list[i].name()))
111  {
112  return i;
113  }
114  }
115 
116  return -1;
117  }
118 
119 } // End namespace Foam
120 
121 
122 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
123 
124 Foam::polyBoundaryMesh::polyBoundaryMesh
125 (
126  const IOobject& io,
127  const polyMesh& mesh
128 )
129 :
130  polyPatchList(),
131  regIOobject(io),
132  mesh_(mesh)
133 {
134  if
135  (
136  readOpt() == IOobject::MUST_READ
137  || readOpt() == IOobject::MUST_READ_IF_MODIFIED
138  )
139  {
140  // Warn for MUST_READ_IF_MODIFIED
141  warnNoRereading<polyBoundaryMesh>();
142 
143  polyPatchList& patches = *this;
144 
145  // Read polyPatchList
146  Istream& is = readStream(typeName);
147 
148  PtrList<entry> patchEntries(is);
149  patches.setSize(patchEntries.size());
150 
151  forAll(patches, patchi)
152  {
153  patches.set
154  (
155  patchi,
157  (
158  patchEntries[patchi].keyword(),
159  patchEntries[patchi].dict(),
160  patchi,
161  *this
162  )
163  );
164  }
165 
166  is.check(FUNCTION_NAME);
167 
168  close();
169  }
170 }
171 
172 
173 Foam::polyBoundaryMesh::polyBoundaryMesh
174 (
175  const IOobject& io,
176  const polyMesh& pm,
177  const label size
178 )
179 :
180  polyPatchList(size),
181  regIOobject(io),
182  mesh_(pm)
183 {}
184 
185 
186 Foam::polyBoundaryMesh::polyBoundaryMesh
187 (
188  const IOobject& io,
189  const polyMesh& pm,
190  const polyPatchList& ppl
191 )
192 :
193  polyPatchList(),
194  regIOobject(io),
195  mesh_(pm)
196 {
197  if
198  (
199  (this->readOpt() == IOobject::READ_IF_PRESENT && this->headerOk())
200  || this->readOpt() == IOobject::MUST_READ
201  || this->readOpt() == IOobject::MUST_READ_IF_MODIFIED
202  )
203  {
204  // Warn for MUST_READ_IF_MODIFIED
205  warnNoRereading<polyBoundaryMesh>();
206 
207  polyPatchList& patches = *this;
208 
209  // Read polyPatchList
210  Istream& is = readStream(typeName);
211 
212  PtrList<entry> patchEntries(is);
213  patches.setSize(patchEntries.size());
214 
215  forAll(patches, patchi)
216  {
217  patches.set
218  (
219  patchi,
221  (
222  patchEntries[patchi].keyword(),
223  patchEntries[patchi].dict(),
224  patchi,
225  *this
226  )
227  );
228  }
229 
230  is.check(FUNCTION_NAME);
231 
232  close();
233  }
234  else
235  {
236  polyPatchList& patches = *this;
237  patches.setSize(ppl.size());
238  forAll(patches, patchi)
239  {
240  patches.set(patchi, ppl[patchi].clone(*this).ptr());
241  }
242  }
243 }
244 
245 
246 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
247 
249 {
250  polyPatchList& patches = *this;
251 
252  for (polyPatch& p : patches)
253  {
254  p.clearGeom();
255  }
256 }
257 
258 
260 {
261  neighbourEdgesPtr_.clear();
262  patchIDPtr_.clear();
263  groupPatchIDsPtr_.clear();
264 
265  polyPatchList& patches = *this;
266 
267  for (polyPatch& p : patches)
268  {
269  p.clearAddressing();
270  }
271 }
272 
273 
274 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
275 
276 void Foam::polyBoundaryMesh::calcGeometry()
277 {
279 
280  if
281  (
284  )
285  {
286  forAll(*this, patchi)
287  {
288  operator[](patchi).initGeometry(pBufs);
289  }
290 
291  pBufs.finishedSends();
292 
293  forAll(*this, patchi)
294  {
295  operator[](patchi).calcGeometry(pBufs);
296  }
297  }
299  {
300  const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
301 
302  // Dummy.
303  pBufs.finishedSends();
304 
305  for (const auto& patchEval : patchSchedule)
306  {
307  const label patchi = patchEval.patch;
308 
309  if (patchEval.init)
310  {
311  operator[](patchi).initGeometry(pBufs);
312  }
313  else
314  {
315  operator[](patchi).calcGeometry(pBufs);
316  }
317  }
318  }
319 }
320 
321 
324 {
325  if (Pstream::parRun())
326  {
328  << "Neighbour edge addressing not correct across parallel"
329  << " boundaries." << endl;
330  }
331 
332  if (!neighbourEdgesPtr_.valid())
333  {
334  neighbourEdgesPtr_.reset(new List<labelPairList>(size()));
335  List<labelPairList>& neighbourEdges = neighbourEdgesPtr_();
336 
337  // Initialize.
338  label nEdgePairs = 0;
339  forAll(*this, patchi)
340  {
341  const polyPatch& pp = operator[](patchi);
342 
343  neighbourEdges[patchi].setSize(pp.nEdges() - pp.nInternalEdges());
344 
345  for (labelPair& edgeInfo : neighbourEdges[patchi])
346  {
347  edgeInfo[0] = -1;
348  edgeInfo[1] = -1;
349  }
350 
351  nEdgePairs += pp.nEdges() - pp.nInternalEdges();
352  }
353 
354  // From mesh edge (expressed as a point pair so as not to construct
355  // point addressing) to patch + relative edge index.
356  EdgeMap<labelPair> pointsToEdge(nEdgePairs);
357 
358  forAll(*this, patchi)
359  {
360  const polyPatch& pp = operator[](patchi);
361 
362  const edgeList& edges = pp.edges();
363 
364  for
365  (
366  label edgei = pp.nInternalEdges();
367  edgei < edges.size();
368  edgei++
369  )
370  {
371  // Edge in patch local points
372  const edge& e = edges[edgei];
373 
374  // Edge in mesh points.
375  edge meshEdge(pp.meshPoints()[e[0]], pp.meshPoints()[e[1]]);
376 
377  auto fnd = pointsToEdge.find(meshEdge);
378 
379  if (!fnd.found())
380  {
381  // First occurrence of mesh edge. Store patch and my
382  // local index.
383  pointsToEdge.insert
384  (
385  meshEdge,
386  labelPair
387  (
388  patchi,
389  edgei - pp.nInternalEdges()
390  )
391  );
392  }
393  else
394  {
395  // Second occurrence. Store.
396  const labelPair& edgeInfo = fnd.val();
397 
398  neighbourEdges[patchi][edgei - pp.nInternalEdges()] =
399  edgeInfo;
400 
401  neighbourEdges[edgeInfo[0]][edgeInfo[1]]
402  = labelPair(patchi, edgei - pp.nInternalEdges());
403 
404  // Found all two occurrences of this edge so remove from
405  // hash to save space. Note that this will give lots of
406  // problems if the polyBoundaryMesh is multiply connected.
407  pointsToEdge.erase(meshEdge);
408  }
409  }
410  }
411 
412  if (pointsToEdge.size())
413  {
415  << "Not all boundary edges of patches match up." << nl
416  << "Is the outside of your mesh multiply connected?"
417  << abort(FatalError);
418  }
419 
420  forAll(*this, patchi)
421  {
422  const polyPatch& pp = operator[](patchi);
423 
424  const labelPairList& nbrEdges = neighbourEdges[patchi];
425 
426  forAll(nbrEdges, i)
427  {
428  const labelPair& edgeInfo = nbrEdges[i];
429 
430  if (edgeInfo[0] == -1 || edgeInfo[1] == -1)
431  {
432  const label edgei = pp.nInternalEdges() + i;
433  const edge& e = pp.edges()[edgei];
434 
436  << "Not all boundary edges of patches match up." << nl
437  << "Edge " << edgei << " on patch " << pp.name()
438  << " end points " << pp.localPoints()[e[0]] << ' '
439  << pp.localPoints()[e[1]] << " is not matched to an"
440  << " edge on any other patch." << nl
441  << "Is the outside of your mesh multiply connected?"
442  << abort(FatalError);
443  }
444  }
445  }
446  }
447 
448  return *neighbourEdgesPtr_;
449 }
450 
451 
453 {
454  if (!patchIDPtr_.valid())
455  {
456  patchIDPtr_.reset(new labelList(mesh_.nBoundaryFaces()));
457  labelList& list = *patchIDPtr_;
458 
459  const polyPatchList& patches = *this;
460 
461  forAll(patches, patchi)
462  {
464  (
465  list,
466  patches[patchi].size(),
467  (patches[patchi].start() - mesh_.nInternalFaces())
468  ) = patchi;
469  }
470  }
471 
472  return *patchIDPtr_;
473 }
474 
475 
478 {
479  if (!groupPatchIDsPtr_.valid())
480  {
481  groupPatchIDsPtr_.reset(new HashTable<labelList>(16));
482  auto& groupPatchIDs = *groupPatchIDsPtr_;
483 
484  const polyBoundaryMesh& patches = *this;
485 
486  forAll(patches, patchi)
487  {
488  const wordList& groups = patches[patchi].inGroups();
489 
490  for (const word& groupName : groups)
491  {
492  auto iter = groupPatchIDs.find(groupName);
493 
494  if (iter.found())
495  {
496  (*iter).append(patchi);
497  }
498  else
499  {
500  groupPatchIDs.insert(groupName, labelList(one(), patchi));
501  }
502  }
503  }
504 
505  // Remove patch names from patchGroups
506  forAll(patches, patchi)
507  {
508  if (groupPatchIDs.erase(patches[patchi].name()))
509  {
511  << "Removed patchGroup '" << patches[patchi].name()
512  << "' which clashes with patch " << patchi
513  << " of the same name."
514  << endl;
515  }
516  }
517  }
518 
519  return *groupPatchIDsPtr_;
520 }
521 
522 
524 (
525  const word& groupName,
526  const labelUList& patchIDs
527 )
528 {
529  groupPatchIDsPtr_.clear();
530 
531  polyPatchList& patches = *this;
532 
533  boolList donePatch(patches.size(), false);
534 
535  // Add to specified patches
536  for (const label patchi : patchIDs)
537  {
538  polyPatch& pp = patches[patchi];
539 
540  if (!pp.inGroup(groupName))
541  {
542  pp.inGroups().append(groupName);
543  }
544  donePatch[patchi] = true;
545  }
546 
547  // Remove from other patches
548  forAll(patches, patchi)
549  {
550  if (!donePatch[patchi])
551  {
552  polyPatch& pp = patches[patchi];
553 
554  label newI = 0;
555  if (pp.inGroup(groupName))
556  {
557  wordList& groups = pp.inGroups();
558 
559  forAll(groups, i)
560  {
561  if (groups[i] != groupName)
562  {
563  groups[newI++] = groups[i];
564  }
565  }
566  groups.setSize(newI);
567  }
568  }
569  }
570 }
571 
572 
574 {
575  const polyPatchList& patches = *this;
576 
577  label nonProc = 0;
578 
579  for (const polyPatch& p : patches)
580  {
581  if (isA<processorPolyPatch>(p))
582  {
583  break;
584  }
585 
586  ++nonProc;
587  }
588 
589  return nonProc;
590 }
591 
592 
594 {
595  return getMethodImpl<wordList>(*this, getNameOp<polyPatch>());
596 }
597 
598 
600 {
601  return getMethodImpl<wordList>(*this, getTypeOp<polyPatch>());
602 }
603 
604 
606 {
607  return
608  getMethodImpl<wordList>
609  (
610  *this,
611  [](const polyPatch& p) { return p.physicalType(); }
612  );
613 }
614 
615 
617 {
618  return
619  getMethodImpl<labelList>
620  (
621  *this,
622  [](const polyPatch& p) { return p.start(); }
623  );
624 }
625 
626 
628 {
629  return
630  getMethodImpl<labelList>
631  (
632  *this,
633  [](const polyPatch& p) { return p.size(); }
634  );
635 }
636 
637 
639 {
640  return mesh_.nInternalFaces();
641 }
642 
643 
645 {
646  return mesh_.nBoundaryFaces();
647 }
648 
649 
651 {
652  return labelRange(mesh_.nInternalFaces(), mesh_.nBoundaryFaces());
653 }
654 
655 
657 {
658  if (patchi < 0)
659  {
660  return labelRange(mesh_.nInternalFaces(), 0);
661  }
662 
663  // Will fail if patchi >= size()
664  return (*this)[patchi].range();
665 }
666 
667 
669 (
670  const keyType& key,
671  const bool useGroups
672 ) const
673 {
674  if (key.empty())
675  {
676  return labelList();
677  }
678 
679  DynamicList<label> patchIndices;
680 
681  if (key.isPattern())
682  {
683  const regExp matcher(key);
684 
685  patchIndices = indicesImpl(*this, matcher);
686 
687  // Only examine patch groups if requested and when they exist.
688  if (useGroups && !groupPatchIDs().empty())
689  {
690  const wordList groupNames
691  (
692  groupPatchIDs().tocKeys(matcher)
693  );
694 
695  if (groupNames.size())
696  {
697  labelHashSet groupIndices;
698 
699  for (const word& grpName : groupNames)
700  {
701  // Hash the patch ids for the group
702  groupIndices.insert( groupPatchIDs()[grpName] );
703  }
704 
705  groupIndices.erase(patchIndices); // Skip existing
706  patchIndices.append(groupIndices.sortedToc());
707  }
708  }
709  }
710  else
711  {
712  // Literal string.
713  // Special version of above for reduced memory footprint
714 
715  const word& matcher = key;
716 
717  const label patchId = findIndexImpl(*this, matcher);
718 
719  if (patchId >= 0)
720  {
721  patchIndices.append(patchId);
722  }
723 
724  // Only examine patch groups if requested and when they exist.
725  if (useGroups && !groupPatchIDs().empty())
726  {
727  const auto iter = groupPatchIDs().cfind(key);
728 
729  if (iter.found())
730  {
731  // Hash the patch ids for the group
732  labelHashSet groupIndices(iter.val());
733 
734  groupIndices.erase(patchIndices); // Skip existing
735  patchIndices.append(groupIndices.sortedToc());
736  }
737  }
738  }
739 
740  return patchIndices;
741 }
742 
743 
745 {
746  if (key.empty())
747  {
748  return -1;
749  }
750  else if (key.isPattern())
751  {
752  // Find as regex
753  regExp matcher(key);
754  return findIndexImpl(*this, matcher);
755  }
756  else
757  {
758  // Find as literal string
759  const word& matcher = key;
760  return findIndexImpl(*this, matcher);
761  }
762 }
763 
764 
766 (
767  const word& patchName,
768  bool allowNotFound
769 ) const
770 {
771  const label patchId = findIndexImpl(*this, patchName);
772 
773  if (patchId >= 0)
774  {
775  return patchId;
776  }
777 
778  if (!allowNotFound)
779  {
780  string regionStr;
781  if (mesh_.name() != polyMesh::defaultRegion)
782  {
783  regionStr = "in region '" + mesh_.name() + "' ";
784  }
785 
787  << "Patch '" << patchName << "' not found. "
788  << "Available patch names " << regionStr << "include: " << names()
789  << exit(FatalError);
790  }
791 
792  // Patch not found
793  if (debug)
794  {
795  Pout<< "label polyBoundaryMesh::findPatchID(const word&) const"
796  << "Patch named " << patchName << " not found. "
797  << "List of available patch names: " << names() << endl;
798  }
799 
800  // Not found, return -1
801  return -1;
802 }
803 
804 
806 {
807  // Find out which patch the current face belongs to by comparing label
808  // with patch start labels.
809  // If the face is internal, return -1;
810  // if it is off the end of the list, abort
811  if (faceIndex < mesh().nInternalFaces())
812  {
813  return -1;
814  }
815  else if (faceIndex >= mesh().nFaces())
816  {
818  << "Face " << faceIndex
819  << " out of bounds. Number of geometric faces " << mesh().nFaces()
820  << abort(FatalError);
821  }
822 
823 
824  // Patches are ordered, use binary search
825 
826  const polyPatchList& patches = *this;
827 
828  const label patchi =
829  findLower
830  (
831  patches,
832  faceIndex,
833  0,
834  // Must include the start in the comparison
835  [](const polyPatch& p, label val) { return (p.start() <= val); }
836  );
837 
838  if (patchi < 0 || !patches[patchi].range().found(faceIndex))
839  {
840  // If not in any of above, it is trouble!
842  << "Face " << faceIndex << " not found in any of the patches "
843  << flatOutput(names()) << nl
844  << "The patches appear to be inconsistent with the mesh :"
845  << " internalFaces:" << mesh().nInternalFaces()
846  << " total number of faces:" << mesh().nFaces()
847  << abort(FatalError);
848 
849  return -1;
850  }
851 
852  return patchi;
853 }
854 
855 
857 (
858  const UList<wordRe>& patchNames,
859  const bool warnNotFound,
860  const bool useGroups
861 ) const
862 {
863  const wordList allPatchNames(this->names());
864  labelHashSet ids(size());
865 
866  for (const wordRe& patchName : patchNames)
867  {
868  // Treat the given patch names as wild-cards and search the set
869  // of all patch names for matches
870  labelList patchIndices = findStrings(patchName, allPatchNames);
871  ids.insert(patchIndices);
872 
873  if (patchIndices.empty())
874  {
875  if (useGroups)
876  {
877  // Treat as group name or regex for group name
878 
879  const wordList groupNames
880  (
881  groupPatchIDs().tocKeys(patchName)
882  );
883 
884  for (const word& grpName : groupNames)
885  {
886  ids.insert( groupPatchIDs()[grpName] );
887  }
888 
889  if (groupNames.empty() && warnNotFound)
890  {
892  << "Cannot find any patch or group names matching "
893  << patchName
894  << endl;
895  }
896  }
897  else if (warnNotFound)
898  {
900  << "Cannot find any patch names matching " << patchName
901  << endl;
902  }
903  }
904  }
905 
906  return ids;
907 }
908 
909 
911 (
912  const labelUList& patchIDs,
913  wordList& groups,
914  labelHashSet& nonGroupPatches
915 ) const
916 {
917  // Current matched groups
918  DynamicList<word> matchedGroups(1);
919 
920  // Current set of unmatched patches
921  nonGroupPatches = labelHashSet(patchIDs);
922 
923  const HashTable<labelList>& groupPatchIDs = this->groupPatchIDs();
924  forAllConstIters(groupPatchIDs, iter)
925  {
926  // Store currently unmatched patches so we can restore
927  labelHashSet oldNonGroupPatches(nonGroupPatches);
928 
929  // Match by deleting patches in group from the current set and seeing
930  // if all have been deleted.
931  labelHashSet groupPatchSet(iter());
932 
933  label nMatch = nonGroupPatches.erase(groupPatchSet);
934 
935  if (nMatch == groupPatchSet.size())
936  {
937  matchedGroups.append(iter.key());
938  }
939  else if (nMatch != 0)
940  {
941  // No full match. Undo.
942  nonGroupPatches.transfer(oldNonGroupPatches);
943  }
944  }
945 
946  groups.transfer(matchedGroups);
947 }
948 
949 
950 bool Foam::polyBoundaryMesh::checkParallelSync(const bool report) const
951 {
952  if (!Pstream::parRun())
953  {
954  return false;
955  }
956 
957  const polyBoundaryMesh& bm = *this;
958 
959  bool hasError = false;
960 
961  // Collect non-proc patches and check proc patches are last.
962  wordList names(bm.size());
963  wordList types(bm.size());
964 
965  label nonProci = 0;
966 
967  forAll(bm, patchi)
968  {
969  if (!isA<processorPolyPatch>(bm[patchi]))
970  {
971  if (nonProci != patchi)
972  {
973  // There is processor patch in between normal patches.
974  hasError = true;
975 
976  if (debug || report)
977  {
978  Pout<< " ***Problem with boundary patch " << patchi
979  << " named " << bm[patchi].name()
980  << " of type " << bm[patchi].type()
981  << ". The patch seems to be preceeded by processor"
982  << " patches. This is can give problems."
983  << endl;
984  }
985  }
986  else
987  {
988  names[nonProci] = bm[patchi].name();
989  types[nonProci] = bm[patchi].type();
990  nonProci++;
991  }
992  }
993  }
994  names.setSize(nonProci);
995  types.setSize(nonProci);
996 
997  List<wordList> allNames(Pstream::nProcs());
998  allNames[Pstream::myProcNo()] = names;
999  Pstream::gatherList(allNames);
1000  Pstream::scatterList(allNames);
1001 
1002  List<wordList> allTypes(Pstream::nProcs());
1003  allTypes[Pstream::myProcNo()] = types;
1004  Pstream::gatherList(allTypes);
1005  Pstream::scatterList(allTypes);
1006 
1007  // Have every processor check but print error on master
1008  // (in processor sequence).
1009 
1010  for (label proci = 1; proci < Pstream::nProcs(); ++proci)
1011  {
1012  if
1013  (
1014  (allNames[proci] != allNames.first())
1015  || (allTypes[proci] != allTypes.first())
1016  )
1017  {
1018  hasError = true;
1019 
1020  if (debug || (report && Pstream::master()))
1021  {
1022  Info<< " ***Inconsistent patches across processors, "
1023  "processor 0 has patch names:"
1024  << allNames.first()
1025  << " patch types:" << allTypes.first()
1026  << " processor " << proci
1027  << " has patch names:" << allNames[proci]
1028  << " patch types:" << allTypes[proci]
1029  << endl;
1030  }
1031  }
1032  }
1033 
1034  return hasError;
1035 }
1036 
1037 
1038 bool Foam::polyBoundaryMesh::checkDefinition(const bool report) const
1039 {
1040  label nextPatchStart = mesh().nInternalFaces();
1041  const polyBoundaryMesh& bm = *this;
1042 
1043  bool hasError = false;
1044 
1045  wordHashSet patchNames(2*size());
1046 
1047  forAll(bm, patchi)
1048  {
1049  if (bm[patchi].start() != nextPatchStart && !hasError)
1050  {
1051  hasError = true;
1052 
1053  Info<< " ****Problem with boundary patch " << patchi
1054  << " named " << bm[patchi].name()
1055  << " of type " << bm[patchi].type()
1056  << ". The patch should start on face no " << nextPatchStart
1057  << " and the patch specifies " << bm[patchi].start()
1058  << "." << endl
1059  << "Possibly consecutive patches have this same problem."
1060  << " Suppressing future warnings." << endl;
1061  }
1062 
1063  if (!patchNames.insert(bm[patchi].name()) && !hasError)
1064  {
1065  hasError = true;
1066 
1067  Info<< " ****Duplicate boundary patch " << patchi
1068  << " named " << bm[patchi].name()
1069  << " of type " << bm[patchi].type()
1070  << "." << endl
1071  << "Suppressing future warnings." << endl;
1072  }
1073 
1074  nextPatchStart += bm[patchi].size();
1075  }
1076 
1077  reduce(hasError, orOp<bool>());
1078 
1079  if (debug || report)
1080  {
1081  if (hasError)
1082  {
1083  Pout<< " ***Boundary definition is in error." << endl;
1084  }
1085  else
1086  {
1087  Info<< " Boundary definition OK." << endl;
1088  }
1089  }
1090 
1091  return hasError;
1092 }
1093 
1094 
1096 {
1098 
1099  if
1100  (
1103  )
1104  {
1105  forAll(*this, patchi)
1106  {
1107  operator[](patchi).initMovePoints(pBufs, p);
1108  }
1109 
1110  pBufs.finishedSends();
1111 
1112  forAll(*this, patchi)
1113  {
1114  operator[](patchi).movePoints(pBufs, p);
1115  }
1116  }
1118  {
1119  const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
1120 
1121  // Dummy.
1122  pBufs.finishedSends();
1123 
1124  for (const auto& patchEval : patchSchedule)
1125  {
1126  const label patchi = patchEval.patch;
1127 
1128  if (patchEval.init)
1129  {
1130  operator[](patchi).initMovePoints(pBufs, p);
1131  }
1132  else
1133  {
1134  operator[](patchi).movePoints(pBufs, p);
1135  }
1136  }
1137  }
1138 }
1139 
1140 
1142 {
1143  neighbourEdgesPtr_.clear();
1144  patchIDPtr_.clear();
1145  groupPatchIDsPtr_.clear();
1146 
1148 
1149  if
1150  (
1153  )
1154  {
1155  forAll(*this, patchi)
1156  {
1157  operator[](patchi).initUpdateMesh(pBufs);
1158  }
1159 
1160  pBufs.finishedSends();
1161 
1162  forAll(*this, patchi)
1163  {
1164  operator[](patchi).updateMesh(pBufs);
1165  }
1166  }
1168  {
1169  const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
1170 
1171  // Dummy.
1172  pBufs.finishedSends();
1173 
1174  for (const auto& patchEval : patchSchedule)
1175  {
1176  const label patchi = patchEval.patch;
1177 
1178  if (patchEval.init)
1179  {
1180  operator[](patchi).initUpdateMesh(pBufs);
1181  }
1182  else
1183  {
1184  operator[](patchi).updateMesh(pBufs);
1185  }
1186  }
1187  }
1188 }
1189 
1190 
1193  const labelUList& oldToNew,
1194  const bool validBoundary
1195 )
1196 {
1197  // Change order of patches
1198  polyPatchList::reorder(oldToNew);
1199 
1200  // Adapt indices
1201  polyPatchList& patches = *this;
1202 
1203  forAll(patches, patchi)
1204  {
1205  patches[patchi].index() = patchi;
1206  }
1207 
1208  if (validBoundary)
1209  {
1210  updateMesh();
1211  }
1212 }
1213 
1214 
1216 {
1217  const polyPatchList& patches = *this;
1218 
1219  os << patches.size() << nl << token::BEGIN_LIST << incrIndent << nl;
1220 
1221  for (const polyPatch& pp : patches)
1222  {
1223  os.beginBlock(pp.name());
1224  os << pp;
1225  os.endBlock();
1226  }
1227 
1228  os << decrIndent << token::END_LIST;
1229 
1230  os.check(FUNCTION_NAME);
1231  return os.good();
1232 }
1233 
1234 
1240  const bool valid
1241 ) const
1242 {
1243  return regIOobject::writeObject(fmt, ver, IOstream::UNCOMPRESSED, valid);
1244 }
1245 
1246 
1247 // * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
1248 
1249 const Foam::polyPatch& Foam::polyBoundaryMesh::operator[]
1251  const word& patchName
1252 ) const
1253 {
1254  const label patchi = findPatchID(patchName);
1255 
1256  if (patchi < 0)
1257  {
1259  << "Patch named " << patchName << " not found." << nl
1260  << "Available patch names: " << names() << endl
1261  << abort(FatalError);
1262  }
1263 
1264  return operator[](patchi);
1265 }
1266 
1267 
1268 Foam::polyPatch& Foam::polyBoundaryMesh::operator[]
1270  const word& patchName
1271 )
1272 {
1273  const label patchi = findPatchID(patchName);
1274 
1275  if (patchi < 0)
1276  {
1278  << "Patch named " << patchName << " not found." << nl
1279  << "Available patch names: " << names() << endl
1280  << abort(FatalError);
1281  }
1282 
1283  return operator[](patchi);
1284 }
1285 
1286 
1287 // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
1288 
1290 {
1291  pbm.writeData(os);
1292  return os;
1293 }
1294 
1295 
1296 // ************************************************************************* //
Foam::expressions::patchExpr::debug
int debug
Static debugging option.
Foam::IOstreamOption::UNCOMPRESSED
compression = false
Definition: IOstreamOption.H:73
Foam::labelList
List< label > labelList
A List of labels.
Definition: List.H:74
Foam::getTypeOp
General get operation to extract the 'type' from an object as a word.
Definition: ops.H:291
Foam::HashTable< T, edge, Hash< edge > >::size
label size() const noexcept
The number of elements in table.
Definition: HashTableI.H:52
Foam::UPstream::commsTypes::blocking
Foam::polyBoundaryMesh::patchSizes
labelList patchSizes() const
Return a list of patch sizes.
Definition: polyBoundaryMesh.C:627
Foam::IOobject
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Definition: IOobject.H:104
Foam::regIOobject::writeObject
virtual bool writeObject(IOstream::streamFormat, IOstream::versionNumber, IOstream::compressionType, const bool valid) const
Write using given format, version and compression.
Definition: regIOobjectWrite.C:39
Foam::val
label ListType::const_reference val
Definition: ListOps.H:407
p
volScalarField & p
Definition: createFieldRefs.H:8
Foam::UPstream::commsTypes::nonBlocking
Foam::polyBoundaryMesh::nFaces
label nFaces() const
The number of boundary faces in the underlying mesh.
Definition: polyBoundaryMesh.C:644
Foam::IOobject::name
const word & name() const
Return name.
Definition: IOobjectI.H:46
Foam::polyBoundaryMesh::matchGroups
void matchGroups(const labelUList &patchIDs, wordList &groups, labelHashSet &nonGroupPatches) const
Match the patches to groups.
Definition: polyBoundaryMesh.C:911
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::lduSchedule
List< lduScheduleEntry > lduSchedule
Definition: lduSchedule.H:76
Foam::polyBoundaryMesh::physicalTypes
wordList physicalTypes() const
Return a list of physical types.
Definition: polyBoundaryMesh.C:605
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::PrimitivePatch::edges
const edgeList & edges() const
Return list of edges, address into LOCAL point list.
Definition: PrimitivePatch.C:238
Foam::polyMesh::defaultRegion
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:312
Foam::DynamicList< label >
Foam::keyType::isPattern
bool isPattern() const
The keyType is treated as a pattern, not as literal string.
Definition: keyTypeI.H:128
Foam::primitiveMesh::nInternalFaces
label nInternalFaces() const
Number of internal faces.
Definition: primitiveMeshI.H:78
globalMeshData.H
Foam::Pstream::scatterList
static void scatterList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Scatter data. Reverse of gatherList.
Definition: gatherScatterList.C:215
Foam::PrimitivePatch::localPoints
const Field< PointType > & localPoints() const
Return pointField of points in patch.
Definition: PrimitivePatch.C:458
Foam::SubList
A List obtained as a section of another List.
Definition: SubList.H:53
Foam::polyBoundaryMesh::findIndex
label findIndex(const keyType &key) const
Return patch index for the first match, return -1 if not found.
Definition: polyBoundaryMesh.C:744
Foam::primitiveMesh::nFaces
label nFaces() const
Number of mesh faces.
Definition: primitiveMeshI.H:90
Foam::UPstream::nProcs
static label nProcs(const label communicator=0)
Number of processes in parallel run.
Definition: UPstream.H:426
Foam::PrimitivePatch::nEdges
label nEdges() const
Return number of edges in patch.
Definition: PrimitivePatch.H:317
Foam::PstreamBuffers
Buffers for inter-processor communications streams (UOPstream, UIPstream).
Definition: PstreamBuffers.H:88
Foam::polyBoundaryMesh::groupPatchIDs
const HashTable< labelList > & groupPatchIDs() const
The patch indices per patch group.
Definition: polyBoundaryMesh.C:477
Foam::UPstream::parRun
static bool & parRun()
Is this a parallel run?
Definition: UPstream.H:414
Foam::polyBoundaryMesh::reorder
void reorder(const labelUList &oldToNew, const bool validBoundary)
Reorders patches. Ordering does not have to be done in.
Definition: polyBoundaryMesh.C:1192
Foam::edge
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
Definition: edge.H:63
Foam::HashTable< T, edge, Hash< edge > >::insert
bool insert(const edge &key, const T &obj)
Copy insert a new entry, not overwriting existing entries.
Definition: HashTableI.H:168
Foam::one
A class representing the concept of 1 (one), which can be used to avoid manipulating objects that are...
Definition: one.H:60
Foam::List::append
void append(const T &val)
Append an element at the end of the list.
Definition: ListI.H:182
primitiveMesh.H
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:337
Foam::UPstream::defaultCommsType
static commsTypes defaultCommsType
Default commsType.
Definition: UPstream.H:273
Foam::polyBoundaryMesh::clearGeom
void clearGeom()
Clear geometry at this level and at patches.
Definition: polyBoundaryMesh.C:248
Foam::Ostream::beginBlock
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.
Definition: Ostream.C:91
Foam::Pout
prefixOSstream Pout
An Ostream wrapper for parallel output to std::cout.
polyMesh.H
Foam::HashSet< label, Hash< label > >
Foam::incrIndent
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Definition: Ostream.H:314
Foam::polyBoundaryMesh::clearAddressing
void clearAddressing()
Clear addressing at this level and at patches.
Definition: polyBoundaryMesh.C:259
Foam::wordRe
A wordRe is a Foam::word, but can contain a regular expression for matching words or strings.
Definition: wordRe.H:72
Foam::polyBoundaryMesh::start
label start() const
The start label of the boundary faces in the polyMesh face list.
Definition: polyBoundaryMesh.C:638
Foam::polyBoundaryMesh::types
wordList types() const
Return a list of patch types.
Definition: polyBoundaryMesh.C:599
Foam::polyMesh
Mesh consisting of general polyhedral cells.
Definition: polyMesh.H:77
Foam::polyBoundaryMesh::names
wordList names() const
Return a list of patch names.
Definition: polyBoundaryMesh.C:593
Foam::polyBoundaryMesh::range
labelRange range() const
The face range for all boundary faces.
Definition: polyBoundaryMesh.C:650
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:290
Foam::findIndexImpl
label findIndexImpl(const faPatchList &list, const UnaryMatchPredicate &matcher)
Definition: faBoundaryMesh.C:95
Foam::indicesImpl
static labelList indicesImpl(const faPatchList &list, const UnaryMatchPredicate &matcher)
Definition: faBoundaryMesh.C:68
Foam::labelPair
Pair< label > labelPair
A pair of labels.
Definition: Pair.H:54
Foam::keyType
A class for handling keywords in dictionaries.
Definition: keyType.H:60
Foam::polyBoundaryMesh::patchID
const labelList & patchID() const
Per boundary face label the patch index.
Definition: polyBoundaryMesh.C:452
Foam::polyBoundaryMesh::checkParallelSync
bool checkParallelSync(const bool report=false) const
Check whether all procs have all patches and in same order. Return.
Definition: polyBoundaryMesh.C:950
Foam::reduce
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
Definition: PstreamReduceOps.H:51
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::IOstreamOption::versionNumber
Representation of a major/minor version number.
Definition: IOstreamOption.H:79
Foam::Field< vector >
Foam::findLower
label findLower(const ListType &input, const T &val, const label start, const ComparePredicate &comp)
Foam::patchIdentifier::inGroups
const wordList & inGroups() const
The optional groups that the patch belongs to.
Definition: patchIdentifier.H:145
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::HashTable< T, edge, Hash< edge > >::erase
bool erase(const iterator &iter)
Erase an entry specified by given iterator.
Definition: HashTable.C:392
Foam::patchIdentifier::inGroup
bool inGroup(const word &name) const
Check if the patch is in named group.
Definition: patchIdentifier.C:79
Foam::Info
messageStream Info
Information stream (uses stdout - output is on the master only)
Foam::polyPatch
A patch is a list of labels that address the faces in the global face list.
Definition: polyPatch.H:66
Foam::polyBoundaryMesh::checkDefinition
bool checkDefinition(const bool report=false) const
Check boundary definition. Return true if in error.
Definition: polyBoundaryMesh.C:1038
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::polyPatchList
PtrList< polyPatch > polyPatchList
container classes for polyPatch
Definition: polyPatchList.H:47
Foam::DynamicList::append
DynamicList< T, SizeMin > & append(const T &val)
Append an element to the end of this list.
Definition: DynamicListI.H:472
Foam::List::transfer
void transfer(List< T > &list)
Definition: List.C:436
Foam::PtrList::setSize
void setSize(const label newLen)
Same as resize()
Definition: PtrListI.H:108
Foam::polyBoundaryMesh::patchStarts
labelList patchStarts() const
Return a list of patch start face indices.
Definition: polyBoundaryMesh.C:616
Foam::labelRange
A range or interval of labels defined by a start and a size.
Definition: labelRange.H:58
Foam::polyBoundaryMesh::whichPatch
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
Definition: polyBoundaryMesh.C:805
Foam::reorder
ListType reorder(const labelUList &oldToNew, const ListType &input, const bool prune=false)
Reorder the elements of a list.
Definition: ListOpsTemplates.C:80
Foam::PtrList
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Definition: List.H:65
Foam::polyBoundaryMesh::writeObject
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool valid) const
Write using given format, version, compression.
Definition: polyBoundaryMesh.C:1236
patchNames
wordList patchNames(nPatches)
Foam::regExpCxx
Wrapper around C++11 regular expressions.
Definition: regExpCxx.H:72
Foam::polyBoundaryMesh::findPatchID
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name, return -1 if not found.
Definition: polyBoundaryMesh.C:766
Foam::PtrList::append
void append(T *ptr)
Append an element to the end of the list.
Definition: PtrListI.H:115
lduSchedule.H
Foam::List::resize
void resize(const label newSize)
Adjust allocated size of list.
Definition: ListI.H:139
Foam::PstreamBuffers::finishedSends
void finishedSends(const bool block=true)
Mark all sends as having been done. This will start receives.
Definition: PstreamBuffers.C:80
Foam::UPstream::commsTypes::scheduled
dict
dictionary dict
Definition: searchingEngine.H:14
Foam::Ostream::endBlock
virtual Ostream & endBlock()
Write end block group.
Definition: Ostream.C:109
Foam::IOstreamOption::streamFormat
streamFormat
Data format (ascii | binary)
Definition: IOstreamOption.H:64
Foam::IOstream::check
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Definition: IOstream.C:51
Foam::FatalError
error FatalError
processorPolyPatch.H
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::ProcessorTopology::patchSchedule
const lduSchedule & patchSchedule() const
Order in which the patches should be initialised/evaluated.
Definition: ProcessorTopology.H:101
Foam::getNameOp
General get operation to extract the 'name' from an object as a word.
Definition: ops.H:278
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::decrIndent
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Definition: Ostream.H:321
Foam::findStrings
labelList findStrings(const regExp &matcher, const UList< StringType > &input, const bool invert=false)
Return list indices for strings matching the regular expression.
Definition: stringListOps.H:75
Foam::abort
errorManip< error > abort(error &err)
Definition: errorManip.H:137
Foam::HashTable::sortedToc
List< Key > sortedToc() const
The table of contents (the keys) in sorted order.
Definition: HashTable.C:136
Foam::HashTable< T, edge, Hash< edge > >::find
iterator find(const edge &key)
Find and return an iterator set at the hashed entry.
Definition: HashTableI.H:114
Foam::HashTable::transfer
void transfer(HashTable< T, Key, Hash > &rhs)
Transfer contents into this table.
Definition: HashTable.C:671
Foam::polyBoundaryMesh::movePoints
void movePoints(const pointField &p)
Correct polyBoundaryMesh after moving points.
Definition: polyBoundaryMesh.C:1095
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:130
Foam::polyBoundaryMesh::indices
labelList indices(const keyType &key, const bool useGroups=true) const
Return patch indices for all matches.
Definition: polyBoundaryMesh.C:669
Foam::UPstream::myProcNo
static int myProcNo(const label communicator=0)
Number of this process (starting from masterNo() = 0)
Definition: UPstream.H:444
Foam::UPstream::master
static bool master(const label communicator=0)
Am I the master process.
Definition: UPstream.H:438
Foam::HashTable
A HashTable similar to std::unordered_map.
Definition: HashTable.H:105
Foam::polyBoundaryMesh::updateMesh
void updateMesh()
Correct polyBoundaryMesh after topology update.
Definition: polyBoundaryMesh.C:1141
Foam::polyBoundaryMesh::nNonProcessor
label nNonProcessor() const
The number of patches before the first processor patch.
Definition: polyBoundaryMesh.C:573
Foam::PrimitivePatch::nInternalEdges
label nInternalEdges() const
Number of internal edges.
Definition: PrimitivePatch.C:258
Foam::New
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Definition: DimensionedFieldReuseFunctions.H:105
Foam::polyBoundaryMesh::writeData
virtual bool writeData(Ostream &os) const
writeData member function required by regIOobject
Definition: polyBoundaryMesh.C:1215
Foam::EdgeMap
Map from edge (expressed as its endpoints) to value. For easier forward declaration it is currently i...
Definition: EdgeMap.H:51
Foam::regIOobject
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:67
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:355
Foam::Pstream::gatherList
static void gatherList(const List< commsStruct > &comms, List< T > &Values, const int tag, const label comm)
Gather data but keep individual values separate.
Definition: gatherScatterList.C:52
Foam::polyBoundaryMesh::neighbourEdges
const List< labelPairList > & neighbourEdges() const
Per patch the edges on the neighbouring patch.
Definition: polyBoundaryMesh.C:323
edgeHashes.H
range
scalar range
Definition: LISASMDCalcMethod1.H:12
Foam::nl
constexpr char nl
Definition: Ostream.H:372
Foam::Pair
An ordered pair of two objects of type <T> with first() and second() elements.
Definition: Pair.H:54
forAllConstIters
forAllConstIters(mixture.phases(), phase)
Definition: pEqn.H:28
Foam::flatOutput
FlatOutput< Container > flatOutput(const Container &obj, label len=0)
Global flatOutput function.
Definition: FlatOutput.H:85
Foam::BitOps::count
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
Definition: BitOps.H:74
Foam::List< label >
Foam::polyBoundaryMesh::setGroup
void setGroup(const word &groupName, const labelUList &patchIDs)
Set/add group with patches.
Definition: polyBoundaryMesh.C:524
Foam::start
label ListType::const_reference const label start
Definition: ListOps.H:408
Foam::UList< label >
Foam::constant::electromagnetic::e
const dimensionedScalar e
Elementary charge.
Definition: createFields.H:11
Foam::polyBoundaryMesh::patchSet
labelHashSet patchSet(const UList< wordRe > &patchNames, const bool warnNotFound=true, const bool useGroups=true) const
Return the set of patch IDs corresponding to the given names.
Definition: polyBoundaryMesh.C:857
PstreamBuffers.H
Foam::HashSet::insert
bool insert(const Key &key)
Insert a new entry, not overwriting existing entries.
Definition: HashSet.H:182
patches
const polyBoundaryMesh & patches
Definition: convertProcessorPatches.H:65
polyBoundaryMesh.H
FUNCTION_NAME
#define FUNCTION_NAME
Definition: messageStream.H:261
Foam::token::END_LIST
End list [isseparator].
Definition: token.H:118
Foam::IOstreamOption::compressionType
compressionType
Compression treatment (UNCOMPRESSED | COMPRESSED)
Definition: IOstreamOption.H:71
stringListOps.H
Operations on lists of strings.
patchId
label patchId(-1)
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::polyMesh::globalData
const globalMeshData & globalData() const
Return parallel info.
Definition: polyMesh.C:1241
Foam::IOstream::good
bool good() const
Return true if next operation might succeed.
Definition: IOstream.H:216
Foam::labelHashSet
HashSet< label, Hash< label > > labelHashSet
A HashSet with label keys and label hasher.
Definition: HashSet.H:415
Foam::PrimitivePatch::meshPoints
const labelList & meshPoints() const
Return labelList of mesh points in patch.
Definition: PrimitivePatch.C:418
Foam::List::setSize
void setSize(const label newSize)
Alias for resize(const label)
Definition: ListI.H:146
Foam::token::BEGIN_LIST
Begin list [isseparator].
Definition: token.H:117
Foam::orOp
Definition: ops.H:234
Foam::defineTypeNameAndDebug
defineTypeNameAndDebug(combustionModel, 0)
Foam::patchIdentifier::name
const word & name() const
Return the patch name.
Definition: patchIdentifier.H:109
WarningInFunction
#define WarningInFunction
Report a warning using Foam::Warning.
Definition: messageStream.H:294
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &)
Definition: boundaryPatch.C:102
Foam::getMethodImpl
static ListType getMethodImpl(const faPatchList &list, const GetOp &getop)
Definition: faBoundaryMesh.C:47