Skip to content

Conversation

@gunney1
Copy link
Contributor

@gunney1 gunney1 commented Sep 23, 2025

Summary

  • This PR is a (work-in-progress) feature.
  • It does the following:
    • Introduces a conduit::Node for internally storing geomety data and allow for new geometry formats and information without further changes to the code. Currently, this information is stored in a variety of objects:
      1. primal geometries (Tetrahedron, Hexahedron, Sphere, etc.)
      2. aggregate data for geometries not supported by primal (for example, 2D function and refinement level for surface of revolution)
      3. file names for geometries stored in files (for example, ProE mesh)
      4. sidre::Group and topology name (for geometries stored in blueprint mesh convention)
    • Provides a way to populate, store and access geometry data without requiring numerous accessors and constructors.

Problems with using primitives in Geometry

  1. They don't have all the parameters needed for shaping (which is why Geometry has to keep supplemental data).
  2. We have to add new primitives and change Geometry to support new shapes.
    For these reasons, primitives will be removed in favor of the hierarchy representation. Geometry is supporting both during the transition.

This is a WIP. It is being used in the on-going work to re-factor and improve clipping performance and may still change to support that goal.

Dependencies

The mesh clipping refactor includes multiple PRs. Please review these before this one.

Cone provides interface for specify a cone geometry.
Type-free geometry is work-in-progress toward allowing
klee::Geometry to support arbitrary geometry types without
requiring a primal representation of that geometry.
Also add asterisks to comment blocks.
@gunney1 gunney1 self-assigned this Sep 24, 2025
@gunney1 gunney1 added the Klee Related to the Klee component label Sep 24, 2025
@gunney1 gunney1 added this to the 2025 Fall Release milestone Sep 24, 2025
@gunney1 gunney1 changed the base branch from develop to feature/gunney/extend-primal-geometries September 24, 2025 17:49
…ries' into feature/gunney/extend-klee-geometry
populateGeomInfo();
}

void Geometry::populateGeomInfo()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by this PR. Is there a reason to store both the geometric primitive, e.g. primal::Tetrahedron and the blueprint representation?

Would it make sense to store just the conduit node and create the primal type on the fly?
(I'm asking because, each Geometry stores at most one of the types, e.g. sphere vs. tetrahedron, but there is a class member for each of the types.

I saw WIP in the description. Are you planning to remove the primitives in a later PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I plan to remove the primitives later. Primitives don't have enough information and they require Geometry to change each time we add a new shape. Geometry is supporting both during the transition from primitives to hierarchy representation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this info to the PR summary.

Copy link
Contributor

@Arlie-Capps Arlie-Capps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the design of klee::Geometry can and should be refined. It feels like the class has a lot of redundancy which I'd like to eliminate. I also recognize, Brian, that you wrote it this way to solve specific problems, and I feel like I don't fully understand those issues. Also, this PR is in support of a feature you're highly motivated to make available to a user of Axom.

If you're willing to revisit the design of Geometry, perhaps in conjunction with moving a body of code out of the experimental namespace, I'm willing to defer the discussion of Geometry until that date and approve this PR.

@gunney1
Copy link
Contributor Author

gunney1 commented Sep 26, 2025

I think the design of klee::Geometry can and should be refined. It feels like the class has a lot of redundancy which I'd like to eliminate. I also recognize, Brian, that you wrote it this way to solve specific problems, and I feel like I don't fully understand those issues. Also, this PR is in support of a feature you're highly motivated to make available to a user of Axom.

If you're willing to revisit the design of Geometry, perhaps in conjunction with moving a body of code out of the experimental namespace, I'm willing to defer the discussion of Geometry until that date and approve this PR.

@Arlie-Capps, I appreciate your point of view and agree completely. klee::Geometry is transitioning from primal primitives to hierarchy to describe the geometry. I've been wanting to complete the transition, but the performance issues kept preempting it. Let me complete it now in this PR and see how that addresses your concerns.

@gunney1
Copy link
Contributor Author

gunney1 commented Sep 30, 2025

I think the design of klee::Geometry can and should be refined. It feels like the class has a lot of redundancy which I'd like to eliminate. I also recognize, Brian, that you wrote it this way to solve specific problems, and I feel like I don't fully understand those issues. Also, this PR is in support of a feature you're highly motivated to make available to a user of Axom.
If you're willing to revisit the design of Geometry, perhaps in conjunction with moving a body of code out of the experimental namespace, I'm willing to defer the discussion of Geometry until that date and approve this PR.

@Arlie-Capps, I appreciate your point of view and agree completely. klee::Geometry is transitioning from primal primitives to hierarchy to describe the geometry. I've been wanting to complete the transition, but the performance issues kept preempting it. Let me complete it now in this PR and see how that addresses your concerns.

As discussed in an email thread with @kennyweiss and @Arlie-Capps, completion of klee::Geometry in this PR would be more work than I think is worth it. It would require fixing some features in mint, fixes that would not be needed after merging the other companion PRs in this task. Therefore, I request that this PR be approved with klee::Geometry still in its transitional state, supporting both primal primitives and hierarchy storage. The transition will be completed after the last PR of this series, #1654.

@gunney1 gunney1 merged commit 742b70b into feature/gunney/extend-primal-geometries Sep 30, 2025
15 checks passed
@gunney1 gunney1 deleted the feature/gunney/extend-klee-geometry branch September 30, 2025 23:53
@gunney1 gunney1 restored the feature/gunney/extend-klee-geometry branch September 30, 2025 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Klee Related to the Klee component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants