Commit fc541cee authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: crash during gap refinement (fixes #1919)

- fixed indexing error (crashes under windows).
  No crash but still incorrect on other systems
parent 5e660c36
...@@ -453,12 +453,13 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement ...@@ -453,12 +453,13 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
forAll(surf1, i) forAll(surf1, i)
{ {
// Combine selfProx of shell and surfaces. Ignore regions for // Combine selfProx of shell and surfaces.
// now // Ignore regions for now
const label cellI = cellMap[i]; const label cellI = cellMap[i];
const label shelli = const label shelli =
( (
cellToCompact[cellI] != -1 (cellI != -1 && cellToCompact[cellI] != -1)
? gapShell[cellToCompact[cellI]] ? gapShell[cellToCompact[cellI]]
: -1 : -1
); );
...@@ -482,8 +483,6 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement ...@@ -482,8 +483,6 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
) )
{ {
// Found intersection with surface. Check opposite normal. // Found intersection with surface. Check opposite normal.
label cellI = cellMap[i];
if if
( (
cellI != -1 cellI != -1
......
Supports Markdown
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