55 #ifndef MeshedSurface_H 56 #define MeshedSurface_H 89 Ostream& operator<<(Ostream&, const MeshedSurface<Face>&);
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();
463 const UList<surfZone>&,
464 const bool cullEmpty=
false 471 const UList<word>&
names,
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);
668 void operator=(
const MeshedSurface<Face>& surf);
671 void operator=(MeshedSurface<Face>&& surf);
674 operator MeshedSurfaceProxy<Face>()
const;
681 friend Istream&
operator>> <Face>
684 MeshedSurface<Face>& surf
690 friend Ostream& operator<< <Face>
A surface geometry mesh, in which the surface zone information is conveyed by the 'zoneId' associated...
Face face_type
The face type (same as the underlying PrimitivePatch)
const Field< point_type > & faceAreas() const
Return face area vectors for patch.
virtual void compactPoints(labelList &pointMap=const_cast< labelList &>(labelList::null()))
Remove unused points and renumber faces in local visit order.
virtual void scalePoints(const scalar scaleFactor)
Scale points. A non-positive factor is ignored.
List< word > names(const UPtrList< T > &list, const UnaryMatchPredicate &matcher)
List of names generated by calling name() for each list item and filtered for matches.
A class for handling file names.
void transcribe(MeshedSurface< face > &surf)
Transfer points/zones from 'face' to other other shapes.
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const MeshedSurface< Face > &surf, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, options))
point point_type
The point type (same as the underlying PrimitivePatch)
virtual ~MeshedSurface()
Destructor.
autoPtr< MeshedSurface< Face > > releaseGeom()
Release (clear) geometry and return for reuse.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
const vectorField & Sf() const
Face area vectors (normals)
static autoPtr< MeshedSurface > New(const fileName &name, const word &fileType, bool mandatory=true)
Read construct from filename with given file type.
bool addZonesToFaces()
Propagate zone information on face regions.
A surface geometry mesh with zone information, not to be confused with the similarly named surfaceMes...
void writeStats(Ostream &os) const
static bool canRead(const fileName &name, bool verbose=false)
Can we read this file format?
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
static wordHashSet writeTypes()
Known writable file-types, without friends or proxies.
virtual void clear()
Clear all storage.
A simple container for options an IOstream can normally have.
static const List< label > & null()
Return a null List.
const Field< scalar > & magFaceAreas() const
Return face area magnitudes for patch.
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")
Declare type-name (with debug switch)
UList< label > labelUList
A UList of labels.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
declareRunTimeSelectionTable(autoPtr, MeshedSurface, fileExtension,(const fileName &name),(name))
void swapPoints(pointField &points)
Swap the stored points.
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
A list of faces which address into the list of points.
vectorField pointField
pointField is a vectorField.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
static wordHashSet readTypes()
Known readable file-types, without friends or proxies.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
List< Face > & storedFaces()
Non-const access to the faces.
A class for handling words, derived from Foam::string.
const scalarField & magSf() const
Face area magnitudes.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Istream & operator>>(Istream &, directionInfo &)
void swap(MeshedSurface< Face > &surf)
Swap contents.
const Field< point_type > & faceCentres() const
Return face centres for patch.
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.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
virtual void movePoints(const pointField &newPoints)
Move points.
static const word null
An empty word.
A List of wordRe with additional matching capabilities.
MeshedSurface subsetMesh(const UList< bool > &include, labelList &pointMap, labelList &faceMap) const
Return a new surface subsetted on the selected faces.
void operator=(const MeshedSurface< Face > &surf)
Copy assignment.
const Field< point_type > & points() const noexcept
Return reference to global points.
labelList & storedFaceIds()
Non-const access to face ids.
A polyBoundaryMesh is a polyPatch list with additional search methods and registered IO...
const labelList & faceIds() const
Return const access to faces ids.
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
const List< Face > & surfFaces() const
Return const access to the faces.
OBJstream os(runTime.globalPath()/outputName)
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...
List< surfZone > surfZoneList
void sortFacesAndStore(DynamicList< Face > &unsortedFaces, DynamicList< label > &zoneIds, DynamicList< label > &elemIds, bool sorted)
Sort faces by zones and store sorted faces.
virtual label nTriangles() const
Count number of triangles.
Macros to ease declaration of member function selection tables.
Calculates points shared by more than two processor patches or cyclic patches.
label size() const
The surface size is the number of faces.
A bitSet stores bits (elements with only two states) in packed internal format and supports a variety...
const Foam::Enum< fileTag > fileExtension
File extension (without ".") for some vtk XML file content types.
void checkZones(const bool verbose=true)
Sanity check/resizing on zones.
static bool canReadType(const word &fileType, bool verbose=false)
Can we read this file format? Also checks friend types.
virtual bool checkFaces(const bool verbose=false)
const vectorField & Cf() const
Face centres.
void transfer(pointField &pointLst, List< Face > &faceLst)
Transfer the components.
virtual void remapFaces(const labelUList &faceMapNewToOld)
Set new zones from faceMap.
label size() const noexcept
The number of elements in the UList.
void swapFaces(List< Face > &faces)
Swap the stored faces. Use with caution.
virtual void addZones(const UList< surfZone > &, const bool cullEmpty=false)
Add surface zones.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void subsetMeshMap(const BoolListType &include, labelList &pointMap, labelList &faceMap) const
Create mappings for a sub-surface.
Macros to ease declaration of run-time selection tables.
List< label > labelList
A List of labels.
const surfZoneList & surfZones() const
Const access to the surface zones.
Defines the attributes of an object for which implicit objectRegistry management is supported...
MeshedSurface()
Default construct, an empty surface.
virtual bool stitchFaces(const scalar tol=SMALL, const bool verbose=false)