Skip to content

Conversation

@cwsmith
Copy link

@cwsmith cwsmith commented Apr 1, 2024

Adds a Model2D class and support for filling the Model2D data structures from a Simmetrix GeomSim model (.smd).

  • tests GeomSim loading on 2d square
  • tests GeomSim loading on a 3d model - expected result is failure (see will_fail_test_func(...) CMake macro)
  • Simmetrix initialization and finalization were moved into the Omega_h::Library constructor.

@cwsmith cwsmith changed the title Define 2d model class and Simmetrix GeomSim loader Define 2d model and mesh class and Simmetrix GeomSim model loader Apr 1, 2024
Copy link
Collaborator

@jacobmerson jacobmerson left a comment

Choose a reason for hiding this comment

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

I mostly commented on high level design choices so far.

@joshia5
Copy link
Collaborator

joshia5 commented May 1, 2024

looks good to me overall, some comments attached

@cwsmith
Copy link
Author

cwsmith commented May 22, 2024

notes from discussion with @jacobmerson

  • this is a 'stub' for future development that will add APIs to access this data during mesh adaptation
  • Model2d is intended to be immutable
    • return Model2d as const
    • make vtxTol and edgeTol as const
    • possibly delete Model2d copy constructor to avoid modification

CKegel and others added 9 commits June 20, 2025 12:24
Stores topological data in private fields and provides a "getter" api to access topological data. Also adds in code doxygen documentation.
Adds topological queries to the Model2D Class by:

- Making the Model2D Fields private, and providing inline "getter" functions
- Reworking the Model2D loading routine. It now utilizes private helper functions to populate the Model2D Fields
- Adding documentation with doxygen

This PR also bumps the maximum version of Simmetrix to 2025.1.250507.
@cwsmith
Copy link
Author

cwsmith commented Aug 27, 2025

/runtests

@github-actions
Copy link

Test Result: success (details)

@cwsmith
Copy link
Author

cwsmith commented Aug 27, 2025

/runtests

@github-actions
Copy link

Test Result: success (details)

}

std::optional<Model2D> Mesh2D::getModel() const {
std::optional<const Model2D> Mesh2D::getModel() const {
Copy link
Collaborator

@jacobmerson jacobmerson Sep 14, 2025

Choose a reason for hiding this comment

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

This may not be what you want. I'm pretty sure this will make a copy of the model to return since std::optional owns the data. If you don’t want a copy a pointer is probably the way to go here, but with an added note in the docs that it may be null since our users may not be as careful with checking for nullptr as they should be.

If you return a pointer, you can also mark this function noexcept

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants