55 #ifndef Foam_MeshedSurface_H 56 #define Foam_MeshedSurface_H 86 Ostream& operator<<(Ostream&, const MeshedSurface<Face>&);
324 const bool isGlobal =
true 351 const word& fileType,
352 bool mandatory =
true 377 (
name, surf, streamOpt, options)
393 const word& fileType,
454 virtual void clear();
460 const UList<surfZone>&,
461 const bool cullEmpty=
false 468 const UList<word>&
names,
469 const bool cullEmpty=
false 476 const bool cullEmpty=
false 493 virtual void scalePoints(
const scalar scaleFactor);
496 virtual void cleanup(
const bool verbose);
508 const scalar tol=SMALL,
509 const bool verbose=
false 514 const bool verbose=
false 537 template<
class BoolListType>
540 const BoolListType& include,
645 const word& fileType,
650 write(
name, fileType, *
this, streamOpt, options);
665 void operator=(
const MeshedSurface<Face>& surf);
668 void operator=(MeshedSurface<Face>&& surf);
671 operator MeshedSurfaceProxy<Face>()
const;
678 friend Istream&
operator>> <Face>
681 MeshedSurface<Face>& surf
687 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.
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...
label size() const noexcept
The number of elements in the List.
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...
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.
List< surfZone > surfZoneList
List of surfZone.
void transfer(pointField &pointLst, List< Face > &faceLst)
Transfer the components.
virtual void remapFaces(const labelUList &faceMapNewToOld)
Set new zones from faceMap.
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.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
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)