visit-dav / visit

VisIt - Visualization and Data Analysis for Mesh-based Scientific Data
https://visit.llnl.gov
BSD 3-Clause "New" or "Revised" License
426 stars 109 forks source link

bug with material id processing in the blueprint plugin #17922

Open cyrush opened 2 years ago

cyrush commented 2 years ago

Describe the bug

There are places were we index by an integer id, instead of a name.

Here is one of them: https://github.com/visit-dav/visit/blob/91ff5211fbae8256bb8590688ca37106b24fef5c/src/databases/Blueprint/avtBlueprintFileFormat.C#L949

This causes a problem when the material ids don't start at zero.

Helpful additional information

mdserver fails while digesting materials metadata (doens't crash, but prevents us from opening the file)

finding coordinate system
coordinate system: 
axes: 
  x: 
  y: 
type: "cartesian"
 (ndims=2)
adding field vars for mesh
adding materials for mesh
adding material set mesh_MESH mesh_MESH_MATERIAL
material map 
box: 1
(caught invalid access in conduit)

Expected behavior

Map logic should handle this case.

Desktop

JustinPrivitera commented 1 month ago

I will investigate if I fixed this in #18928