dolfinx.cpp.io

I/O module

Functions

distribute_entity_data(mesh, entity_dim, ...)

extract_vtk_connectivity(mesh)

Extract the mesh topology with VTK ordering using geometry indices

get_vtk_cell_type(cell, dim)

Get VTK cell identifier

perm_gmsh(type, num_nodes)

Permutation array to map from Gmsh to DOLFINx node ordering

perm_vtk(type, num_nodes)

Permutation array to map from VTK to DOLFINx node ordering

Classes

FidesWriter(*args, **kwargs)

FidesWriter object

VTKFile(self, comm, filename, mode)

VTXWriter(*args, **kwargs)

VTXWriter object

XDMFFile(self, comm, filename, file_mode, ...)

class dolfinx.cpp.io.FidesWriter(*args, **kwargs)

Bases: pybind11_object

FidesWriter object

Overloaded function.

  1. __init__(self: dolfinx.cpp.io.FidesWriter, comm: MPICommWrapper, filename: os.PathLike, mesh: dolfinx.cpp.mesh.Mesh) -> None

  2. __init__(self: dolfinx.cpp.io.FidesWriter, comm: MPICommWrapper, filename: os.PathLike, u: List[Union[dolfinx.cpp.fem.Function_float64, dolfinx.cpp.fem.Function_complex128]]) -> None

close(self: dolfinx.cpp.io.FidesWriter) None
write(self: dolfinx.cpp.io.FidesWriter, t: float) None
class dolfinx.cpp.io.VTKFile(self: dolfinx.cpp.io.VTKFile, comm: MPICommWrapper, filename: os.PathLike, mode: str)

Bases: pybind11_object

close(self: dolfinx.cpp.io.VTKFile) None
write(*args, **kwargs)

Overloaded function.

  1. write(self: dolfinx.cpp.io.VTKFile, u: List[dolfinx.cpp.fem.Function_float64], t: float = 0.0) -> None

  2. write(self: dolfinx.cpp.io.VTKFile, u: List[dolfinx.cpp.fem.Function_complex128], t: float = 0.0) -> None

  3. write(self: dolfinx.cpp.io.VTKFile, mesh: dolfinx.cpp.mesh.Mesh, t: float = 0.0) -> None

class dolfinx.cpp.io.VTXWriter(*args, **kwargs)

Bases: pybind11_object

VTXWriter object

Overloaded function.

  1. __init__(self: dolfinx.cpp.io.VTXWriter, comm: MPICommWrapper, filename: os.PathLike, mesh: dolfinx.cpp.mesh.Mesh) -> None

  2. __init__(self: dolfinx.cpp.io.VTXWriter, comm: MPICommWrapper, filename: os.PathLike, u: List[Union[dolfinx.cpp.fem.Function_float64, dolfinx.cpp.fem.Function_complex128]]) -> None

close(self: dolfinx.cpp.io.VTXWriter) None
write(self: dolfinx.cpp.io.VTXWriter, t: float) None
class dolfinx.cpp.io.XDMFFile(self: dolfinx.cpp.io.XDMFFile, comm: MPICommWrapper, filename: os.PathLike, file_mode: str, encoding: dolfinx.cpp.io.XDMFFile.Encoding = <Encoding.HDF5: 0>)

Bases: pybind11_object

class Encoding(self: dolfinx.cpp.io.XDMFFile.Encoding, value: int)

Bases: pybind11_object

Members:

HDF5

ASCII

ASCII = <Encoding.ASCII: 1>
HDF5 = <Encoding.HDF5: 0>
property name
property value
close(self: dolfinx.cpp.io.XDMFFile) None
comm(self: dolfinx.cpp.io.XDMFFile) MPICommWrapper
read_cell_type(self: dolfinx.cpp.io.XDMFFile, name: str = 'mesh', xpath: str = '/Xdmf/Domain') Tuple[dolfinx.cpp.mesh.CellType, int]
read_geometry_data(*args, **kwargs)

Overloaded function.

  1. read_geometry_data(self: dolfinx.cpp.io.XDMFFile, name: str = ‘mesh’, xpath: str = ‘/Xdmf/Domain’) -> numpy.ndarray[numpy.float64]

  2. read_geometry_data(self: dolfinx.cpp.io.XDMFFile, name: str = ‘mesh’, xpath: str = ‘/Xdmf/Domain’) -> Tuple[List[float], List[int[2]]]

read_information(self: dolfinx.cpp.io.XDMFFile, name: str, xpath: str = '/Xdmf/Domain') str
read_meshtags(self: dolfinx.cpp.io.XDMFFile, mesh: dolfinx.cpp.mesh.Mesh, name: str, xpath: str = '/Xdmf/Domain') dolfinx.cpp.mesh.MeshTags_int32
read_topology_data(self: dolfinx.cpp.io.XDMFFile, name: str = 'mesh', xpath: str = '/Xdmf/Domain') numpy.ndarray[numpy.int64]
write_function(*args, **kwargs)

Overloaded function.

  1. write_function(self: dolfinx.cpp.io.XDMFFile, function: dolfinx.cpp.fem.Function_float64, t: float, mesh_xpath: str) -> None

  2. write_function(self: dolfinx.cpp.io.XDMFFile, function: dolfinx.cpp.fem.Function_complex128, t: float, mesh_xpath: str) -> None

write_geometry(self: dolfinx.cpp.io.XDMFFile, geometry: dolfinx.cpp.mesh.Geometry, name: str = 'geometry', xpath: str = '/Xdmf/Domain') None
write_information(self: dolfinx.cpp.io.XDMFFile, name: str, value: str, xpath: str = '/Xdmf/Domain') None
write_mesh(self: dolfinx.cpp.io.XDMFFile, mesh: dolfinx.cpp.mesh.Mesh, xpath: str = '/Xdmf/Domain') None
write_meshtags(self: dolfinx.cpp.io.XDMFFile, meshtags: dolfinx.cpp.mesh.MeshTags_int32, geometry_xpath: str = '/Xdmf/Domain/Grid/Geometry', xpath: str = '/Xdmf/Domain') None
dolfinx.cpp.io.distribute_entity_data(mesh: dolfinx.cpp.mesh.Mesh, entity_dim: int, entities: numpy.ndarray[numpy.int64], values: numpy.ndarray[numpy.int32]) Tuple[numpy.ndarray[numpy.int32], numpy.ndarray[numpy.int32]]
dolfinx.cpp.io.extract_vtk_connectivity(mesh: dolfinx.cpp.mesh.Mesh) numpy.ndarray[numpy.int64]

Extract the mesh topology with VTK ordering using geometry indices

dolfinx.cpp.io.get_vtk_cell_type(cell: dolfinx.cpp.mesh.CellType, dim: int) int

Get VTK cell identifier

dolfinx.cpp.io.perm_gmsh(type: dolfinx.cpp.mesh.CellType, num_nodes: int) List[int]

Permutation array to map from Gmsh to DOLFINx node ordering

dolfinx.cpp.io.perm_vtk(type: dolfinx.cpp.mesh.CellType, num_nodes: int) List[int]

Permutation array to map from VTK to DOLFINx node ordering