Suppose I have a mesh
created by
mesh, cell_tags, facet_tags = model_to_mesh(gmsh.model, MPI.COMM_WORLD, 0,gdim=2)
Then I save the mesh
and the facet_tags
as follows:
import adios4dolfinx as adx
from pathlib import Path
mesh_to_save = mesh
facet_to_save = facet_tags
facet_to_save.name = "my_facet_tag"
checkpoint_file = Path("function_checkpoint.bp")
adx.write_mesh(mesh_to_save, checkpoint_file, engine="BP4")
adx.write_meshtags(checkpoint_file,mesh_to_save,facet_to_save, engine="BP4")
Next I import the mesh and the facet tags as follows:
new_mesh = adx.read_mesh(MPI.COMM_WORLD, checkpoint_file, "BP4", dolfinx.mesh.GhostMode.none)
new_ft = adx.read_meshtags(checkpoint_file, new_mesh, meshtag_name="my_facet_tag", engine="BP4" )
For these adios4dolfinx
codes, I used the details mentioned in:
adios4dolfinx/tests/test_meshtags.py at main Ā· jorgensd/adios4dolfinx Ā· GitHub
My question
Is there a difference between mesh
vs new_mesh
or facet_tags
vs new_ft
?
Just by the looks of it, both should be the same, but Iām worried whether adios4dolfinx
is doing any sort of changes when saving the file.
When I ran this code the results I got looks like:
You can notice that the indexing at the end is differentā¦
Appreciate your help