37 if (tetBasePtIsPtr_.valid())
39 tetBasePtIsPtr_->writeOpt() = wo;
48 faces_.writeOpt() = wo;
49 owner_.writeOpt() = wo;
50 neighbour_.writeOpt() = wo;
51 boundary_.writeOpt() = wo;
52 pointZones_.writeOpt() = wo;
53 faceZones_.writeOpt() = wo;
54 cellZones_.writeOpt() = wo;
65 points_.instance() = inst;
66 points_.eventNo() = getEvent();
68 if (tetBasePtIsPtr_.valid())
70 tetBasePtIsPtr_->instance() = inst;
71 tetBasePtIsPtr_().eventNo() = getEvent();
85 setPointsInstance(inst);
87 faces_.instance() = inst;
88 owner_.instance() = inst;
89 neighbour_.instance() = inst;
90 boundary_.instance() = inst;
91 pointZones_.instance() = inst;
92 faceZones_.instance() = inst;
93 cellZones_.instance() = inst;
107 fileName pointsInst(time().findInstance(meshDir(),
"points"));
108 fileName facesInst(time().findInstance(meshDir(),
"faces"));
112 Info<<
"Faces instance: old = " << facesInstance()
113 <<
" new = " << facesInst <<
nl
114 <<
"Points instance: old = " << pointsInstance()
115 <<
" new = " << pointsInst <<
endl;
118 if (facesInst != facesInstance())
123 Info<<
"Topological change" <<
endl;
142 points_.instance() = pointsInst;
158 faces_.instance() = facesInst;
174 owner_.instance() = facesInst;
190 neighbour_.instance() = facesInst;
209 bool boundaryChanged =
false;
211 if (newBoundary.
size() != boundary_.size())
213 boundaryChanged =
true;
220 wordList oldTypes = boundary_.types();
221 wordList oldNames = boundary_.names();
231 boundaryChanged =
true;
240 boundary_.setSize(newBoundary.
size());
254 newBoundary[
patchi].size(),
255 newBoundary[
patchi].start(),
263 boundary_.instance() = facesInst;
269 if (!owner_.headerClassName().empty())
299 boundary_.topoChange();
302 boundary_.calcGeometry();
326 pointZones_.swap(newPointZones);
327 pointZones_.instance() = facesInst;
347 faceZones_.swap(newFaceZones);
348 faceZones_.instance() = facesInst;
368 cellZones_.swap(newCellZones);
369 cellZones_.instance() = facesInst;
373 tetBasePtIsPtr_ = readTetBasePtIs();
385 else if (pointsInst != pointsInstance())
396 label nOldPoints = points_.size();
414 if (nOldPoints != 0 && nOldPoints != newPoints.
size())
417 <<
"Point motion detected but number of points "
418 << newPoints.
size() <<
" in "
419 << newPoints.
objectPath() <<
" does not correspond to "
420 <<
" current " << nOldPoints
424 points_.transfer(newPoints);
426 points_.instance() = pointsInst;
430 if (newTetBasePtIsPtr.
valid())
432 tetBasePtIsPtr_ = newTetBasePtIsPtr;
436 boundary_.calcGeometry();
467 if (faces_.writeOpt() == AUTO_WRITE)
469 auto rmAddressing = [&](
const word&
name)
484 rmAddressing(
"cellProc");
488 rmAddressing(
"pointProcAddressing");
489 rmAddressing(
"faceProcAddressing");
490 rmAddressing(
"cellProcAddressing");
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.
A List of objects of type <Type> with automated input and output using a compact storage....
A primitive field of type <Type> with automated input and output.
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
writeOption writeOpt() const
writeOption
Enumeration defining the write options.
fileName objectPath(const bool global) const
Return complete path + object name including the processor.
streamFormat
Enumeration for the format of data in the stream.
compressionType
Enumeration for the format of data in the stream.
void size(const label)
Override size to be inconsistent with allocated storage.
static bool & parRun()
Is this a parallel run?
label size() const
Return the number of elements in the UPtrList.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
bool valid() const
Return true if the autoPtr valid (ie, the pointer is set)
A bounding box defined in terms of the points at its extremities.
A class for handling file names.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write) const
Write the objects.
wordList types() const
Return a list of patch types.
wordList names() const
Return the list of patch names.
Mesh consisting of general polyhedral cells.
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual bool writeObject(IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp, const bool write=true) const
Write the underlying polyMesh.
readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
void setPointsInstance(const fileName &)
Set the instance for the points files.
void setInstance(const fileName &)
Set the instance for mesh files.
A patch is a list of labels that address the faces in the global face list.
fileName objectPath() const
Return complete path + object name.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
#define InfoInFunction
Report an information message using Foam::Info.
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.
CompactIOList< face > faceCompactIOList
vectorIOField pointIOField
pointIOField is a vectorIOField.
IOList< label > labelIOList
Label container classes.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.