44 surfZones_.instance() = inst;
54 surfZones_.writeOpt(wOpt);
63 fileName pointsInst(time().findInstance(meshDir(),
"points"));
64 fileName facesInst(time().findInstance(meshDir(),
"faces"));
67 <<
"Points instance: old = " << pointsInstance()
68 <<
" new = " << pointsInst <<
nl
69 <<
"Faces instance: old = " << facesInstance()
70 <<
" new = " << facesInst <<
endl;
72 if (facesInst != facesInstance())
76 <<
"Topological change" <<
endl;
82 setInstance(facesInst);
83 storedIOPoints().instance() = pointsInst;
129 bool zonesChanged =
false;
131 if (surfZones_.size() != newZones.size())
139 if (surfZones_[zoneI].
name() != newZones[zoneI].
name())
147 surfZones_.transfer(newZones);
152 <<
"Unexpected consequences. Proceed with care." <<
endl;
161 else if (pointsInst != pointsInstance())
167 storedIOPoints().instance() = pointsInst;
196 IOstreamOption streamOpt,
197 const bool writeOnProc
200 bool ok = Allocator::writeObject(streamOpt, writeOnProc);
204 surfZones_.writeObject(streamOpt, writeOnProc);
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write using stream options.
pointIOField & storedIOPoints() noexcept
Non-const access to the points.
void setInstance(const fileName &inst)
Set the instance for mesh files.
void setWriteOption(IOobjectOption::writeOption wOpt)
Adjust the write option for all components.
@ NO_REGISTER
Do not request registration (bool: false).
writeOption writeOpt() const noexcept
Get the write option.
@ MUST_READ
Reading required.
@ LAZY_READ
Reading is optional [identical to READ_IF_PRESENT].
writeOption
Enumeration defining write preferences.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const fileName & instance() const noexcept
Read access to instance path component.
A simple container for options an IOstream can normally have.
void size(const label n)
Older name for setAddressableSize.
A class for handling file names.
const Time & time() const noexcept
Return time registry.
virtual bool writeObject(IOstreamOption streamOpt, const bool writeOnProc) const
Write all components using given format, version and compression.
const fileName & facesInstance() const
Return the current instance directory for faces.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir).
faceList & storedFaces()
Non-const access to the faces.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual readUpdateState readUpdate()
Update mesh based on the files saved in time directories.
const fileName & pointsInstance() const
Return the current instance directory for points.
void setInstance(const fileName &inst, IOobjectOption::writeOption wOpt=IOobjectOption::AUTO_WRITE)
Set the instance for mesh files.
static word meshSubDir
Return the mesh sub-directory name (normally "surfMesh").
void clearOut()
Clear all geometry and addressing unnecessary for CFD.
void setWriteOption(IOobjectOption::writeOption wOpt)
Adjust the write option for all components.
IOobject for a surfZoneList.
#define DebugInfo
Report an information message using Foam::Info.
#define WarningInFunction
Report a warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
CompactIOList< face > faceCompactIOList
Compact IO for a List of face.
vectorIOField pointIOField
pointIOField is a vectorIOField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
constexpr char nl
The newline '\n' character (0x0a).
#define forAll(list, i)
Loop across all elements in list.