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"));
81 Info<<
"Faces instance: old = " << facesInstance()
82 <<
" new = " << facesInst <<
nl
85 <<
"Points instance: old = " << pointsInstance()
86 <<
" new = " << pointsInst <<
endl;
89 if (facesInst != facesInstance())
101 setInstance(facesInst);
102 points_.instance() = pointsInst;
177 bool boundaryChanged =
false;
179 if (newBoundary.
size() != boundary_.size())
181 boundaryChanged =
true;
188 wordList oldTypes = boundary_.types();
189 wordList oldNames = boundary_.names();
195 oldTypes[patchI] != newTypes[patchI]
196 || oldNames[patchI] != newNames[patchI]
199 boundaryChanged =
true;
208 <<
"unexpected consequences. Proceed with care." <<
endl;
211 boundary_.setSize(newBoundary.
size());
213 forAll(newBoundary, patchI)
215 boundary_.set(patchI, newBoundary[patchI].clone(boundary_));
224 newBoundary[patchI].
name(),
225 newBoundary[patchI].size(),
226 newBoundary[patchI].start(),
229 newBoundary[patchI].physicalType(),
230 newBoundary[patchI].inGroups()
239 if (
exists(owner_.objectPath()))
269 boundary_.updateMesh();
272 boundary_.calcGeometry();
295 label oldSize = pointZones_.size();
297 if (newPointZones.size() <= pointZones_.size())
299 pointZones_.setSize(newPointZones.size());
305 pointZones_[czI] = newPointZones[czI];
309 pointZones_.setSize(newPointZones.size());
311 for (
label czI = oldSize; czI < newPointZones.size(); czI++)
313 pointZones_.set(czI, newPointZones[czI].clone(pointZones_));
332 oldSize = faceZones_.size();
334 if (newFaceZones.size() <= faceZones_.size())
336 faceZones_.setSize(newFaceZones.size());
342 faceZones_[fzI].resetAddressing
345 newFaceZones[fzI].flipMap()
350 faceZones_.setSize(newFaceZones.size());
352 for (
label fzI = oldSize; fzI < newFaceZones.size(); fzI++)
354 faceZones_.set(fzI, newFaceZones[fzI].clone(faceZones_));
373 oldSize = cellZones_.size();
375 if (newCellZones.size() <= cellZones_.size())
377 cellZones_.setSize(newCellZones.size());
383 cellZones_[czI] = newCellZones[czI];
387 cellZones_.setSize(newCellZones.size());
389 for (
label czI = oldSize; czI < newCellZones.size(); czI++)
391 cellZones_.set(czI, newCellZones[czI].clone(cellZones_));
404 else if (pointsInst != pointsInstance())
415 label nOldPoints = points_.size();
433 if (nOldPoints != 0 && nOldPoints != newPoints.size())
436 <<
"Point motion detected but number of points "
437 << newPoints.size() <<
" in "
438 << newPoints.
objectPath() <<
" does not correspond to "
439 <<
" current " << nOldPoints
443 points_.transfer(newPoints);
444 points_.instance() = pointsInst;