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