cashocs.io.mesh.extract_mesh_from_xdmf#

cashocs.io.mesh.extract_mesh_from_xdmf(xdmffile: str, iteration: int = 0, outputfile: str | None = None, original_gmsh_file: str | None = None, quiet: bool = False) None[source]#

Extracts a Gmsh mesh file from an XDMF state file.

Parameters:
  • xdmffile (str) – The path to the XDMF state file.

  • iteration (int) – The iteration of interest (for a time series saved in the XDMF file), default is 0.

  • outputfile (str | None) – The path to the output Gmsh file. The default is None in which case the output is saved in the same directory as the XDMF state file.

  • original_gmsh_file (str | None) – The original gmsh .msh file used to create the mesh. This can be used to generate output files which preserve, e.g., physical tags and only updates the nodal positions. This will not work if the geometry has been remeshed. The default is None, which uses a more robust (but less detailed) approach.

  • quiet (bool) – When this is set to True, verbose output is disabled. Default is False.

Return type:

None