mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user