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