47 #ifndef MeshedSurface_H
48 #define MeshedSurface_H
71 class polyBoundaryMesh;
73 template<
class Face>
class MeshedSurface;
74 template<
class Face>
class MeshedSurfaceProxy;
75 template<
class Face>
class UnsortedMeshedSurface;
161 inline static bool isTri();
294 return static_cast<const List<Face> &
>(*this);
309 const bool cullEmpty=
false
317 const bool cullEmpty=
false
324 const bool cullEmpty=
false
334 virtual void clear();
361 virtual void cleanup(
const bool verbose);
365 const scalar tol=small,
366 const bool verbose=
false
371 const bool verbose=
false
A HashTable with keys but without contents.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label size() const
Return the number of elements in the UList.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
static bool isTri()
Face storage only handles triangulated faces.
virtual void scalePoints(const scalar)
Scale points. A non-positive factor is ignored.
const List< surfZone > & surfZones() const
Const access to the surface zones.
const List< Face > & faces() const
Return const access to the faces.
Face FaceType
Face type used.
void transcribe(MeshedSurface< face > &)
Transfer points/zones and transcribe face -> triFace.
void operator=(const MeshedSurface< Face > &)
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
static wordHashSet writeTypes()
pointField & storedPoints()
Non-const access to global points.
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf),(name, surf))
void sortFacesAndStore(List< Face > &&unsortedFaces, List< label > &&zoneIds, const bool sorted)
Sort faces by zones and store sorted faces.
ClassName("MeshedSurface")
Runtime type information.
virtual void cleanup(const bool verbose)
Remove invalid faces.
void transfer(MeshedSurface< Face > &)
Transfer the contents of the argument and annul the argument.
virtual ~MeshedSurface()
Destructor.
declareRunTimeSelectionTable(autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name))
bool read(const fileName &, const word &ext)
Read from file. Chooses reader based on explicit extension.
virtual label triangulate()
Triangulate in-place, returning the number of triangles added.
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format?
label size() const
The surface size is the number of faces.
MeshedSurface subsetMesh(const labelHashSet &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
surfZoneList & storedZones()
Non-const access to the zones.
static bool canRead(const fileName &, const bool verbose=false)
Can we read this file format?
static bool canReadType(const word &ext, const bool verbose=false)
Can we read this file format?
virtual bool stitchFaces(const scalar tol=small, const bool verbose=false)
virtual void movePoints(const pointField &)
Move points.
static void write(const fileName &, const MeshedSurface< Face > &)
Write to file.
virtual void reset(pointField &&points, List< Face > &&faces, surfZoneList &&zones)
Reset primitive data (points, faces and zones)
List< Face > & storedFaces()
Non-const access to the faces.
void writeStats(Ostream &os) const
static autoPtr< MeshedSurface > New(const fileName &, const word &ext)
Select constructed from filename (explicit extension)
virtual void remapFaces(const labelUList &faceMap)
Set new zones from faceMap.
virtual void clear()
Clear all storage.
friend class MeshedSurface
virtual bool checkFaces(const bool verbose=false)
virtual void removeZones()
Remove surface zones.
void checkZones()
Basic sanity check on zones.
static wordHashSet readTypes()
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of faces which address into the list of points.
const Field< PointType > & points() const
Return reference to global points.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
A class for handling file names.
Calculates points shared by more than two processor patches or cyclic patches.
A surface mesh consisting of general polygon faces.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
word name(const complex &)
Return a string representation of a complex.
UList< label > labelUList
Macros to ease declaration of run-time selection tables.