mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: shm: parallel consistency. See #2331
This commit is contained in:
@ -2443,26 +2443,45 @@ Foam::labelList Foam::hexRef8::consistentSlowRefinement
|
||||
// Seed all boundary faces with owner value. This is to make sure that
|
||||
// they are visited (probably only important for coupled faces since
|
||||
// these need to be visited from both sides)
|
||||
List<refinementData> nbrCellInfo;
|
||||
syncTools::swapBoundaryCellList(mesh_, allCellInfo, nbrCellInfo);
|
||||
|
||||
for (label facei = mesh_.nInternalFaces(); facei < mesh_.nFaces(); facei++)
|
||||
{
|
||||
// Check if face already handled in loop above
|
||||
if (!allFaceInfo[facei].valid(dummyTrackData))
|
||||
{
|
||||
label own = faceOwner[facei];
|
||||
const label own = faceOwner[facei];
|
||||
const auto& nbrInfo = nbrCellInfo[facei-mesh_.nInternalFaces()];
|
||||
|
||||
// Seed face with transported data from owner.
|
||||
refinementData faceData;
|
||||
faceData.updateFace
|
||||
(
|
||||
mesh_,
|
||||
facei,
|
||||
own,
|
||||
allCellInfo[own],
|
||||
FaceCellWave<refinementData, int>::propagationTol(),
|
||||
dummyTrackData
|
||||
);
|
||||
seedFaces.append(facei);
|
||||
seedFacesInfo.append(faceData);
|
||||
if (allCellInfo[own].count() > nbrInfo.count())
|
||||
{
|
||||
allFaceInfo[facei].updateFace
|
||||
(
|
||||
mesh_,
|
||||
facei,
|
||||
own,
|
||||
allCellInfo[own],
|
||||
FaceCellWave<refinementData, int>::propagationTol(),
|
||||
dummyTrackData
|
||||
);
|
||||
seedFaces.append(facei);
|
||||
seedFacesInfo.append(allFaceInfo[facei]);
|
||||
}
|
||||
else if (allCellInfo[own].count() < nbrInfo.count())
|
||||
{
|
||||
allFaceInfo[facei].updateFace
|
||||
(
|
||||
mesh_,
|
||||
facei,
|
||||
-1, // Lucky! neighbCelli not used!
|
||||
nbrInfo,
|
||||
FaceCellWave<refinementData, int>::propagationTol(),
|
||||
dummyTrackData
|
||||
);
|
||||
seedFaces.append(facei);
|
||||
seedFacesInfo.append(allFaceInfo[facei]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2054,7 +2054,6 @@ Foam::labelList Foam::meshRefinement::intersectedPoints() const
|
||||
|
||||
// Mark all points on faces that will become baffles
|
||||
bitSet isBoundaryPoint(mesh_.nPoints());
|
||||
label nBoundaryPoints = 0;
|
||||
|
||||
const labelList& surfIndex = surfaceIndex();
|
||||
|
||||
@ -2062,15 +2061,7 @@ Foam::labelList Foam::meshRefinement::intersectedPoints() const
|
||||
{
|
||||
if (surfIndex[facei] != -1)
|
||||
{
|
||||
const face& f = faces[facei];
|
||||
|
||||
forAll(f, fp)
|
||||
{
|
||||
if (isBoundaryPoint.set(f[fp]))
|
||||
{
|
||||
nBoundaryPoints++;
|
||||
}
|
||||
}
|
||||
isBoundaryPoint.set(faces[facei]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2083,37 +2074,17 @@ Foam::labelList Foam::meshRefinement::intersectedPoints() const
|
||||
// if (patchi != -1)
|
||||
// {
|
||||
// const polyPatch& pp = mesh_.boundaryMesh()[patchi];
|
||||
//
|
||||
// label facei = pp.start();
|
||||
//
|
||||
// forAll(pp, i)
|
||||
// {
|
||||
// const face& f = faces[facei];
|
||||
//
|
||||
// forAll(f, fp)
|
||||
// {
|
||||
// if (isBoundaryPoint.set(f[fp]))
|
||||
// nBoundaryPoints++;
|
||||
// }
|
||||
// }
|
||||
// facei++;
|
||||
// isBoundaryPoint.set(faces[pp.start()+i]);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
// Make sure all processors have the same data
|
||||
syncTools::syncPointList(mesh_, isBoundaryPoint, orEqOp<unsigned int>(), 0);
|
||||
|
||||
// Pack
|
||||
labelList boundaryPoints(nBoundaryPoints);
|
||||
nBoundaryPoints = 0;
|
||||
forAll(isBoundaryPoint, pointi)
|
||||
{
|
||||
if (isBoundaryPoint.test(pointi))
|
||||
{
|
||||
boundaryPoints[nBoundaryPoints++] = pointi;
|
||||
}
|
||||
}
|
||||
|
||||
return boundaryPoints;
|
||||
return isBoundaryPoint.sortedToc();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user