Function t8_forest_to_vtkUnstructuredGrid

Function Documentation

void t8_forest_to_vtkUnstructuredGrid(t8_forest_t forest, vtkSmartPointer<vtkUnstructuredGrid> unstructuredGrid, const int write_treeid, const int write_mpirank, const int write_level, const int write_element_id, const int write_ghosts, const int curved_flag, const int num_data, t8_vtk_data_field_t *data)

Translate a forest into a vtkUnstructuredGrid with respect to the given flags.

This function uses the vtk library. t8code must be configured with “-DT8CODE_ENABLE_VTK=ON” in order to use it.

Parameters:
  • forest[in] The forest.

  • unstructuredGrid[inout]

  • write_treeid[in] If true, the global tree id is written for each element.

  • write_mpirank[in] If true, the mpirank is written for each element.

  • write_level[in] If true, the refinement level is written for each element.

  • write_element_id[in] If true, the global element id is written for each element.

  • curved_flag[in] If true, write the elements as curved element types from vtk.

  • write_ghosts[in] If true, write out ghost elements as well.

  • num_data[in] Number of user defined double valued data fields to write.

  • data[in] Array of t8_vtk_data_field_t of length num_data providing the user defined per element data. If scalar and vector fields are used, all scalar fields must come first in the array.