diff --git a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C index c096aed1f..27b16317c 100644 --- a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C +++ b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C @@ -123,7 +123,10 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) // Distribute the cells according to the given processor label // Calculate the addressing information for the original mesh - Info<< "\nCalculating original mesh data" << endl; + if (debug) + { + Pout<< "\nCalculating original mesh data" << endl; + } // Set references to the original mesh const polyBoundaryMesh& patches = mesh_.boundaryMesh(); @@ -136,7 +139,10 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) // loop through the list of processor labels for the cell and add the // cell shape to the list of cells for the appropriate processor - Info<< "\nDistributing cells to processors" << endl; + if (debug) + { + Pout<< "\nDistributing cells to processors" << endl; + } // Memory management { @@ -164,7 +170,10 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) } } - Info << "\nDistributing faces to processors" << endl; + if (debug) + { + Pout << "\nDistributing faces to processors" << endl; + } // Loop through internal faces and decide which processor they belong to // First visit all internal faces. If cells at both sides belong to the @@ -753,8 +762,11 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) << exit(FatalError); } - Info<< "Preserving global face zone " << fzNames[nameI] - << endl; + if (debug) + { + Pout<< "Preserving global face zone " << fzNames[nameI] + << endl; + } const faceZone& curFz = fz[zoneID]; @@ -953,7 +965,10 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) } // End for all processors } // End of memory management - Info << "\nCalculating processor boundary addressing" << endl; + if (debug) + { + Pout << "\nCalculating processor boundary addressing" << endl; + } // For every patch of processor boundary, find the index of the original // patch. Mis-alignment is caused by the fact that patches with zero size @@ -1023,7 +1038,10 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) curBoundaryAddressing.setSize(nPatches); } - Info << "\nDistributing points to processors" << endl; + if (debug) + { + Pout << "\nDistributing points to processors" << endl; + } // For every processor, loop through the list of faces for the processor. // For every face, loop through the list of points and mark the point as diff --git a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/domainDecomposition.H b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/domainDecomposition.H index af42612f3..7fa550ac9 100644 --- a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/domainDecomposition.H +++ b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/domainDecomposition.H @@ -163,6 +163,7 @@ public: // Declare name of the class and its debug switch ClassName("domainDecomposition"); + // Constructors //- Construct from mesh and dictionary diff --git a/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesRebuild.C b/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesRebuild.C index e677381a4..76add0eb9 100644 --- a/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesRebuild.C +++ b/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesRebuild.C @@ -805,7 +805,11 @@ Foam::processorMeshesReconstructor::reconstructMesh(const Time& db) // Dump first valid mesh without checking { const label fvmId = firstValidMesh(); - Pout<< "Dump mesh " << fvmId << endl; + + if (debug) + { + Pout<< "Dump mesh " << fvmId << endl; + } cellOffset[fvmId] = 0; @@ -1060,9 +1064,12 @@ Foam::processorMeshesReconstructor::reconstructMesh(const Time& db) else { // Valid mesh, combine it - Pout<< "Dump mesh " << procI - << " cell offset: " << cellOffset[procI] - << endl; + if (debug) + { + Pout<< "Dump mesh " << procI + << " cell offset: " << cellOffset[procI] + << endl; + } const polyMesh& curMesh = meshes_[procI]; const polyBoundaryMesh& procPatches = curMesh.boundaryMesh(); @@ -1542,12 +1549,24 @@ Foam::processorMeshesReconstructor::reconstructMesh(const Time& db) // Mesh assembly completed - Info<< "Global mesh size (final): " << nl - << " nPoints = " << reconPoints.size() << nl - << " nFaces = " << reconFaces.size() << nl - << " nCells = " << nReconCells << nl - << " nPatches = " << reconPatchSizes.size() << nl - << " nPatchFaces = " << reconPatchSizes << endl; + if (!Pstream::parRun()) + { + Info<< "Global mesh size (final): " << nl + << " nPoints = " << reconPoints.size() << nl + << " nFaces = " << reconFaces.size() << nl + << " nCells = " << nReconCells << nl + << " nPatches = " << reconPatchSizes.size() << nl + << " nPatchFaces = " << reconPatchSizes << endl; + } + else if (debug) + { + Pout<< "Local mesh size (final): " << nl + << " nPoints = " << reconPoints.size() << nl + << " nFaces = " << reconFaces.size() << nl + << " nCells = " << nReconCells << nl + << " nPatches = " << reconPatchSizes.size() << nl + << " nPatchFaces = " << reconPatchSizes << endl; + } // Renumber the face-processor addressing list for all pieces // now that the number of internal faces is known diff --git a/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesReconstructor.C b/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesReconstructor.C index 55a754bca..289794ab5 100644 --- a/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesReconstructor.C +++ b/src/decompositionMethods/decomposeReconstruct/reconstructTools/finiteVolume/processorMeshesReconstructor.C @@ -25,6 +25,11 @@ License #include "processorMeshesReconstructor.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +defineTypeNameAndDebug(Foam::processorMeshesReconstructor, 0); + + // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::processorMeshesReconstructor::readMeshes(PtrList