47 #ifndef MeshedSurface_H 48 #define MeshedSurface_H 71 class polyBoundaryMesh;
171 inline static bool isTri();
304 return static_cast<const List<Face> &
>(*this);
319 const bool cullEmpty=
false 327 const bool cullEmpty=
false 334 const bool cullEmpty=
false 344 virtual void clear();
371 virtual void cleanup(
const bool verbose);
375 const scalar tol=SMALL,
376 const bool verbose=
false 381 const bool verbose=
false void transcribe(MeshedSurface< face > &)
Transfer points/zones and transcribe face -> triFace.
virtual void removeZones()
Remove surface zones.
A surface mesh consisting of general polygon faces.
UList< label > labelUList
Face FaceType
Face type used.
virtual void cleanup(const bool verbose)
Remove invalid faces.
const List< surfZone > & surfZones() const
Const access to the surface zones.
virtual void remapFaces(const labelUList &faceMap)
Set new zones from faceMap.
Xfer< MeshedSurface< Face > > xfer()
Transfer contents to the Xfer container.
static bool canReadType(const word &ext, const bool verbose=false)
Can we read this file format?
static wordHashSet readTypes()
declareRunTimeSelectionTable(autoPtr, MeshedSurface, fileExtension,( const fileName &name ),(name))
Macros to ease declaration of run-time selection tables.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
void sortFacesAndStore(const Xfer< List< Face > > &unsortedFaces, const Xfer< List< label > > &zoneIds, const bool sorted)
Sort faces by zones and store sorted faces.
A simple container for copying or transferring objects of type <T>.
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.
label size() const
The surface size is the number of faces.
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,( const fileName &name, const MeshedSurface< Face > &surf ),(name, surf))
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
MeshedSurface()
Construct null.
ClassName("MeshedSurface")
Runtime type information.
vectorField pointField
pointField is a vectorField.
static wordHashSet writeTypes()
pointField & storedPoints()
Non-const access to global points.
static void write(const fileName &, const MeshedSurface< Face > &)
Write to file.
virtual void clear()
Clear all storage.
static autoPtr< MeshedSurface > New(const fileName &, const word &ext)
Select constructed from filename (explicit extension)
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A collection of helper functions for reading/writing surface formats.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
void clear()
Clear the list, i.e. set size to zero.
Calculates points shared by more than two processor patches or cyclic patches.
const List< Face > & faces() const
Return const access to the faces.
virtual void reset(const Xfer< pointField > &points, const Xfer< List< Face > > &faces, const Xfer< surfZoneList > &zones)
Reset primitive data (points, faces and zones)
surfZoneList & storedZones()
Non-const access to the zones.
virtual ~MeshedSurface()
Destructor.
A list of faces which address into the list of points.
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
void operator=(const MeshedSurface< Face > &)
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
void checkZones()
Basic sanity check on zones.
static bool isTri()
Face storage only handles triangulated faces.
A class for handling file names.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A HashTable with keys but without contents.
label size() const
Return the number of elements in the UList.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
virtual void movePoints(const pointField &)
Move points.
List< Face > & storedFaces()
Non-const access to the faces.
void transfer(MeshedSurface< Face > &)
Transfer the contents of the argument and annul the argument.
static bool canWriteType(const word &ext, const bool verbose=false)
Can we write this file format?
virtual label triangulate()
Triangulate in-place, returning the number of triangles added.
MeshedSurface subsetMesh(const labelHashSet &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
virtual void scalePoints(const scalar)
Scale points. A non-positive factor is ignored.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const Field< point > & points() const
Return reference to global points.
void writeStats(Ostream &os) const
virtual bool checkFaces(const bool verbose=false)
virtual bool stitchFaces(const scalar tol=SMALL, const bool verbose=false)
bool read(const fileName &, const word &ext)
Read from file. Chooses reader based on explicit extension.
static bool canRead(const fileName &, const bool verbose=false)
Can we read this file format?