C++11 conformance and consistency: Added "move" constructors and assignment operators to OpenFOAM containers
Replaced all uses of complex Xfer class with C++11 "move" constructors and assignment operators. Removed the now redundant Xfer class. This substantial changes improves consistency between OpenFOAM and the C++11 STL containers and algorithms, reduces memory allocation and copy overhead when returning containers from functions and simplifies maintenance of the core libraries significantly.
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -211,9 +211,9 @@ int main(int argc, char *argv[])
|
||||
runTime.timeName(),
|
||||
runTime
|
||||
),
|
||||
xferCopy(mesh.points()), // could we safely re-use the data?
|
||||
xferCopy(mesh.faces()),
|
||||
xferCopy(mesh.cells())
|
||||
clone(mesh.points()), // could we safely re-use the data?
|
||||
clone(mesh.faces()),
|
||||
clone(mesh.cells())
|
||||
);
|
||||
|
||||
// Add the boundary patches
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -948,10 +948,10 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove<pointField>(foamPoints),
|
||||
xferMove<faceList>(foamFaces),
|
||||
xferCopy<labelList>(foamOwner),
|
||||
xferMove<labelList>(foamNeighbour)
|
||||
move(foamPoints),
|
||||
move(foamFaces),
|
||||
clone(foamOwner),
|
||||
move(foamNeighbour)
|
||||
);
|
||||
|
||||
// Create patches. Use patch types to determine what Foam types to generate.
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -448,7 +448,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferCopy(points),
|
||||
clone(points),
|
||||
cellShapes,
|
||||
faceListList(0),
|
||||
wordList(0),
|
||||
@ -595,7 +595,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cellShapes,
|
||||
patchFaces,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -737,7 +737,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cellShapes,
|
||||
boundary,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -932,10 +932,10 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferCopy(pointField()),
|
||||
xferCopy(faceList()),
|
||||
xferCopy(labelList()),
|
||||
xferCopy(labelList())
|
||||
pointField(),
|
||||
faceList(),
|
||||
labelList(),
|
||||
labelList()
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1167,7 +1167,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cellShapes,
|
||||
patches,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -843,7 +843,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cells,
|
||||
boundary,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -916,7 +916,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cells,
|
||||
boundaryFaces,
|
||||
boundaryPatchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1129,15 +1129,15 @@ int main(int argc, char *argv[])
|
||||
// Create globally numbered surface
|
||||
meshedSurface rawSurface
|
||||
(
|
||||
xferCopy(polyPoints),
|
||||
xferCopyTo<faceList>(boundaryFaces)
|
||||
clone(polyPoints),
|
||||
clone(boundaryFaces)
|
||||
);
|
||||
|
||||
// Write locally numbered surface
|
||||
meshedSurface
|
||||
(
|
||||
xferCopy(rawSurface.localPoints()),
|
||||
xferCopy(rawSurface.localFaces())
|
||||
clone(rawSurface.localPoints()),
|
||||
clone(rawSurface.localFaces())
|
||||
).write(runTime.path()/"boundaryFaces.obj");
|
||||
}
|
||||
|
||||
@ -1172,7 +1172,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(polyPoints),
|
||||
move(polyPoints),
|
||||
cellVerts,
|
||||
usedPatchFaceVerts, // boundaryFaces,
|
||||
usedPatchNames, // boundaryPatchNames,
|
||||
|
||||
@ -565,7 +565,7 @@ polyMesh pShapeMesh
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cellShapes,
|
||||
boundary,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -141,7 +141,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cells,
|
||||
faceListList(0),
|
||||
wordList(0),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -300,7 +300,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cells,
|
||||
patchFaces,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -245,7 +245,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(newPoints),
|
||||
move(newPoints),
|
||||
cellShapes,
|
||||
boundary,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -46,7 +46,7 @@ void Foam::sammMesh::writeMesh()
|
||||
runTime_.constant(),
|
||||
runTime_
|
||||
),
|
||||
xferCopy(points_), // we could probably re-use the data
|
||||
clone(points_), // we could probably re-use the data
|
||||
cellShapes_,
|
||||
boundary_,
|
||||
patchNames_,
|
||||
@ -75,9 +75,9 @@ void Foam::sammMesh::writeMesh()
|
||||
runTime_.constant(),
|
||||
runTime_
|
||||
),
|
||||
xferCopy(points_), // we could probably re-use the data
|
||||
xferCopy(meshFaces_),
|
||||
xferCopy(cellPolys_)
|
||||
move(points_), // we could probably re-use the data
|
||||
move(meshFaces_),
|
||||
move(cellPolys_)
|
||||
);
|
||||
|
||||
pMesh.addPatches(polyBoundaryPatches(pMesh));
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -50,7 +50,7 @@ void Foam::starMesh::writeMesh()
|
||||
runTime_.constant(),
|
||||
runTime_
|
||||
),
|
||||
xferCopy(points_), // we could probably re-use the data
|
||||
clone(points_), // we could probably re-use the data
|
||||
cellShapes_,
|
||||
boundary_,
|
||||
patchNames_,
|
||||
@ -81,9 +81,9 @@ void Foam::starMesh::writeMesh()
|
||||
runTime_.constant(),
|
||||
runTime_
|
||||
),
|
||||
xferCopy(points_), // we could probably re-use the data
|
||||
xferCopy(meshFaces_),
|
||||
xferCopy(cellPolys_)
|
||||
clone(points_), // we could probably re-use the data
|
||||
clone(meshFaces_),
|
||||
clone(cellPolys_)
|
||||
);
|
||||
|
||||
// adding patches also checks the mesh
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -326,7 +326,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferCopy(points),
|
||||
clone(points),
|
||||
cells,
|
||||
faceListList(0),
|
||||
wordList(0), // boundaryPatchNames
|
||||
@ -530,7 +530,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(points),
|
||||
move(points),
|
||||
cells,
|
||||
patchFaces,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -62,7 +62,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferMove(reader.points()),
|
||||
move(reader.points()),
|
||||
reader.cells(),
|
||||
faceListList(0),
|
||||
wordList(0),
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -267,7 +267,7 @@ int main(int argc, char *argv[])
|
||||
runTime.constant(),
|
||||
runTime
|
||||
),
|
||||
xferCopy(blocks.points()), // could we re-use space?
|
||||
clone(blocks.points()), // could we re-use space?
|
||||
blocks.cells(),
|
||||
blocks.patches(),
|
||||
blocks.patchNames(),
|
||||
|
||||
@ -63,7 +63,7 @@ class extrudedMesh
|
||||
|
||||
//- Construct and return the extruded mesh points
|
||||
template<class FaceList, class PointField>
|
||||
Xfer<pointField> extrudedPoints
|
||||
pointField extrudedPoints
|
||||
(
|
||||
const PrimitivePatch<FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel&
|
||||
@ -71,7 +71,7 @@ class extrudedMesh
|
||||
|
||||
//- Construct and return the extruded mesh faces
|
||||
template<class FaceList, class PointField>
|
||||
Xfer<faceList> extrudedFaces
|
||||
faceList extrudedFaces
|
||||
(
|
||||
const PrimitivePatch<FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel&
|
||||
@ -79,7 +79,7 @@ class extrudedMesh
|
||||
|
||||
//- Construct and return the extruded mesh cells
|
||||
template<class FaceList, class PointField>
|
||||
Xfer<cellList> extrudedCells
|
||||
cellList extrudedCells
|
||||
(
|
||||
const PrimitivePatch<FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel&
|
||||
|
||||
@ -29,7 +29,7 @@ License
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
template<class FaceList, class PointField>
|
||||
Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints
|
||||
Foam::pointField Foam::extrudedMesh::extrudedPoints
|
||||
(
|
||||
const PrimitivePatch<FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
@ -57,13 +57,12 @@ Foam::Xfer<Foam::pointField> Foam::extrudedMesh::extrudedPoints
|
||||
}
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(ePoints);
|
||||
return ePoints;
|
||||
}
|
||||
|
||||
|
||||
template<class FaceList, class PointField>
|
||||
Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
|
||||
Foam::faceList Foam::extrudedMesh::extrudedFaces
|
||||
(
|
||||
const PrimitivePatch<FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
@ -183,13 +182,12 @@ Foam::Xfer<Foam::faceList> Foam::extrudedMesh::extrudedFaces
|
||||
);
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(eFaces);
|
||||
return eFaces;
|
||||
}
|
||||
|
||||
|
||||
template<class FaceList, class PointField>
|
||||
Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
|
||||
Foam::cellList Foam::extrudedMesh::extrudedCells
|
||||
(
|
||||
const PrimitivePatch<FaceList, PointField>& extrudePatch,
|
||||
const extrudeModel& model
|
||||
@ -290,8 +288,7 @@ Foam::Xfer<Foam::cellList> Foam::extrudedMesh::extrudedCells
|
||||
facei++;
|
||||
}
|
||||
|
||||
// return points for transferring
|
||||
return xferMove(eCells);
|
||||
return eCells;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1824,7 +1824,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
const primitiveFacePatch extrudePatch(zoneFaces.xfer(), mesh.points());
|
||||
const primitiveFacePatch extrudePatch(move(zoneFaces), mesh.points());
|
||||
|
||||
|
||||
Pstream::listCombineGather(isInternal, orEqOp<bool>());
|
||||
@ -2349,10 +2349,10 @@ int main(int argc, char *argv[])
|
||||
IOobject::AUTO_WRITE,
|
||||
false
|
||||
),
|
||||
xferCopy(pointField()),
|
||||
xferCopy(faceList()),
|
||||
xferCopy(labelList()),
|
||||
xferCopy(labelList()),
|
||||
pointField(),
|
||||
faceList(),
|
||||
labelList(),
|
||||
labelList(),
|
||||
false
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -199,10 +199,10 @@ int main(int argc, char *argv[])
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
xferMove(poly2DMesh.points()),
|
||||
xferMove(poly2DMesh.faces()),
|
||||
xferMove(poly2DMesh.owner()),
|
||||
xferMove(poly2DMesh.neighbour())
|
||||
move(poly2DMesh.points()),
|
||||
move(poly2DMesh.faces()),
|
||||
move(poly2DMesh.owner()),
|
||||
move(poly2DMesh.neighbour())
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -247,7 +247,7 @@ void Foam::patchToPoly2DMesh::addPatchFacesToOwner()
|
||||
<< nExternalEdges << endl;
|
||||
}
|
||||
|
||||
owner_ = newOwner.xfer();
|
||||
owner_ = move(newOwner);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -605,10 +605,10 @@ Foam::DelaunayMesh<Triangulation>::createMesh
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
xferMove(points),
|
||||
xferMove(faces),
|
||||
xferMove(owner),
|
||||
xferMove(neighbour)
|
||||
move(points),
|
||||
move(faces),
|
||||
move(owner),
|
||||
move(neighbour)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -113,8 +113,8 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap
|
||||
new mapDistribute
|
||||
(
|
||||
constructSize,
|
||||
sendMap.xfer(),
|
||||
constructMap.xfer()
|
||||
move(sendMap),
|
||||
move(constructMap)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -214,7 +214,7 @@ Foam::labelList Foam::DistributedDelaunayMesh<Triangulation>::overlapProcessors
|
||||
}
|
||||
}
|
||||
|
||||
return toProc;
|
||||
return move(toProc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -35,9 +35,7 @@ License
|
||||
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
defineTypeNameAndDebug(backgroundMeshDecomposition, 0);
|
||||
|
||||
defineTypeNameAndDebug(backgroundMeshDecomposition, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -118,8 +116,8 @@ Foam::autoPtr<Foam::mapDistribute> Foam::backgroundMeshDecomposition::buildMap
|
||||
new mapDistribute
|
||||
(
|
||||
constructSize,
|
||||
sendMap.xfer(),
|
||||
constructMap.xfer()
|
||||
move(sendMap),
|
||||
move(constructMap)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -1370,7 +1368,7 @@ Foam::labelList Foam::backgroundMeshDecomposition::overlapProcessors
|
||||
}
|
||||
}
|
||||
|
||||
return toProc;
|
||||
return Foam::move(toProc);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -739,10 +739,10 @@ Foam::conformalVoronoiMesh::createPolyMeshFromPoints
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
xferCopy(pts),
|
||||
xferMove(faces),
|
||||
xferMove(owner),
|
||||
xferMove(neighbour)
|
||||
clone(pts),
|
||||
Foam::move(faces),
|
||||
Foam::move(owner),
|
||||
Foam::move(neighbour)
|
||||
)
|
||||
);
|
||||
|
||||
@ -991,7 +991,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findOffsetPatchFaces
|
||||
offsetBoundaryCells.write();
|
||||
}
|
||||
|
||||
return offsetBoundaryCells;
|
||||
return Foam::move(offsetBoundaryCells);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -1839,7 +1839,7 @@ Foam::conformalVoronoiMesh::nearestFeatureEdgeLocations
|
||||
dynPointHit.append(nearHit);
|
||||
}
|
||||
|
||||
return dynPointHit;
|
||||
return Foam::move(dynPointHit);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -444,7 +444,7 @@ inline Foam::List<bool> Foam::conformalVoronoiMesh::dualFaceBoundaryPoints
|
||||
|
||||
} while (cc1 != ccStart);
|
||||
|
||||
return tmpFaceBoundaryPoints;
|
||||
return Foam::move(tmpFaceBoundaryPoints);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -410,9 +410,9 @@ Foam::autoPtr<Foam::fvMesh> Foam::conformalVoronoiMesh::createDummyMesh
|
||||
new fvMesh
|
||||
(
|
||||
io,
|
||||
xferCopy(pointField()),
|
||||
xferCopy(faceList()),
|
||||
xferCopy(cellList())
|
||||
pointField(),
|
||||
faceList(),
|
||||
cellList()
|
||||
)
|
||||
);
|
||||
fvMesh& mesh = meshPtr();
|
||||
@ -817,10 +817,10 @@ void Foam::conformalVoronoiMesh::writeMesh
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
xferMove(points),
|
||||
xferMove(faces),
|
||||
xferMove(owner),
|
||||
xferMove(neighbour)
|
||||
Foam::move(points),
|
||||
Foam::move(faces),
|
||||
Foam::move(owner),
|
||||
Foam::move(neighbour)
|
||||
);
|
||||
|
||||
Info<< indent << "Adding patches to mesh" << endl;
|
||||
@ -1399,7 +1399,7 @@ Foam::labelHashSet Foam::conformalVoronoiMesh::findRemainingProtrusionSet
|
||||
protrudingCells.write();
|
||||
}
|
||||
|
||||
return protrudingCells;
|
||||
return Foam::move(protrudingCells);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -961,7 +961,7 @@ List<Vb::Point> autoDensity::initialPoints() const
|
||||
<< decrIndent << decrIndent
|
||||
<< endl;
|
||||
|
||||
return initialPoints;
|
||||
return move(initialPoints);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -194,7 +194,7 @@ List<Vb::Point> pointFile::initialPoints() const
|
||||
<< pointFileName_.name() << endl;
|
||||
}
|
||||
|
||||
return initialPoints;
|
||||
return Foam::move(initialPoints);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2012-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -287,7 +287,7 @@ autoPtr<polyMesh> generateHexMesh
|
||||
new polyMesh
|
||||
(
|
||||
io,
|
||||
xferMoveTo<pointField>(points),
|
||||
move(points),
|
||||
cellShapes,
|
||||
boundary,
|
||||
patchNames,
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -155,10 +155,10 @@ int main(int argc, char *argv[])
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
xferMove(poly2DMesh.points()),
|
||||
xferMove(poly2DMesh.faces()),
|
||||
xferMove(poly2DMesh.owner()),
|
||||
xferMove(poly2DMesh.neighbour())
|
||||
move(poly2DMesh.points()),
|
||||
move(poly2DMesh.faces()),
|
||||
move(poly2DMesh.owner()),
|
||||
move(poly2DMesh.neighbour())
|
||||
);
|
||||
|
||||
Info<< "Constructing patches." << endl;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2013-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2013-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -204,7 +204,7 @@ Foam::shortEdgeFilter2D::shortEdgeFilter2D
|
||||
|
||||
points2D.clear();
|
||||
|
||||
ms_ = MeshedSurface<face>(xferMove(points), xferMove(faces));
|
||||
ms_ = MeshedSurface<face>(move(points), move(faces));
|
||||
|
||||
Info<< "Meshed surface stats before edge filtering :" << endl;
|
||||
ms_.writeStats(Info);
|
||||
@ -535,9 +535,9 @@ Foam::shortEdgeFilter2D::filter()
|
||||
|
||||
MeshedSurface<face> fMesh
|
||||
(
|
||||
xferMove(newPoints),
|
||||
xferMove(newFaces),
|
||||
xferCopy(List<surfZone>())
|
||||
move(newPoints),
|
||||
move(newFaces),
|
||||
List<surfZone>()
|
||||
);
|
||||
|
||||
updateEdgeRegionMap
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -471,7 +471,7 @@ void extractSurface
|
||||
|
||||
// Gather all ZoneIDs
|
||||
List<labelList> gatheredZones(Pstream::nProcs());
|
||||
gatheredZones[Pstream::myProcNo()] = compactZones.xfer();
|
||||
gatheredZones[Pstream::myProcNo()] = move(compactZones);
|
||||
Pstream::gatherList(gatheredZones);
|
||||
|
||||
// On master combine all points, faces, zones
|
||||
@ -510,10 +510,10 @@ void extractSurface
|
||||
|
||||
UnsortedMeshedSurface<face> unsortedFace
|
||||
(
|
||||
xferMove(allPoints),
|
||||
xferMove(allFaces),
|
||||
xferMove(allZones),
|
||||
xferMove(surfZones)
|
||||
move(allPoints),
|
||||
move(allFaces),
|
||||
move(allZones),
|
||||
move(surfZones)
|
||||
);
|
||||
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration | Website: https://openfoam.org
|
||||
\\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -392,9 +392,9 @@ Foam::mirrorFvMesh::mirrorFvMesh(const IOobject& io, const word& dictName)
|
||||
new fvMesh
|
||||
(
|
||||
io,
|
||||
xferMove(newPoints),
|
||||
xferMove(newFaces),
|
||||
xferMove(newCells)
|
||||
move(newPoints),
|
||||
move(newFaces),
|
||||
move(newCells)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -448,10 +448,10 @@ autoPtr<mapPolyMesh> reorderMesh
|
||||
|
||||
mesh.resetPrimitives
|
||||
(
|
||||
Xfer<pointField>::null(),
|
||||
xferMove(newFaces),
|
||||
xferMove(newOwner),
|
||||
xferMove(newNeighbour),
|
||||
NullObjectMove<pointField>(),
|
||||
move(newFaces),
|
||||
move(newOwner),
|
||||
move(newNeighbour),
|
||||
patchSizes,
|
||||
patchStarts,
|
||||
true
|
||||
|
||||
Reference in New Issue
Block a user