BUG: foamToVTK patch/proc ids missing if there are no volume fields
This commit is contained in:
parent
fcd7423fa8
commit
8628d4216c
@ -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
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user