Skip to content
Snippets Groups Projects
Commit 8628d421 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: foamToVTK patch/proc ids missing if there are no volume fields

parent fcd7423f
No related branches found
No related tags found
1 merge request!488add point snapping to iso-surface topo algorithm (#2210)
...@@ -264,7 +264,7 @@ Description ...@@ -264,7 +264,7 @@ Description
// Begin CellData // Begin CellData
if (internalWriter) if (internalWriter)
{ {
// Optionally with cellID and procID fields // Optionally with (cellID, procID) fields
internalWriter->beginCellData internalWriter->beginCellData
( (
(withMeshIds ? 1 + (internalWriter->parallel() ? 1 : 0) : 0) (withMeshIds ? 1 + (internalWriter->parallel() ? 1 : 0) : 0)
...@@ -278,20 +278,21 @@ Description ...@@ -278,20 +278,21 @@ Description
} }
} }
if (nVolFields) if (nVolFields || withMeshIds)
{ {
for (vtk::patchWriter& writer : patchWriters) for (vtk::patchWriter& writer : patchWriters)
{ {
// Optionally with patchID field // Optionally with (patchID, procID) fields
writer.beginCellData writer.beginCellData
( (
(withMeshIds ? 1 : 0) (withMeshIds ? 2 : 0)
+ nVolFields + nVolFields
); );
if (withMeshIds) if (withMeshIds)
{ {
writer.writePatchIDs(); writer.writePatchIDs();
writer.writeProcIDs();
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment