43 points_.writeOpt(wOpt);
44 points_.instance() = inst;
46 faces_.writeOpt(wOpt);
47 faces_.instance() = inst;
49 owner_.writeOpt(wOpt);
50 owner_.instance() = inst;
52 neighbour_.writeOpt(wOpt);
53 neighbour_.instance() = inst;
55 boundary_.writeOpt(wOpt);
56 boundary_.instance() = inst;
58 pointZones_.writeOpt(wOpt);
59 pointZones_.instance() = inst;
61 faceZones_.writeOpt(wOpt);
62 faceZones_.instance() = inst;
64 cellZones_.writeOpt(wOpt);
65 cellZones_.instance() = inst;
69 tetBasePtIsPtr_->writeOpt(wOpt);
70 tetBasePtIsPtr_->instance() = inst;
80 const fileName pointsInst(time().findInstance(meshDir(),
"points"));
81 const fileName facesInst(time().findInstance(meshDir(),
"faces"));
87 Info<<
"Faces instance: old = " << facesInstance()
88 <<
" new = " << facesInst <<
nl
89 <<
"Points instance: old = " << pointsInstance()
90 <<
" new = " << pointsInst <<
endl;
93 if (facesInst != facesInstance())
105 setInstance(facesInst);
106 points_.instance() = pointsInst;
159 owner_ = std::move(
static_cast<labelList&
>(list));
160 owner_.headerClassName() = std::move(list.headerClassName());
161 owner_.note() = std::move(list.note());
186 neighbour_ = std::move(
static_cast<labelList&
>(list));
187 neighbour_.headerClassName() = std::move(list.headerClassName());
188 neighbour_.note() = std::move(list.note());
208 bool boundaryChanged =
false;
210 if (newBoundary.size() != boundary_.size())
212 boundaryChanged =
true;
218 const auto& oldPatch = boundary_[patchi];
219 const auto& newPatch = newBoundary[patchi];
223 (oldPatch.name() != newPatch.name())
224 || (oldPatch.type() != newPatch.type())
227 boundaryChanged =
true;
236 <<
"Number of patches has changed. This may have "
237 <<
"unexpected consequences. Proceed with care." <<
endl;
239 boundary_.resize_null(newBoundary.size());
241 forAll(newBoundary, patchi)
243 boundary_.set(patchi, newBoundary[patchi].clone(boundary_));
252 newBoundary[patchi].
name(),
253 newBoundary[patchi].size(),
254 newBoundary[patchi].start(),
257 newBoundary[patchi].physicalType(),
258 newBoundary[patchi].inGroups()
267 if (owner_.hasHeaderClass())
297 boundary_.updateMesh();
300 boundary_.calcGeometry();
312 #undef update_meshZones
313 #define update_meshZones(DataMember) \
315 (DataMember).clearAddressing(); \
316 (DataMember).clearPrimitives(); \
318 decltype(DataMember) newZones \
322 (DataMember).name(), \
326 IOobject::READ_IF_PRESENT, \
327 IOobject::NO_WRITE, \
328 IOobject::NO_REGISTER \
333 const label numZones = newZones.size(); \
334 (DataMember).resize(numZones); \
336 for (label zonei = 0; zonei < numZones; ++zonei) \
339 auto& zn = (DataMember).try_emplace \
342 newZones[zonei], Foam::zero{}, (DataMember) \
346 zn.resetAddressing(std::move(newZones[zonei])); \
353 #undef update_meshZones
357 tetBasePtIsPtr_ = readTetBasePtIs();
369 else if (pointsInst != pointsInstance())
395 updateGeomPoints(std::move(newPoints), newTetBasePtIsPtr);
label size() const noexcept
@ NO_REGISTER
Do not request registration (bool: false).
@ READ_IF_PRESENT
Reading is optional [identical to LAZY_READ].
@ MUST_READ
Reading required.
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 word & headerClassName() const noexcept
Return name of the class name read from header.
autoPtr< IOobject > clone() const
Clone.
const string & note() const noexcept
Return the optional note.
label size() const noexcept
The number of entries in the list.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A bounding box defined in terms of min/max extrema points.
A class for handling file names.
const Time & time() const noexcept
Return time registry.
A polyBoundaryMesh is a polyPatch list with registered IO, a reference to the associated polyMesh,...
void setInstance(const fileName &instance, const IOobjectOption::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.
const fileName & facesInstance() const
Return the current instance directory for faces.
fileName meshDir() const
Return the local mesh directory (dbDir()/meshSubDir).
readUpdateState
Enumeration defining the state of the mesh after a read update.
void updateGeomPoints(pointIOField &&newPoints, autoPtr< labelIOList > &newTetBasePtIsPtr)
Update geometry points; keep topology. Optionally with new face decomposition.
const fileName & pointsInstance() const
Return the current instance directory for points.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
static word meshSubDir
Return the mesh sub-directory name (usually "polyMesh").
void clearOut(const bool isMeshUpdate=false)
Clear all geometry and addressing.
A patch is a list of labels that address the faces in the global face list.
const cellList & cells() const
#define WarningInFunction
Report a warning using Foam::Warning.
#define DebugInFunction
Report an information message using Foam::Info.
Namespace for handling debugging switches.
List< label > labelList
A List of labels.
IOList< label > labelIOList
IO for a List of label.
CompactIOList< face > faceCompactIOList
Compact IO for a List of face.
messageStream Info
Information stream (stdout output on master, null elsewhere).
vectorIOField pointIOField
pointIOField is a vectorIOField.
Ostream & endl(Ostream &os)
Add newline and flush stream.
CompactIOList< cell > cellCompactIOList
Compact IO for a List of cell.
static constexpr const zero Zero
Global zero (0).
constexpr char nl
The newline '\n' character (0x0a).
#define update_meshZones(DataMember)
#define forAll(list, i)
Loop across all elements in list.