Back to Finite Element (MFEM)
mfem.gridfunction.toVTK
Exports a grid function to VTK format string for visualization.
Syntax
mfem.gridfunction.toVTK(gf, options?)
Description
Exports a grid function to VTK format string for visualization. The returned string contains VTK data for the grid function values. **Note:** This exports only the field data. For complete VTK output, you also need to export the mesh using `mesh.toVTK()`. For visualization in ParaView or similar tools, combine the mesh and field data into a complete VTK file.
Parameters
| Name | Description |
|---|---|
| gf | - GridFunction to export |
| options(optional) | - Export options |
Returns
string