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();
325 label oldSize = pointZones_.size();
327 if (newPointZones.
size() <= pointZones_.size())
329 pointZones_.setSize(newPointZones.
size());
335 pointZones_[czI] = newPointZones[czI];
341 for (
label czI = oldSize; czI < newPointZones.
size(); czI++)
343 pointZones_.set(czI, newPointZones[czI].
clone(pointZones_));
346 pointZones_.instance() = facesInst;
364 oldSize = faceZones_.size();
366 if (newFaceZones.
size() <= faceZones_.size())
368 faceZones_.setSize(newFaceZones.
size());
374 faceZones_[fzI].resetAddressing
377 newFaceZones[fzI].flipMap()
382 faceZones_.setSize(newFaceZones.
size());
384 for (
label fzI = oldSize; fzI < newFaceZones.
size(); fzI++)
386 faceZones_.set(fzI, newFaceZones[fzI].
clone(faceZones_));
389 faceZones_.instance() = facesInst;
407 oldSize = cellZones_.size();
409 if (newCellZones.
size() <= cellZones_.size())
411 cellZones_.setSize(newCellZones.
size());
417 cellZones_[czI] = newCellZones[czI];
423 for (
label czI = oldSize; czI < newCellZones.
size(); czI++)
425 cellZones_.set(czI, newCellZones[czI].
clone(cellZones_));
428 cellZones_.instance() = facesInst;
432 tetBasePtIsPtr_ = readTetBasePtIs();
444 else if (pointsInst != pointsInstance())
455 label nOldPoints = points_.size();
473 if (nOldPoints != 0 && nOldPoints != newPoints.
size())
476 <<
"Point motion detected but number of points "
477 << newPoints.
size() <<
" in "
478 << newPoints.
objectPath() <<
" does not correspond to "
479 <<
" current " << nOldPoints
483 points_.transfer(newPoints);
485 points_.instance() = pointsInst;
489 if (newTetBasePtIsPtr.
valid())
491 tetBasePtIsPtr_ = newTetBasePtIsPtr;
495 boundary_.calcGeometry();
526 if (faces_.writeOpt() == AUTO_WRITE)
528 auto rmAddressing = [&](
const word&
name)
543 rmAddressing(
"cellProc");
547 rmAddressing(
"pointProcAddressing");
548 rmAddressing(
"faceProcAddressing");
549 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.
void setSize(const label)
Reset size of PtrList. If extending the PtrList, new entries are.
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 a 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.
CompactIOList< face > faceCompactIOList
vectorIOField pointIOField
pointIOField is a vectorIOField.
IOList< label > labelIOList
Label container classes.
word name(const complex &)
Return a string representation of a complex.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.