Go to the documentation of this file.
82 time().findInstance(meshDir(),
"points"),
91 time().findInstance(meshDir(),
"faces"),
100 time().findInstance(meshDir(),
"surfZones"),
203 <<
" name: " << io.
name()
205 <<
" local: " << io.
local()
207 Info<<
"creating surfMesh at instance " << instance() <<
endl;
208 Info<<
"timeName: " << instance() <<
endl;
243 static_cast<UList<face>&
>(*this) = this->storedFaces();
249 this->updatePointsRef();
250 this->updateFacesRef();
263 MeshReference::clearGeom();
265 Allocator::reset(
points, faces, zones);
281 MeshReference::clearGeom();
284 this->storedIOFaces().transfer(surf.
storedFaces());
285 this->storedIOZones().transfer(surf.
storedZones());
295 xf().storedPoints().transfer(this->storedPoints());
296 xf().storedFaces().transfer(this->storedFaces());
297 xf().storedZones().transfer(this->storedZones());
303 MeshReference::clearGeom();
311 return dbDir()/meshSubDir;
317 return this->storedIOPoints().instance();
323 return this->storedIOFaces().instance();
329 return this->
points().size();
335 return this->faces().size();
341 return this->storedIOPoints();
347 return this->storedIOFaces();
357 if (zones.
size() <= 1)
366 zones[zoneI].start() = count;
367 count += zones[zoneI].
size();
370 if (count < nFaces())
373 <<
"more faces " << nFaces() <<
" than zones " << count
374 <<
" ... extending final zone"
377 zones.last().
size() += count - nFaces();
379 else if (count > size())
382 <<
"more zones " << count <<
" than faces " << nFaces()
400 zones[zoneI] =
surfZone(srfZones[zoneI], zoneI);
413 fileName meshFilesPath = db().
path()/instanceDir/meshSubDir;
415 rm(meshFilesPath/
"points");
416 rm(meshFilesPath/
"faces");
417 rm(meshFilesPath/
"surfZones");
422 removeFiles(instance());
vectorField pointField
pointField is a vectorField.
const fileName & pointsInstance() const
Return the current instance directory for points.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
virtual void updatePointsRef()
Update references to storedPoints.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
A class for handling words, derived from string.
List< Face > & storedFaces()
Non-const access to the faces.
Wraps the normal objectRegistry with a local instance for surfaces.
A class for handling file names.
#define forAll(list, i)
Loop across all elements in list.
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
pointField & storedPoints()
Non-const access to global points.
bool rm(const fileName &)
Remove a file, returning true if successful otherwise false.
Template functions to aid in the implementation of demand driven data.
static void write(const fileName &, const MeshedSurfaceProxy< Face > &)
Write to file.
virtual void updateRefs()
Update references to storedPoints/storedFaces.
void addZones(const List< surfZone > &, const bool validate=true)
Add surface zones.
fileName path() const
Return directory path name (part before last /)
virtual bool write() const
Write using setting from DB.
A surface mesh consisting of general polygon faces.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fileName & instance() const
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats.
static word meshSubDir
Return the mesh sub-directory name (normally "surfMesh")
A simple container for copying or transferring objects of type <T>.
const objectRegistry & db() const
Return the local objectRegistry.
Xfer< MeshedSurface< face > > xfer()
Transfer contents to the Xfer container as a MeshedSurface.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
surfZoneList & storedZones()
Non-const access to the zones.
surfMesh(const surfMesh &)
Disallow construct as copy.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
virtual const faceList & faces() const
Return faces.
virtual label nPoints() const
Return the number of raw points.
void removeFiles() const
Remove all files from mesh instance()
virtual void updateFacesRef()
Update references to storedFaces.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual ~surfMesh()
Destructor.
virtual const surfZoneList & surfZones() const
Return surface zones.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual const pointField & points() const
Return points.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
A helper class for storing points, faces and zones with IO capabilities.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A surface zone on a MeshedSurface.
List< surfZone > surfZoneList
thermo validate(args.executable(), "h", "e")
void size(const label)
Override size to be inconsistent with allocated storage.
void checkZones()
Check the surface zone definitions.
fileName path() const
Return complete path.
defineTypeNameAndDebug(combustionModel, 0)
virtual label nFaces() const
Return the number of raw faces.
void transfer(MeshedSurface< face > &)
Transfer the contents of the argument and annul the argument.
#define WarningInFunction
Report a warning using Foam::Warning.
const fileName & local() const
void resetPrimitives(const Xfer< pointField > &points, const Xfer< faceList > &faces, const Xfer< surfZoneList > &zones, const bool validate=true)
Reset mesh primitive data.
word name(const complex &)
Return a string representation of a complex.
const fileName & facesInstance() const
Return the current instance directory for faces.