mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: snappyHexMesh: handle parallel cyclics. Fixes #1731.
This commit is contained in:
@ -676,15 +676,42 @@ void Foam::snappySnapDriver::calcNearestFacePointProperties
|
||||
List<point>(),
|
||||
mapDistribute::transform()
|
||||
);
|
||||
syncTools::syncPointList
|
||||
(
|
||||
mesh,
|
||||
pp.meshPoints(),
|
||||
pointFaceCentres,
|
||||
listPlusEqOp<point>(),
|
||||
List<point>(),
|
||||
mapDistribute::transformPosition()
|
||||
);
|
||||
|
||||
{
|
||||
// Make into displacement before synchronising to avoid any problems
|
||||
// with parallel cyclics
|
||||
pointField localPoints(pp.points(), pp.meshPoints());
|
||||
forAll(pointFaceCentres, pointi)
|
||||
{
|
||||
const point& pt = pp.points()[pp.meshPoints()[pointi]];
|
||||
|
||||
List<point>& pFc = pointFaceCentres[pointi];
|
||||
for (point& p : pFc)
|
||||
{
|
||||
p -= pt;
|
||||
}
|
||||
}
|
||||
syncTools::syncPointList
|
||||
(
|
||||
mesh,
|
||||
pp.meshPoints(),
|
||||
pointFaceCentres,
|
||||
listPlusEqOp<point>(),
|
||||
List<point>(),
|
||||
mapDistribute::transform()
|
||||
);
|
||||
forAll(pointFaceCentres, pointi)
|
||||
{
|
||||
const point& pt = pp.points()[pp.meshPoints()[pointi]];
|
||||
|
||||
List<point>& pFc = pointFaceCentres[pointi];
|
||||
for (point& p : pFc)
|
||||
{
|
||||
p += pt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
syncTools::syncPointList
|
||||
(
|
||||
mesh,
|
||||
|
||||
Reference in New Issue
Block a user