discretize.CylindricalMesh.write_vtk#
- CylindricalMesh.write_vtk(file_name, models=None, directory='')[source]#
Convert mesh (and models) to corresponding VTK or PyVista data object then writes to file.
This method converts a
discretize
mesh (and associated models) to its corresponding VTK or PyVista data object, then writes to file. The output structure will be one of:vtkUnstructuredGrid
,vtkRectilinearGrid
orvtkStructuredGrid
.- Parameters:
- file_name
str
orfile
name
Full path for the output file or just its name if directory is specified
- models
dict
of
[str
, (n_cells
)numpy.ndarray
],optional
Models are supplied as a dictionary where the keys are the model names. Each model is a 1D
numpy.ndarray
of size (n_cells).- directory
str
,optional
output directory
- file_name
- Returns:
str
The output of Python’s write function