Go to the documentation of this file.
50 #ifndef MeshedSurface_H
51 #define MeshedSurface_H
74 class polyBoundaryMesh;
331 (
name, surf, options)
359 return ParentType::size();
398 virtual void clear();
405 const bool cullEmpty=
false
413 const bool cullEmpty=
false
420 const bool cullEmpty=
false
437 virtual void scalePoints(
const scalar scaleFactor);
440 virtual void cleanup(
const bool verbose);
444 const scalar tol=SMALL,
445 const bool verbose=
false
450 const bool verbose=
false
473 template<
class BoolListType>
476 const BoolListType& include,
559 friend Istream&
operator>> <Face>
568 friend Ostream& operator<< <Face>
vectorField pointField
pointField is a vectorField.
const surfZoneList & surfZones() const
Const access to the surface zones.
virtual ~MeshedSurface()
Destructor.
void checkZones()
Basic sanity check on zones.
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 Foam::string.
void swapZones(surfZoneList &zones)
Swap the stored zones.
List< Face > & storedFaces()
Non-const access to the faces.
A class for handling file names.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
ClassName("MeshedSurface")
Runtime type information.
virtual label triangulate()
Triangulate in-place, returning the number of triangles added.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
void swap(MeshedSurface< Face > &surf)
Swap contents.
Face FaceType
Face type used.
pointField & storedPoints()
Non-const access to global points.
virtual bool stitchFaces(const scalar tol=SMALL, const bool verbose=false)
const Foam::Enum< fileTag > fileExtension
File extension (without ".") for some vtk XML file content types.
MeshedSurface subsetMesh(const BoolListType &include, labelList &pointMap, labelList &faceMap) const
Return new surface.
void operator=(const MeshedSurface< Face > &surf)
Copy assignment.
const vectorField & Sf() const
Face area vectors (normals)
const List< Face > & surfFaces() const
Return const access to the faces.
virtual void scalePoints(const scalar scaleFactor)
Scale points. A non-positive factor is ignored.
A surface mesh consisting of general polygon faces.
Istream & operator>>(Istream &, directionInfo &)
virtual void clear()
Clear all storage.
void transcribe(MeshedSurface< face > &surf)
Transfer points/zones from 'face' to other other shapes.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
void sortFacesAndStore(DynamicList< Face > &unsortedFaces, DynamicList< label > &zoneIds, const bool sorted)
Sort faces by zones and store sorted faces.
bool addZonesToFaces()
Propagate zone information on face regions.
virtual bool checkFaces(const bool verbose=false)
static bool canWriteType(const word &ext, bool verbose=false)
Can we write this file format?
void writeStats(Ostream &os) const
static bool canRead(const fileName &name, bool verbose=false)
Can we read this file format?
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
const Field< PointType > & faceAreas() const
Return face area vectors for patch.
virtual void remapFaces(const labelUList &faceMap)
Set new zones from faceMap.
surfZoneList & storedZones()
Non-const access to the zones.
const scalarField & magSf() const
Face area magnitudes.
void transfer(pointField &pointLst, List< Face > &faceLst)
Transfer the components.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
word name(const complex &c)
Return string representation of complex.
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
virtual void removeZones()
Remove surface zones.
virtual label nTriangles() const
Count number of triangles.
void swapPoints(pointField &points)
Swap the stored points.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static wordHashSet readTypes()
Known readable file-types.
static bool canReadType(const word &ext, bool verbose=false)
Can we read this file format?
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
virtual void movePoints(const pointField &newPoints)
Move points.
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...
const Field< PointType > & faceCentres() const
Return face centres for patch.
static const word null
An empty word.
MeshedSurface()
Construct null, an empty surface.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
const Field< scalar > & magFaceAreas() const
Return face area magnitudes for patch.
static wordHashSet writeTypes()
Known writable file-types.
Macros to enable the easy declaration of member function selection tables.
const vectorField & Cf() const
Face centres.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
UList< label > labelUList
A UList of labels.
void swapFaces(List< Face > &faces)
Swap the stored faces.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
declareRunTimeSelectionTable(autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name))
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf, const dictionary &options),(name, surf, options))
label size() const
The surface size is the number of faces.
autoPtr< MeshedSurface< Face > > releaseGeom()
Release (clear) geometry and return for reuse.
Ostream & operator<<(Ostream &, const boundaryPatch &)
virtual void cleanup(const bool verbose)
Remove invalid faces.
static autoPtr< MeshedSurface > New(const fileName &name, const word &ext)
Select constructed from filename (explicit extension)
A list of faces which address into the list of points.