ENH: decompositionMethod: move decomposition constraints into library

This commit is contained in:
mattijs
2013-08-06 10:58:44 +01:00
parent a36205f202
commit 8562923f3c
4 changed files with 1020 additions and 745 deletions

View File

@ -255,6 +255,34 @@ public:
// CompactListList<label>& cellCells
//);
//- Helper: extract constraints
void setConstraints
(
const polyMesh& mesh,
boolList& blockedFace,
PtrList<labelList>& specifiedProcessorFaces,
labelList& specifiedProcessor
);
// Decompose a mesh with constraints:
// - blockedFace : whether owner and neighbour should be on
// - specifiedProcessorFaces, specifiedProcessor : sets of faces
// that should go to same processor (as specified in
// specifiedProcessor, can be -1)
// - explicitConnections : connections between baffle faces
// Set all to zero size to have unconstrained decomposition.
labelList decompose
(
const polyMesh& mesh,
const scalarField& cellWeights,
const boolList& blockedFace,
const PtrList<labelList>& specifiedProcessorFaces,
const labelList& specifiedProcessor,
const List<labelPair>& explicitConnections
);
//- Decompose a mesh. Apply all constraints from decomposeParDict
// ('preserveFaceZones' etc). Calls either
// - no constraints, empty weights: