firedrake.output package¶
Submodules¶
firedrake.output.paraview_reordering module¶
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:
objectCreate 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.SobolevSpaceobject: \(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.You may save more than one function to the same file. However, all calls to
write()must use the same set of functions.- Parameters:
functions – list of functions to write.
time – optional timestep value.
- Raises:
CommMismatchError – If function is not defined on the same MPI comm as this file.
