firedrake.output package

Submodules

firedrake.output.paraview_reordering module

firedrake.output.paraview_reordering.vtk_lagrange_hex_reorder(ufl_element)[source]
firedrake.output.paraview_reordering.vtk_lagrange_interval_reorder(ufl_element)[source]
firedrake.output.paraview_reordering.vtk_lagrange_quad_reorder(ufl_element)[source]
firedrake.output.paraview_reordering.vtk_lagrange_tet_reorder(ufl_element)[source]
firedrake.output.paraview_reordering.vtk_lagrange_triangle_reorder(ufl_element)[source]
firedrake.output.paraview_reordering.vtk_lagrange_wedge_reorder(ufl_element)[source]

firedrake.output.vtk_output module

class firedrake.output.vtk_output.VTKFile(filename, project_output=False, comm=None, mode='w', target_degree=None, target_continuity=None, adaptive=False)[source]

Bases: object

Create an object for outputting data for visualisation.

This produces output in VTU format, suitable for visualisation with Paraview or other VTK-capable visualisation packages.

Parameters:

filename – The name of the output file (must end in .pvd).

Keyword Arguments:
  • project_output – Should the output be projected to a computed output space? Default is to use interpolation.

  • comm – The MPI communicator to use.

  • mode – “w” to overwrite any existing file, “a” to append to an existing file.

  • target_degree – override the degree of the output space.

  • target_continuity – override the continuity of the output space; A UFL ufl.sobolevspace.SobolevSpace object: H1 for a continuous output and L2 for a discontinuous output.

  • adaptive – allow different meshes at different exports if True.

Note

Visualisation is only possible for Lagrange fields (either continuous or discontinuous). All other fields are first either projected or interpolated to Lagrange elements before storing for visualisation purposes.

write(*functions, **kwargs)[source]

Write functions to this VTKFile.

Parameters:

functions – list of functions to write.

Keyword Arguments:

time – optional timestep value.

You may save more than one function to the same file. However, all calls to write() must use the same set of functions.

Module contents