Skip to content

Blueprint save_mesh() ignores existing state/domain_id and overwrites the value. #1115

@BradWhitlock

Description

@BradWhitlock

I was saving a file in parallel to HDF5 using conduit::relay::mpi::io::blueprint::save_mesh() and I was confused when I opened up the results in VisIt and the domain numbering in VisIt was not what I had constructed in memory using Conduit. It turns out that the function overwrites any state/domain_id value that might be in the supplied meshes and renumbers in ascending MPI-rank order.

Suppose you have 2 ranks with the following domain numbering (using state/domain_id)
rank 0: {dom2, dom 3}
rank 1: {dom1, dom0}

You'll get a file that saves the domains like this:
dom2-> file domain 0
dom3-> file domain 1
dom1-> file domain 2
dom0-> file domain 3

The domain numbers have been totally changed and you might not get domains where you expect as a result.

Can the following be done instead?

  • If state/domain_id values are not present then create them
  • If state/domain_id values are present but contain duplicates, or gaps, renumber and issue warning.
  • If state/domain_id values are otherwise well-formed, use that number to write the domain file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions