mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
drop ununsed nUsedFaces parameter from polyMesh::resetPrimitives(xfer<..)
- use xfer form for calls to resetPrimitives
This commit is contained in:
@ -316,11 +316,10 @@ autoPtr<mapPolyMesh> reorderMesh
|
|||||||
|
|
||||||
mesh.resetPrimitives
|
mesh.resetPrimitives
|
||||||
(
|
(
|
||||||
mesh.nFaces(),
|
xfer<pointField>::null(),
|
||||||
mesh.points(),
|
xferMove(newFaces),
|
||||||
newFaces,
|
xferMove(newOwner),
|
||||||
newOwner,
|
xferMove(newNeighbour),
|
||||||
newNeighbour,
|
|
||||||
patchSizes,
|
patchSizes,
|
||||||
patchStarts
|
patchStarts
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1059,7 +1059,6 @@ void Foam::polyMesh::resetPrimitives
|
|||||||
|
|
||||||
void Foam::polyMesh::resetPrimitives
|
void Foam::polyMesh::resetPrimitives
|
||||||
(
|
(
|
||||||
const label nUsedFaces,
|
|
||||||
const xfer<pointField>& points,
|
const xfer<pointField>& points,
|
||||||
const xfer<faceList>& faces,
|
const xfer<faceList>& faces,
|
||||||
const xfer<labelList>& owner,
|
const xfer<labelList>& owner,
|
||||||
@ -1124,7 +1123,6 @@ void Foam::polyMesh::resetPrimitives
|
|||||||
(
|
(
|
||||||
"polyMesh::polyMesh::resetPrimitives\n"
|
"polyMesh::polyMesh::resetPrimitives\n"
|
||||||
"(\n"
|
"(\n"
|
||||||
" const label nUsedFaces,\n"
|
|
||||||
" const xfer<pointField>&,\n"
|
" const xfer<pointField>&,\n"
|
||||||
" const xfer<faceList>&,\n"
|
" const xfer<faceList>&,\n"
|
||||||
" const xfer<labelList>& owner,\n"
|
" const xfer<labelList>& owner,\n"
|
||||||
@ -1163,7 +1161,6 @@ void Foam::polyMesh::resetPrimitives
|
|||||||
(
|
(
|
||||||
"polyMesh::polyMesh::resetPrimitives\n"
|
"polyMesh::polyMesh::resetPrimitives\n"
|
||||||
"(\n"
|
"(\n"
|
||||||
" const label nUsedFaces,\n"
|
|
||||||
" const xfer<pointField>&,\n"
|
" const xfer<pointField>&,\n"
|
||||||
" const xfer<faceList>&,\n"
|
" const xfer<faceList>&,\n"
|
||||||
" const xfer<labelList>& owner,\n"
|
" const xfer<labelList>& owner,\n"
|
||||||
|
|||||||
@ -477,7 +477,6 @@ public:
|
|||||||
// patch ends at nActiveFaces) and change patches with addPatches.
|
// patch ends at nActiveFaces) and change patches with addPatches.
|
||||||
void resetPrimitives
|
void resetPrimitives
|
||||||
(
|
(
|
||||||
const label nUsedFaces,
|
|
||||||
const xfer<pointField>& points,
|
const xfer<pointField>& points,
|
||||||
const xfer<faceList>& faces,
|
const xfer<faceList>& faces,
|
||||||
const xfer<labelList>& owner,
|
const xfer<labelList>& owner,
|
||||||
|
|||||||
@ -1349,11 +1349,10 @@ void Foam::polyDualMesh::calcDual
|
|||||||
// Assign to mesh.
|
// Assign to mesh.
|
||||||
resetPrimitives
|
resetPrimitives
|
||||||
(
|
(
|
||||||
dualFaces.size(),
|
xferMove(dualPoints),
|
||||||
dualPoints,
|
xferMove(dualFaces),
|
||||||
dualFaces,
|
xferMove(dualOwner),
|
||||||
dualOwner,
|
xferMove(dualNeighbour),
|
||||||
dualNeighbour,
|
|
||||||
patchSizes,
|
patchSizes,
|
||||||
patchStarts
|
patchStarts
|
||||||
);
|
);
|
||||||
|
|||||||
@ -959,7 +959,7 @@ void Foam::polyMeshAdder::mergeFaceZones
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
zoneNames.setSize(fz0.size() + fz1.size());
|
zoneNames.setSize(fz0.size() + fz1.size());
|
||||||
|
|
||||||
append(fz0.names(), zoneNames);
|
append(fz0.names(), zoneNames);
|
||||||
|
|
||||||
from1ToAll.setSize(fz1.size());
|
from1ToAll.setSize(fz1.size());
|
||||||
@ -1041,7 +1041,7 @@ void Foam::polyMeshAdder::mergeCellZones
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
zoneNames.setSize(cz0.size() + cz1.size());
|
zoneNames.setSize(cz0.size() + cz1.size());
|
||||||
|
|
||||||
append(cz0.names(), zoneNames);
|
append(cz0.names(), zoneNames);
|
||||||
|
|
||||||
from1ToAll.setSize(cz1.size());
|
from1ToAll.setSize(cz1.size());
|
||||||
@ -1168,7 +1168,7 @@ void Foam::polyMeshAdder::addZones
|
|||||||
mesh.pointZones()
|
mesh.pointZones()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<faceZone*> fZones(fzFaces.size());
|
List<faceZone*> fZones(fzFaces.size());
|
||||||
forAll(fZones, i)
|
forAll(fZones, i)
|
||||||
{
|
{
|
||||||
@ -1557,7 +1557,7 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
|||||||
|
|
||||||
// Inplace extend mesh0 patches (note that patches0.size() now also
|
// Inplace extend mesh0 patches (note that patches0.size() now also
|
||||||
// has changed)
|
// has changed)
|
||||||
polyBoundaryMesh& allPatches =
|
polyBoundaryMesh& allPatches =
|
||||||
const_cast<polyBoundaryMesh&>(mesh0.boundaryMesh());
|
const_cast<polyBoundaryMesh&>(mesh0.boundaryMesh());
|
||||||
allPatches.setSize(allPatchNames.size());
|
allPatches.setSize(allPatchNames.size());
|
||||||
|
|
||||||
@ -1702,11 +1702,10 @@ Foam::autoPtr<Foam::mapAddedPolyMesh> Foam::polyMeshAdder::add
|
|||||||
mesh0.resetMotion(); // delete any oldPoints.
|
mesh0.resetMotion(); // delete any oldPoints.
|
||||||
mesh0.resetPrimitives
|
mesh0.resetPrimitives
|
||||||
(
|
(
|
||||||
allFaces.size(),
|
xferMove(allPoints),
|
||||||
allPoints,
|
xferMove(allFaces),
|
||||||
allFaces,
|
xferMove(allOwner),
|
||||||
allOwner,
|
xferMove(allNeighbour),
|
||||||
allNeighbour,
|
|
||||||
patchSizes, // size
|
patchSizes, // size
|
||||||
patchStarts, // patchstarts
|
patchStarts, // patchstarts
|
||||||
validBoundary // boundary valid?
|
validBoundary // boundary valid?
|
||||||
@ -1792,7 +1791,7 @@ Foam::Map<Foam::label> Foam::polyMeshAdder::findSharedPoints
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Assign single master for every shared with multiple geometric points
|
// Assign single master for every shared with multiple geometric points
|
||||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@ -852,7 +852,7 @@ void Foam::polyTopoChange::compact
|
|||||||
<< " at position " << faceI << endl
|
<< " at position " << faceI << endl
|
||||||
<< "Probably face has not been adapted for"
|
<< "Probably face has not been adapted for"
|
||||||
<< " removed points." << abort(FatalError);
|
<< " removed points." << abort(FatalError);
|
||||||
}
|
}
|
||||||
localPointMap[pointI] = newPointI++;
|
localPointMap[pointI] = newPointI++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -904,7 +904,7 @@ void Foam::polyTopoChange::compact
|
|||||||
<< " at position " << faceI << endl
|
<< " at position " << faceI << endl
|
||||||
<< "Probably face has not been adapted for"
|
<< "Probably face has not been adapted for"
|
||||||
<< " removed points." << abort(FatalError);
|
<< " removed points." << abort(FatalError);
|
||||||
}
|
}
|
||||||
localPointMap[pointI] = newPointI++;
|
localPointMap[pointI] = newPointI++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2987,13 +2987,12 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
|
|||||||
|
|
||||||
mesh.resetPrimitives
|
mesh.resetPrimitives
|
||||||
(
|
(
|
||||||
nActiveFaces_,
|
xferMove(renumberedMeshPoints),
|
||||||
xferMove<pointField>(renumberedMeshPoints),
|
xferMoveTo<faceList>(faces_),
|
||||||
xferMove<faceList>(faces_),
|
xferMoveTo<labelList>(faceOwner_),
|
||||||
xferMove<labelList>(faceOwner_),
|
xferMoveTo<labelList>(faceNeighbour_),
|
||||||
xferMove<labelList>(faceNeighbour_),
|
patchSizes,
|
||||||
xferMove<labelList>(patchSizes),
|
patchStarts,
|
||||||
xferMove<labelList>(patchStarts),
|
|
||||||
syncParallel
|
syncParallel
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -3004,13 +3003,12 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::polyTopoChange::changeMesh
|
|||||||
// Set new points.
|
// Set new points.
|
||||||
mesh.resetPrimitives
|
mesh.resetPrimitives
|
||||||
(
|
(
|
||||||
nActiveFaces_,
|
xferMove(newPoints),
|
||||||
xferMove<pointField>(newPoints),
|
xferMoveTo<faceList>(faces_),
|
||||||
xferMove<faceList>(faces_),
|
xferMoveTo<labelList>(faceOwner_),
|
||||||
xferMove<labelList>(faceOwner_),
|
xferMoveTo<labelList>(faceNeighbour_),
|
||||||
xferMove<labelList>(faceNeighbour_),
|
patchSizes,
|
||||||
xferMove<labelList>(patchSizes),
|
patchStarts,
|
||||||
xferMove<labelList>(patchStarts),
|
|
||||||
syncParallel
|
syncParallel
|
||||||
);
|
);
|
||||||
// Invalidate new points to go into map.
|
// Invalidate new points to go into map.
|
||||||
|
|||||||
@ -237,7 +237,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
|||||||
|
|
||||||
// Go through the points and start from the point used twice
|
// Go through the points and start from the point used twice
|
||||||
// check all the edges to find the edges starting from this point
|
// check all the edges to find the edges starting from this point
|
||||||
// add the
|
// add the
|
||||||
|
|
||||||
labelListList edgesToInsert(singleEdges.size());
|
labelListList edgesToInsert(singleEdges.size());
|
||||||
label nEdgesToInsert = 0;
|
label nEdgesToInsert = 0;
|
||||||
@ -438,7 +438,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
|||||||
// Warning: the ordering must be parametric, because in
|
// Warning: the ordering must be parametric, because in
|
||||||
// the case of multiple point insertion onto the same edge
|
// the case of multiple point insertion onto the same edge
|
||||||
// it is possible to get non-cyclic loops
|
// it is possible to get non-cyclic loops
|
||||||
//
|
//
|
||||||
|
|
||||||
const labelList& unorderedEdge = edgesToInsert[edgeToInsertI];
|
const labelList& unorderedEdge = edgesToInsert[edgeToInsertI];
|
||||||
|
|
||||||
@ -678,7 +678,7 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
|||||||
<< oldFaces[currentFaceIndex] << nl
|
<< oldFaces[currentFaceIndex] << nl
|
||||||
<< "newFace: " << newFace << endl;
|
<< "newFace: " << newFace << endl;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
// Check for duplicate points in the new face
|
// Check for duplicate points in the new face
|
||||||
forAll (newFace, checkI)
|
forAll (newFace, checkI)
|
||||||
{
|
{
|
||||||
@ -756,11 +756,10 @@ bool Foam::polyMeshZipUpCells(polyMesh& mesh)
|
|||||||
// (patches guaranteed to be in increasing order)
|
// (patches guaranteed to be in increasing order)
|
||||||
mesh.resetPrimitives
|
mesh.resetPrimitives
|
||||||
(
|
(
|
||||||
patchStarts[bMesh.size()-1] + patchSizes[bMesh.size()-1],
|
xfer<pointField>::null(),
|
||||||
mesh.points(),
|
xferMove(newFaces),
|
||||||
newFaces,
|
xfer<labelList>::null(),
|
||||||
mesh.faceOwner(),
|
xfer<labelList>::null(),
|
||||||
mesh.faceNeighbour(),
|
|
||||||
patchSizes,
|
patchSizes,
|
||||||
patchStarts,
|
patchStarts,
|
||||||
true // boundary forms valid boundary mesh.
|
true // boundary forms valid boundary mesh.
|
||||||
|
|||||||
Reference in New Issue
Block a user