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

dealing with multiple topologies #1296

Closed
mlohry opened this issue May 15, 2024 · 4 comments
Closed

dealing with multiple topologies #1296

mlohry opened this issue May 15, 2024 · 4 comments
Labels

Comments

@mlohry
Copy link

mlohry commented May 15, 2024

I have two topologies defined, "volume" consisting of tetrahedra and "surface" consisting of triangles, eg

  data["topologies/surface/type"]           = "unstructured";
  data["topologies/surface/elements/shape"] = "tri";
  data["topologies/surface/coordset"]       = "coords";
...
  data["topologies/volume/type"]           = "unstructured";
  data["topologies/volume/elements/shape"] = "tet";
  data["topologies/volume/coordset"]       = "coords";

Some questions relating to dealing with this:

  1. Scenes seem to always require a topology specified. Can I specify a default somewhere so as to not need to add this to ascent_actions.yaml?
  2. Blueprint relay extracts are dumping both topologies by default. Is there a way to specify only dumping the surface output?
  3. The multiple topologies examples in the docs Example of adding multiple ghosts with 2 topologies don't explicitly specify a topology, but when I try to create a scene I get the error s1/p1: data set has multiple topologies and no topology is specified. topology names: 'surface', 'volume's1/p1 mesh plot yielded no data, i.e., no cells remain[Error] Ascent::execute. If I explicitly state it like
-
  action: "add_scenes"
  scenes:
    s1:
      plots:
        p1:
          type: "mesh"
          topology: "volume"

I get the error s1/p1 mesh plot yielded no data, i.e., no cells remain. How do those examples work?

Examples of end goals we're after, and if this is possible an example input would be great:

  1. Render of isosurfaces of q-criterion from the volume topology, and show a solid/opaque surface of the surface topology. Or a pseudocolor of some other quantity on the surface.
  2. Render of slices through the volume topology showing some field, along with a surface pseudocolor of some other field.
@cyrush
Copy link
Member

cyrush commented May 15, 2024

  1. For a mesh plot: If there is only a single topology published -- we don't require the topology name. If there are more than one -- we need to know which one you intend to plot (we don't attempt to plot all of them), that's why it is asking.

That said, you can create multiple mesh plots in the same scene -- each with a different target topology and have them all rendered to single image.

  1. The relay extract allows you to select which fields you want to export.
    I believe f you know a field name that exists on your surface, you can use the "fields" option:

extracts["e1/params/fields"].append() = "iters";

It doesn't have an option to only export a specific topology -- that is something we can add.

  1. Pseudocolor plots always require a field name as an input, and fields are always linked to a unique topology.
    So the example in the docs ends up plotting multiple typologies, but the selection of which is implicit based on the field names.

Each plot can take the result of a pipeline (which allows you to apply specific filters, like isosurfaces)

So for your case 1:

You can create a pipeline that calculates the isosurfaces of the q-crit, and have that be a plot in a scene. Then you can add another plot to your scene that shows surface topology.

Right now we don't have the simple "solid" plot, so it would have to be faked with pseudocolor plot of constant field.
The input to the 2nd plot would be the default data, not the result of the pipeline.

For case 2, similarly:

You can use a pipeline and a plot to show your slides, and another pseudocolor plot to show your surface.
Again, the input to the 2nd plot would be the default data, not the result of the pipeline.

@mlohry
Copy link
Author

mlohry commented May 16, 2024

Thanks @cyrush , sounds good. I did hit what appears to be a bug or user error in #1297

It doesn't have an option to only export a specific topology -- that is something we can add.

This would be a nice to have. Our volume meshes are getting into the multiple TBs so right now I have a separate workflow for surface-only data.

@cyrush
Copy link
Member

cyrush commented May 21, 2024

@mlohry #1300 adds a topologies option to the relay extract that allow you to select which topology you want to save.

When used, it will say the selected topologies and all their associated fields.
When used with the fields option as well, the result is the union of the data found.

(so you can, for example save a whole topology, along with a single field from another)

@mlohry
Copy link
Author

mlohry commented May 21, 2024

Fantastic, thanks @cyrush ! I think this closes out my questions.

@mlohry mlohry closed this as completed May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants