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

Export a field to vtk.

  • filename (str) – Filename of the file to be saved, including the path. Note that an ending (.vtr or .vtu) will be added to the name.

  • 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