t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Functions
t8_cmesh_vtk_reader.cxx File Reference

Implementation of a Reader for vtk/vtu files using the vtk-library. More...

#include <t8_cmesh_vtk_reader.hxx>

Functions

t8_cmesh_t t8_cmesh_vtk_reader (const char *filename, const int partition, const int main_proc, sc_MPI_Comm comm, const vtk_file_type_t vtk_file_type)
 Given a filename to a vtkUnstructuredGrid or vtkPolyData read the file and construct a cmesh. More...
 

Detailed Description

Implementation of a Reader for vtk/vtu files using the vtk-library.

The functions can only be used when t8code is linked with the vtk-library.

Function Documentation

◆ t8_cmesh_vtk_reader()

t8_cmesh_t t8_cmesh_vtk_reader ( const char *  filename,
const int  partition,
const int  main_proc,
sc_MPI_Comm  comm,
const vtk_file_type_t  vtk_file_type 
)

Given a filename to a vtkUnstructuredGrid or vtkPolyData read the file and construct a cmesh.

This is a two stage process. First the file is read and stored in a vtkDataSet using t8_vtk_reader and t8_file_to_vtkGrid. In the second stage a cmesh is constructed from the vtkDataSet using t8_vtkGrid_to_cmesh.

Both stages use the vtk-library, therefore the function is only available if t8code is linked against VTK.

Parameters
[in]filenameThe name of the file
[in]partitionFlag if the constructed mesh should be partitioned
[in]main_procThe main reading processor
[in]commAn mpi-communicator
[in]vtk_file_typeA vtk-filetype that is readable by t8code.
Returns
A committed cmesh.