utilities: Updated moveMesh -> setPoints
Mesh manipulation utilities do not need to generate or use mesh-motion fluxes so it is more efficient to use setPoints rather than moveMesh.
This commit is contained in:
@ -1145,7 +1145,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing might not do this)
|
// Move mesh (since morphing might not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
subsetter.subMesh().movePoints(map().preMotionPoints());
|
subsetter.subMesh().setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Writing mesh with split blockedFaces to time "
|
Info<< "Writing mesh with split blockedFaces to time "
|
||||||
|
|||||||
@ -517,7 +517,7 @@ void subsetMesh
|
|||||||
|
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update topology on cellRemover
|
// Update topology on cellRemover
|
||||||
|
|||||||
@ -113,7 +113,7 @@ label mergePatchFaces
|
|||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -269,7 +269,7 @@ label mergePatchFaces
|
|||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -322,7 +322,7 @@ label mergeEdges(const scalar minCos, polyMesh& mesh)
|
|||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -534,7 +534,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
cutter.topoChange(map());
|
cutter.topoChange(map());
|
||||||
@ -580,7 +580,7 @@ int main(int argc, char *argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Move master point to destination.
|
// Move master point to destination.
|
||||||
mesh.movePoints(newPoints);
|
mesh.setPoints(newPoints);
|
||||||
|
|
||||||
List<pointEdgeCollapse> allPointInfo;
|
List<pointEdgeCollapse> allPointInfo;
|
||||||
const globalIndex globalPoints(mesh.nPoints());
|
const globalIndex globalPoints(mesh.nPoints());
|
||||||
@ -606,7 +606,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not implemented yet:
|
// Not implemented yet:
|
||||||
@ -651,7 +651,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
cutter.topoChange(map());
|
cutter.topoChange(map());
|
||||||
|
|||||||
@ -153,7 +153,7 @@ int main(int argc, char *argv[])
|
|||||||
// Optionally inflate mesh
|
// Optionally inflate mesh
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
Info<< "Refined from " << returnReduce(map().nOldCells(), sumOp<label>())
|
Info<< "Refined from " << returnReduce(map().nOldCells(), sumOp<label>())
|
||||||
|
|||||||
@ -244,7 +244,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update stored labels on meshCutter.
|
// Update stored labels on meshCutter.
|
||||||
|
|||||||
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update numbering of cells/vertices.
|
// Update numbering of cells/vertices.
|
||||||
|
|||||||
@ -689,7 +689,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update stored labels on meshCutter
|
// Update stored labels on meshCutter
|
||||||
|
|||||||
@ -429,7 +429,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -610,7 +610,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
newPoints[extrudePatch.meshPoints()[i]] = layer0Points[i];
|
newPoints[extrudePatch.meshPoints()[i]] = layer0Points[i];
|
||||||
}
|
}
|
||||||
mesh.movePoints(newPoints);
|
mesh.setPoints(newPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -894,7 +894,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (if inflation used)
|
// Move mesh (if inflation used)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1024,7 +1024,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (if inflation used)
|
// Move mesh (if inflation used)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2669,7 +2669,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing might not do this)
|
// Move mesh (since morphing might not do this)
|
||||||
if (addBafflesMap().hasMotionPoints())
|
if (addBafflesMap().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(addBafflesMap().preMotionPoints());
|
mesh.setPoints(addBafflesMap().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
mesh.setInstance(meshInstance);
|
mesh.setInstance(meshInstance);
|
||||||
|
|||||||
@ -104,7 +104,7 @@ static const NamedEnum<ExtrudeMode, 2> ExtrudeModeNames;
|
|||||||
// - layer0Points[meshPointi];
|
// - layer0Points[meshPointi];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// fMesh.movePoints(layer0Points);
|
// fMesh.setPoints(layer0Points);
|
||||||
|
|
||||||
// return displacement;
|
// return displacement;
|
||||||
//}
|
//}
|
||||||
|
|||||||
@ -729,7 +729,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing might not do this)
|
// Move mesh (since morphing might not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove any now zero-sized patches
|
// Remove any now zero-sized patches
|
||||||
|
|||||||
@ -724,7 +724,7 @@ int main(int argc, char *argv[])
|
|||||||
// tensors.
|
// tensors.
|
||||||
Info<< "Doing topology modification to order faces." << nl << endl;
|
Info<< "Doing topology modification to order faces." << nl << endl;
|
||||||
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, true);
|
autoPtr<polyTopoChangeMap> map = meshMod.changeMesh(mesh, true);
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
|
|
||||||
if (writeCyclicMatch)
|
if (writeCyclicMatch)
|
||||||
{
|
{
|
||||||
@ -754,7 +754,7 @@ int main(int argc, char *argv[])
|
|||||||
Info<< "Points changed by average:" << gAverage(diff)
|
Info<< "Points changed by average:" << gAverage(diff)
|
||||||
<< " max:" << gMax(diff) << nl << endl;
|
<< " max:" << gMax(diff) << nl << endl;
|
||||||
|
|
||||||
mesh.movePoints(newPoints);
|
mesh.setPoints(newPoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 3. Remove zeros-sized patches
|
// 3. Remove zeros-sized patches
|
||||||
|
|||||||
@ -224,7 +224,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overwrite)
|
if (overwrite)
|
||||||
|
|||||||
@ -62,7 +62,7 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
Info<< "Time = " << runTime.userTimeName() << endl;
|
Info<< "Time = " << runTime.userTimeName() << endl;
|
||||||
|
|
||||||
mesh.movePoints(motionPtr->newPoints());
|
mesh.setPoints(motionPtr->newPoints());
|
||||||
|
|
||||||
runTime.write();
|
runTime.write();
|
||||||
|
|
||||||
|
|||||||
@ -517,7 +517,7 @@ int main(int argc, char *argv[])
|
|||||||
// Optionally inflate mesh
|
// Optionally inflate mesh
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!overwrite)
|
if (!overwrite)
|
||||||
|
|||||||
@ -1069,7 +1069,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing might not do this)
|
// Move mesh (since morphing might not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -120,7 +120,7 @@ int main(int argc, char *argv[])
|
|||||||
// Move mesh (since morphing does not do this)
|
// Move mesh (since morphing does not do this)
|
||||||
if (map().hasMotionPoints())
|
if (map().hasMotionPoints())
|
||||||
{
|
{
|
||||||
mesh.movePoints(map().preMotionPoints());
|
mesh.setPoints(map().preMotionPoints());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (overwrite)
|
if (overwrite)
|
||||||
|
|||||||
@ -450,7 +450,7 @@ int main(int argc, char *argv[])
|
|||||||
// Execute all polyMeshModifiers
|
// Execute all polyMeshModifiers
|
||||||
autoPtr<polyTopoChangeMap> map = stitcher.changeMesh(true);
|
autoPtr<polyTopoChangeMap> map = stitcher.changeMesh(true);
|
||||||
|
|
||||||
mesh.movePoints(map->preMotionPoints());
|
mesh.setPoints(map->preMotionPoints());
|
||||||
|
|
||||||
// Write mesh
|
// Write mesh
|
||||||
if (overwrite)
|
if (overwrite)
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
{
|
{
|
||||||
// Read new points
|
// Read new points
|
||||||
io.readOpt() = IOobject::MUST_READ;
|
io.readOpt() = IOobject::MUST_READ;
|
||||||
mesh.movePoints(pointIOField(io));
|
mesh.setPoints(pointIOField(io));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -23,5 +23,5 @@ if (ioPoints.headerOk())
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
mesh.movePoints(newPoints);
|
mesh.setPoints(newPoints);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user