Alpine-DAV / ascent

A flyweight in situ visualization and analysis runtime for multi-physics HPC simulations
https://alpine-dav.github.io/ascent/
Other
196 stars 66 forks source link

Unsupported cell types: pyramid, wedge #1249

Closed mlohry closed 3 months ago

mlohry commented 9 months ago

Meshes which use pyramid aka PYRA_5as well as wedge aka PENTA_6 elements, as specified in the conduit mesh docs, are not supported as seen here: https://github.com/Alpine-DAV/ascent/blob/6d1ca3f8d27e9b640be93453c6453f76f545ae7d/src/libs/ascent/runtimes/ascent_vtkh_data_adapter.cpp#L479

Are there plans to support this, or the arbitrary polyhedron type?

cyrush commented 9 months ago

related to: https://github.com/Alpine-DAV/ascent/issues/1038

we do have arbitrary polyhedral support, here is an test that plots one of our example meshes:

https://github.com/Alpine-DAV/ascent/blob/develop/src/tests/ascent/t_ascent_render_3d_poly.cpp

This allows you to have heterogeneous element types within a topology as well as polyhedra.

Long term: goal is to support unstructured pyramids and widgets, as well heterogeneous elements w/o the full polyhedra spec.

FreddieWitherden commented 5 months ago

Is there a proposed Conduit syntax for what mixed topologies (but with fixed element types rather than polyhedra) would look like?

cyrush commented 5 months ago

Hi @FreddieWitherden

Yes, Blueprint provides the a concept of a shape_map + a shapes array, and a set of indexed arrays for this case:

https://llnl-conduit.readthedocs.io/en/latest/blueprint_mesh.html#mixed-topologies-with-shapes-shape-map

The conduit braid example dataset has a mixed case that demos this, it includes fixed element types and polyehdra, here is a snapshot:

state: 
  time: 3.1415
  cycle: 100
coordsets: 
  coords: 
    type: "explicit"
    values: 
      x: [-10.0, -5.0, 0.0, ..., 5.0, 10.0]
      y: [-10.0, -10.0, -10.0, ..., 10.0, 10.0]
      z: [-10.0, -10.0, -10.0, ..., 10.0, 10.0]
topologies: 
  mesh: 
    type: "unstructured"
    coordset: "coords"
    elements: 
      shape: "mixed"
      shape_map: 
        polyhedral: 42
        tet: 10
        hex: 12
      shapes: [10, 10, 10, ..., 42, 12]
      sizes: [4, 4, 4, ..., 5, 8]
      offsets: [0, 4, 8, ..., 787, 792]
      connectivity: [0, 1, 5, ..., 124, 123]
    subelements: 
      shape: "mixed"
      shape_map: 
        quad: 9
        tri: 5
      shapes: [9, 9, 9, ..., 5, 5]
      sizes: [4, 4, 4, ..., 3, 3]
      offsets: [0, 4, 8, ..., 570, 573]
      connectivity: [1, 26, 30, ..., 122, 118]
fields: 
  braid: 
    association: "vertex"
    topology: "mesh"
    values: [3.42859718441792, 0.153213421293581, 0.725718098203051, ..., -0.449498317544991, -1.1475095392738]
  vel: 
    association: "vertex"
    topology: "mesh"
    values: 
      u: [-10.0, -5.0, 0.0, ..., 5.0, 10.0]
      v: [-10.0, -10.0, -10.0, ..., 10.0, 10.0]
      w: [-10.0, -10.0, -10.0, ..., 10.0, 10.0]

For the case w/o polyhedra, you won't need the sub-elements -- it would look more like:

elements: 
      shape: "mixed"
      shape_map: 
        pyramid: 14
        wedge: 13
        tet: 10
        hex: 12
      shapes: [10, 10, 10, ..., 14, 12]
      sizes: [4, 4, 4, ..., 5, 8]
      offsets: [0, 4, 8, ..., 787, 792]
      connectivity: [0, 1, 5, ..., 124, 123]
FreddieWitherden commented 5 months ago

Perfect! I'll get support wired up in our code for this. We only need it for pyramids (since being high-order we have to subdivide and pyramids divide into pyramids and tets giving rise to a mixed grid).

What are the blockers in terms of getting Ascent ready for pyramids and prisms?

cyrush commented 5 months ago

We will first add pyramids and wedges as single element types, then support mixed meshes. We plan to have this done in June.

cyrush commented 5 months ago

https://github.com/Alpine-DAV/ascent/pull/1302 Adds support for all pyramid and all wedge typologies.

cyrush commented 3 months ago

mixed element case supported as of #1309