MeshedSurface.H
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-2016 OpenFOAM Foundation
9  Copyright (C) 2016-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 Class
28  Foam::MeshedSurface
29 
30 Description
31  A surface geometry mesh with zone information, not to be confused with
32  the similarly named surfaceMesh, which actually refers to the cell faces
33  of a volume mesh.
34 
35  A MeshedSurface can have zero or more surface zones (roughly equivalent
36  to faceZones for a polyMesh). If surface zones are defined, they must
37  be contiguous and cover all of the faces.
38 
39  The MeshedSurface is intended for surfaces from a variety of sources.
40  - A set of points and faces without any surface zone information.
41  - A set of points and faces with randomly ordered zone information.
42  This could arise, for example, from reading external file formats
43  such as STL, etc.
44 
45 SourceFiles
46  MeshedSurface.C
47 
48 \*---------------------------------------------------------------------------*/
49 
50 #ifndef MeshedSurface_H
51 #define MeshedSurface_H
52 
53 #include "PrimitivePatch.H"
54 #include "PatchTools.H"
55 #include "pointField.H"
56 #include "face.H"
57 #include "labelledTri.H"
58 #include "bitSet.H"
59 #include "HashSet.H"
60 #include "surfZoneList.H"
61 #include "surfaceFormatsCore.H"
62 #include "runTimeSelectionTables.H"
64 
65 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
66 
67 namespace Foam
68 {
69 
70 // Forward declarations
71 
72 class Time;
73 class surfMesh;
74 class polyBoundaryMesh;
75 class Istream;
76 class Ostream;
77 
78 template<class Face> class MeshedSurface;
79 template<class Face> class MeshedSurfaceProxy;
80 template<class Face> class UnsortedMeshedSurface;
81 
82 template<class Face>
84 template<class Face>
86 
87 /*---------------------------------------------------------------------------*\
88  Class MeshedSurface Declaration
89 \*---------------------------------------------------------------------------*/
90 
91 template<class Face>
92 class MeshedSurface
93 :
94  public PrimitivePatch<Face, ::Foam::List, pointField, point>,
96 {
97  // Friends, regardless of face representations
98  template<class Face2> friend class MeshedSurface;
99  template<class Face2> friend class UnsortedMeshedSurface;
100 
101  // Friendship with surfMesh is needed for transferring
102  friend class surfMesh;
103 
104 
105 private:
106 
107  // Private typedefs for convenience
108 
109  typedef PrimitivePatch
110  <
111  Face,
112  ::Foam::List,
113  pointField,
114  point
115  >
116  ParentType;
117 
120 
121 
122  // Private Member Data
123 
124  //- Zone information
125  // (face ordering nFaces/startFace only used during reading/writing)
126  surfZoneList zones_;
127 
128 
129  // Private Member Functions
130 
131  //- Read/construct from Istream
132  Istream& read(Istream& is);
133 
134  //- Write to Ostream
135  Ostream& write(Ostream& os) const;
136 
137 
138 protected:
139 
140  // Protected Member functions
141 
142  //- Transfer points/zones from 'face' to other other shapes.
143  // Eg, transcribe face to triFace, or face -> labelledTri, including
144  // any addZonesToFaces adjustment.
145  // No general form, only specializations.
146  void transcribe(MeshedSurface<face>& surf);
147 
148  //- Basic sanity check on zones
149  void checkZones();
150 
151  //- Non-const access to global points
153  {
154  return const_cast<pointField&>(ParentType::points());
155  }
156 
157  //- Non-const access to the faces
159  {
160  return static_cast<List<Face>&>(*this);
161  }
162 
163  //- Non-const access to the zones
165  {
166  return zones_;
167  }
168 
169  //- Sort faces by zones and store sorted faces
170  void sortFacesAndStore
171  (
172  DynamicList<Face>& unsortedFaces,
173  DynamicList<label>& zoneIds,
174  const bool sorted
175  );
176 
177  //- Set new zones from faceMap
178  virtual void remapFaces(const labelUList& faceMap);
179 
180 
181 public:
182 
183  // Public typedefs
184 
185  //- Face type used
186  typedef Face FaceType;
187 
188  //- Runtime type information
189  ClassName("MeshedSurface");
190 
191 
192  // Static
193 
194  //- Can we read this file format?
195  static bool canRead(const fileName& name, bool verbose=false);
196 
197  //- Can we read this file format?
198  static bool canReadType(const word& ext, bool verbose=false);
199 
200  //- Can we write this file format?
201  static bool canWriteType(const word& ext, bool verbose=false);
202 
203  //- Known readable file-types
204  static wordHashSet readTypes();
205 
206  //- Known writable file-types
207  static wordHashSet writeTypes();
208 
209 
210  // Constructors
211 
212  //- Construct null, an empty surface
213  MeshedSurface();
214 
215  //- Copy construct
216  MeshedSurface(const MeshedSurface& surf);
217 
218  //- Copy construct from an UnsortedMeshedSurface
220 
221  //- Move construct
223 
224  //- Move construct from an UnsortedMeshedSurface
226 
227  //- Copy construct from components (points, faces, zones).
229  (
230  const pointField& pointLst,
231  const UList<Face>& faceLst,
232  const UList<surfZone>& zoneLst
233  );
234 
235  //- Move construct from components (points, faces).
236  // Zone information is fairly lightweight and is copied.
238  (
239  pointField&& pointLst,
240  List<Face>&& faceLst,
241  const UList<surfZone>& zoneLst
242  );
243 
244  //- Copy construct from components (points, faces).
245  // Use zone information if available
247  (
248  const pointField& pointLst,
249  const UList<Face>& faceLst,
250  const labelUList& zoneSizes = labelUList(),
251  const UList<word>& zoneNames = UList<word>()
252  );
253 
254  //- Move construct from components (points, faces).
255  // Use zone information if available
257  (
258  pointField&& pointLst,
259  List<Face>&& faceLst,
260  const labelUList& zoneSizes = labelUList(),
261  const UList<word>& zoneNames = UList<word>()
262  );
263 
264  //- Construct from a boundary mesh with local points/faces
266  (
267  const polyBoundaryMesh& bMesh,
268  const bool globalPoints = false
269  );
270 
271  //- Construct from a surfMesh
272  MeshedSurface(const surfMesh& mesh);
273 
274  //- Construct from file name (uses extension to determine type)
275  MeshedSurface(const fileName& name);
276 
277  //- Construct from file name (uses extension to determine type)
278  MeshedSurface(const fileName& name, const word& ext);
279 
280  //- Construct from Istream
281  MeshedSurface(Istream& is);
282 
283  //- Construct from database
284  MeshedSurface(const Time& runTime, const word& surfName = word::null);
285 
286 
287  // Declare run-time constructor selection table
288 
290  (
291  autoPtr,
294  (
295  const fileName& name
296  ),
297  (name)
298  );
299 
300 
301  // Selectors
302 
303  //- Select constructed from filename (explicit extension)
305  (
306  const fileName& name,
307  const word& ext
308  );
309 
310  //- Select constructed from filename (implicit extension)
311  static autoPtr<MeshedSurface> New(const fileName& name);
312 
313 
314  //- Destructor
315  virtual ~MeshedSurface();
316 
317 
318  // Member Function Selectors
319 
321  (
322  void,
324  write,
326  (
327  const fileName& name,
328  const MeshedSurface<Face>& surf,
329  const dictionary& options
330  ),
331  (name, surf, options)
332  );
333 
334  //- Write to file, selecting writer based on its extension
335  static void write
336  (
337  const fileName& name,
338  const MeshedSurface<Face>& surf,
339  const dictionary& options = dictionary::null
340  );
341 
342  //- Write to file, selecting writer based on the given extension
343  static void write
344  (
345  const fileName& name,
346  const word& ext,
347  const MeshedSurface<Face>& surf,
348  const dictionary& options = dictionary::null
349  );
350 
351 
352  // Member Functions
353 
354  // Access
355 
356  //- The surface size is the number of faces
357  label size() const
358  {
359  return ParentType::size();
360  }
361 
362  //- Return const access to the faces
363  inline const List<Face>& surfFaces() const
364  {
365  return static_cast<const List<Face>&>(*this);
366  }
367 
368  //- Const access to the surface zones.
369  // If zones are defined, they must be contiguous and cover the
370  // entire surface
371  const surfZoneList& surfZones() const
372  {
373  return zones_;
374  }
375 
376  //- Face area vectors (normals)
377  inline const vectorField& Sf() const
378  {
379  return ParentType::faceAreas();
380  }
381 
382  //- Face area magnitudes
383  inline const scalarField& magSf() const
384  {
385  return ParentType::magFaceAreas();
386  }
387 
388  //- Face centres
389  inline const vectorField& Cf() const
390  {
391  return ParentType::faceCentres();
392  }
393 
394 
395  // Edit
396 
397  //- Clear all storage
398  virtual void clear();
399 
400 
401  //- Add surface zones
402  virtual void addZones
403  (
404  const UList<surfZone>&,
405  const bool cullEmpty=false
406  );
407 
408  //- Add surface zones
409  virtual void addZones
410  (
411  const labelUList& sizes,
412  const UList<word>& names,
413  const bool cullEmpty=false
414  );
415 
416  //- Add surface zones
417  virtual void addZones
418  (
419  const labelUList& sizes,
420  const bool cullEmpty=false
421  );
422 
423  //- Propagate zone information on face regions.
424  // Normally a no-op, only used by the labelledTri specialization.
425  // Specializations return true, others return false.
426  bool addZonesToFaces();
427 
428 
429  //- Remove surface zones
430  virtual void removeZones();
431 
432 
433  //- Move points
434  virtual void movePoints(const pointField& newPoints);
435 
436  //- Scale points. A non-positive factor is ignored
437  virtual void scalePoints(const scalar scaleFactor);
438 
439  //- Remove invalid faces
440  virtual void cleanup(const bool verbose);
441 
442  virtual bool stitchFaces
443  (
444  const scalar tol=SMALL,
445  const bool verbose=false
446  );
447 
448  virtual bool checkFaces
449  (
450  const bool verbose=false
451  );
452 
453  //- Count number of triangles.
454  virtual label nTriangles() const;
455 
456  //- Count number of triangles, returning a face map of original ids.
457  // The faceMap is zero-sized when no triangulation would be needed.
458  virtual label nTriangles(List<label>& faceMap) const;
459 
460  //- Triangulate in-place, returning the number of triangles added.
461  virtual label triangulate();
462 
463  //- Triangulate in-place, returning the number of triangles added
464  // and setting a map of original face Ids.
465  // The faceMap is zero-sized when no triangulation was done.
467 
468  //- Return new surface.
469  //
470  // \param[in] include the faces to select
471  // \param[out] pointMap from subsetMeshMap
472  // \param[out] faceMap from subsetMeshMap
473  template<class BoolListType>
475  (
476  const BoolListType& include,
477  labelList& pointMap,
479  ) const;
480 
481  //- Return new surface
482  MeshedSurface subsetMesh(const bitSet& include) const;
483 
484  //- Return new surface
485  MeshedSurface subsetMesh(const labelHashSet& include) const;
486 
487  //- Swap contents
488  void swap(MeshedSurface<Face>& surf);
489 
490  //- Transfer the components
491  void transfer(pointField& pointLst, List<Face>& faceLst);
492 
493  //- Transfer the contents of the argument and annul the argument
494  void transfer(MeshedSurface<Face>& surf);
495 
496  //- Transfer the contents of the argument and annul the argument
498 
499  //- Release (clear) geometry and return for reuse
501 
502  //- Swap the stored faces
503  void swapFaces(List<Face>& faces);
504 
505  //- Swap the stored points
507 
508  //- Swap the stored zones
509  void swapZones(surfZoneList& zones);
510 
511 
512  // Read
513 
514  //- Read from file. Chooses reader based on explicit extension
515  bool read(const fileName& name, const word& ext);
516 
517  //- Read from file. Chooses reader based on detected extension
518  virtual bool read(const fileName& name);
519 
520 
521  // Write
522 
523  void writeStats(Ostream& os) const;
524 
525  //- Generic write routine. Chooses writer based on extension.
526  virtual void write
527  (
528  const fileName& name,
529  const dictionary& options = dictionary::null
530  ) const
531  {
532  write(name, *this, options);
533  }
534 
535  //- Write to database
536  void write
537  (
538  const Time& t,
539  const word& surfName = word::null
540  ) const;
541 
542 
543  // Member operators
544 
545  //- Copy assignment
546  void operator=(const MeshedSurface<Face>& surf);
547 
548  //- Move assignment
549  void operator=(MeshedSurface<Face>&& surf);
550 
551  //- Conversion operator to MeshedSurfaceProxy
552  operator MeshedSurfaceProxy<Face>() const;
553 
554 
555  // IOstream Operators
556 
557  //- Read MeshedSurface from Istream.
558  // Avoid using to read/write file content (fragile).
559  friend Istream& operator>> <Face>
560  (
561  Istream& is,
562  MeshedSurface<Face>& surf
563  );
564 
565 
566  //- Write MeshedSurface to Ostream.
567  // Avoid using to read/write file content (fragile).
568  friend Ostream& operator<< <Face>
569  (
570  Ostream& os,
571  const MeshedSurface<Face>& surf
572  );
573 
574 };
575 
576 
577 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
578 
579 //- Specialization for labelledTri.
580 template<>
582 
583 
584 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
585 
586 } // End namespace Foam
587 
588 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
589 
590 #ifdef NoRepository
591  #include "MeshedSurface.C"
592 #endif
593 
594 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
595 
596 #endif
597 
598 // ************************************************************************* //
Foam::pointField
vectorField pointField
pointField is a vectorField.
Definition: pointFieldFwd.H:44
runTime
engineTime & runTime
Definition: createEngineTime.H:13
Foam::fileFormats::surfaceFormatsCore
A collection of helper functions for reading/writing surface formats.
Definition: surfaceFormatsCore.H:61
Foam::MeshedSurface::surfZones
const surfZoneList & surfZones() const
Const access to the surface zones.
Definition: MeshedSurface.H:370
Foam::MeshedSurface::~MeshedSurface
virtual ~MeshedSurface()
Destructor.
Definition: MeshedSurface.C:456
MeshedSurface.C
Foam::MeshedSurface::checkZones
void checkZones()
Basic sanity check on zones.
Definition: MeshedSurfaceZones.C:35
Foam::Time
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Definition: Time.H:73
Foam::globalPoints
Calculates points shared by more than two processor patches or cyclic patches.
Definition: globalPoints.H:102
Foam::faceMap
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Definition: blockMeshMergeFast.C:94
Foam::PrimitivePatch::points
const Field< PointType > & points() const
Return reference to global points.
Definition: PrimitivePatch.H:300
Foam::word
A class for handling words, derived from Foam::string.
Definition: word.H:62
Foam::MeshedSurface::swapZones
void swapZones(surfZoneList &zones)
Swap the stored zones.
Definition: MeshedSurface.C:1228
Foam::MeshedSurface::storedFaces
List< Face > & storedFaces()
Non-const access to the faces.
Definition: MeshedSurface.H:157
Foam::fileName
A class for handling file names.
Definition: fileName.H:69
Foam::bitSet
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
Definition: bitSet.H:64
Foam::polyBoundaryMesh
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
Definition: polyBoundaryMesh.H:62
Foam::MeshedSurface::ClassName
ClassName("MeshedSurface")
Runtime type information.
Foam::MeshedSurface::triangulate
virtual label triangulate()
Triangulate in-place, returning the number of triangles added.
Definition: MeshedSurface.C:864
PatchTools.H
Foam::DynamicList
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Definition: DynamicList.H:57
Foam::MeshedSurface::swap
void swap(MeshedSurface< Face > &surf)
Swap contents.
Definition: MeshedSurface.C:1108
Foam::MeshedSurface::FaceType
Face FaceType
Face type used.
Definition: MeshedSurface.H:185
Foam::MeshedSurface::storedPoints
pointField & storedPoints()
Non-const access to global points.
Definition: MeshedSurface.H:151
Foam::MeshedSurface::stitchFaces
virtual bool stitchFaces(const scalar tol=SMALL, const bool verbose=false)
Definition: MeshedSurface.C:569
Foam::vtk::fileExtension
const Foam::Enum< fileTag > fileExtension
File extension (without ".") for some vtk XML file content types.
Foam::MeshedSurface::subsetMesh
MeshedSurface subsetMesh(const BoolListType &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
Foam::MeshedSurface::operator=
void operator=(const MeshedSurface< Face > &surf)
Copy assignment.
Definition: MeshedSurface.C:1278
Foam::MeshedSurface::Sf
const vectorField & Sf() const
Face area vectors (normals)
Definition: MeshedSurface.H:376
face.H
Foam::MeshedSurface::surfFaces
const List< Face > & surfFaces() const
Return const access to the faces.
Definition: MeshedSurface.H:362
Foam::MeshedSurface::scalePoints
virtual void scalePoints(const scalar scaleFactor)
Scale points. A non-positive factor is ignored.
Definition: MeshedSurface.C:538
Foam::surfMesh
A surface mesh consisting of general polygon faces.
Definition: surfMesh.H:64
Foam::operator>>
Istream & operator>>(Istream &, directionInfo &)
Definition: directionInfo.C:228
Foam::MeshedSurface::clear
virtual void clear()
Clear all storage.
Definition: MeshedSurface.C:514
Foam::MeshedSurface::transcribe
void transcribe(MeshedSurface< face > &surf)
Transfer points/zones from 'face' to other other shapes.
Foam::HashSet< word >
bitSet.H
Foam::MeshedSurfaceProxy
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
Definition: MeshedSurface.H:78
Foam::MeshedSurface::sortFacesAndStore
void sortFacesAndStore(DynamicList< Face > &unsortedFaces, DynamicList< label > &zoneIds, const bool sorted)
Sort faces by zones and store sorted faces.
Definition: MeshedSurfaceZones.C:70
Foam::MeshedSurface::addZonesToFaces
bool addZonesToFaces()
Propagate zone information on face regions.
Definition: MeshedSurfaceZones.C:192
Foam::MeshedSurface::checkFaces
virtual bool checkFaces(const bool verbose=false)
Definition: MeshedSurface.C:652
Foam::MeshedSurface::canWriteType
static bool canWriteType(const word &ext, bool verbose=false)
Can we write this file format?
Definition: MeshedSurface.C:78
Foam::MeshedSurface::writeStats
void writeStats(Ostream &os) const
Definition: MeshedSurfaceIO.C:62
Foam::MeshedSurface::canRead
static bool canRead(const fileName &name, bool verbose=false)
Can we read this file format?
Definition: MeshedSurface.C:95
Foam::dictionary::null
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
Definition: dictionary.H:385
Foam::PrimitivePatch::faceAreas
const Field< PointType > & faceAreas() const
Return face area vectors for patch.
Definition: PrimitivePatch.C:537
Foam::MeshedSurface::remapFaces
virtual void remapFaces(const labelUList &faceMap)
Set new zones from faceMap.
Definition: MeshedSurface.C:466
Foam::MeshedSurface::storedZones
surfZoneList & storedZones()
Non-const access to the zones.
Definition: MeshedSurface.H:163
Foam::MeshedSurface::magSf
const scalarField & magSf() const
Face area magnitudes.
Definition: MeshedSurface.H:382
Foam::MeshedSurface::transfer
void transfer(pointField &pointLst, List< Face > &faceLst)
Transfer the components.
Definition: MeshedSurface.C:1128
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::Field< vector >
PrimitivePatch.H
Foam::Istream
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
Definition: Istream.H:61
Foam::UnsortedMeshedSurface
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
Definition: MeshedSurface.H:79
Foam::name
word name(const complex &c)
Return string representation of complex.
Definition: complex.C:76
Foam::MeshedSurface::addZones
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
Definition: MeshedSurfaceZones.C:107
Foam::MeshedSurface::removeZones
virtual void removeZones()
Remove surface zones.
Definition: MeshedSurfaceZones.C:200
Foam::MeshedSurface::nTriangles
virtual label nTriangles() const
Count number of triangles.
Definition: MeshedSurface.C:804
Foam::blockMeshTools::read
void read(Istream &, label &, const dictionary &)
In-place read with dictionary lookup.
Definition: blockMeshTools.C:33
HashSet.H
Foam::MeshedSurface::swapPoints
void swapPoints(pointField &points)
Swap the stored points.
Definition: MeshedSurface.C:1219
Foam::dictionary
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Definition: dictionary.H:121
mesh
dynamicFvMesh & mesh
Definition: createDynamicFvMesh.H:6
Foam::MeshedSurface::readTypes
static wordHashSet readTypes()
Known readable file-types.
Definition: MeshedSurface.C:45
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::MeshedSurface::canReadType
static bool canReadType(const word &ext, bool verbose=false)
Can we read this file format?
Definition: MeshedSurface.C:61
pointField.H
Foam::autoPtr
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: HashPtrTable.H:53
Foam::MeshedSurface::movePoints
virtual void movePoints(const pointField &newPoints)
Move points.
Definition: MeshedSurface.C:525
runTimeSelectionTables.H
Macros to ease declaration of run-time selection tables.
Foam::Vector< scalar >
Foam::List
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
Definition: HashTable.H:102
Foam::PrimitivePatch::faceCentres
const Field< PointType > & faceCentres() const
Return face centres for patch.
Definition: PrimitivePatch.C:517
Foam::UList< label >
points
const pointField & points
Definition: gmvOutputHeader.H:1
Foam::word::null
static const word null
An empty word.
Definition: word.H:77
Foam::MeshedSurface::MeshedSurface
MeshedSurface()
Construct null, an empty surface.
Definition: MeshedSurface.C:165
Foam::vtk::write
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
Definition: foamVtkOutputTemplates.C:35
surfZoneList.H
Foam::PrimitivePatch::magFaceAreas
const Field< scalar > & magFaceAreas() const
Return face area magnitudes for patch.
Definition: PrimitivePatch.C:557
Foam::MeshedSurface::writeTypes
static wordHashSet writeTypes()
Known writable file-types.
Definition: MeshedSurface.C:51
memberFunctionSelectionTables.H
Macros to enable the easy declaration of member function selection tables.
Foam::MeshedSurface::Cf
const vectorField & Cf() const
Face centres.
Definition: MeshedSurface.H:388
labelledTri.H
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:56
Foam::labelUList
UList< label > labelUList
A UList of labels.
Definition: UList.H:79
Foam::MeshedSurface::swapFaces
void swapFaces(List< Face > &faces)
Swap the stored faces.
Definition: MeshedSurface.C:1210
Foam::MeshedSurface
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Definition: triSurfaceTools.H:80
Foam::MeshedSurface::declareRunTimeSelectionTable
declareRunTimeSelectionTable(autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name))
Foam::MeshedSurface::declareMemberFunctionSelectionTable
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf, const dictionary &options),(name, surf, options))
Foam::MeshedSurface::size
label size() const
The surface size is the number of faces.
Definition: MeshedSurface.H:356
surfaceFormatsCore.H
Foam::MeshedSurface::releaseGeom
autoPtr< MeshedSurface< Face > > releaseGeom()
Release (clear) geometry and return for reuse.
Definition: MeshedSurface.C:1203
Foam::operator<<
Ostream & operator<<(Ostream &, const boundaryPatch &)
Definition: boundaryPatch.C:102
Foam::MeshedSurface::cleanup
virtual void cleanup(const bool verbose)
Remove invalid faces.
Definition: MeshedSurface.C:557
Foam::MeshedSurface::New
static autoPtr< MeshedSurface > New(const fileName &name, const word &ext)
Select constructed from filename (explicit extension)
Definition: MeshedSurfaceNew.C:37
Foam::PrimitivePatch
A list of faces which address into the list of points.
Definition: PrimitivePatch.H:90