Commit 695246ad authored by mattijs's avatar mattijs
Browse files

ENH: snappyHexMesh: directional refinement parallel

parent 01b785f2
......@@ -1586,6 +1586,8 @@ Foam::label Foam::snappyRefineDriver::directionalShellRefine
labelList& cellLevel =
const_cast<labelIOList&>(meshRefiner_.meshCutter().cellLevel());
labelList& pointLevel =
const_cast<labelIOList&>(meshRefiner_.meshCutter().pointLevel());
// Determine the minimum and maximum cell levels that are candidates for
......@@ -1705,6 +1707,17 @@ Foam::label Foam::snappyRefineDriver::directionalShellRefine
dirCellLevel
);
// Note: edges will have been split. The points might have
// inherited pointLevel from either side of the edge which
// might not be the same for coupled edges so sync
syncTools::syncPointList
(
mesh,
pointLevel,
maxEqOp<label>(),
labelMin
);
forAll(map().cellMap(), celli)
{
if (isRefineCell[map().cellMap()[celli]])
......@@ -1712,6 +1725,18 @@ Foam::label Foam::snappyRefineDriver::directionalShellRefine
dirCellLevel[celli][dir]++;
}
}
// Do something with the pointLevel. See discussion about the
// cellLevel. Do we keep min/max ?
forAll(map().pointMap(), pointi)
{
label oldPointi = map().pointMap()[pointi];
if (map().reversePointMap()[oldPointi] != pointi)
{
// Is added point (splitting an edge)
pointLevel[pointi]++;
}
}
}
}
......
......@@ -146,26 +146,6 @@ class snappyRefineDriver
// Directional refinement
//- Calculate direction of face (using geometry)
List<direction> faceDirection() const;
//- Check if level across (directed) face obeys 2:1
label faceConsistentRefinement
(
const PackedBoolList& isDirFace,
const List<labelVector>& dirCellLevel,
const direction dir,
const bool maxSet,
PackedBoolList& refineCell
) const;
//- Make sure 2:1 refinement in given direction
labelList consistentDirectionalRefinement
(
const direction dir,
const List<labelVector>& dirCellLevel,
const labelUList& candidateCells,
const bool maxSet
) const;
//- Refine (directional) all cells inside/outside shell
label directionalShellRefine
(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment