49#ifndef Foam_UnsortedMeshedSurface_H
50#define Foam_UnsortedMeshedSurface_H
115 void resize(
const label,
const Face&) =
delete;
118 void setSize(
const label,
const Face&) =
delete;
244 const bool isGlobal =
true
271 const word& fileType,
272 bool mandatory =
true
297 (
name, surf, streamOpt, options)
314 const word& fileType,
367 virtual void clear();
374 template<
class BoolListType>
377 const BoolListType& include,
464 const word& fileType,
469 write(
name, fileType, *
this, streamOpt, options);
496 friend Istream&
operator>> <Face>
Defines the attributes of an object for which implicit objectRegistry management is supported,...
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 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
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...
label size() const
The surface size is the number of faces.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
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).
virtual void write(const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
Write to file, choosing writer based on the file extension.
UnsortedMeshedSurface(Istream &is)
Construct from Istream.
UnsortedMeshedSurface(const MeshedSurface< Face > &surf)
Construct from a MeshedSurface.
static void write(const fileName &name, const UnsortedMeshedSurface< face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
declareRunTimeSelectionTable(autoPtr, UnsortedMeshedSurface, fileExtension,(const fileName &name),(name))
void operator=(UnsortedMeshedSurface< Face > &&surf)
Move assignment.
void transfer(MeshedSurface< Face > &surf)
Transfer the contents of the argument and annul the argument.
static bool canWriteType(const word &fileType, bool verbose=false)
Can we write this file format? Also checks friend types.
autoPtr< labelList > releaseZoneIds()
Release (clear) stored zoneIds and return for reuse.
UnsortedMeshedSurface(UnsortedMeshedSurface< Face > &&surf)
Move construct from a UnsortedMeshedSurface.
void setZones(const labelUList &sizes, const UList< word > &names)
Set zone ids and zones.
UnsortedMeshedSurface subsetMesh(const bitSet &include) const
Return a new surface subsetted on the selected faces.
surfZoneList sortedZones(labelList &faceMap) const
Sort faces according to zoneIds.
UnsortedMeshedSurface(MeshedSurface< Face > &&surf)
Move construct from MeshedSurface.
static wordHashSet writeTypes()
Known writable file-types, without friends or proxies.
UnsortedMeshedSurface subsetMesh(const bitSet &include, labelList &pointMap, labelList &faceMap) const
Return a new surface subsetted on the selected faces.
static void write(const fileName &name, const word &fileType, const UnsortedMeshedSurface< Face > &surf, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null)
Write to file with given format type.
void setZones(const labelUList &sizes)
Set zone ids and zones with default names.
void write(const Time &t, const word &surfName=word::null) const
Write to database.
virtual bool read(const fileName &name)
Read from file. Chooses reader based on detected extension.
virtual void remapFaces(const labelUList &faceMapNewToOld)
Set new zones from faceMap.
virtual void write(const fileName &name, const word &fileType, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
Write to file with given format type.
void setZones(const surfZoneList &zoneLst)
Set zone ids and zones.
static bool canReadType(const word &fileType, bool verbose=false)
Can we read this file format? Also checks friend types.
void transfer(UnsortedMeshedSurface< Face > &surf)
Transfer the contents of the argument and annul the argument.
bool read(const fileName &name, const word &fileType)
Read from file with given format type.
static autoPtr< UnsortedMeshedSurface > New(const fileName &name)
Read construct from filename (implicit extension).
virtual const labelList & zoneIds() const
labelList & storedZoneIds()
Return non-const access to the zone Ids.
static bool canRead(const fileName &name, bool verbose=false)
Can we read this file format?
UnsortedMeshedSurface(const UnsortedMeshedSurface< Face > &surf)
Copy construct.
label size() const
The surface size is the number of faces.
UnsortedMeshedSurface subsetMesh(const UList< bool > &include) const
Return a new surface subsetted on the selected faces.
UnsortedMeshedSurface(const IOobject &io, const dictionary &dict, const bool isGlobal=true)
Read construct using IO to find the file location.
UnsortedMeshedSurface()
Default construct.
virtual ~UnsortedMeshedSurface()=default
Destructor.
List< surfZoneIdentifier > & storedZoneToc()
Return non-const access to the zone table-of-contents.
void operator=(const UnsortedMeshedSurface< Face > &surf)
Copy assignment.
TypeName("UnsortedMeshedSurface")
Declare type-name, virtual type (with debug switch).
void subsetMeshMap(const BoolListType &include, labelList &pointMap, labelList &faceMap) const
Create mappings for a sub-surface.
declareMemberFunctionSelectionTable(void, UnsortedMeshedSurface, write, fileExtension,(const fileName &name, const UnsortedMeshedSurface< Face > &surf, IOstreamOption streamOpt, const dictionary &options),(name, surf, streamOpt, options))
UnsortedMeshedSurface(pointField &&pointLst, List< Face > &&faceLst, List< label > &&zoneIds, UList< surfZoneIdentifier > &tocInfo)
Move construct from components (points, faces, zone ids).
void setOneZone()
Set zones to 0 and set a single zone.
virtual void clear()
Clear all storage.
point point_type
The point type (same as the underlying PrimitivePatch).
friend class UnsortedMeshedSurface
static autoPtr< UnsortedMeshedSurface > New(const fileName &name, const word &fileType, bool mandatory=true)
Read construct from filename with given file type.
UnsortedMeshedSurface(const fileName &name)
Construct from file name (uses extension to determine type).
friend class MeshedSurface
const List< surfZoneIdentifier > & zoneToc() const
Return const access to the zone table-of-contents.
UnsortedMeshedSurface(const Time &runTime, const word &surfName)
Construct from database (as surfMesh) with given surface name.
void setSize(const label)
Reset size of face and zone list.
UnsortedMeshedSurface(const Time &runTime)
Construct from database (as surfMesh) with default name.
void swap(UnsortedMeshedSurface< Face > &surf)
Swap contents.
UnsortedMeshedSurface(const fileName &name, const word &fileType)
Construct from file name with given format type.
void swap(MeshedSurface< Face > &surf)=delete
Swap contents - disabled.
UnsortedMeshedSurface subsetMesh(const UList< bool > &include, labelList &pointMap, labelList &faceMap) const
Return a new surface subsetted on the selected faces.
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.
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,...
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
A class for handling file names.
A class for handling words, derived from Foam::string.
static const word null
An empty word.
patchWriters resize(patchIds.size())
OBJstream os(runTime.globalPath()/outputName)
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)
HashSet< word, Hash< word > > wordHashSet
A HashSet of words, uses string hasher.
List< label > labelList
A List of labels.
List< surfZone > surfZoneList
List of surfZone.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces).
Istream & operator>>(Istream &, directionInfo &)
vector point
Point is a vector.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
vectorField pointField
pointField is a vectorField.
UList< label > labelUList
A UList of labels.
points setSize(newPointi)
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).
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.