, fields, mesh_type='unstructured')[source]

Create a VTK/PyVista grid.

  • pos (list) – the position tuple, containing main direction and transversal directions

  • fields (dict or numpy.ndarray) – [Un]structured fields to be saved. Either a single numpy array as returned by SRF, or a dictionary of fields with theirs names as keys.

  • mesh_type (str, optional) – ‘structured’ / ‘unstructured’. Default: structured


This will return a PyVista object for the given field data in its appropriate type. Structured meshes will return a pyvista.RectilinearGrid and unstructured meshes will return an pyvista.UnstructuredGrid object.

Return type

pyvista.RectilinearGrid or pyvista.UnstructuredGrid