55#ifndef MeshedSurface_H
56#define MeshedSurface_H
78class polyBoundaryMesh;
82template<
class Face>
class MeshedSurface;
83template<
class Face>
class MeshedSurfaceProxy;
84template<
class Face>
class UnsortedMeshedSurface;
327 const bool isGlobal =
true
354 const word& fileType,
355 bool mandatory =
true
380 (
name, surf, streamOpt, options)
396 const word& fileType,
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>
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
The IOstreamOption is a simple container for options an IOstream can normally have.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
Face face_type
The face type (same as the underlying PrimitivePatch)
virtual void write(const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
Generic write routine. Chooses writer based on extension.
MeshedSurface subsetMesh(const UList< bool > &include, labelList &pointMap, labelList &faceMap) const
Return a new surface subsetted on the selected faces.
virtual void movePoints(const pointField &newPoints)
Move points.
surfZoneList & storedZones()
Non-const access to the zones.
static bool canWriteType(const word &fileType, bool verbose=false)
Can we write this file format? Also checks proxy types.
labelList & storedFaceIds()
Non-const access to face ids.
const surfZoneList & surfZones() const
Const access to the surface zones.
const vectorField & Sf() const
Face area vectors (normals)
pointField & storedPoints()
Non-const access to global points.
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
static wordHashSet writeTypes()
Known writable file-types, without friends or proxies.
const scalarField & magSf() const
Face area magnitudes.
static autoPtr< MeshedSurface > New(const fileName &name, const word &fileType, bool mandatory=true)
Read construct from filename with given file type.
MeshedSurface(MeshedSurface &&surf)
Move construct.
virtual void remapFaces(const labelUList &faceMapNewToOld)
Set new zones from faceMap.
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, options))
void transfer(pointField &pointLst, List< Face > &faceLst)
Transfer the components.
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 void cleanup(const bool verbose)
Remove invalid faces.
virtual ~MeshedSurface()
Destructor.
declareRunTimeSelectionTable(autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name))
virtual label triangulate()
Triangulate in-place, returning the number of triangles added.
void swapPoints(pointField &points)
Swap the stored points.
virtual void compactPoints(labelList &pointMap=const_cast< labelList & >(labelList::null()))
Remove unused points and renumber faces in local visit order.
const vectorField & Cf() const
Face centres.
MeshedSurface(const MeshedSurface &surf)
Copy construct.
static bool canRead(const fileName &name, bool verbose=false)
Can we read this file format?
void checkZones(const bool verbose=true)
Sanity check/resizing on zones.
label size() const
The surface size is the number of faces.
const labelList & faceIds() const
Return const access to faces ids.
void sortFacesAndStore(DynamicList< Face > &unsortedFaces, DynamicList< label > &zoneIds, DynamicList< label > &elemIds, bool sorted)
Sort faces by zones and store sorted faces.
const List< Face > & surfFaces() const
Return const access to the faces.
void subsetMeshMap(const BoolListType &include, labelList &pointMap, labelList &faceMap) const
Create mappings for a sub-surface.
autoPtr< MeshedSurface< Face > > releaseGeom()
Release (clear) geometry and return for reuse.
virtual label nTriangles() const
Count number of triangles.
List< Face > & storedFaces()
Non-const access to the faces.
void writeStats(Ostream &os) const
void transcribe(MeshedSurface< face > &surf)
Transfer points/zones from 'face' to other other shapes.
void swap(MeshedSurface< Face > &surf)
Swap contents.
virtual void clear()
Clear all storage.
point point_type
The point type (same as the underlying PrimitivePatch)
virtual bool stitchFaces(const scalar tol=SMALL, const bool verbose=false)
virtual void scalePoints(const scalar scaleFactor)
Scale points. A non-positive factor is ignored.
friend class MeshedSurface
virtual bool checkFaces(const bool verbose=false)
void operator=(const MeshedSurface< Face > &surf)
Copy assignment.
virtual void removeZones()
Remove surface zones.
void swapFaces(List< Face > &faces)
Swap the stored faces. Use with caution.
static wordHashSet readTypes()
Known readable file-types, without friends or proxies.
bool addZonesToFaces()
Propagate zone information on face regions.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A list of faces which address into the list of points.
const Field< point_type > & points() const noexcept
Return reference to global points.
const Field< point_type > & faceAreas() const
Return face area vectors for patch.
const Field< point_type > & faceCentres() const
Return face centres for patch.
const Field< scalar > & magFaceAreas() const
Return face area magnitudes for patch.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A class for handling file names.
Calculates points shared by more than two processor patches or cyclic patches.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO.
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
A List of wordRe with additional matching capabilities.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
OBJstream os(runTime.globalPath()/outputName)
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
Macros to ease declaration of member function selection tables.
#define declareMemberFunctionSelectionTable(returnType, baseType, funcName, argNames, argList, parListUnused)
Declare a run-time member-function selection (variables and adder classes)
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
Istream & operator>>(Istream &, directionInfo &)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
List< surfZone > surfZoneList
UList< label > labelUList
A UList of labels.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)