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) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -121,6 +121,42 @@ Foam::scalar Foam::meshToMeshMethod::interVol
}
Foam::Tuple2<Foam::scalar, Foam::point>
Foam::meshToMeshMethod::interVolAndCentroid
(
const label srcCellI,
const label tgtCellI
)
{
tetOverlapVolume overlapEngine;
treeBoundBox bbTgtCell(tgt_.points(), tgt_.cellPoints()[tgtCellI]);
Tuple2<scalar, point> volAndInertia =
overlapEngine.cellCellOverlapMomentMinDecomp
(
src_,
srcCellI,
tgt_,
tgtCellI,
bbTgtCell
);
// Convert from inertia to centroid
if (volAndInertia.first() <= ROOTVSMALL)
{
volAndInertia.first() = 0.0;
volAndInertia.second() = vector::zero;
}
else
{
volAndInertia.second() /= volAndInertia.first();
}
return volAndInertia;
}
void Foam::meshToMeshMethod::appendNbrCells
(
const label cellI,