87 shallowCopy(this->storedFaces());
93 this->updatePointsRef();
94 this->updateFacesRef();
108 time().findInstance(meshDir(),
"points"),
117 time().findInstance(meshDir(),
"faces"),
126 time().findInstance(meshDir(),
"surfZones"),
229 <<
" name: " << io.
name()
231 <<
" local: " << io.
local()
265 MeshReference::clearGeom();
267 Allocator::reset(move(
points), move(faces), move(zones));
283 MeshReference::clearGeom();
286 this->storedIOFaces().transfer(surf.
storedFaces());
287 this->storedIOZones().transfer(surf.
storedZones());
295 return dbDir()/meshSubDir;
301 return this->storedIOPoints().instance();
307 return this->storedIOFaces().instance();
319 return this->faces().size();
325 return this->storedIOPoints();
331 return this->storedIOFaces();
341 if (zones.
size() <= 1)
350 zones[zoneI].start() =
count;
354 if (
count < nFaces())
357 <<
"more faces " << nFaces() <<
" than zones " <<
count
358 <<
" ... extending final zone"
363 else if (
count > size())
366 <<
"more zones " <<
count <<
" than faces " << nFaces()
384 zones[zoneI] =
surfZone(srfZones[zoneI], zoneI);
397 fileName meshFilesPath = db().
path(instanceDir, meshSubDir);
399 rm(meshFilesPath/
"points");
400 rm(meshFilesPath/
"faces");
401 rm(meshFilesPath/
"surfZones");
406 removeFiles(instance());
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
#define forAll(list, i)
Loop across all elements in list.
Pre-declare SubField and related Field type.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
const fileName & local() const
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
const objectRegistry & db() const
Return the local objectRegistry.
const word & name() const
Return name.
fileName path(const bool global) const
Return complete path including the processor sub-directory.
void size(const label)
Override size to be inconsistent with allocated storage.
A helper class for storing points, faces and zones with IO capabilities.
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
static void write(const fileName &, const MeshedSurfaceProxy< Face > &)
Write to file.
pointField & storedPoints()
Non-const access to global points.
surfZoneList & storedZones()
Non-const access to the zones.
List< Face > & storedFaces()
Non-const access to the faces.
const Field< PointType > & points() const
Return reference to global points.
Pre-declare related SubField type.
T & last()
Return the last element of the list.
A class for handling file names.
fileName path() const
Return directory path name (part before last /)
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
A surface mesh consisting of general polygon faces.
virtual void updatePointsRef()
Update references to storedPoints.
void addZones(const List< surfZone > &, const bool validate=true)
Add surface zones.
const fileName & facesInstance() const
Return the current instance directory for faces.
void transfer(MeshedSurface< face > &)
Transfer the contents of the argument and annul the argument.
static void write(const fileName &, const surfMesh &)
Write to file.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
pointField & storedPoints()
Non-const access to global points.
virtual const faceList & faces() const
Return faces.
surfMesh(const IOobject &, const word &surfName="")
Construct from IOobject, with alternative surface name.
virtual ~surfMesh()
Destructor.
virtual void updateRefs()
Update references to storedPoints/storedFaces.
const fileName & pointsInstance() const
Return the current instance directory for points.
void resetPrimitives(pointField &&points, faceList &&faces, surfZoneList &&zones, const bool validate=true)
Reset mesh primitive data.
virtual const pointField & points() const
Return points.
void removeFiles() const
Remove all files from mesh instance()
virtual const surfZoneList & surfZones() const
Return surface zones.
virtual label nPoints() const
Return the number of raw points.
static word meshSubDir
The mesh sub-directory name (normally "surfMesh")
virtual void updateFacesRef()
Update references to storedFaces.
void checkZones()
Check the surface zone definitions.
virtual label nFaces() const
Return the number of raw faces.
A surface zone on a MeshedSurface.
Wraps the normal objectRegistry with a local instance for surfaces.
A class for handling words, derived from string.
Template functions to aid in the implementation of demand driven data.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define WarningInFunction
Report a warning using Foam::Warning.
void write(std::ostream &os, const bool binary, List< floatScalar > &fField)
Write floats ascii or binary.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool rm(const fileName &)
Remove a file, returning true if successful otherwise false.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
defineTypeNameAndDebug(combustionModel, 0)
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
thermo validate(args.executable(), "h")