decompositionMethod: Removed diagnostics message
This commit is contained in:
@ -179,8 +179,6 @@ Foam::autoPtr<Foam::decompositionMethod> Foam::decompositionMethod::New
|
||||
const dictionary& decompositionDict
|
||||
)
|
||||
{
|
||||
Pout << " Foam::decompositionMethod::New " << decompositionDict << endl;
|
||||
|
||||
const word methodType(decompositionDict.lookup("method"));
|
||||
|
||||
Pout<< "Selecting decompositionMethod " << methodType << endl;
|
||||
@ -473,21 +471,6 @@ void Foam::decompositionMethod::calcCellCells
|
||||
}
|
||||
|
||||
cellCells.m().setSize(newIndex);
|
||||
|
||||
// forAll(cellCells, celli)
|
||||
//{
|
||||
// Pout<< "Original: Coarse cell " << celli << endl;
|
||||
// forAll(mesh.cellCells()[celli], i)
|
||||
// {
|
||||
// Pout<< " nbr:" << mesh.cellCells()[celli][i] << endl;
|
||||
// }
|
||||
// Pout<< "Compacted: Coarse cell " << celli << endl;
|
||||
// const labelUList cCells = cellCells[celli];
|
||||
// forAll(cCells, i)
|
||||
// {
|
||||
// Pout<< " nbr:" << cCells[i] << endl;
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@ -695,381 +678,6 @@ void Foam::decompositionMethod::calcCellCells
|
||||
}
|
||||
|
||||
|
||||
//void Foam::decompositionMethod::calcCellCells
|
||||
//(
|
||||
// const polyMesh& mesh,
|
||||
// const boolList& blockedFace,
|
||||
// const List<labelPair>& explicitConnections,
|
||||
// const labelList& agglom,
|
||||
// const label nLocalCoarse,
|
||||
// const bool parallel,
|
||||
// CompactListList<label>& cellCells
|
||||
//)
|
||||
//{
|
||||
// const labelList& faceOwner = mesh.faceOwner();
|
||||
// const labelList& faceNeighbour = mesh.faceNeighbour();
|
||||
// const polyBoundaryMesh& patches = mesh.boundaryMesh();
|
||||
//
|
||||
//
|
||||
// // Create global cell numbers
|
||||
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// globalIndex globalAgglom
|
||||
// (
|
||||
// nLocalCoarse,
|
||||
// Pstream::msgType(),
|
||||
// Pstream::worldComm,
|
||||
// parallel
|
||||
// );
|
||||
//
|
||||
//
|
||||
// // Get agglomerate owner on other side of coupled faces
|
||||
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// labelList globalNeighbour(mesh.nFaces()-mesh.nInternalFaces());
|
||||
//
|
||||
// forAll(patches, patchi)
|
||||
// {
|
||||
// const polyPatch& pp = patches[patchi];
|
||||
//
|
||||
// if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp)))
|
||||
// {
|
||||
// label facei = pp.start();
|
||||
// label bFacei = pp.start() - mesh.nInternalFaces();
|
||||
//
|
||||
// forAll(pp, i)
|
||||
// {
|
||||
// globalNeighbour[bFacei] = globalAgglom.toGlobal
|
||||
// (
|
||||
// agglom[faceOwner[facei]]
|
||||
// );
|
||||
//
|
||||
// bFacei++;
|
||||
// facei++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Get the cell on the other side of coupled patches
|
||||
// syncTools::swapBoundaryFaceList(mesh, globalNeighbour);
|
||||
//
|
||||
//
|
||||
// // Count number of faces (internal + coupled)
|
||||
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// // Number of faces per coarse cell
|
||||
// labelList nFacesPerCell(nLocalCoarse, 0);
|
||||
//
|
||||
// // 1. Internal faces
|
||||
// for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
|
||||
// {
|
||||
// if (!blockedFace[facei])
|
||||
// {
|
||||
// label own = agglom[faceOwner[facei]];
|
||||
// label nei = agglom[faceNeighbour[facei]];
|
||||
//
|
||||
// nFacesPerCell[own]++;
|
||||
// nFacesPerCell[nei]++;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 2. Coupled faces
|
||||
// forAll(patches, patchi)
|
||||
// {
|
||||
// const polyPatch& pp = patches[patchi];
|
||||
//
|
||||
// if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp)))
|
||||
// {
|
||||
// label facei = pp.start();
|
||||
// label bFacei = pp.start()-mesh.nInternalFaces();
|
||||
//
|
||||
// forAll(pp, i)
|
||||
// {
|
||||
// if (!blockedFace[facei])
|
||||
// {
|
||||
// label own = agglom[faceOwner[facei]];
|
||||
//
|
||||
// label globalNei = globalNeighbour[bFacei];
|
||||
// if
|
||||
// (
|
||||
// !globalAgglom.isLocal(globalNei)
|
||||
// || globalAgglom.toLocal(globalNei) != own
|
||||
// )
|
||||
// {
|
||||
// nFacesPerCell[own]++;
|
||||
// }
|
||||
//
|
||||
// facei++;
|
||||
// bFacei++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 3. Explicit connections between non-coupled boundary faces
|
||||
// forAll(explicitConnections, i)
|
||||
// {
|
||||
// const labelPair& baffle = explicitConnections[i];
|
||||
// label f0 = baffle.first();
|
||||
// label f1 = baffle.second();
|
||||
//
|
||||
// if (!blockedFace[f0] && blockedFace[f1])
|
||||
// {
|
||||
// label f0Own = agglom[faceOwner[f0]];
|
||||
// label f1Own = agglom[faceOwner[f1]];
|
||||
//
|
||||
// // Always count the connection between the two owner sides
|
||||
// if (f0Own != f1Own)
|
||||
// {
|
||||
// nFacesPerCell[f0Own]++;
|
||||
// nFacesPerCell[f1Own]++;
|
||||
// }
|
||||
//
|
||||
// // Add any neighbour side connections
|
||||
// if (mesh.isInternalFace(f0))
|
||||
// {
|
||||
// label f0Nei = agglom[faceNeighbour[f0]];
|
||||
//
|
||||
// if (mesh.isInternalFace(f1))
|
||||
// {
|
||||
// // Internal faces
|
||||
// label f1Nei = agglom[faceNeighbour[f1]];
|
||||
//
|
||||
// if (f0Own != f1Nei)
|
||||
// {
|
||||
// nFacesPerCell[f0Own]++;
|
||||
// nFacesPerCell[f1Nei]++;
|
||||
// }
|
||||
// if (f0Nei != f1Own)
|
||||
// {
|
||||
// nFacesPerCell[f0Nei]++;
|
||||
// nFacesPerCell[f1Own]++;
|
||||
// }
|
||||
// if (f0Nei != f1Nei)
|
||||
// {
|
||||
// nFacesPerCell[f0Nei]++;
|
||||
// nFacesPerCell[f1Nei]++;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // f1 boundary face
|
||||
// if (f0Nei != f1Own)
|
||||
// {
|
||||
// nFacesPerCell[f0Nei]++;
|
||||
// nFacesPerCell[f1Own]++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (mesh.isInternalFace(f1))
|
||||
// {
|
||||
// label f1Nei = agglom[faceNeighbour[f1]];
|
||||
// if (f0Own != f1Nei)
|
||||
// {
|
||||
// nFacesPerCell[f0Own]++;
|
||||
// nFacesPerCell[f1Nei]++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // Fill in offset and data
|
||||
// // ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// cellCells.setSize(nFacesPerCell);
|
||||
//
|
||||
// nFacesPerCell = 0;
|
||||
//
|
||||
// labelList& m = cellCells.m();
|
||||
// const labelList& offsets = cellCells.offsets();
|
||||
//
|
||||
// // 1. For internal faces is just offsetted owner and neighbour
|
||||
// for (label facei = 0; facei < mesh.nInternalFaces(); facei++)
|
||||
// {
|
||||
// if (!blockedFace[facei])
|
||||
// {
|
||||
// label own = agglom[faceOwner[facei]];
|
||||
// label nei = agglom[faceNeighbour[facei]];
|
||||
//
|
||||
// m[offsets[own] + nFacesPerCell[own]++] =
|
||||
// globalAgglom.toGlobal(nei);
|
||||
// m[offsets[nei] + nFacesPerCell[nei]++] =
|
||||
// globalAgglom.toGlobal(own);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 2. For boundary faces is offsetted coupled neighbour
|
||||
// forAll(patches, patchi)
|
||||
// {
|
||||
// const polyPatch& pp = patches[patchi];
|
||||
//
|
||||
// if (pp.coupled() && (parallel || !isA<processorPolyPatch>(pp)))
|
||||
// {
|
||||
// label facei = pp.start();
|
||||
// label bFacei = pp.start()-mesh.nInternalFaces();
|
||||
//
|
||||
// forAll(pp, i)
|
||||
// {
|
||||
// if (!blockedFace[facei])
|
||||
// {
|
||||
// label own = agglom[faceOwner[facei]];
|
||||
//
|
||||
// label globalNei = globalNeighbour[bFacei];
|
||||
//
|
||||
// if
|
||||
// (
|
||||
// !globalAgglom.isLocal(globalNei)
|
||||
// || globalAgglom.toLocal(globalNei) != own
|
||||
// )
|
||||
// {
|
||||
// m[offsets[own] + nFacesPerCell[own]++] = globalNei;
|
||||
// }
|
||||
//
|
||||
// facei++;
|
||||
// bFacei++;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // 3. Explicit connections between non-coupled boundary faces
|
||||
// forAll(explicitConnections, i)
|
||||
// {
|
||||
// const labelPair& baffle = explicitConnections[i];
|
||||
// label f0 = baffle.first();
|
||||
// label f1 = baffle.second();
|
||||
//
|
||||
// if (!blockedFace[f0] && blockedFace[f1])
|
||||
// {
|
||||
// label f0Own = agglom[faceOwner[f0]];
|
||||
// label f1Own = agglom[faceOwner[f1]];
|
||||
//
|
||||
// // Always count the connection between the two owner sides
|
||||
// if (f0Own != f1Own)
|
||||
// {
|
||||
// m[offsets[f0Own] + nFacesPerCell[f0Own]++] =
|
||||
// globalAgglom.toGlobal(f1Own);
|
||||
// m[offsets[f1Own] + nFacesPerCell[f1Own]++] =
|
||||
// globalAgglom.toGlobal(f0Own);
|
||||
// }
|
||||
//
|
||||
// // Add any neighbour side connections
|
||||
// if (mesh.isInternalFace(f0))
|
||||
// {
|
||||
// label f0Nei = agglom[faceNeighbour[f0]];
|
||||
//
|
||||
// if (mesh.isInternalFace(f1))
|
||||
// {
|
||||
// // Internal faces
|
||||
// label f1Nei = agglom[faceNeighbour[f1]];
|
||||
//
|
||||
// if (f0Own != f1Nei)
|
||||
// {
|
||||
// m[offsets[f0Own] + nFacesPerCell[f0Own]++] =
|
||||
// globalAgglom.toGlobal(f1Nei);
|
||||
// m[offsets[f1Nei] + nFacesPerCell[f1Nei]++] =
|
||||
// globalAgglom.toGlobal(f1Nei);
|
||||
// }
|
||||
// if (f0Nei != f1Own)
|
||||
// {
|
||||
// m[offsets[f0Nei] + nFacesPerCell[f0Nei]++] =
|
||||
// globalAgglom.toGlobal(f1Own);
|
||||
// m[offsets[f1Own] + nFacesPerCell[f1Own]++] =
|
||||
// globalAgglom.toGlobal(f0Nei);
|
||||
// }
|
||||
// if (f0Nei != f1Nei)
|
||||
// {
|
||||
// m[offsets[f0Nei] + nFacesPerCell[f0Nei]++] =
|
||||
// globalAgglom.toGlobal(f1Nei);
|
||||
// m[offsets[f1Nei] + nFacesPerCell[f1Nei]++] =
|
||||
// globalAgglom.toGlobal(f0Nei);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// // f1 boundary face
|
||||
// if (f0Nei != f1Own)
|
||||
// {
|
||||
// m[offsets[f0Nei] + nFacesPerCell[f0Nei]++] =
|
||||
// globalAgglom.toGlobal(f1Own);
|
||||
// m[offsets[f1Own] + nFacesPerCell[f1Own]++] =
|
||||
// globalAgglom.toGlobal(f0Nei);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (mesh.isInternalFace(f1))
|
||||
// {
|
||||
// label f1Nei = agglom[faceNeighbour[f1]];
|
||||
// if (f0Own != f1Nei)
|
||||
// {
|
||||
// m[offsets[f0Own] + nFacesPerCell[f0Own]++] =
|
||||
// globalAgglom.toGlobal(f1Nei);
|
||||
// m[offsets[f1Nei] + nFacesPerCell[f1Nei]++] =
|
||||
// globalAgglom.toGlobal(f0Own);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // Check for duplicates connections between cells
|
||||
// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// // Done as postprocessing step since we now have cellCells.
|
||||
// label newIndex = 0;
|
||||
// labelHashSet nbrCells;
|
||||
//
|
||||
//
|
||||
// if (cellCells.size() == 0)
|
||||
// {
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// label startIndex = cellCells.offsets()[0];
|
||||
//
|
||||
// forAll(cellCells, celli)
|
||||
// {
|
||||
// nbrCells.clear();
|
||||
// nbrCells.insert(globalAgglom.toGlobal(celli));
|
||||
//
|
||||
// label endIndex = cellCells.offsets()[celli+1];
|
||||
//
|
||||
// for (label i = startIndex; i < endIndex; i++)
|
||||
// {
|
||||
// if (nbrCells.insert(cellCells.m()[i]))
|
||||
// {
|
||||
// cellCells.m()[newIndex++] = cellCells.m()[i];
|
||||
// }
|
||||
// }
|
||||
// startIndex = endIndex;
|
||||
// cellCells.offsets()[celli+1] = newIndex;
|
||||
// }
|
||||
//
|
||||
// cellCells.m().setSize(newIndex);
|
||||
//
|
||||
// // forAll(cellCells, celli)
|
||||
// //{
|
||||
// // Pout<< "Original: Coarse cell " << celli << endl;
|
||||
// // forAll(mesh.cellCells()[celli], i)
|
||||
// // {
|
||||
// // Pout<< " nbr:" << mesh.cellCells()[celli][i] << endl;
|
||||
// // }
|
||||
// // Pout<< "Compacted: Coarse cell " << celli << endl;
|
||||
// // const labelUList cCells = cellCells[celli];
|
||||
// // forAll(cCells, i)
|
||||
// // {
|
||||
// // Pout<< " nbr:" << cCells[i] << endl;
|
||||
// // }
|
||||
// //}
|
||||
//}
|
||||
|
||||
|
||||
Foam::labelList Foam::decompositionMethod::decompose
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
|
||||
Reference in New Issue
Block a user