Commit 6dd5a5f3 authored by Mark OLESEN's avatar Mark OLESEN
Browse files

BUG: foamToVTK -cellSet produces rubbish or segfault (closes #516)

- erroneous double logic for subset meshes.

  The underlying vtk::vtuCells uses a cellMap to map into a global
  field, which also allows handling of decomposed polyhedral cells.

  If a mesh subset is involved (eg, cellSet, cellZone), then the
  set/zone cellMap can be used to ensure that the original number is
  properly adjusted. For foamToVTK, the meshSubsetHelper already
  does the subsetting and is used when loading fields.

  Does not affect ParaView reader module since there we work on the
  full field and do the subsetting manually (using the cellMap).
parent 29102400
......@@ -831,16 +831,8 @@ int main(int argc, char *argv[])
if (vtuMeshCells.empty())
// subMesh or baseMesh
// Convert cellMap, addPointCellLabels to global cell ids
if (meshRef.useSubMesh())
// Create file and write header
......@@ -856,7 +848,7 @@ int main(int argc, char *argv[])
// Write mesh
vtk::internalWriter writer
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