0

I am trying to output my numerical simulation data in vtk format. My grid is structured and I need to use the VTK's XML format. My greatest confusion is about the WholeExtent and the Piece Extent attributes. E.g., the VTK pdf manual says

StructuredGrid WholeExtent = "x1 x2 y1 y2 z1 z2".

What exactly are these x1, x2's, etc? A similar question is about the x1, x2's in the Piece Extent attribute. Thank you!

Ali_Sh
  • 2,667
  • 3
  • 43
  • 66
Terry
  • 11
  • 2
  • As an answer was given on [VTK forum](https://discourse.vtk.org/t/extent-attributes-in-structuredgrid/7472), you may answer yourself here to mark the question as solved – Nico Vuaille Jan 07 '22 at 09:24

1 Answers1

1

I got the answer on the VTK forum, courtesy of Dan Lipsa.

It is easier to explain it using a minimum working example. Suppose we have a 10x6x1 (2D) grid, 2 CPUs in the x-direction, 1 CPU in the remaining directions. That is, Proc 1 has 6x6x1 and Proc 2 has 5x6x1 grid points, respectively. Then I've these lines of code in my vts files:

Processor 1: StructuredGrid WholeExtent=" 1 6 1 6 1 1 " Piece Extent=" 1 6 1 6 1 1 "

Processor 2: StructuredGrid WholeExtent=" 6 10 1 6 1 1 " Piece Extent=" 6 10 1 6 1 1 "

A sample data file can be found at the following link: VTK forum

Ali_Sh
  • 2,667
  • 3
  • 43
  • 66
Terry
  • 11
  • 2
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 09 '22 at 00:11