dolfinx.cpp.io

I/O module

Functions

distribute_entity_data(*args, **kwargs)

Overloaded function.

extract_vtk_connectivity(dofmap, celltype)

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

FidesMeshPolicy(self, value)

Members:

FidesWriter_float32(*args, **kwargs)

FidesWriter object

FidesWriter_float64(*args, **kwargs)

FidesWriter object

VTKFile(self, comm, filename, mode)

VTXWriter_float32(*args, **kwargs)

VTXWriter object

VTXWriter_float64(*args, **kwargs)

VTXWriter object

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

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

Bases: pybind11_object

Members:

update

reuse

property name
reuse = <FidesMeshPolicy.reuse: 1>
update = <FidesMeshPolicy.update: 0>
property value
class dolfinx.cpp.io.FidesWriter_float32(*args, **kwargs)

Bases: pybind11_object

FidesWriter object

Overloaded function.

  1. __init__(self: dolfinx.cpp.io.FidesWriter_float32, comm: MPICommWrapper, filename: os.PathLike, mesh: dolfinx.cpp.mesh.Mesh_float32, engine: str = ‘BPFile’) -> None

  2. __init__(self: dolfinx.cpp.io.FidesWriter_float32, comm: MPICommWrapper, filename: os.PathLike, u: List[Union[dolfinx.cpp.fem.Function_float32, dolfinx::fem::Function<double, float>, dolfinx.cpp.fem.Function_complex64, dolfinx::fem::Function<std::complex<double>, float>]], engine: str = ‘BPFile’, policy: dolfinx.cpp.io.FidesMeshPolicy = <FidesMeshPolicy.update: 0>) -> None

close(self: dolfinx.cpp.io.FidesWriter_float32) None
write(self: dolfinx.cpp.io.FidesWriter_float32, t: float) None
class dolfinx.cpp.io.FidesWriter_float64(*args, **kwargs)

Bases: pybind11_object

FidesWriter object

Overloaded function.

  1. __init__(self: dolfinx.cpp.io.FidesWriter_float64, comm: MPICommWrapper, filename: os.PathLike, mesh: dolfinx.cpp.mesh.Mesh_float64, engine: str = ‘BPFile’) -> None

  2. __init__(self: dolfinx.cpp.io.FidesWriter_float64, comm: MPICommWrapper, filename: os.PathLike, u: List[Union[dolfinx::fem::Function<float, double>, dolfinx.cpp.fem.Function_float64, dolfinx::fem::Function<std::complex<float>, double>, dolfinx.cpp.fem.Function_complex128]], engine: str = ‘BPFile’, policy: dolfinx.cpp.io.FidesMeshPolicy = <FidesMeshPolicy.update: 0>) -> None

close(self: dolfinx.cpp.io.FidesWriter_float64) None
write(self: dolfinx.cpp.io.FidesWriter_float64, 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, mesh: dolfinx.cpp.mesh.Mesh_float32, t: float = 0.0) -> None

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

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

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

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

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

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

Bases: pybind11_object

VTXWriter object

Overloaded function.

  1. __init__(self: dolfinx.cpp.io.VTXWriter_float32, comm: MPICommWrapper, filename: os.PathLike, mesh: dolfinx.cpp.mesh.Mesh_float32, engine: str = ‘BPFile’) -> None

  2. __init__(self: dolfinx.cpp.io.VTXWriter_float32, comm: MPICommWrapper, filename: os.PathLike, u: List[Union[dolfinx.cpp.fem.Function_float32, dolfinx::fem::Function<double, float>, dolfinx.cpp.fem.Function_complex64, dolfinx::fem::Function<std::complex<double>, float>]], engine: str = ‘BPFile’) -> None

close(self: dolfinx.cpp.io.VTXWriter_float32) None
write(self: dolfinx.cpp.io.VTXWriter_float32, t: float) None
class dolfinx.cpp.io.VTXWriter_float64(*args, **kwargs)

Bases: pybind11_object

VTXWriter object

Overloaded function.

  1. __init__(self: dolfinx.cpp.io.VTXWriter_float64, comm: MPICommWrapper, filename: os.PathLike, mesh: dolfinx.cpp.mesh.Mesh_float64, engine: str = ‘BPFile’) -> None

  2. __init__(self: dolfinx.cpp.io.VTXWriter_float64, comm: MPICommWrapper, filename: os.PathLike, u: List[Union[dolfinx::fem::Function<float, double>, dolfinx.cpp.fem.Function_float64, dolfinx::fem::Function<std::complex<float>, double>, dolfinx.cpp.fem.Function_complex128]], engine: str = ‘BPFile’) -> None

close(self: dolfinx.cpp.io.VTXWriter_float64) None
write(self: dolfinx.cpp.io.VTXWriter_float64, 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[Union[List[float], List[float]], Annotated[List[int], FixedSize(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_float64, 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, u: dolfinx.cpp.fem.Function_float32, t: float, mesh_xpath: str = “/Xdmf/Domain/Grid[@GridType=’Uniform’][1]”) -> None

  2. write_function(self: dolfinx.cpp.io.XDMFFile, u: dolfinx.cpp.fem.Function_float64, t: float, mesh_xpath: str = “/Xdmf/Domain/Grid[@GridType=’Uniform’][1]”) -> None

  3. write_function(self: dolfinx.cpp.io.XDMFFile, u: dolfinx.cpp.fem.Function_complex64, t: float, mesh_xpath: str = “/Xdmf/Domain/Grid[@GridType=’Uniform’][1]”) -> None

  4. write_function(self: dolfinx.cpp.io.XDMFFile, u: dolfinx.cpp.fem.Function_complex128, t: float, mesh_xpath: str = “/Xdmf/Domain/Grid[@GridType=’Uniform’][1]”) -> None

write_geometry(self: dolfinx.cpp.io.XDMFFile, geometry: dolfinx.cpp.mesh.Geometry_float64, 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(*args, **kwargs)

Overloaded function.

  1. write_mesh(self: dolfinx.cpp.io.XDMFFile, mesh: dolfinx.cpp.mesh.Mesh_float32, xpath: str = ‘/Xdmf/Domain’) -> None

  2. write_mesh(self: dolfinx.cpp.io.XDMFFile, mesh: dolfinx.cpp.mesh.Mesh_float64, xpath: str = ‘/Xdmf/Domain’) -> None

write_meshtags(*args, **kwargs)

Overloaded function.

  1. write_meshtags(self: dolfinx.cpp.io.XDMFFile, meshtags: dolfinx.cpp.mesh.MeshTags_int32, x: dolfinx.cpp.mesh.Geometry_float32, geometry_xpath: str, xpath: str = ‘/Xdmf/Domain’) -> None

  2. write_meshtags(self: dolfinx.cpp.io.XDMFFile, meshtags: dolfinx.cpp.mesh.MeshTags_int32, x: dolfinx.cpp.mesh.Geometry_float64, geometry_xpath: str, xpath: str = ‘/Xdmf/Domain’) -> None

dolfinx.cpp.io.distribute_entity_data(*args, **kwargs)

Overloaded function.

  1. distribute_entity_data(mesh: dolfinx.cpp.mesh.Mesh_float32, entity_dim: int, entities: numpy.ndarray[numpy.int64], values: numpy.ndarray[numpy.int32]) -> Tuple[numpy.ndarray[numpy.int32], numpy.ndarray[numpy.int32]]

  2. distribute_entity_data(mesh: dolfinx.cpp.mesh.Mesh_float64, 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(dofmap: numpy.ndarray[numpy.int32], celltype: dolfinx.cpp.mesh.CellType) 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