From 245a11123517ab63a145edbf4baf427481759397 Mon Sep 17 00:00:00 2001 From: mattijs Date: Tue, 21 Feb 2012 10:57:21 +0000 Subject: [PATCH] STYLE: fvMeshDistribute: added extra comment about parallel sync --- .../fvMeshDistribute/fvMeshDistribute.C | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C index 3ce3d4a51b..ce77536053 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistribute.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -553,6 +553,12 @@ Foam::autoPtr Foam::fvMeshDistribute::repatch saveBoundaryFields(tFlds); // Change the mesh (no inflation). Note: parallel comms allowed. + // + // NOTE: there is one very particular problem with this ordering. + // We first create the processor patches and use these to merge out + // shared points (see mergeSharedPoints below). So temporarily points + // and edges do not match! + autoPtr map = meshMod.changeMesh(mesh_, false, true); // Update fields. No inflation, parallel sync. @@ -2429,10 +2435,14 @@ Foam::autoPtr Foam::fvMeshDistribute::distribute // Change patches. Since this might change ordering of coupled faces // we also need to adapt our constructMaps. + // NOTE: there is one very particular problem with this structure. + // We first create the processor patches and use these to merge out + // shared points (see mergeSharedPoints below). So temporarily points + // and edges do not match! repatch(newPatchID, constructFaceMap); // See if any geometrically shared points need to be merged. Note: does - // parallel comms. + // parallel comms. After this points and edges should again be consistent. mergeSharedPoints(constructPointMap); // Bit of hack: processorFvPatchField does not get reset since created