Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/t8_vtk/t8_vtk_writer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ t8_cmesh_vtk_write_file (const t8_cmesh_t cmesh, const char *fileprefix)
return writer.write_ASCII (cmesh);
}

T8_EXTERN_C_END ();

#if T8_ENABLE_VTK
void
t8_forest_to_vtkUnstructuredGrid (const t8_forest_t forest, vtkSmartPointer<vtkUnstructuredGrid> unstructuredGrid,
Expand All @@ -168,5 +170,3 @@ t8_forest_to_vtkUnstructuredGrid (const t8_forest_t forest, vtkSmartPointer<vtkU
writer.grid_to_vtkUnstructuredGrid (forest, unstructuredGrid);
}
#endif

T8_EXTERN_C_END ();
30 changes: 0 additions & 30 deletions src/t8_vtk/t8_vtk_writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,38 +32,8 @@
#include <t8_vtk/t8_vtk.h>
#include <t8_forest/t8_forest_types.h>

#if T8_ENABLE_VTK
#include <vtkUnstructuredGrid.h>
#endif

T8_EXTERN_C_BEGIN ();

#if T8_ENABLE_VTK
/**
* 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.
* \param [in] forest The forest.
* \param[in, out] unstructuredGrid
* \param [in] write_treeid If true, the global tree id is written for each element.
* \param [in] write_mpirank If true, the mpirank is written for each element.
* \param [in] write_level If true, the refinement level is written for each element.
* \param [in] write_element_id If true, the global element id is written for each element.
* \param [in] curved_flag If true, write the elements as curved element types from vtk.
* \param [in] write_ghosts If true, write out ghost elements as well.
* \param [in] num_data Number of user defined double valued data fields to write.
* \param [in] data Array of t8_vtk_data_field_t of length \a 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.
*/
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);
#endif

/** Write the forest in .pvtu file format. Writes one .vtu file per
* process and a meta .pvtu file.
* This function uses the vtk library. t8code must be configured with
Expand Down
26 changes: 26 additions & 0 deletions src/t8_vtk/t8_vtk_writer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -586,4 +586,30 @@ struct vtk_writer
bool merge_points = true;
};

#if T8_ENABLE_VTK
/**
* 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.
* \param [in] forest The forest.
* \param[in, out] unstructuredGrid
* \param [in] write_treeid If true, the global tree id is written for each element.
* \param [in] write_mpirank If true, the mpirank is written for each element.
* \param [in] write_level If true, the refinement level is written for each element.
* \param [in] write_element_id If true, the global element id is written for each element.
* \param [in] curved_flag If true, write the elements as curved element types from vtk.
* \param [in] write_ghosts If true, write out ghost elements as well.
* \param [in] num_data Number of user defined double valued data fields to write.
* \param [in] data Array of t8_vtk_data_field_t of length \a 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.
*/
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);
#endif

#endif /* T8_VTK_WRITER_HXX */
Loading