ENH: parallel: overhaul of parallel mapping

- redistributePar to have almost (complete) functionality of decomposePar+reconstructPar
- low-level distributed Field mapping
- support for mapping surfaceFields (including flipping faces)
- support for decomposing/reconstructing refinement data
This commit is contained in:
mattijs
2015-11-17 15:05:05 +00:00
parent 09dec5263b
commit 916dcb8685
205 changed files with 21665 additions and 4196 deletions

View File

@ -2,8 +2,8 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -36,8 +36,8 @@ SourceFiles
#define decompositionMethod_H
#include "polyMesh.H"
#include "pointField.H"
#include "CompactListList.H"
#include "decompositionConstraint.H"
namespace Foam
{
@ -56,6 +56,8 @@ protected:
const dictionary& decompositionDict_;
label nProcessors_;
//- Optional constraints
PtrList<decompositionConstraint> constraints_;
private:
@ -98,14 +100,7 @@ public:
// Constructors
//- Construct given the decomposition dictionary
decompositionMethod(const dictionary& decompositionDict)
:
decompositionDict_(decompositionDict),
nProcessors_
(
readLabel(decompositionDict.lookup("numberOfSubdomains"))
)
{}
decompositionMethod(const dictionary& decompositionDict);
//- Destructor
@ -233,6 +228,19 @@ public:
CompactListList<label>& cellCells
);
//- Helper: determine (local or global) cellCells and face weights
// from mesh agglomeration.
// Uses mag of faceArea as weights
static void calcCellCells
(
const polyMesh& mesh,
const labelList& agglom,
const label nLocalCoarse,
const bool parallel,
CompactListList<label>& cellCells,
CompactListList<scalar>& cellCellWeights
);
//- Helper: extract constraints:
// blockedface: existing faces where owner and neighbour on same
// proc
@ -248,6 +256,19 @@ public:
List<labelPair>& explicitConnections
);
//- Helper: apply constraints to a decomposition. This gives
// constraints opportunity to modify decomposition in case
// the native decomposition method has not obeyed all constraints
void applyConstraints
(
const polyMesh& mesh,
const boolList& blockedFace,
const PtrList<labelList>& specifiedProcessorFaces,
const labelList& specifiedProcessor,
const List<labelPair>& explicitConnections,
labelList& finalDecomp
);
// Decompose a mesh with constraints:
// - blockedFace : whether owner and neighbour should be on same
// processor