forAll(boundary_, patchI) { boundary_[patchI] = polyPatch ( newBoundary[patchI].name(), newBoundary[patchI].size(), newBoundary[patchI].start(), patchI, boundary_ ); }
void Foam::polyMesh::resetPrimitives ( const Xfer<pointField>& pts, const Xfer<faceList>& fcs, const Xfer<labelList>& own, const Xfer<labelList>& nei, const labelList& patchSizes, const labelList& patchStarts, const bool validBoundary ) { // Clear addressing. Keep geometric props for mapping. clearAddressing(); // Take over new primitive data. // Optimized to avoid overwriting data at all if (&pts) { allPoints_.transfer(pts()); // Recalculate bounds with all points. HJ, 17/Oct/2008 // ... if points have change. HJ, 19/Aug/2010 bounds_ = boundBox(allPoints_, validBoundary); } if (&fcs) { allFaces_.transfer(fcs()); // Faces will be reset in initMesh(), using size of owner list } if (&own) { owner_.transfer(own()); } if (&nei) { neighbour_.transfer(nei()); } // Reset patch sizes and starts forAll (boundary_, patchI) { boundary_[patchI] = polyPatch ( boundary_[patchI].name(), patchSizes[patchI], patchStarts[patchI], patchI, boundary_ ); }
void Foam::polyMesh::resetPrimitives ( const Xfer<pointField>& points, const Xfer<faceList>& faces, const Xfer<labelList>& owner, const Xfer<labelList>& neighbour, const labelList& patchSizes, const labelList& patchStarts, const bool validBoundary ) { // Clear addressing. Keep geometric props and updateable props for mapping. clearAddressing(true); // Take over new primitive data. // Optimized to avoid overwriting data at all if (notNull(points)) { points_.transfer(points()); bounds_ = boundBox(points_, validBoundary); } if (notNull(faces)) { faces_.transfer(faces()); } if (notNull(owner)) { owner_.transfer(owner()); } if (notNull(neighbour)) { neighbour_.transfer(neighbour()); } // Reset patch sizes and starts forAll(boundary_, patchI) { boundary_[patchI] = polyPatch ( boundary_[patchI], boundary_, patchI, patchSizes[patchI], patchStarts[patchI] ); }