diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H index e81db70929..617b4c3a6d 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncTools.H @@ -54,6 +54,7 @@ SourceFiles namespace Foam { +// Forward declarations class polyBoundaryMesh; /*---------------------------------------------------------------------------*\ diff --git a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C index 66ffd62cb3..d20017a897 100644 --- a/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C +++ b/src/OpenFOAM/meshes/polyMesh/syncTools/syncToolsTemplates.C @@ -771,224 +771,6 @@ void Foam::syncTools::syncEdgeMap } -//template -//void Foam::syncTools::syncPointList -//( -// const polyMesh& mesh, -// List& 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 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(patches[patchi]) -// && patches[patchi].nPoints() > 0 -// ) -// { -// const processorPolyPatch& procPatch = -// refCast(patches[patchi]); -// -// // Get data per patchPoint in neighbouring point numbers. -// Field 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(patches[patchi]) -// && patches[patchi].nPoints() > 0 -// ) -// { -// const processorPolyPatch& procPatch = -// refCast(patches[patchi]); -// -// Field 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(patches[patchi])) -// { -// const cyclicPolyPatch& cycPatch = -// refCast(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 half0Values(coupledPoints.size()); -// Field half1Values(coupledPoints.size()); -// -// forAll(coupledPoints, i) -// { -// const edge& e = coupledPoints[i]; -// half0Values[i] = pointValues[meshPts[e[0]]]; -// half1Values[i] = pointValues[nbrMeshPoints[e[1]]]; -// } -// -// //SubField slice0(half0Values, half0Values.size()); -// //SubField slice1(half1Values, half1Values.size()); -// //top(cycPatch, reinterpret_cast&>(slice1)); -// //top(nbrPatch, reinterpret_cast&>(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 -//void Foam::syncTools::syncPointList -//( -// const polyMesh& mesh, -// const labelList& meshPoints, -// List& 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 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 void Foam::syncTools::syncPointList ( @@ -1011,27 +793,6 @@ void Foam::syncTools::syncPointList } -//template -//void Foam::syncTools::syncPointPositions -//( -// const polyMesh& mesh, -// List& 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 void Foam::syncTools::syncPointList ( @@ -1089,63 +850,6 @@ void Foam::syncTools::syncPointList } -//template -//void Foam::syncTools::syncPointPositions -//( -// const polyMesh& mesh, -// const labelList& meshPoints, -// List& 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