mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: remove dead code from syncTools (unused since 2014 or earlier)
This commit is contained in:
@ -54,6 +54,7 @@ SourceFiles
|
||||
namespace Foam
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
class polyBoundaryMesh;
|
||||
|
||||
/*---------------------------------------------------------------------------*\
|
||||
|
||||
@ -771,224 +771,6 @@ void Foam::syncTools::syncEdgeMap
|
||||
}
|
||||
|
||||
|
||||
//template<class T, class CombineOp, class TransformOp>
|
||||
//void Foam::syncTools::syncPointList
|
||||
//(
|
||||
// const polyMesh& mesh,
|
||||
// List<T>& pointValues,
|
||||
// const CombineOp& cop,
|
||||
// const T& nullValue,
|
||||
// const TransformOp& top
|
||||
//)
|
||||
//{
|
||||
// if (pointValues.size() != mesh.nPoints())
|
||||
// {
|
||||
// FatalErrorInFunction
|
||||
// << "Number of values " << pointValues.size()
|
||||
// << " is not equal to the number of points in the mesh "
|
||||
// << mesh.nPoints() << abort(FatalError);
|
||||
// }
|
||||
//
|
||||
// const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
//
|
||||
// // Synchronize multiple shared points.
|
||||
// const globalMeshData& pd = mesh.globalData();
|
||||
//
|
||||
// // Values on shared points.
|
||||
// Field<T> sharedPts(0);
|
||||
// if (pd.nGlobalPoints() > 0)
|
||||
// {
|
||||
// // Values on shared points.
|
||||
// sharedPts.setSize(pd.nGlobalPoints(), nullValue);
|
||||
//
|
||||
// forAll(pd.sharedPointLabels(), i)
|
||||
// {
|
||||
// label meshPointi = pd.sharedPointLabels()[i];
|
||||
// // Fill my entries in the shared points
|
||||
// sharedPts[pd.sharedPointAddr()[i]] = pointValues[meshPointi];
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (Pstream::parRun())
|
||||
// {
|
||||
// PstreamBuffers pBufs(Pstream::commsTypes::nonBlocking);
|
||||
//
|
||||
// // Send
|
||||
//
|
||||
// forAll(patches, patchi)
|
||||
// {
|
||||
// if
|
||||
// (
|
||||
// isA<processorPolyPatch>(patches[patchi])
|
||||
// && patches[patchi].nPoints() > 0
|
||||
// )
|
||||
// {
|
||||
// const processorPolyPatch& procPatch =
|
||||
// refCast<const processorPolyPatch>(patches[patchi]);
|
||||
//
|
||||
// // Get data per patchPoint in neighbouring point numbers.
|
||||
// Field<T> patchInfo(procPatch.nPoints());
|
||||
//
|
||||
// const labelList& meshPts = procPatch.meshPoints();
|
||||
// const labelList& nbrPts = procPatch.neighbPoints();
|
||||
//
|
||||
// forAll(nbrPts, pointi)
|
||||
// {
|
||||
// label nbrPointi = nbrPts[pointi];
|
||||
// patchInfo[nbrPointi] = pointValues[meshPts[pointi]];
|
||||
// }
|
||||
//
|
||||
// UOPstream toNbr(procPatch.neighbProcNo(), pBufs);
|
||||
// toNbr << patchInfo;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// pBufs.finishedSends();
|
||||
//
|
||||
// // Receive and combine.
|
||||
//
|
||||
// forAll(patches, patchi)
|
||||
// {
|
||||
// if
|
||||
// (
|
||||
// isA<processorPolyPatch>(patches[patchi])
|
||||
// && patches[patchi].nPoints() > 0
|
||||
// )
|
||||
// {
|
||||
// const processorPolyPatch& procPatch =
|
||||
// refCast<const processorPolyPatch>(patches[patchi]);
|
||||
//
|
||||
// Field<T> nbrPatchInfo(procPatch.nPoints());
|
||||
// {
|
||||
// UIPstream fromNbr(procPatch.neighbProcNo(), pBufs);
|
||||
// fromNbr >> nbrPatchInfo;
|
||||
// }
|
||||
//
|
||||
// // Transform to this side
|
||||
// top(procPatch, nbrPatchInfo);
|
||||
//
|
||||
// const labelList& meshPts = procPatch.meshPoints();
|
||||
//
|
||||
// forAll(meshPts, pointi)
|
||||
// {
|
||||
// label meshPointi = meshPts[pointi];
|
||||
// cop(pointValues[meshPointi], nbrPatchInfo[pointi]);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Do the cyclics.
|
||||
// forAll(patches, patchi)
|
||||
// {
|
||||
// if (isA<cyclicPolyPatch>(patches[patchi]))
|
||||
// {
|
||||
// const cyclicPolyPatch& cycPatch =
|
||||
// refCast<const cyclicPolyPatch>(patches[patchi]);
|
||||
//
|
||||
// if (cycPatch.owner())
|
||||
// {
|
||||
// // Owner does all.
|
||||
//
|
||||
// const edgeList& coupledPoints = cycPatch.coupledPoints();
|
||||
// const labelList& meshPts = cycPatch.meshPoints();
|
||||
// const cyclicPolyPatch& nbrPatch = cycPatch.neighbPatch();
|
||||
// const labelList& nbrMeshPoints = nbrPatch.meshPoints();
|
||||
//
|
||||
// Field<T> half0Values(coupledPoints.size());
|
||||
// Field<T> half1Values(coupledPoints.size());
|
||||
//
|
||||
// forAll(coupledPoints, i)
|
||||
// {
|
||||
// const edge& e = coupledPoints[i];
|
||||
// half0Values[i] = pointValues[meshPts[e[0]]];
|
||||
// half1Values[i] = pointValues[nbrMeshPoints[e[1]]];
|
||||
// }
|
||||
//
|
||||
// //SubField<T> slice0(half0Values, half0Values.size());
|
||||
// //SubField<T> slice1(half1Values, half1Values.size());
|
||||
// //top(cycPatch, reinterpret_cast<Field<T>&>(slice1));
|
||||
// //top(nbrPatch, reinterpret_cast<Field<T>&>(slice0));
|
||||
//
|
||||
// top(cycPatch, half1Values);
|
||||
// top(nbrPatch, half0Values);
|
||||
//
|
||||
// forAll(coupledPoints, i)
|
||||
// {
|
||||
// const edge& e = coupledPoints[i];
|
||||
// cop(pointValues[meshPts[e[0]]], half1Values[i]);
|
||||
// cop(pointValues[nbrMeshPoints[e[1]]], half0Values[i]);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Synchronize multiple shared points.
|
||||
// const globalMeshData& pd = mesh.globalData();
|
||||
//
|
||||
// if (pd.nGlobalPoints() > 0)
|
||||
// {
|
||||
// // Combine on master.
|
||||
// Pstream::listCombineGather(sharedPts, cop);
|
||||
// Pstream::listCombineScatter(sharedPts);
|
||||
//
|
||||
// // Now we will all have the same information. Merge it back with
|
||||
// // my local information.
|
||||
// forAll(pd.sharedPointLabels(), i)
|
||||
// {
|
||||
// label meshPointi = pd.sharedPointLabels()[i];
|
||||
// pointValues[meshPointi] = sharedPts[pd.sharedPointAddr()[i]];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
//template<class T, class CombineOp, class TransformOp>
|
||||
//void Foam::syncTools::syncPointList
|
||||
//(
|
||||
// const polyMesh& mesh,
|
||||
// const labelList& meshPoints,
|
||||
// List<T>& pointValues,
|
||||
// const CombineOp& cop,
|
||||
// const T& nullValue,
|
||||
// const TransformOp& top
|
||||
//)
|
||||
//{
|
||||
// if (pointValues.size() != meshPoints.size())
|
||||
// {
|
||||
// FatalErrorInFunction
|
||||
// << "Number of values " << pointValues.size()
|
||||
// << " is not equal to the number of points "
|
||||
// << meshPoints.size() << abort(FatalError);
|
||||
// }
|
||||
//
|
||||
// if (!hasCouples(mesh.boundaryMesh()))
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// Field<T> meshValues(mesh.nPoints(), nullValue);
|
||||
//
|
||||
// forAll(meshPoints, i)
|
||||
// {
|
||||
// meshValues[meshPoints[i]] = pointValues[i];
|
||||
// }
|
||||
//
|
||||
// syncTools::syncPointList
|
||||
// (
|
||||
// mesh,
|
||||
// meshValues,
|
||||
// cop, // combine op
|
||||
// nullValue, // null value
|
||||
// top // position or field
|
||||
// );
|
||||
//
|
||||
// forAll(meshPoints, i)
|
||||
// {
|
||||
// pointValues[i] = meshValues[meshPoints[i]];
|
||||
// }
|
||||
//}
|
||||
|
||||
template<class T, class CombineOp, class TransformOp>
|
||||
void Foam::syncTools::syncPointList
|
||||
(
|
||||
@ -1011,27 +793,6 @@ void Foam::syncTools::syncPointList
|
||||
}
|
||||
|
||||
|
||||
//template<class CombineOp>
|
||||
//void Foam::syncTools::syncPointPositions
|
||||
//(
|
||||
// const polyMesh& mesh,
|
||||
// List<point>& pointValues,
|
||||
// const CombineOp& cop,
|
||||
// const point& nullValue
|
||||
//)
|
||||
//{
|
||||
// if (pointValues.size() != mesh.nPoints())
|
||||
// {
|
||||
// FatalErrorInFunction
|
||||
// << "Number of values " << pointValues.size()
|
||||
// << " is not equal to the number of points in the mesh "
|
||||
// << mesh.nPoints() << abort(FatalError);
|
||||
// }
|
||||
//
|
||||
// mesh.globalData().syncPointData(pointValues, cop, true);
|
||||
//}
|
||||
|
||||
|
||||
template<class T, class CombineOp, class TransformOp>
|
||||
void Foam::syncTools::syncPointList
|
||||
(
|
||||
@ -1089,63 +850,6 @@ void Foam::syncTools::syncPointList
|
||||
}
|
||||
|
||||
|
||||
//template<class CombineOp>
|
||||
//void Foam::syncTools::syncPointPositions
|
||||
//(
|
||||
// const polyMesh& mesh,
|
||||
// const labelList& meshPoints,
|
||||
// List<point>& pointValues,
|
||||
// const CombineOp& cop,
|
||||
// const point& nullValue
|
||||
//)
|
||||
//{
|
||||
// if (pointValues.size() != meshPoints.size())
|
||||
// {
|
||||
// FatalErrorInFunction
|
||||
// << "Number of values " << pointValues.size()
|
||||
// << " is not equal to the number of meshPoints "
|
||||
// << meshPoints.size() << abort(FatalError);
|
||||
// }
|
||||
// const globalMeshData& gd = mesh.globalData();
|
||||
// const indirectPrimitivePatch& cpp = gd.coupledPatch();
|
||||
// const Map<label>& mpm = cpp.meshPointMap();
|
||||
//
|
||||
// List<point> cppFld(cpp.nPoints(), nullValue);
|
||||
//
|
||||
// forAll(meshPoints, i)
|
||||
// {
|
||||
// label pointi = meshPoints[i];
|
||||
// Map<label>::const_iterator iter = mpm.find(pointi);
|
||||
// if (iter != mpm.end())
|
||||
// {
|
||||
// cppFld[iter()] = pointValues[i];
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// globalMeshData::syncData
|
||||
// (
|
||||
// cppFld,
|
||||
// gd.globalPointSlaves(),
|
||||
// gd.globalPointTransformedSlaves(),
|
||||
// gd.globalPointSlavesMap(),
|
||||
// gd.globalTransforms(),
|
||||
// cop,
|
||||
// true, //position?
|
||||
// mapDistribute::transform() // not used
|
||||
// );
|
||||
//
|
||||
// forAll(meshPoints, i)
|
||||
// {
|
||||
// label pointi = meshPoints[i];
|
||||
// Map<label>::const_iterator iter = mpm.find(pointi);
|
||||
// if (iter != mpm.end())
|
||||
// {
|
||||
// pointValues[i] = cppFld[iter()];
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
template<class T, class CombineOp, class TransformOp>
|
||||
void Foam::syncTools::syncEdgeList
|
||||
(
|
||||
@ -1190,50 +894,6 @@ void Foam::syncTools::syncEdgeList
|
||||
}
|
||||
|
||||
|
||||
//template<class CombineOp>
|
||||
//void Foam::syncTools::syncEdgePositions
|
||||
//(
|
||||
// const polyMesh& mesh,
|
||||
// List<point>& edgeValues,
|
||||
// const CombineOp& cop,
|
||||
// const point& nullValue
|
||||
//)
|
||||
//{
|
||||
// if (edgeValues.size() != mesh.nEdges())
|
||||
// {
|
||||
// FatalErrorInFunction
|
||||
// << "Number of values " << edgeValues.size()
|
||||
// << " is not equal to the number of edges in the mesh "
|
||||
// << mesh.nEdges() << abort(FatalError);
|
||||
// }
|
||||
//
|
||||
// const globalMeshData& gd = mesh.globalData();
|
||||
// const labelList& meshEdges = gd.coupledPatchMeshEdges();
|
||||
// const globalIndexAndTransform& git = gd.globalTransforms();
|
||||
// const mapDistribute& map = gd.globalEdgeSlavesMap();
|
||||
//
|
||||
// List<point> cppFld(UIndirectList<point>(edgeValues, meshEdges));
|
||||
//
|
||||
// globalMeshData::syncData
|
||||
// (
|
||||
// cppFld,
|
||||
// gd.globalEdgeSlaves(),
|
||||
// gd.globalEdgeTransformedSlaves(),
|
||||
// map,
|
||||
// git,
|
||||
// cop,
|
||||
// true, //position?
|
||||
// mapDistribute::transform() // not used
|
||||
// );
|
||||
//
|
||||
// // Extract back onto mesh
|
||||
// forAll(meshEdges, i)
|
||||
// {
|
||||
// edgeValues[meshEdges[i]] = cppFld[i];
|
||||
// }
|
||||
//}
|
||||
|
||||
|
||||
template<class T, class CombineOp, class TransformOp>
|
||||
void Foam::syncTools::syncEdgeList
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user