From 8ca9d01c74aadc8cb5196ce385d44ebff8bdfc94 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Thu, 12 Apr 2018 17:47:18 +0100 Subject: [PATCH] Modified decomposition tools: passive patches --- .../decomposeReconstruct/Make/files | 3 + .../finiteVolume/decomposeMesh.C | 359 ++++++++++++++---- .../finiteVolume/distributeCells.C | 43 ++- .../finiteVolume/domainDecomposition.C | 72 ++-- .../finiteVolume/domainDecomposition.H | 27 +- 5 files changed, 392 insertions(+), 112 deletions(-) diff --git a/src/decompositionMethods/decomposeReconstruct/Make/files b/src/decompositionMethods/decomposeReconstruct/Make/files index 061c4f182..0d3f4f821 100644 --- a/src/decompositionMethods/decomposeReconstruct/Make/files +++ b/src/decompositionMethods/decomposeReconstruct/Make/files @@ -1,3 +1,6 @@ +passivePatches/passiveProcessorPolyPatch/passiveProcessorPolyPatch.C +passivePatches/passiveProcessorFvPatch/passiveProcessorFvPatch.C + decomposeTools/finiteVolume/domainDecomposition.C decomposeTools/finiteVolume/distributeCells.C decomposeTools/finiteVolume/decomposeMesh.C diff --git a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C index 189c8c558..56bbea30d 100644 --- a/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C +++ b/src/decompositionMethods/decomposeReconstruct/decomposeTools/finiteVolume/decomposeMesh.C @@ -36,7 +36,8 @@ Description #include "boolList.H" #include "cellList.H" #include "primitiveMesh.H" -#include "cyclicPolyPatch.H" +#include "processorFvPatch.H" +#include "cyclicFvPatch.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -50,11 +51,11 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) // calculate the addressing information for the original mesh Info<< "\nCalculating original mesh data" << endl; - // set references to the original mesh - const polyBoundaryMesh& patches = mesh_.boundaryMesh(); + // Set references to the original mesh + const fvBoundaryMesh& patches = mesh_.boundary(); // Access all faces to grab the zones - const faceList& fcs = mesh_.allFaces(); + const faceList& allFaces = mesh_.allFaces(); const labelList& owner = mesh_.faceOwner(); const labelList& neighbour = mesh_.faceNeighbour(); @@ -100,12 +101,12 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) { List > procFaceList(nProcs_); - forAll (neighbour, facei) + forAll (neighbour, faceI) { - if (cellToProc_[owner[facei]] == cellToProc_[neighbour[facei]]) + if (cellToProc_[owner[faceI]] == cellToProc_[neighbour[faceI]]) { // Face internal to processor - procFaceList[cellToProc_[owner[facei]]].append(facei); + procFaceList[cellToProc_[owner[faceI]]].append(faceI); } } @@ -125,17 +126,19 @@ void Foam::domainDecomposition::decomposeMesh(const bool filterEmptyPatches) List > procPatchIndex(nProcs_); - forAll (neighbour, facei) + forAll (neighbour, faceI) { - if (cellToProc_[owner[facei]] != cellToProc_[neighbour[facei]]) + if (cellToProc_[owner[faceI]] != cellToProc_[neighbour[faceI]]) { - // inter - processor patch face found. Go through the list of + // Inter - processor patch face found. Go through the list of // inside boundaries for the owner processor and try to find // this inter-processor patch. - label ownerProc = cellToProc_[owner[facei]]; - label neighbourProc = cellToProc_[neighbour[facei]]; + const label ownerProc = cellToProc_[owner[faceI]]; + const label neighbourProc = cellToProc_[neighbour[faceI]]; + // Search algorithm repeated in processor patches. Reconsider + // HJ, 11/Apr/2018 SLList