pointBoundaryMesh.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-2024 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 "pointBoundaryMesh.H"
30 #include "polyBoundaryMesh.H"
31 #include "facePointPatch.H"
32 #include "pointMesh.H"
33 #include "PstreamBuffers.H"
34 #include "lduSchedule.H"
35 #include "globalMeshData.H"
36 #include "processorPointPatch.H"
37 
38 // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
39 
40 namespace Foam
41 {
42  defineTypeNameAndDebug(pointBoundaryMesh, 0);
43 }
44 
45 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
46 
47 bool Foam::pointBoundaryMesh::hasGroupIDs() const
48 {
49  if (groupIDsPtr_)
50  {
51  // Use existing cache
52  return !groupIDsPtr_->empty();
53  }
54 
55  const auto& patches = *this;
56 
57  for (const auto& p : patches)
58  {
59  if (!p.inGroups().empty())
60  {
61  return true;
62  }
63  }
64 
65  return false;
66 }
67 
68 
69 void Foam::pointBoundaryMesh::calcGroupIDs() const
70 {
71  if (groupIDsPtr_)
72  {
73  return; // Or FatalError
74  }
75 
76  groupIDsPtr_.emplace(16);
77  auto& groupLookup = *groupIDsPtr_;
78 
79  const auto& patches = *this;
80 
81  forAll(patches, patchi)
82  {
83  for (const word& groupName : patches[patchi].inGroups())
84  {
85  groupLookup(groupName).push_back(patchi);
86  }
87  }
88 
89  // Remove groups that clash with patch names
90  forAll(patches, patchi)
91  {
92  if (groupLookup.erase(patches[patchi].name()))
93  {
95  << "Removed group '" << patches[patchi].name()
96  << "' which clashes with patch " << patchi
97  << " of the same name."
98  << endl;
99  }
100  }
101 }
102 
103 
104 void Foam::pointBoundaryMesh::addPatches(const polyBoundaryMesh& pbm)
105 {
106  // Set boundary patches
107  pointPatchList& patches = *this;
108 
110 
111  forAll(pbm, patchi)
112  {
113  // NB: needs ptr() to get *pointPatch instead of *facePointPatch
114  patches.set(patchi, facePointPatch::New(pbm[patchi], *this).ptr());
115  }
116 }
117 
118 
119 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
120 
121 Foam::pointBoundaryMesh::pointBoundaryMesh
122 (
123  const pointMesh& m,
124  const polyBoundaryMesh& pbm
125 )
126 :
127  pointPatchList(),
128  regIOobject
129  (
130  IOobject
131  (
132  "boundary",
133  //m.thisDb().time().findInstance(m.meshDir(), "boundary"),
134  pbm.mesh().facesInstance(),
135  polyMesh::meshSubDir/pointMesh::meshSubDir,
136  m.thisDb(),
137  IOobject::NO_READ,
138  IOobject::NO_WRITE,
139  false // Avoid conflict with polyMesh/boundary
140  )
141  ),
142  mesh_(m)
143 {
144  addPatches(pbm);
145 
146  if (debug)
147  {
148  pointPatchList& Patches = *this;
149 
150  Pout<< "pointBoundaryMesh::pointBoundaryMesh"
151  << "(const pointMesh&, const polyBoundaryMesh&): "
152  << "constructed pointBoundaryMesh:" << endl;
153  Pout<< incrIndent;
154  for (const auto& pp : Patches)
155  {
156  Pout<< indent
157  << "index:" << pp.index() << " patch:" << pp.name()
158  << " type:" << pp.type() << endl;
159  }
160  Pout<< decrIndent;
161  }
162 }
163 
164 
165 Foam::pointBoundaryMesh::pointBoundaryMesh
166 (
167  const IOobject& io,
168  const pointMesh& m,
169  const polyBoundaryMesh& pbm
170 )
171 :
172  pointPatchList(),
173  regIOobject
174  (
175  IOobject
176  (
177  "boundary",
178  io.instance(),
179  polyMesh::meshSubDir/pointMesh::meshSubDir,
180  io.db(),
181  io.readOpt(),
182  io.writeOpt(),
183  false //io.registerObject() // or always set to false?
184  )
185  ),
186  mesh_(m)
187 {
188  pointPatchList& Patches = *this;
189 
190  if (isReadRequired() || (isReadOptional() && headerOk()))
191  {
193  {
195  << "Specified IOobject::MUST_READ_IF_MODIFIED but class"
196  << " does not support automatic rereading."
197  << endl;
198  }
199 
200  if (debug)
201  {
202  Pout<< "pointBoundaryMesh::pointBoundaryMesh"
203  << "(const IOobject&, const pointMesh&,"
204  << " const polyBoundaryMesh&): "
205  << "Constructing from boundary file " << objectRelPath()
206  << endl;
207  }
208 
209  // Read pointPatchList
210  Istream& is = readStream(typeName);
211 
212  PtrList<entry> patchEntries(is);
213  Patches.setSize(patchEntries.size());
214 
215  forAll(Patches, patchi)
216  {
217  // Try construct-from-dictionary first
218  const word& name = patchEntries[patchi].keyword();
219 
220  autoPtr<pointPatch> pPtr
221  (
223  (
224  name,
225  patchEntries[patchi].dict(),
226  patchi,
227  *this
228  )
229  );
230 
231  if (!pPtr)
232  {
233  const label polyPatchi = pbm.findPatchID(name, false);
234  // Try as facePointPatch from polyPatch
235  pPtr = facePointPatch::New(pbm[polyPatchi], *this);
236  pPtr->index() = patchi;
237  }
238 
239  Patches.set(patchi, pPtr);
240  }
241 
242  // Check state of IOstream
243  is.check
244  (
245  "pointBoundaryMesh::pointBoundaryMesh"
246  "(const IOobject&, const pointMesh&,"
247  " const polyBoundaryMesh&)"
248  );
249 
250  close();
251  }
252  else
253  {
254  if (debug)
255  {
256  Pout<< "pointBoundaryMesh::pointBoundaryMesh"
257  << "(const IOobject&, const pointMesh&,"
258  << " const polyBoundaryMesh&): "
259  << "Constructing from polyBoundaryMesh only"
260  << endl;
261  }
262 
263  addPatches(pbm);
264  }
265 
266 
267  if (debug)
268  {
269  Pout<< "pointBoundaryMesh::pointBoundaryMesh"
270  << "(const IOobject&, const pointMesh&, const polyBoundaryMesh&): "
271  << "constructed pointBoundaryMesh:" << endl;
272  Pout<< incrIndent;
273  for (const auto& pp : Patches)
274  {
275  Pout<< indent
276  << "index:" << pp.index() << " patch:" << pp.name()
277  << " type:" << pp.type() << endl;
278  }
280  }
281 }
282 
283 
284 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
285 
286 Foam::label Foam::pointBoundaryMesh::nNonProcessor() const
287 {
288  const pointPatchList& patches = *this;
289 
290  label count = 0;
291 
292  for (const auto& p : patches)
293  {
294  if (isA<processorPointPatch>(p))
295  {
296  break;
297  }
298 
299  ++count;
300  }
301 
302  return count;
303 }
304 
305 
307 {
308  const pointPatchList& patches = *this;
309 
310  label count = 0;
311 
312  for (const auto& p : patches)
313  {
314  if (isA<processorPointPatch>(p))
315  {
316  ++count;
317  }
318  }
319 
320  return count;
321 }
322 
325 {
326  return PtrListOps::get<word>(*this, nameOp<pointPatch>());
327 }
328 
331 {
332  return PtrListOps::get<word>(*this, typeOp<pointPatch>());
333 }
334 
335 
337 {
338  return
339  PtrListOps::get<word>
340  (
341  *this,
342  [](const pointPatch& p) { return p.physicalType(); }
343  );
344 }
345 
346 
349 {
350  if (!groupIDsPtr_)
351  {
352  calcGroupIDs();
353  }
354 
355  return *groupIDsPtr_;
356 }
357 
358 
360 (
361  const wordRe& matcher,
362  const bool useGroups
363 ) const
364 {
365  if (matcher.empty())
366  {
367  return labelList();
368  }
369 
370  // Only check groups if requested and they exist
371  const bool checkGroups = (useGroups && this->hasGroupIDs());
372 
373  labelHashSet ids(0);
374 
375  if (matcher.isPattern())
376  {
377  if (checkGroups)
378  {
379  const auto& groupLookup = groupPatchIDs();
380  forAllConstIters(groupLookup, iter)
381  {
382  if (matcher(iter.key()))
383  {
384  // Add patch ids associated with the group
385  ids.insert(iter.val());
386  }
387  }
388  }
389 
390  if (ids.empty())
391  {
392  return PtrListOps::findMatching(*this, matcher);
393  }
394  else
395  {
396  ids.insert(PtrListOps::findMatching(*this, matcher));
397  }
398  }
399  else
400  {
401  // Literal string.
402  // Special version of above for reduced memory footprint.
403 
404  const label patchId = PtrListOps::firstMatching(*this, matcher);
405 
406  if (patchId >= 0)
407  {
408  return labelList(one{}, patchId);
409  }
410  else if (checkGroups)
411  {
412  const auto iter = groupPatchIDs().cfind(matcher);
413 
414  if (iter.good())
415  {
416  // Hash ids associated with the group
417  ids.insert(iter.val());
418  }
419  }
420  }
421 
422  return ids.sortedToc();
423 }
424 
425 
427 (
428  const wordRes& matcher,
429  const bool useGroups
430 ) const
431 {
432  if (matcher.empty())
433  {
434  return labelList();
435  }
436  else if (matcher.size() == 1)
437  {
438  return this->indices(matcher.front(), useGroups);
439  }
440 
441  labelHashSet ids(0);
442 
443  // Only check groups if requested and they exist
444  if (useGroups && this->hasGroupIDs())
445  {
446  ids.reserve(this->size());
447 
448  const auto& groupLookup = groupPatchIDs();
449  forAllConstIters(groupLookup, iter)
450  {
451  if (matcher(iter.key()))
452  {
453  // Add patch ids associated with the group
454  ids.insert(iter.val());
455  }
456  }
457  }
458 
459  if (ids.empty())
460  {
461  return PtrListOps::findMatching(*this, matcher);
462  }
463  else
464  {
465  ids.insert(PtrListOps::findMatching(*this, matcher));
466  }
467 
468  return ids.sortedToc();
469 }
470 
471 
473 (
474  const wordRes& select,
475  const wordRes& ignore,
476  const bool useGroups
477 ) const
478 {
479  //return mesh().boundaryMesh().indices(select, ignore, useGroups);
480  if (ignore.empty())
481  {
482  return this->indices(select, useGroups);
483  }
484 
485  const wordRes::filter matcher(select, ignore);
486 
487  labelHashSet ids(0);
488 
489  // Only check groups if requested and they exist
490  if (useGroups && this->hasGroupIDs())
491  {
492  ids.reserve(this->size());
493 
494  const auto& groupLookup = groupPatchIDs();
495  forAllConstIters(groupLookup, iter)
496  {
497  if (matcher(iter.key()))
498  {
499  // Add patch ids associated with the group
500  ids.insert(iter.val());
501  }
502  }
503  }
504 
505  if (ids.empty())
506  {
507  return PtrListOps::findMatching(*this, matcher);
508  }
509  else
510  {
511  ids.insert(PtrListOps::findMatching(*this, matcher));
512  }
513 
514  return ids.sortedToc();
515 }
516 
517 
519 (
520  const word& patchName,
521  bool allowNotFound
522 ) const
523 {
524  //return mesh().boundaryMesh().findPatchID(patchName);
525  if (patchName.empty())
526  {
527  return -1;
528  }
529 
530  const label patchId = PtrListOps::firstMatching(*this, patchName);
531 
532  if (patchId >= 0)
533  {
534  return patchId;
535  }
536 
537  if (!allowNotFound)
538  {
540  << "Patch '" << patchName << "' not found. "
541  << "Available patch names";
542 
543  if (polyMesh::defaultRegion != mesh_.name())
544  {
545  FatalError
546  << " in region '" << mesh_.name() << "'";
547  }
548 
549  FatalError
550  << " include: " << names() << endl
551  << exit(FatalError);
552  }
553 
554  // Patch not found
555  if (debug)
556  {
557  Pout<< "label pointBoundaryMesh::findPatchID(const word&) const"
558  << " Patch named " << patchName << " not found. "
559  << "Available patch names: " << names() << endl;
560  }
561 
562  // Not found, return -1
563  return -1;
564 }
565 
566 
567 void Foam::pointBoundaryMesh::calcGeometry()
568 {
569  PstreamBuffers pBufs(Pstream::defaultCommsType);
570 
571  if
572  (
573  pBufs.commsType() == Pstream::commsTypes::buffered
574  || pBufs.commsType() == Pstream::commsTypes::nonBlocking
575  )
576  {
577  forAll(*this, patchi)
578  {
579  operator[](patchi).initGeometry(pBufs);
580  }
581 
582  pBufs.finishedSends();
583 
584  forAll(*this, patchi)
585  {
586  operator[](patchi).calcGeometry(pBufs);
587  }
588  }
589  else if (pBufs.commsType() == Pstream::commsTypes::scheduled)
590  {
591  const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
592 
593  // Dummy.
594  pBufs.finishedSends();
595 
596  for (const auto& schedEval : patchSchedule)
597  {
598  const label patchi = schedEval.patch;
599 
600  if (schedEval.init)
601  {
602  operator[](patchi).initGeometry(pBufs);
603  }
604  else
605  {
606  operator[](patchi).calcGeometry(pBufs);
607  }
608  }
609  }
610 }
611 
612 
614 {
615  PstreamBuffers pBufs(Pstream::defaultCommsType);
616 
617  if
618  (
619  pBufs.commsType() == Pstream::commsTypes::buffered
620  || pBufs.commsType() == Pstream::commsTypes::nonBlocking
621  )
622  {
623  forAll(*this, patchi)
624  {
625  operator[](patchi).initMovePoints(pBufs, p);
626  }
627 
628  pBufs.finishedSends();
629 
630  forAll(*this, patchi)
631  {
632  operator[](patchi).movePoints(pBufs, p);
633  }
634  }
635  else if (pBufs.commsType() == Pstream::commsTypes::scheduled)
636  {
637  const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
638 
639  // Dummy.
640  pBufs.finishedSends();
641 
642  for (const auto& schedEval : patchSchedule)
643  {
644  const label patchi = schedEval.patch;
645 
646  if (schedEval.init)
647  {
648  operator[](patchi).initMovePoints(pBufs, p);
649  }
650  else
651  {
652  operator[](patchi).movePoints(pBufs, p);
653  }
654  }
655  }
656 }
657 
658 
660 {
661  PstreamBuffers pBufs(Pstream::defaultCommsType);
662 
663  if
664  (
665  pBufs.commsType() == Pstream::commsTypes::buffered
666  || pBufs.commsType() == Pstream::commsTypes::nonBlocking
667  )
668  {
669  forAll(*this, patchi)
670  {
671  operator[](patchi).initUpdateMesh(pBufs);
672  }
673 
674  pBufs.finishedSends();
675 
676  forAll(*this, patchi)
677  {
678  operator[](patchi).updateMesh(pBufs);
679  }
680  }
681  else if (pBufs.commsType() == Pstream::commsTypes::scheduled)
682  {
683  const lduSchedule& patchSchedule = mesh().globalData().patchSchedule();
684 
685  // Dummy.
686  pBufs.finishedSends();
687 
688  for (const auto& schedEval : patchSchedule)
689  {
690  const label patchi = schedEval.patch;
691 
692  if (schedEval.init)
693  {
694  operator[](patchi).initUpdateMesh(pBufs);
695  }
696  else
697  {
698  operator[](patchi).updateMesh(pBufs);
699  }
700  }
701  }
702 }
703 
704 
706 (
707  const labelUList& oldToNew,
708  const bool validBoundary
709 )
710 {
711  // Change order of patches
712  pointPatchList::reorder(oldToNew);
713 
714  // Adapt indices
715  pointPatchList& patches = *this;
716 
717  forAll(patches, patchi)
718  {
719  patches[patchi].index() = patchi;
720  }
721 
722  // Clear group-to-patch addressing. Note: could re-calculate
723  groupIDsPtr_.reset(nullptr);
724 
725  if (validBoundary)
726  {
727  updateMesh();
728  }
729 
730  if (debug)
731  {
732  pointPatchList& Patches = *this;
733 
734  Pout<< "pointBoundaryMesh::reorder"
735  << "(const labelUList&, const bool): "
736  << "reordered pointBoundaryMesh:" << endl;
737  Pout<< incrIndent;
738  for (const auto& pp : Patches)
739  {
740  Pout<< indent
741  << "index:" << pp.index() << " patch:" << pp.name()
742  << " type:" << pp.type() << endl;
743  }
744  Pout<< decrIndent;
745  }
746 }
747 
748 
749 bool Foam::pointBoundaryMesh::writeData(Ostream& os) const
750 {
751  const pointPatchList& patches = *this;
752 
753  os << patches.size() << nl << token::BEGIN_LIST << incrIndent << nl;
754 
755  forAll(patches, patchi)
756  {
757  os << indent << patches[patchi].name() << nl
758  << indent << token::BEGIN_BLOCK << nl
759  << incrIndent << patches[patchi] << decrIndent
760  << indent << token::END_BLOCK << endl;
761  }
762 
764 
765  // Check state of IOstream
766  os.check("pointBoundaryMesh::writeData(Ostream& os) const");
767 
768  return os.good();
769 }
770 
771 
772 //bool Foam::pointBoundaryMesh::writeObject
773 //(
774 // IOstreamOption
775 //) const
776 //{
777 // return regIOobject::writeObject(fmt, ver, IOstream::UNCOMPRESSED);
778 //}
779 
780 
781 // ************************************************************************* //
Begin block [isseparator].
Definition: token.H:165
label patchId(-1)
const polyBoundaryMesh & pbm
dictionary dict
labelList findMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Extract list indices for all items with &#39;name()&#39; that matches.
PtrList< pointPatch > pointPatchList
Store lists of pointPatch as a PtrList.
Definition: pointPatch.H:58
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
readOption readOpt() const noexcept
Get the read option.
Ostream & indent(Ostream &os)
Indent stream.
Definition: Ostream.H:493
label nNonProcessor() const
The number of patches before the first processor patch.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:125
wordList physicalTypes() const
Return a list of physical types.
error FatalError
Error stream (stdout output on all processes), with additional &#39;FOAM FATAL ERROR&#39; header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:608
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Definition: IOstream.C:45
void movePoints(const pointField &)
Correct pointBoundaryMesh after moving points.
const word & name() const noexcept
Return the object name.
Definition: IOobjectI.H:195
static autoPtr< pointPatch > New(const word &name, const dictionary &dict, const label index, const pointBoundaryMesh &)
Return a pointer to a new patch created on freestore. Returns null if not found.
Definition: pointPatchNew.C:24
label nProcessorPatches() const
The number of processorPointPatch patches.
List< bool > select(const label n, const labelUList &locations)
Construct a selection list of bools (all false) with the given pre-size, subsequently add specified l...
Definition: BitOps.C:134
constexpr char nl
The newline &#39;\n&#39; character (0x0a)
Definition: Ostream.H:50
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:531
bool headerOk()
Read and check header info. Does not check the headerClassName.
Definition: regIOobject.C:505
void reorder(const labelUList &oldToNew, const bool check=false)
Reorder elements. Reordering must be unique (ie, shuffle).
Definition: UPtrList.C:79
labelList indices(const wordRe &matcher, const bool useGroups) const
Return (sorted) patch indices for all matches.
Begin list [isseparator].
Definition: token.H:161
List< lduScheduleEntry > lduSchedule
A List of lduSchedule entries.
Definition: lduSchedule.H:46
void updateMesh()
Correct pointBoundaryMesh after topology update.
bool isReadOptional() const noexcept
True if (LAZY_READ) bits are set [same as READ_IF_PRESENT].
UList< label > labelUList
A UList of labels.
Definition: UList.H:78
Extract name (as a word) from an object, typically using its name() method.
Definition: word.H:340
static autoPtr< facePointPatch > New(const polyPatch &, const pointBoundaryMesh &)
Return a pointer to a new patch created on freestore from polyPatch.
#define forAll(list, i)
Loop across all elements in list.
Definition: stdFoam.H:421
HashSet< label, Hash< label > > labelHashSet
A HashSet of labels, uses label hasher.
Definition: HashSet.H:85
void resize_null(const label newLen)
Set the addressed list to the given size, deleting all existing entries. Afterwards the list contains...
Definition: PtrListI.H:96
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of &#39;true&#39; entries.
Definition: BitOps.H:73
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:38
dynamicFvMesh & mesh
"scheduled" (MPI standard) : (MPI_Send, MPI_Recv)
void close()
Close Istream.
static word defaultRegion
Return the default region name.
Definition: polyMesh.H:406
label size() const noexcept
The number of entries in the list.
Definition: UPtrListI.H:106
void reorder(const labelUList &oldToNew, const bool validBoundary)
Reorders patches. Ordering does not have to be done in.
const globalMeshData & globalData() const
Return parallel info (demand-driven)
Definition: polyMesh.C:1311
End list [isseparator].
Definition: token.H:162
A HashTable similar to std::unordered_map.
Definition: HashTable.H:108
const T * set(const label i) const
Return const pointer to element (can be nullptr), or nullptr for out-of-range access (ie...
Definition: PtrList.H:159
int debug
Static debugging option.
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
Ostream & decrIndent(Ostream &os)
Decrement the indent level.
Definition: Ostream.H:511
bool isReadRequired() const noexcept
True if (MUST_READ | READ_MODIFIED) bits are set.
label findPatchID(const word &patchName, const bool allowNotFound=true) const
Find patch index given a name.
static commsTypes defaultCommsType
Default commsType.
Definition: UPstream.H:397
#define WarningInFunction
Report a warning using Foam::Warning.
Basic pointPatch represents a set of points from the mesh.
Definition: pointPatch.H:64
const HashTable< labelList > & groupPatchIDs() const
The patch indices per patch group.
bool good() const noexcept
True if next operation might succeed.
Definition: IOstream.H:281
const lduSchedule & patchSchedule() const noexcept
Order in which the patches should be initialised/evaluated corresponding to the schedule.
const polyBoundaryMesh & patches
fileName objectRelPath() const
The object path relative to the root.
Definition: IOobject.C:524
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
wordList types() const
Return a list of patch types.
List< label > labelList
A List of labels.
Definition: List.H:62
volScalarField & p
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
"buffered" : (MPI_Bsend, MPI_Recv)
End block [isseparator].
Definition: token.H:166
wordList names() const
Return a list of patch names.
Ostream & incrIndent(Ostream &os)
Increment the indent level.
Definition: Ostream.H:502
Istream & readStream(const word &, const bool readOnProc=true)
Return Istream and check object type against that given.
prefixOSstream Pout
OSstream wrapped stdout (std::cout) with parallel prefix.
virtual bool writeData(Ostream &) const
writeData member function required by regIOobject
Extract type (as a word) from an object, typically using its type() method.
Definition: word.H:361
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
Namespace for OpenFOAM.
forAllConstIters(mixture.phases(), phase)
Definition: pEqn.H:28
label firstMatching(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
Find first list item with &#39;name()&#39; that matches, -1 on failure.