Template Function t8_mesh_handle::write_mesh_to_vtk_ext
Defined in File mesh_io.hxx
Function Documentation
-
template<T8MeshType TMeshClass>
int t8_mesh_handle::write_mesh_to_vtk_ext(TMeshClass &mesh, const char *fileprefix, const int num_data, t8_vtk_data_field_t *data, bool write_treeid = false, bool write_mpirank = true, bool write_level = true, bool write_element_id = true, bool write_ghosts = false, bool write_curved = false, bool do_not_use_API = false) Write the mesh in a parallel vtu format.
Extended version. See
See also
write_mesh_to_vtk for the standard version of this function. Writes one master .pvtu file and each process writes in its own .vtu file. If linked and not otherwise specified, the VTK API is used. If the VTK library is not linked, an ASCII file is written. This may change in accordance with write_ghosts, write_curved and do_not_use_API, because the export of ghosts is not yet available with the VTK API and the export of curved elements is not available with the built-in function to write ASCII files. The function will for example still use the VTK API to satisfy write_curved, even if do_not_use_API is set to true. This function is collective and must be called on each process.
- Parameters:
mesh – [in] The mesh to write.
fileprefix – [in] The prefix of the files where the vtk will be stored. The master file is then fileprefix.pvtu and the process with rank r writes in the file fileprefix_r.vtu.
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.
write_treeid – [in] If true, the global tree id of the underlying forest 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.
write_ghosts – [in] If true, each process additionally writes its ghost elements. For ghost element the treeid of the underlying forest is -1.
write_curved – [in] If true, write the elements as curved element types from vtk.
do_not_use_API – [in] If true, do not use the VTK API, even if linked and available.
- Returns:
True if successful, false if not (process local).