diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index 7f74c3761d..9349455847 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -405,7 +405,7 @@ void Foam::backgroundMeshDecomposition::initialRefinement() icellWeights ); - fvMeshDistribute distributor(mesh_, mergeDist_); + fvMeshDistribute distributor(mesh_); autoPtr mapDist = distributor.distribute ( @@ -813,7 +813,6 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition ) ), decomposerPtr_(decompositionMethod::New(decomposeDict_)), - mergeDist_(1e-6*mesh_.bounds().mag()), spanScale_(coeffsDict.lookup("spanScale")), minCellSizeLimit_ ( @@ -998,7 +997,7 @@ Foam::backgroundMeshDecomposition::distribute Info<< " Redistributing background mesh cells" << endl; - fvMeshDistribute distributor(mesh_, mergeDist_); + fvMeshDistribute distributor(mesh_); autoPtr mapDist = distributor.distribute(newDecomp); diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C index b7264a2f64..ae7edf54ce 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -1247,7 +1247,7 @@ int main(int argc, char *argv[]) } // Mesh distribution engine (uses tolerance to reconstruct meshes) - fvMeshDistribute distributor(mesh, mergeDist); + fvMeshDistribute distributor(mesh); diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 0432e048e6..080717687a 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,17 +25,11 @@ Application reconstructParMesh Description - Reconstructs a mesh using geometric information only. + Reconstructs a mesh. Writes point/face/cell procAddressing so afterwards reconstructPar can be used to reconstruct fields. - Note: - - uses geometric matching tolerance (set with -mergeTol (at your option) - - If the parallel case does not have correct procBoundaries use the - -fullMatch option which will check all boundary faces (bit slower). - \*---------------------------------------------------------------------------*/ #include "argList.H" @@ -56,320 +50,111 @@ using namespace Foam; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Tolerance (as fraction of the bounding box). Needs to be fairly lax since -// usually meshes get written with limited precision (6 digits) -static const scalar defaultMergeTol = 1e-7; - - -static void renumber -( - const labelList& map, - labelList& elems -) -{ - forAll(elems, i) - { - if (elems[i] >= 0) - { - elems[i] = map[elems[i]]; - } - } -} - - -// Determine which faces are coupled. Uses geometric merge distance. -// Looks either at all boundaryFaces (fullMatch) or only at the -// procBoundaries for proci. Assumes that masterMesh contains already merged -// all the processors < proci. autoPtr determineCoupledFaces ( - const bool fullMatch, const label masterMeshProcStart, const label masterMeshProcEnd, const polyMesh& masterMesh, const label meshToAddProcStart, const label meshToAddProcEnd, - const polyMesh& meshToAdd, - const scalar mergeDist + const polyMesh& meshToAdd ) { - if (fullMatch || masterMesh.nCells() == 0) - { - return autoPtr - ( - new faceCoupleInfo - ( - masterMesh, - meshToAdd, - mergeDist, // Absolute merging distance - true // Matching faces identical - ) - ); - } - else - { - // Pick up all patches on masterMesh ending in "toDDD" where DDD is - // the processor number proci. + const polyBoundaryMesh& masterPatches = masterMesh.boundaryMesh(); + const polyBoundaryMesh& addPatches = meshToAdd.boundaryMesh(); - const polyBoundaryMesh& masterPatches = masterMesh.boundaryMesh(); - - - DynamicList