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());
192 polyBoundaryMesh newBoundary
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_));
250 boundary_[patchi] = polyPatch
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();
303 bounds_ = boundBox(points_);
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())
392 autoPtr<labelIOList> newTetBasePtIsPtr = readTetBasePtIs();
395 updateGeomPoints(std::move(newPoints), newTetBasePtIsPtr);
writeOption
Enumeration defining write preferences.
A class for handling file names.
vectorIOField pointIOField
pointIOField is a vectorIOField.
constexpr char nl
The newline '\n' character (0x0a)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Ignore writing from objectRegistry::writeObject()
#define forAll(list, i)
Loop across all elements in list.
#define update_meshZones(DataMember)
CompactIOList< face, label > faceCompactIOList
Compact IO for a List of face.
writeOption writeOpt() const noexcept
Get the write option.
IOList< label > labelIOList
IO for a List of label.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define DebugInFunction
Report an information message using Foam::Info.
Reading is optional [identical to LAZY_READ].
int debug
Static debugging option.
CompactIOList< cell, label > cellCompactIOList
Compact IO for a List of cell.
const fileName & instance() const noexcept
Read access to instance path component.
void setInstance(const fileName &instance, const IOobjectOption::writeOption wOpt=IOobject::AUTO_WRITE)
Set the instance for mesh files.
#define WarningInFunction
Report a warning using Foam::Warning.
messageStream Info
Information stream (stdout output on master, null elsewhere)
readUpdateState
Enumeration defining the state of the mesh after a read update.
virtual readUpdateState readUpdate()
Update the mesh based on the mesh files saved in.
Do not request registration (bool: false)
static constexpr const zero Zero
Global zero (0)