XDMFFile

class dolfin.cpp.io.XDMFFile(*args)

Bases: dolfin.cpp.common.Variable

This class supports the output of meshes and functions in XDMF (http://www.xdmf.org) format. It creates an XML file that describes the data and points to a HDF5 file that stores the actual problem data. Output of data in parallel is supported.

XDMF is not suitable for checkpointing as it may decimate some data.

Overloaded versions

  • XDMFFile(filename)

    Constructor

  • XDMFFile(comm, filename)

    Constructor

Encoding_ASCII = 1
Encoding_HDF5 = 0
read()

Overloaded versions

  • read(mesh)

    Read in a mesh

    Arguments

    mesh (Mesh)

  • read(meshfunction, name=””)

    Read first MeshFunction from file @param meshfunction @param name

  • read(meshfunction, name=””)

    Read first MeshFunction from file @param meshfunction @param name

  • read(meshfunction, name=””)

    Read first MeshFunction from file @param meshfunction @param name

  • read(meshfunction, name=””)

    Read first MeshFunction from file @param meshfunction @param name

  • read(mvc, name=””)

    Read MeshValueCollection from file

  • read(mvc, name=””)

    Read MeshValueCollection from file

  • read(mvc, name=””)

    Read MeshValueCollection from file

  • read(mvc, name=””)

    Read MeshValueCollection from file

thisown

The membership flag

write()

Overloaded versions

  • write(mesh)

    Save a mesh to XDMF format, either using an associated HDF5 file, or storing the data inline as XML Create function on given function space

    Arguments
    mesh (Mesh)

    A mesh to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(u)

    Save a Function to XDMF file for visualisation, using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    u (Function)

    A function to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(u, t)

    Save a Function with timestamp to XDMF file for visualisation, using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    u (Function)

    A function to save.

    t (_double_)

    Timestep

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(meshfunction)

    Save MeshFunction to file using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    meshfunction (MeshFunction)

    A meshfunction to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(mvc)

    Write out mesh value collection (subset) using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    mvc (_MeshValueCollection<bool>_)

    A list of points to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(mvc)

    Write out mesh value collection (subset) using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    mvc (_MeshValueCollection<int>_)

    A list of points to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(mvc)

    Write out mesh value collection (subset) using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    mvc (_MeshValueCollection<int>_)

    A list of points to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(mvc)

    Write out mesh value collection (subset) using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    mvc (_MeshValueCollection<double>_)

    A list of points to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(points)

    Save a cloud of points to file using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    points (_std::vector<Point>_)

    A list of points to save.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII

  • write(points, values)

    Save a cloud of points, with scalar values using an associated HDF5 file, or storing the data inline as XML.

    Arguments
    points (_std::vector<Point>_)

    A list of points to save.

    values (numpy.array(float))

    A list of values at each point.

    encoding (_Encoding_)

    Encoding to use: HDF5 or ASCII