Go to the documentation of this file.
55 #ifndef MeshedSurface_H
56 #define MeshedSurface_H
78 class polyBoundaryMesh;
327 const bool isGlobal =
true
354 const word& fileType,
355 bool mandatory =
true
380 (
name, surf, streamOpt, options)
396 const word& fileType,
410 return MeshReference::size();
457 virtual void clear();
464 const bool cullEmpty=
false
472 const bool cullEmpty=
false
479 const bool cullEmpty=
false
496 virtual void scalePoints(
const scalar scaleFactor);
499 virtual void cleanup(
const bool verbose);
511 const scalar tol=SMALL,
512 const bool verbose=
false
517 const bool verbose=
false
540 template<
class BoolListType>
543 const BoolListType& include,
648 const word& fileType,
653 write(
name, fileType, *
this, streamOpt, options);
681 friend Istream&
operator>> <Face>
690 friend Ostream& operator<< <Face>
const Field< point_type > & points() const noexcept
Return reference to global points.
const labelList & faceIds() const
Return const access to faces ids.
point point_type
The point type (same as the underlying PrimitivePatch)
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const surfZoneList & surfZones() const
Const access to the surface zones.
virtual ~MeshedSurface()
Destructor.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static const List< T > & null()
Return a null List.
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)
A class for handling words, derived from Foam::string.
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.
labelList & storedFaceIds()
Non-const access to face ids.
static bool canReadType(const word &fileType, bool verbose=false)
Can we read this file format? Also checks friend types.
ClassName("MeshedSurface")
Declare type-name (with debug switch)
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.
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.
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 that has IO capabilities and a registry for storin...
Istream & operator>>(Istream &, directionInfo &)
virtual void clear()
Clear all storage.
void transcribe(MeshedSurface< face > &surf)
Transfer points/zones from 'face' to other other shapes.
static bool canWriteType(const word &fileType, bool verbose=false)
Can we write this file format? Also checks proxy types.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
bool addZonesToFaces()
Propagate zone information on face regions.
virtual bool checkFaces(const bool verbose=false)
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.
Face face_type
The face type (same as the underlying PrimitivePatch)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
surfZoneList & storedZones()
Non-const access to the zones.
void checkZones(const bool verbose=true)
Sanity check/resizing on zones.
const scalarField & magSf() const
Face area magnitudes.
void transfer(pointField &pointLst, List< Face > &faceLst)
Transfer the components.
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, options))
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...
const Field< point_type > & faceAreas() const
Return face area vectors for patch.
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
virtual void removeZones()
Remove surface zones.
The IOstreamOption is a simple container for options an IOstream can normally have.
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,...
OBJstream os(runTime.globalPath()/outputName)
static wordHashSet readTypes()
Known readable file-types, without friends or proxies.
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.
static autoPtr< MeshedSurface > New(const fileName &name, const word &fileType, bool mandatory=true)
Read construct from filename with given file type.
void sortFacesAndStore(DynamicList< Face > &unsortedFaces, DynamicList< label > &zoneIds, DynamicList< label > &elemIds, bool sorted)
Sort faces by zones and store sorted faces.
void subsetMeshMap(const BoolListType &include, labelList &pointMap, labelList &faceMap) const
Create mappings for a sub-surface.
A List of wordRe with additional matching capabilities.
static const word null
An empty word.
MeshedSurface()
Default construct, an empty surface.
List< surfZone > surfZoneList
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, without friends or proxies.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
Macros to ease 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. Use with caution.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
declareRunTimeSelectionTable(autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name))
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
label size() const
The surface size is the number of faces.
const Field< point_type > & faceCentres() const
Return face centres for patch.
MeshedSurface subsetMesh(const UList< bool > &include, labelList &pointMap, labelList &faceMap) const
Return a new surface subsetted on the selected faces.
virtual void compactPoints(labelList &pointMap=const_cast< labelList & >(labelList::null()))
Remove unused points and renumber faces in local visit order.
virtual void remapFaces(const labelUList &faceMapNewToOld)
Set new zones from faceMap.
autoPtr< MeshedSurface< Face > > releaseGeom()
Release (clear) geometry and return for reuse.
virtual void cleanup(const bool verbose)
Remove invalid faces.
A list of faces which address into the list of points.