UnsortedMeshedSurface.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 | Copyright (C) 2011-2015 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 "MeshedSurface.H"
27 #include "UnsortedMeshedSurface.H"
28 #include "MeshedSurfaceProxy.H"
29 #include "IFstream.H"
30 #include "OFstream.H"
31 #include "Time.H"
32 #include "polyBoundaryMesh.H"
33 #include "polyMesh.H"
34 
35 // * * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * //
36 
37 template<class Face>
39 {
40  return wordHashSet(*fileExtensionConstructorTablePtr_);
41 }
42 
43 
44 template<class Face>
46 {
47  return wordHashSet(*writefileExtensionMemberFunctionTablePtr_);
48 }
49 
50 
51 template<class Face>
53 (
54  const word& ext,
55  const bool verbose
56 )
57 {
58  return fileFormats::surfaceFormatsCore::checkSupport
59  (
60  readTypes() | ParentType::readTypes(),
61  ext,
62  verbose,
63  "reading"
64  );
65 }
66 
67 
68 template<class Face>
70 (
71  const word& ext,
72  const bool verbose
73 )
74 {
75  return fileFormats::surfaceFormatsCore::checkSupport
76  (
77  writeTypes(),
78  ext,
79  verbose,
80  "writing"
81  );
82 }
83 
84 
85 template<class Face>
87 (
88  const fileName& name,
89  const bool verbose
90 )
91 {
92  word ext = name.ext();
93  if (ext == "gz")
94  {
95  ext = name.lessExt().ext();
96  }
97  return canReadType(ext, verbose);
98 }
99 
100 
101 template<class Face>
103 (
104  const fileName& name,
105  const UnsortedMeshedSurface<Face>& surf
106 )
107 {
108  if (debug)
109  {
110  Info<< "UnsortedMeshedSurface::write"
111  "(const fileName&, const UnsortedMeshedSurface&) : "
112  "writing to " << name
113  << endl;
114  }
115 
116  const word ext = name.ext();
117 
118  typename writefileExtensionMemberFunctionTable::iterator mfIter =
119  writefileExtensionMemberFunctionTablePtr_->find(ext);
120 
121  if (mfIter == writefileExtensionMemberFunctionTablePtr_->end())
122  {
123  // no direct writer, delegate to proxy if possible
124  wordHashSet supported = ProxyType::writeTypes();
125 
126  if (supported.found(ext))
127  {
128  MeshedSurfaceProxy<Face>(surf).write(name);
129  }
130  else
131  {
133  << "Unknown file extension " << ext << nl << nl
134  << "Valid types are :" << endl
135  << (supported | writeTypes())
136  << exit(FatalError);
137  }
138  }
139  else
140  {
141  mfIter()(name, surf);
142  }
143 }
144 
145 
146 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
147 
148 template<class Face>
150 :
151  ParentType()
152 {}
153 
154 
155 template<class Face>
157 (
158  const Xfer<pointField>& pointLst,
159  const Xfer<List<Face> >& faceLst,
160  const Xfer<List<label> >& zoneIds,
161  const Xfer<surfZoneIdentifierList>& zoneTofc
162 )
163 :
164  ParentType(pointLst, faceLst),
165  zoneIds_(zoneIds),
166  zoneToc_(zoneTofc)
167 {}
168 
169 
170 template<class Face>
172 (
173  const Xfer<pointField>& pointLst,
174  const Xfer<List<Face> >& faceLst,
175  const labelUList& zoneSizes,
176  const UList<word>& zoneNames
177 )
178 :
179  ParentType(pointLst, faceLst)
180 {
181  if (zoneSizes.size())
182  {
183  if (zoneNames.size())
184  {
185  setZones(zoneSizes, zoneNames);
186  }
187  else
188  {
189  setZones(zoneSizes);
190  }
191  }
192  else
193  {
194  setOneZone();
195  }
196 }
197 
198 
199 template<class Face>
201 (
202  const UnsortedMeshedSurface<Face>& surf
203 )
204 :
205  ParentType
206  (
207  xferCopy(surf.points()),
208  xferCopy(surf.faces())
209  ),
210  zoneIds_(surf.zoneIds()),
211  zoneToc_(surf.zoneToc())
212 {}
213 
214 
215 template<class Face>
217 (
218  const MeshedSurface<Face>& surf
219 )
220 :
221  ParentType
222  (
223  xferCopy(surf.points()),
224  xferCopy(surf.faces())
225  )
226 {
227  setZones(surf.surfZones());
228 }
229 
230 
231 template<class Face>
233 (
234  const Xfer<UnsortedMeshedSurface<Face> >& surf
235 )
236 :
237  ParentType()
238 {
239  transfer(surf());
240 }
241 
242 
243 template<class Face>
245 (
246  const Xfer<MeshedSurface<Face> >& surf
247 )
248 :
249  ParentType()
250 {
251  transfer(surf());
252 }
253 
254 
255 template<class Face>
257 (
258  const fileName& name,
259  const word& ext
260 )
261 :
262  ParentType()
263 {
264  read(name, ext);
265 }
266 
267 
268 template<class Face>
270 :
271  ParentType()
272 {
273  read(name);
274 }
275 
276 
277 template<class Face>
279 (
280  const Time& t,
281  const word& surfName
282 )
283 :
284  ParentType()
285 {
286  MeshedSurface<Face> surf(t, surfName);
287  transfer(surf);
288 }
289 
290 
291 // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
292 
293 template<class Face>
295 {}
296 
297 
298 // * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
299 
300 template<class Face>
302 {
303  zoneIds_.setSize(size());
304  zoneIds_ = 0;
305 
306  word zoneName;
307  if (zoneToc_.size())
308  {
309  zoneName = zoneToc_[0].name();
310  }
311  if (zoneName.empty())
312  {
313  zoneName = "zone0";
314  }
315 
316  // set single default zone
317  zoneToc_.setSize(1);
318  zoneToc_[0] = surfZoneIdentifier(zoneName, 0);
319 }
320 
321 
322 template<class Face>
324 (
325  const surfZoneList& zoneLst
326 )
327 {
328  zoneIds_.setSize(size());
329  zoneToc_.setSize(zoneLst.size());
330 
331  forAll(zoneToc_, zoneI)
332  {
333  const surfZone& zone = zoneLst[zoneI];
334  zoneToc_[zoneI] = zone;
335 
336  // assign sub-zone Ids
337  SubList<label> subZone(zoneIds_, zone.size(), zone.start());
338  subZone = zoneI;
339  }
340 }
341 
342 
343 template<class Face>
345 (
346  const labelUList& sizes,
347  const UList<word>& names
348 )
349 {
350  zoneIds_.setSize(size());
351  zoneToc_.setSize(sizes.size());
352 
353  label start = 0;
354  forAll(zoneToc_, zoneI)
355  {
356  zoneToc_[zoneI] = surfZoneIdentifier(names[zoneI], zoneI);
357 
358  // assign sub-zone Ids
359  SubList<label> subZone(zoneIds_, sizes[zoneI], start);
360  subZone = zoneI;
361 
362  start += sizes[zoneI];
363  }
364 }
365 
366 
367 template<class Face>
369 (
370  const labelUList& sizes
371 )
372 {
373  zoneIds_.setSize(size());
374  zoneToc_.setSize(sizes.size());
375 
376  label start = 0;
377  forAll(zoneToc_, zoneI)
378  {
379  zoneToc_[zoneI] = surfZoneIdentifier
380  (
381  word("zone") + ::Foam::name(zoneI),
382  zoneI
383  );
384 
385  // assign sub-zone Ids
386  SubList<label> subZone(zoneIds_, sizes[zoneI], start);
387  subZone = zoneI;
388 
389  start += sizes[zoneI];
390  }
391 }
392 
393 
394 template<class Face>
396 (
397  const labelUList& faceMap
398 )
399 {
400  // re-assign the zone Ids
401  if (notNull(faceMap) && faceMap.size())
402  {
403  if (zoneToc_.empty())
404  {
405  setOneZone();
406  }
407  else if (zoneToc_.size() == 1)
408  {
409  // optimized for single-zone case
410  zoneIds_ = 0;
411  }
412  else
413  {
414  List<label> newZones(faceMap.size());
415 
416  forAll(faceMap, faceI)
417  {
418  newZones[faceI] = zoneIds_[faceMap[faceI]];
419  }
420  zoneIds_.transfer(newZones);
421  }
422  }
423 }
424 
425 
426 // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
427 
428 template<class Face>
430 {
431  this->storedFaces().setSize(s);
432  // if zones extend: set with last zoneId
433  zoneIds_.setSize(s, zoneToc_.size() - 1);
434 }
435 
436 
437 template<class Face>
439 {
441  zoneIds_.clear();
442  zoneToc_.clear();
443 }
444 
445 
446 template<class Face>
448 (
450 ) const
451 {
452  // supply some zone names
453  Map<word> zoneNames;
454  forAll(zoneToc_, zoneI)
455  {
456  zoneNames.insert(zoneI, zoneToc_[zoneI].name());
457  }
458 
459  // std::sort() really seems to mix up the order.
460  // and std::stable_sort() might take too long / too much memory
461 
462  // Assuming that we have relatively fewer zones compared to the
463  // number of items, just do it ourselves
464 
465  // step 1: get zone sizes and store (origId => zoneI)
467  forAll(zoneIds_, faceI)
468  {
469  const label origId = zoneIds_[faceI];
470 
471  Map<label>::iterator fnd = lookup.find(origId);
472  if (fnd != lookup.end())
473  {
474  fnd()++;
475  }
476  else
477  {
478  lookup.insert(origId, 1);
479  }
480  }
481 
482  // step 2: assign start/size (and name) to the newZones
483  // re-use the lookup to map (zoneId => zoneI)
484  surfZoneList zoneLst(lookup.size());
485  label start = 0;
486  label zoneI = 0;
488  {
489  label origId = iter.key();
490 
491  word name;
492  Map<word>::const_iterator fnd = zoneNames.find(origId);
493  if (fnd != zoneNames.end())
494  {
495  name = fnd();
496  }
497  else
498  {
499  name = word("zone") + ::Foam::name(zoneI);
500  }
501 
502  zoneLst[zoneI] = surfZone
503  (
504  name,
505  0, // initialize with zero size
506  start,
507  zoneI
508  );
509 
510  // increment the start for the next zone
511  // and save the (zoneId => zoneI) mapping
512  start += iter();
513  iter() = zoneI++;
514  }
515 
516 
517  // step 3: build the re-ordering
518  faceMap.setSize(zoneIds_.size());
519 
520  forAll(zoneIds_, faceI)
521  {
522  label zoneI = lookup[zoneIds_[faceI]];
523  faceMap[faceI] = zoneLst[zoneI].start() + zoneLst[zoneI].size()++;
524  }
525 
526  // with reordered faces registered in faceMap
527  return zoneLst;
528 }
529 
530 
531 template<class Face>
534 (
535  const labelHashSet& include,
536  labelList& pointMap,
538 ) const
539 {
540  const pointField& locPoints = this->localPoints();
541  const List<Face>& locFaces = this->localFaces();
542 
543  // Fill pointMap, faceMap
544  PatchTools::subsetMap(*this, include, pointMap, faceMap);
545 
546  // Create compact coordinate list and forward mapping array
547  pointField newPoints(pointMap.size());
548  labelList oldToNew(locPoints.size());
549  forAll(pointMap, pointI)
550  {
551  newPoints[pointI] = locPoints[pointMap[pointI]];
552  oldToNew[pointMap[pointI]] = pointI;
553  }
554 
555  // Renumber face node labels and compact
556  List<Face> newFaces(faceMap.size());
557  List<label> newZones(faceMap.size());
558 
559  forAll(faceMap, faceI)
560  {
561  const label origFaceI = faceMap[faceI];
562  newFaces[faceI] = Face(locFaces[origFaceI]);
563 
564  // Renumber labels for face
565  Face& f = newFaces[faceI];
566  forAll(f, fp)
567  {
568  f[fp] = oldToNew[f[fp]];
569  }
570 
571  newZones[faceI] = zoneIds_[origFaceI];
572  }
573  oldToNew.clear();
574 
575  // construct a sub-surface
576  return UnsortedMeshedSurface
577  (
578  xferMove(newPoints),
579  xferMove(newFaces),
580  xferMove(newZones),
581  xferCopy(zoneToc_)
582  );
583 }
584 
585 
586 template<class Face>
588 (
589  const labelHashSet& include
590 ) const
591 {
592  labelList pointMap, faceMap;
593  return subsetMesh(include, pointMap, faceMap);
594 }
595 
596 
597 template<class Face>
599 (
600  const Xfer<pointField>& pointLst,
601  const Xfer<List<Face> >& faceLst,
602  const Xfer<List<label> >& zoneIds
603 )
604 {
605  ParentType::reset
606  (
607  pointLst,
608  faceLst,
610  );
611 
612  if (notNull(zoneIds))
613  {
614  zoneIds_.transfer(zoneIds());
615  }
616 }
617 
618 
619 template<class Face>
621 (
622  const Xfer<List<point> >& pointLst,
623  const Xfer<List<Face> >& faceLst,
624  const Xfer<List<label> >& zoneIds
625 )
626 {
627  ParentType::reset
628  (
629  pointLst,
630  faceLst,
631  Xfer<surfZoneList>()
632  );
633 
634  if (notNull(zoneIds))
635  {
636  zoneIds_.transfer(zoneIds());
637  }
638 }
639 
640 
641 template<class Face>
643 (
644  UnsortedMeshedSurface<Face>& surf
645 )
646 {
647  ParentType::reset
648  (
649  xferMove(surf.storedPoints()),
650  xferMove(surf.storedFaces()),
651  Xfer<surfZoneList>()
652  );
653 
654  zoneIds_.transfer(surf.zoneIds_);
655  zoneToc_.transfer(surf.zoneToc_);
656 
657  surf.clear();
658 }
659 
660 
661 template<class Face>
663 (
664  MeshedSurface<Face>& surf
665 )
666 {
667  ParentType::reset
668  (
669  xferMove(surf.storedPoints()),
670  xferMove(surf.storedFaces()),
671  Xfer<surfZoneList>()
672  );
673 
674  setZones(surf.surfZones());
675  surf.clear();
676 }
677 
678 
679 template<class Face>
682 {
683  return xferMove(*this);
684 }
685 
686 
687 // Read from file, determine format from extension
688 template<class Face>
690 {
691  word ext = name.ext();
692  if (ext == "gz")
693  {
694  fileName unzipName = name.lessExt();
695  return read(unzipName, unzipName.ext());
696  }
697  else
698  {
699  return read(name, ext);
700  }
701 }
702 
703 
704 // Read from file in given format
705 template<class Face>
707 (
708  const fileName& name,
709  const word& ext
710 )
711 {
712  clear();
713 
714  // read via use selector mechanism
715  transfer(New(name, ext)());
716  return true;
717 }
718 
719 
720 template<class Face>
722 (
723  const Time& t,
724  const word& surfName
725 ) const
726 {
727  MeshedSurfaceProxy<Face>(*this).write(t, surfName);
728 }
729 
730 
731 // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
732 
733 template<class Face>
735 (
736  const UnsortedMeshedSurface<Face>& surf
737 )
738 {
739  clear();
740 
741  this->storedPoints() = surf.points();
742  this->storedFaces() = surf.faces();
743  zoneIds_ = surf.zoneIds_;
744  zoneToc_ = surf.zoneToc_;
745 }
746 
747 
748 template<class Face>
751 {
753  List<surfZone> zoneLst = this->sortedZones(faceMap);
754 
756  (
757  this->points(),
758  this->faces(),
759  zoneLst,
760  faceMap
761  );
762 }
763 
764 
765 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
766 
768 
769 // ************************************************************************* //
Foam::UnsortedMeshedSurface::write
static void write(const fileName &, const UnsortedMeshedSurface< Face > &)
Write to file.
MeshedSurfaceProxy.H
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:68
Foam::faceMap
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Definition: blockMeshMergeFast.C:90
Foam::word
A class for handling words, derived from string.
Definition: word.H:59
Foam::compressible::New
autoPtr< BasicCompressibleTurbulenceModel > New(const volScalarField &rho, const volVectorField &U, const surfaceScalarField &phi, const typename BasicCompressibleTurbulenceModel::transportModel &transport, const word &propertiesName)
Definition: turbulentFluidThermoModel.C:36
forAllIter
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
Definition: UList.H:431
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::UnsortedMeshedSurface::canWriteType
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format?
Definition: UnsortedMeshedSurface.C:70
clear
UEqn clear()
forAll
#define forAll(list, i)
Loop across all elements in list.
Definition: UList.H:406
Foam::UnsortedMeshedSurface::reset
virtual void reset(const Xfer< pointField > &, const Xfer< List< Face > > &, const Xfer< List< label > > &zoneIds)
Transfer components (points, faces, zone ids).
Foam::notNull
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
Definition: nullObjectI.H:46
Foam::read
bool read(const char *, int32_t &)
Definition: int32IO.C:87
Foam::SubList
A List obtained as a section of another List.
Definition: SubList.H:53
Foam::UnsortedMeshedSurface::~UnsortedMeshedSurface
virtual ~UnsortedMeshedSurface()
Destructor.
Definition: UnsortedMeshedSurface.C:294
Foam::UnsortedMeshedSurface::xfer
Xfer< UnsortedMeshedSurface< Face > > xfer()
Transfer contents to the Xfer container.
Definition: UnsortedMeshedSurface.C:681
Foam::HashTable::const_iterator
An STL-conforming const_iterator.
Definition: HashTable.H:470
Foam::zone
Base class for zones.
Definition: zone.H:57
Foam::List::transfer
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Foam::Map
A HashTable to objects of type <T> with a label key.
Definition: PrimitivePatchTemplate.H:68
Foam::UnsortedMeshedSurface::setSize
void setSize(const label, const Face &)
Disable setSize with value.
Foam::endl
Ostream & endl(Ostream &os)
Add newline and flush stream.
Definition: Ostream.H:251
Foam::UnsortedMeshedSurface::read
bool read(const fileName &, const word &ext)
Read from file. Chooses reader based on explicit extension.
Foam::UnsortedMeshedSurface::remapFaces
virtual void remapFaces(const labelUList &faceMap)
Set new zones from faceMap.
Definition: UnsortedMeshedSurface.C:396
polyMesh.H
Foam::HashSet
A HashTable with keys but without contents.
Definition: HashSet.H:59
Foam::MeshedSurfaceProxy
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
Definition: MeshedSurface.H:73
Foam::Xfer
A simple container for copying or transferring objects of type <T>.
Definition: Xfer.H:85
Foam::MeshedSurface::faces
const List< Face > & faces() const
Return const access to the faces.
Definition: MeshedSurface.H:301
Foam::surfZoneIdentifier
An identifier for a surface zone on a meshed surface.
Definition: surfZoneIdentifier.H:60
OFstream.H
UnsortedMeshedSurface.H
Foam::MeshedSurface::surfZones
const List< surfZone > & surfZones() const
Const access to the surface zones.
Definition: MeshedSurface.H:309
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:59
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::UnsortedMeshedSurface< Face >
Foam::nl
static const char nl
Definition: Ostream.H:260
Foam::Info
messageStream Info
Foam::UnsortedMeshedSurface::zoneIds
const List< label > & zoneIds() const
Return const access to the zone ids.
Definition: UnsortedMeshedSurface.H:269
Foam::UnsortedMeshedSurface::canReadType
static bool canReadType(const word &ext, const bool verbose=false)
Can we read this file format?
Definition: UnsortedMeshedSurface.C:53
Foam::UnsortedMeshedSurface::zoneToc
const List< surfZoneIdentifier > & zoneToc() const
Return const access to the zone table-of-contents.
Definition: UnsortedMeshedSurface.H:275
IFstream.H
Foam::FatalError
error FatalError
Foam::fileName::ext
word ext() const
Return file name extension (part after last .)
Definition: fileName.C:329
s
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
Foam::UnsortedMeshedSurface::readTypes
static wordHashSet readTypes()
Definition: UnsortedMeshedSurface.C:38
Foam::exit
errorManipArg< error, int > exit(error &err, const int errNo=1)
Definition: errorManip.H:124
UnsortedMeshedSurfaceNew.C
Foam::UnsortedMeshedSurface::subsetMesh
UnsortedMeshedSurface subsetMesh(const labelHashSet &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
Definition: UnsortedMeshedSurface.C:534
FatalErrorInFunction
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Definition: error.H:318
Foam::xferMove
Xfer< T > xferMove(T &)
Construct by transferring the contents of the arg.
Foam::UnsortedMeshedSurface::setOneZone
void setOneZone()
Set zones to 0 and set a single zone.
Definition: UnsortedMeshedSurface.C:301
f
labelList f(nPoints)
Foam::xferCopy
Xfer< T > xferCopy(const T &)
Construct by copying the contents of the arg.
Foam::UnsortedMeshedSurface::clear
virtual void clear()
Clear all storage.
Definition: UnsortedMeshedSurface.C:438
Foam::List< Face >
Foam::surfZone
A surface zone on a MeshedSurface.
Definition: surfZone.H:62
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::List::clear
void clear()
Clear the list, i.e. set size to zero.
Definition: List.C:379
polyBoundaryMesh.H
Foam::wordHashSet
HashSet wordHashSet
A HashSet with word keys.
Definition: HashSet.H:207
List
Definition: Test.C:19
Foam::List::size
void size(const label)
Override size to be inconsistent with allocated storage.
Foam::UList::size
label size() const
Return the number of elements in the UList.
Definition: UListI.H:299
Foam::MeshedSurface< Face >
Foam::UnsortedMeshedSurface::setZones
void setZones(const surfZoneList &)
Set zone ids and zones.
Foam::UnsortedMeshedSurface::writeTypes
static wordHashSet writeTypes()
Definition: UnsortedMeshedSurface.C:45
Foam::UnsortedMeshedSurface::transfer
void transfer(UnsortedMeshedSurface< Face > &)
Transfer the contents of the argument and annul the argument.
Foam::UnsortedMeshedSurface::sortedZones
surfZoneList sortedZones(labelList &faceMap) const
Sort faces according to zoneIds.
Definition: UnsortedMeshedSurface.C:448
Foam::name
word name(const complex &)
Return a string representation of a complex.
Definition: complex.C:47
MeshedSurface.H
Foam::UnsortedMeshedSurface::UnsortedMeshedSurface
friend class UnsortedMeshedSurface
Definition: UnsortedMeshedSurface.H:81
Foam::UnsortedMeshedSurface::canRead
static bool canRead(const fileName &, const bool verbose=false)
Can we read this file format?
Definition: UnsortedMeshedSurface.C:87
lookup
stressControl lookup("compactNormalStress") >> compactNormalStress