Commit 042d8d07 authored by mattijs's avatar mattijs
Browse files

xfer use

parent 135c6d05
......@@ -2988,12 +2988,12 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
mesh.resetPrimitives
(
nActiveFaces_,
renumberedMeshPoints,
faces_,
faceOwner_,
faceNeighbour_,
patchSizes,
patchStarts,
xferMove<pointField>(renumberedMeshPoints),
xferMove<faceList>(faces_),
xferMove<labelList>(faceOwner_),
xferMove<labelList>(faceNeighbour_),
xferMove<labelList>(patchSizes),
xferMove<labelList>(patchStarts),
syncParallel
);
......@@ -3005,12 +3005,12 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
mesh.resetPrimitives
(
nActiveFaces_,
newPoints,
faces_,
faceOwner_,
faceNeighbour_,
patchSizes,
patchStarts,
xferMove<pointField>(newPoints),
xferMove<faceList>(faces_),
xferMove<labelList>(faceOwner_),
xferMove<labelList>(faceNeighbour_),
xferMove<labelList>(patchSizes),
xferMove<labelList>(patchStarts),
syncParallel
);
// Invalidate new points to go into map.
......@@ -3019,6 +3019,22 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
mesh.changing(true);
}
// Clear out primitives
{
retiredPoints_.clear();
retiredPoints_.resize(0);
faces_.clear();
faces_.setSize(0);
region_.clear();
region_.setSize(0);
faceOwner_.clear();
faceOwner_.setSize(0);
faceNeighbour_.clear();
faceNeighbour_.setSize(0);
}
if (debug)
{
// Some stats on changes
......@@ -3055,21 +3071,6 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
writeMeshStats(mesh, Pout);
}
// Clear out primitives
{
retiredPoints_.clear();
retiredPoints_.resize(0);
faces_.clear();
faces_.setSize(0);
region_.clear();
region_.setSize(0);
faceOwner_.clear();
faceOwner_.setSize(0);
faceNeighbour_.clear();
faceNeighbour_.setSize(0);
}
// Zones
// ~~~~~
......@@ -3250,14 +3251,30 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
new fvMesh
(
io,
newPoints,
faces_,
faceOwner_,
faceNeighbour_
xferMove<pointField>(newPoints),
xferMove<faceList>(faces_),
xferMove<labelList>(faceOwner_),
xferMove<labelList>(faceNeighbour_)
)
);
fvMesh& newMesh = newMeshPtr();
// Clear out primitives
{
newPoints.clear();
retiredPoints_.clear();
retiredPoints_.resize(0);
faces_.clear();
faces_.setSize(0);
region_.clear();
region_.setSize(0);
faceOwner_.clear();
faceOwner_.setSize(0);
faceNeighbour_.clear();
faceNeighbour_.setSize(0);
}
if (debug)
{
// Some stats on changes
......@@ -3289,22 +3306,6 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::makeMesh
}
// Clear out primitives
{
newPoints.clear();
retiredPoints_.clear();
retiredPoints_.resize(0);
faces_.clear();
faces_.setSize(0);
region_.clear();
region_.setSize(0);
faceOwner_.clear();
faceOwner_.setSize(0);
faceNeighbour_.clear();
faceNeighbour_.setSize(0);
}
{
const polyBoundaryMesh& oldPatches = mesh.boundaryMesh();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment