41 #ifndef Foam_surfMesh_H 42 #define Foam_surfMesh_H 58 template<
class Face>
class MeshedSurface;
110 void operator=(
const surfMesh&) =
delete;
222 virtual label
nFaces()
const;
225 virtual label
size()
const 315 template<
class Type,
class GeoMeshType = surfGeoMesh>
318 const word& fieldName,
326 template<
class Type,
class GeoMeshType = surfGeoMesh>
329 const word& fieldName,
344 const bool writeOnProc
362 const word& fileType,
bool BoundaryMesh
Placeholder only, but do not remove - it is needed for GeoMesh.
void updateRefs()
Update point/face references.
const Field< point_type > & faceAreas() const
Return face area vectors for patch.
writeOption
Enumeration defining write preferences.
const fileName & facesInstance() const
Return the current instance directory for faces.
virtual label size() const
Return number of faces.
A class for handling file names.
readUpdateState
Enumeration defining the state of the mesh after a read update.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
surfZoneList & storedZones()
Non-const access to the surface zones.
const word & name() const noexcept
Return the object name.
void storeField(const word &fieldName, const dimensionSet &dims, const Field< Type > &values)
Copy/store named field as face or point data (template parameter).
void write(const fileName &name, IOstreamOption streamOpt=IOstreamOption(), const dictionary &options=dictionary::null) const
Write to file, choosing writer based on its extension.
const fileName & pointsInstance() const
Return the current instance directory for points.
const vectorField & Sf() const
Return face area vectors (normals)
void clearFields()
Clear stored fields.
faceList & storedFaces()
Non-const access to the faces.
void clearGeom()
Clear geometry.
A simple container for options an IOstream can normally have.
void addZones(const surfZoneList &zones, bool validate=true)
Add surface zones, optionally validating the zone coverage.
const Field< scalar > & magFaceAreas() const
Return face area magnitudes for patch.
virtual readUpdateState readUpdate()
Update mesh based on the files saved in time directories.
Abstract definition of a meshed surface defined by faces and points.
Wraps the normal objectRegistry with a local instance for surfaces.
StringType validate(const std::string &str, const UnaryPredicate &accept, const bool invert=false)
Return a copy of the input string with validated characters.
void clearPrimitives()
Clear primitive data (points, faces and cells)
List< face > faceList
List of faces.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
A list of faces which address into the list of points.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
static word meshSubDir
Return the mesh sub-directory name (normally "surfMesh")
A class for handling words, derived from Foam::string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const faceList & faces() const
Return faces.
pointIOField & storedIOPoints()
Non-const access to the points.
const Field< point_type > & faceCentres() const
Return face centres for patch.
static const dictionary null
An empty dictionary, which is also the parent for all dictionaries.
virtual bool write(const bool writeOnProc=true) const
Write using setting from DB.
static const word null
An empty word.
void transfer(MeshedSurface< face > &surf, bool validate=false)
Transfer the contents of the argument and annul the argument.
void removeZones()
Remove surface zones.
virtual label nPoints() const
Return the number of raw points.
IOobject for a surfZoneList.
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
faceCompactIOList & storedIOFaces()
Non-const access to the faces.
const scalarField & magSf() const
Return face area magnitudes.
A surface mesh consisting of general polygon faces that has IO capabilities and a registry for storin...
void checkZones(const bool verbose=true)
Check the surface zone definitions.
void removeFiles() const
Remove all files from mesh instance()
surfMesh Mesh
Typedef required for GeoMesh.
void setInstance(const fileName &inst, IOobjectOption::writeOption wOpt=IOobjectOption::AUTO_WRITE)
Set the instance for mesh files.
virtual const surfZoneList & surfZones() const
Return surface zones.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write all components using given format, version and compression.
List< surfZone > surfZoneList
List of surfZone.
Automatically write from objectRegistry::writeObject()
pointField & storedPoints()
Non-const access to global points.
Field< vector > vectorField
Specialisation of Field<T> for vector.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
virtual label nFaces() const
Return the number of raw faces.
virtual const pointField & points() const
Return points.
TypeName("surfMesh")
Declare type-name, virtual type (with debug switch)
virtual ~surfMesh()
Destructor.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
Registry of regIOobjects.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
Defines the attributes of an object for which implicit objectRegistry management is supported...
autoPtr< MeshedSurface< face > > releaseGeom()
Release the geometry and return as a MeshedSurface<face>.
A helper class for storing points and faces with IO capabilities.
const vectorField & Cf() const
Face centres.
void clearAddressing()
Clear addressing.
void setWriteOption(IOobjectOption::writeOption wOpt)
Adjust the write option for all components.
void copySurface(const pointField &points, const faceList &faces, bool validate=false)
Update with new contents.