36 Info<<
"void polyMesh::setInstance(const fileName& inst) : "
37 <<
"Resetting file instance to " << inst <<
endl;
70 Info<<
"polyMesh::readUpdateState polyMesh::readUpdate() : "
71 <<
"Updating mesh based on saved data." <<
endl;
75 fileName pointsInst(time().findInstance(meshDir(),
"points"));
76 fileName facesInst(time().findInstance(meshDir(),
"faces"));
80 Info<<
"Faces instance: old = " << facesInstance()
81 <<
" new = " << facesInst <<
nl
82 <<
"Points instance: old = " << pointsInstance()
83 <<
" new = " << pointsInst <<
endl;
86 if (facesInst != facesInstance())
91 Info <<
"Topological change" <<
endl;
98 setInstance(facesInst);
99 points_.instance() = pointsInst;
174 bool boundaryChanged =
false;
176 if (newBoundary.
size() != boundary_.size())
178 boundaryChanged =
true;
185 wordList oldTypes = boundary_.types();
186 wordList oldNames = boundary_.names();
192 oldTypes[patchI] != newTypes[patchI]
193 || oldNames[patchI] != newNames[patchI]
196 boundaryChanged =
true;
204 WarningIn(
"polyMesh::readUpdateState polyMesh::readUpdate()")
205 <<
"Number of patches has changed. This may have "
206 <<
"unexpected consequences. Proceed with care." <<
endl;
209 boundary_.setSize(newBoundary.
size());
211 forAll (newBoundary, patchI)
213 boundary_.set(patchI, newBoundary[patchI].clone(boundary_));
218 forAll (boundary_, patchI)
222 newBoundary[patchI].
name(),
223 newBoundary[patchI].size(),
224 newBoundary[patchI].start(),
235 if (
exists(owner_.objectPath()))
265 boundary_.updateMesh();
268 boundary_.calcGeometry();
291 label oldSize = pointZones_.size();
293 if (newPointZones.
size() <= pointZones_.size())
295 pointZones_.setSize(newPointZones.
size());
301 pointZones_[czI] = newPointZones[czI];
307 for (label czI = oldSize; czI < newPointZones.
size(); czI++)
309 pointZones_.set(czI, newPointZones[czI].clone(pointZones_));
328 oldSize = faceZones_.size();
330 if (newFaceZones.
size() <= faceZones_.size())
332 faceZones_.setSize(newFaceZones.
size());
338 faceZones_[fzI].resetAddressing
341 newFaceZones[fzI].flipMap()
346 faceZones_.setSize(newFaceZones.
size());
348 for (label fzI = oldSize; fzI < newFaceZones.
size(); fzI++)
350 faceZones_.set(fzI, newFaceZones[fzI].clone(faceZones_));
369 oldSize = cellZones_.size();
371 if (newCellZones.
size() <= cellZones_.size())
373 cellZones_.setSize(newCellZones.
size());
379 cellZones_[czI] = newCellZones[czI];
385 for (label czI = oldSize; czI < newCellZones.
size(); czI++)
387 cellZones_.set(czI, newCellZones[czI].clone(cellZones_));
400 else if (pointsInst != pointsInstance())
410 points_.instance() = pointsInst;