47 #ifndef MeshedSurface_H 48 #define MeshedSurface_H 71 class polyBoundaryMesh;
94 typedef PrimitivePatch<::Foam::List<Face>,
pointField> ParentType;
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 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 HashTable with keys but without contents.
void sortFacesAndStore(List< Face > &&unsortedFaces, List< label > &&zoneIds, const bool sorted)
Sort faces by zones and store sorted faces.
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.
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...
void writeStats(Ostream &os) const
static wordHashSet writeTypes()
virtual void clear()
Clear all storage.
void transfer(MeshedSurface< Face > &)
Transfer the contents of the argument and annul the argument.
MeshedSurface subsetMesh(const labelHashSet &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
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))
A list of faces which address into the list of points.
void operator=(const MeshedSurface< Face > &)
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.
const Field< PointType > & points() const
Return reference to global points.
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...
virtual void reset(pointField &&points, List< Face > &&faces, surfZoneList &&zones)
Reset primitive data (points, faces and zones)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
void checkZones()
Basic sanity check on zones.
const List< Face > & faces() const
Return const access to the faces.
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.
label size() const
The surface size is the number of faces.
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?
virtual bool stitchFaces(const scalar tol=small, const bool verbose=false)
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.
label size() const
Return the number of elements in the UList.
virtual void movePoints(const pointField &)
Move points.
const List< surfZone > & surfZones() const
Const access to the surface zones.
MeshedSurface()
Construct null.