visit-dav / visit

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

Blueprint MFEM New LOR breaks nodal vs zonal variables #19876

Open JustinPrivitera opened 3 weeks ago

JustinPrivitera commented 3 weeks ago

Old LOR of bp_mfem_ex9_periodic_hexagon_000000.root solution variable: image

New LOR: image

New LOR is doing the wrong thing with variable association.

JustinPrivitera commented 3 weeks ago

duplicate of #19469

JustinPrivitera commented 3 weeks ago

Not a duplicate. Something is wrong here.

cyrush commented 4 hours ago
domain_000000: 
  coordsets: 
    coords: 
      type: "explicit"
      values: 
        x: [0.0, 0.0, 0.0, ..., -0.5, -0.375]
        y: [0.0, 0.0, 0.0, ..., -0.64951905, -0.4330127]
  topologies: 
    main: 
      type: "unstructured"
      coordset: "coords"
      elements: 
        shape: "quad"
        connectivity: [0, 48, 144, ..., 101, 5]
      grid_function: "mesh_nodes"
  fields: 
    mesh_nodes: 
      basis: "L2_T1_2D_P1"
      topology: "main"
      values: 
        v0: [-0.5, -0.375, -0.4375, ..., -0.25, -0.3125]
        v1: [-0.8660254, -0.8660254, -0.75777223, ..., -0.4330127, -0.54126588]
    element_attribute: 
      association: "element"
      topology: "main"
      values: [1, 1, 1, ..., 3, 3]
    solution: 
      basis: "L2_2D_P3"
      topology: "main"
      values: [2.8945783e-15, 4.5769815e-15, 6.7905961e-15, ..., 0.037897328, 0.012559671]
cyrush commented 4 hours ago
mesh  main is a mfem mesh
Creating Refined MFEM Mesh with lod:1
High Order Mesh is periodic; falling back to Legacy LOR.
avtBlueprintFileFormat::GetMesh Done
GetVar: mesh_main/solution [domain 0]
ReadBlueprintField: mesh_main/solution [domain 0]
field mesh_main/solution is defined on mesh mesh_main
mesh name: mesh
topo name: main
GetBlueprintIndexForField: mesh_main/solution
GetBlueprintIndexForField: found solution

number_of_components: 1
topology: "main"
basis: "L2_2D_P3"
path: "fields/solution"

tree_id: 0 ==> file_id: 0
tree cache read [domain 0] /Users/harrison37/bp_mfem_ex9_periodic_hexagon_000000/domain_000000.hdf5:fields/solution
Blueprint Tree Cache Size (Post fetch of domain: 0 sub path: fields/solution) = 43865 bytes
done loading conduit data for mesh_main/solution [domain 0]
ReadBlueprintMesh: mesh_main [domain 0]
mesh name: mesh
topo name: main
coordset path coordsets/coords
Blueprint Tree Cache Size (Post fetch of domain: 0 sub path: coordsets/coords) = 43865 bytes
topology path topologies/main
Blueprint Tree Cache Size (Post fetch of domain: 0 sub path: topologies/main) = 43865 bytes
GetMesh: done loading conduit data for mesh_main [domain 0]
mesh_main has a mfem grid fuction
field for grid_function for topology is named: mesh_nodes
grid function path fields/mesh_nodes
Blueprint Tree Cache Size (Post fetch of domain: 0 sub path: fields/mesh_nodes) = 43865 bytes
Blueprint Tree Cache Size (Post fetch of domain: 0 sub path: fields/element_attribute) = 43865 bytes
Creating Refined MFEM Field with lod:1
High Order Mesh is periodic; falling back to Legacy LOR.
JustinPrivitera commented 4 hours ago

why is it falling back to legacy LOR? The issue manifests itself with new LOR

cyrush commented 3 hours ago

This issue is specific to periodic meshes.

We have to use legacy LOR, which can only create nodal outputs.

When we parse metadata, we see it is L2 and think it is zonal.

In populate database metadata, we need to check if the mesh related to a grid function is periodic. If so, we the field must be registered as nodal.

JustinPrivitera commented 3 hours ago

will need logic for both blueprint and mfem plugins