42 Foam::word Foam::surfMesh::meshSubDir =
"surfMesh";
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()
341 if (zones.
size() <= 1)
350 zones[zoneI].start() =
count;
351 count += zones[zoneI].
size();
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);
399 rm(meshFilesPath/
"points");
400 rm(meshFilesPath/
"faces");
401 rm(meshFilesPath/
"surfZones");
virtual void updateRefs()
Update references to storedPoints/storedFaces.
const fileName & facesInstance() const
Return the current instance directory for faces.
#define forAll(list, i)
Loop across all elements in list.
virtual label size() const
Return number of faces.
const word & name() const
Return name.
faceCompactIOList & storedIOFaces()
Non-const access to the faces.
A class for handling file names.
errorManipArg< error, int > exit(error &err, const int errNo=1)
virtual void updatePointsRef()
Update references to storedPoints.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const fileName & pointsInstance() const
Return the current instance directory for points.
surfaceRegistry(const objectRegistry &, const word &surfName="")
Construct for the given objectRegistry and named surface.
A surface zone on a MeshedSurface.
void size(const label)
Override size to be inconsistent with allocated storage.
Ostream & endl(Ostream &os)
Add newline and flush stream.
void addZones(const List< surfZone > &, const bool validate=true)
Add surface zones.
label count(const ListType &l, typename ListType::const_reference x)
Count the number of occurrences of a value in a list.
fileName path(const word &instance, const fileName &local="") const
Return complete path with alternative instance and local.
Pre-declare related SubField type.
pointIOField & storedIOPoints()
Non-const access to the points.
surfZoneList & storedZones()
Non-const access to the zones.
static void write(const fileName &, const surfMesh &)
Write to file.
Wraps the normal objectRegistry with a local instance for surfaces.
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
vectorField pointField
pointField is a vectorField.
List< Face > & storedFaces()
Non-const access to the faces.
Pre-declare SubField and related Field type.
static word meshSubDir
Return the mesh sub-directory name (normally "surfMesh")
A class for handling words, derived from string.
virtual const faceList & faces() const
Return faces.
const fileName & local() const
pointField & storedPoints()
Non-const access to global points.
fileName path(const bool global) const
Return complete path including the processor sub-directory.
virtual void updateFacesRef()
Update references to storedFaces.
surfZoneIOList & storedIOZones()
Non-const access to the zones.
void removeZones()
Update the mesh corresponding to given map.
virtual label nPoints() const
Return the number of raw points.
A helper class for storing points, faces and zones with IO capabilities.
surfMesh(const IOobject &, const word &surfName="")
Construct from IOobject, with alternative surface name.
A surface mesh consisting of general polygon faces.
defineTypeNameAndDebug(combustionModel, 0)
A proxy for writing MeshedSurface, UnsortedMeshedSurface and surfMesh to various file formats...
void reset(pointField &&points, faceList &&faces, surfZoneList &&zones)
Reset primitive data (points, faces and zones)
void removeFiles() const
Remove all files from mesh instance()
void resetPrimitives(pointField &&points, faceList &&faces, surfZoneList &&zones, const bool validate=true)
Reset mesh primitive data.
word name(const complex &)
Return a string representation of a complex.
List< surfZone > surfZoneList
bool notNull(const T &t)
Return true if t is not a reference to the nullObject of type T.
Template functions to aid in the implementation of demand driven data.
void transfer(MeshedSurface< face > &)
Transfer the contents of the argument and annul the argument.
#define WarningInFunction
Report a warning using Foam::Warning.
virtual const surfZoneList & surfZones() const
Return surface zones.
virtual const fileName & dbDir() const
Local directory path of this objectRegistry relative to the time.
virtual label nFaces() const
Return the number of raw faces.
void checkZones()
Check the surface zone definitions.
fileName & instance() const
Return the instance directory, constant, system, <time> etc.
virtual const pointField & points() const
Return points.
virtual ~surfMesh()
Destructor.
bool rm(const fileName &)
Remove a file, returning true if successful otherwise false.
T & last()
Return the last element of the list.
const objectRegistry & db() const
Return the local objectRegistry.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir)
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
void transfer(List< T > &)
Transfer the contents of the argument List into this list.