38 if (tetBasePtIsPtr_.valid())
40 tetBasePtIsPtr_->writeOpt() = wo;
49 faces_.writeOpt() = wo;
50 owner_.writeOpt() = wo;
51 neighbour_.writeOpt() = wo;
52 boundary_.writeOpt() = wo;
54 if (pointZones_.noTopoUpdate())
56 pointZones_.writeOpt() = wo;
59 if (faceZones_.noTopoUpdate())
61 faceZones_.writeOpt() = wo;
64 if (cellZones_.noTopoUpdate())
66 cellZones_.writeOpt() = wo;
78 points_.instance() = inst;
79 points_.eventNo() = getEvent();
81 if (tetBasePtIsPtr_.valid())
83 tetBasePtIsPtr_->instance() = inst;
84 tetBasePtIsPtr_().eventNo() = getEvent();
98 setPointsInstance(inst);
100 faces_.instance() = inst;
101 owner_.instance() = inst;
102 neighbour_.instance() = inst;
103 boundary_.instance() = inst;
105 if (pointZones_.noTopoUpdate())
107 pointZones_.instance() = inst;
110 if (faceZones_.noTopoUpdate())
112 faceZones_.instance() = inst;
115 if (cellZones_.noTopoUpdate())
117 cellZones_.instance() = inst;
134 const fileName pointsInst(time().findInstance(meshDir(),
"points"));
135 const fileName facesInst(time().findInstance(meshDir(),
"faces"));
139 Info<<
"Faces instance: old = " << facesInstance()
140 <<
" new = " << facesInst <<
nl
141 <<
"Points instance: old = " << pointsInstance()
142 <<
" new = " << pointsInst <<
endl;
145 if (facesInst != facesInstance())
150 Info<<
"Topological change" <<
endl;
169 points_.instance() = pointsInst;
185 faces_.instance() = facesInst;
201 owner_.instance() = facesInst;
217 neighbour_.instance() = facesInst;
236 bool boundaryChanged =
false;
238 if (newBoundary.
size() != boundary_.size())
240 boundaryChanged =
true;
247 wordList oldTypes = boundary_.types();
248 wordList oldNames = boundary_.names();
258 boundaryChanged =
true;
267 boundary_.setSize(newBoundary.
size());
281 newBoundary[
patchi].size(),
282 newBoundary[
patchi].start(),
290 boundary_.instance() = facesInst;
296 if (!owner_.headerClassName().empty())
326 boundary_.topoChange();
329 boundary_.calcGeometry();
337 tetBasePtIsPtr_ = readTetBasePtIs();
348 else if (pointsInst != pointsInstance())
359 label nOldPoints = points_.size();
377 if (nOldPoints != 0 && nOldPoints != newPoints.
size())
380 <<
"Point motion detected but number of points "
381 << newPoints.
size() <<
" in "
382 << newPoints.
objectPath() <<
" does not correspond to "
383 <<
" current " << nOldPoints
387 points_.transfer(newPoints);
389 points_.instance() = pointsInst;
393 if (newTetBasePtIsPtr.
valid())
395 tetBasePtIsPtr_ = newTetBasePtIsPtr;
399 boundary_.calcGeometry();
424 if (pointZonesInst != pointZones_.instance())
441 pointZones_.swap(newPointZones);
442 pointZones_.instance() = pointZonesInst;
459 if (faceZonesInst != faceZones_.instance())
476 faceZones_.swap(newFaceZones);
477 faceZones_.instance() = faceZonesInst;
494 if (cellZonesInst != cellZones_.instance())
511 cellZones_.swap(newCellZones);
512 cellZones_.instance() = cellZonesInst;
533 if (faces_.writeOpt() == AUTO_WRITE)
535 auto rmAddressing = [&](
const word&
name)
550 rmAddressing(
"cellProc");
554 rmAddressing(
"pointProcAddressing");
555 rmAddressing(
"faceProcAddressing");
556 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
fileName filePath(const bool global) const
Return complete path + object name if the file exists.
writeOption
Enumeration defining the write options.
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 rm(const fileName &) const =0
Remove a file, returning true if successful otherwise false.
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.
const fileOperation & fileHandler()
Get current file handler.
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.
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 LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
fileType type(const fileName &, const bool checkVariants=true, const bool followLink=true)
Return the file type: directory or file.