Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blueprint reader can mess up fields for point meshes. #20273

Open
BradWhitlock opened this issue Mar 4, 2025 · 1 comment
Open

Blueprint reader can mess up fields for point meshes. #20273

BradWhitlock opened this issue Mar 4, 2025 · 1 comment
Assignees
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood

Comments

@BradWhitlock
Copy link
Member

Describe the bug

I noticed in ExplicitCoordsToVTKPoints that there is code to check the topology to make a vtkPoints object that contains only the used points for point meshes. Vertex-associated fields will have the number of values that the coordset has. This operation reduces the number of points in the VTK dataset, making it no longer match any vertex-associated fields. Later when a vertex-associated field is retrieved, VisIt just copies it into a VTK data array and serves it up. The field has the wrong number of values for the mesh.

Either:
a) Remove this behavior when constructing the points (add them all like other unstructured topos)
b) Or, use the connectivity to pull out the relevant field values when making a field

Option a is probably easiest/best.

To Reproduce

This YAML file makes 8 points but only selects 4 of them via connectivity. When making a PC plot of "wrong", it shows all 10's instead of the negative values that should be shown, according to the connectivity.

Take this YAML file and convert it to blueprint.

coordsets: 
  coords: 
    type: "explicit"
    values: 
      x: [0., 1., 0., 1., 0., 1., 0., 1.]
      y: [0., 0., 1., 1., 0., 0., 1., 1.]
      z: [0., 0., 0., 0., 1., 1., 1., 1.]
topologies: 
  mesh: 
    coordset: "coords"
    type: "unstructured"
    elements: 
      shape: "point"
      connectivity: [4, 5, 6, 7]
      sizes: [1, 1, 1, 1]
      offsets: [0, 1, 2, 3]
fields: 
  zonal: 
    topology: "mesh"
    association: "element"
    values: [10., 10., 10., 10.]
  wrong: 
    topology: "mesh"
    association: "vertex"
    values: [10., 10., 10., 10., -2., -3., -4., -5.]

conduit_relay_io_convert pointmesh.yaml pointmesh --write-protocol blueprint

Expected behavior

Plot the data, get 4 points, and show the negative values for a PC plot of "wrong".

Desktop

/usr/gapps/visit on RZ.

@BradWhitlock BradWhitlock added bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood labels Mar 4, 2025
@JustinPrivitera JustinPrivitera self-assigned this Mar 5, 2025
@JustinPrivitera
Copy link
Member

Others are welcome to work on this, but I am happy to take it if no one else gets to it. Hence my assignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working impact medium Productivity partially degraded (not easily mitigated bug) or improved (enhancement) likelihood medium Neither low nor high likelihood
Projects
None yet
Development

No branches or pull requests

2 participants