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

Robustness of face group information in C++ unit tests #696

Open
baagaard-usgs opened this issue May 11, 2024 · 5 comments
Open

Robustness of face group information in C++ unit tests #696

baagaard-usgs opened this issue May 11, 2024 · 5 comments
Assignees
Labels
clean up Clean up design At design stage

Comments

@baagaard-usgs
Copy link
Contributor

In adding tests for reading face groups (sidesets), the C++ test data in TestMeshIO_Data identifies faces using cell + face vertices, which is consistent with the ASCII input. This seems easiest from a test setup perspective. However, this is sensitive to the order of vertices when getting the vertices for a face.

The alternative is to update the test data to use the points corresponding to the face. This information is not usually available in the input mesh, so it would require examining the created mesh to identify the point for each face.

@baagaard-usgs baagaard-usgs added design At design stage clean up Clean up labels May 11, 2024
@baagaard-usgs baagaard-usgs self-assigned this May 11, 2024
@knepley
Copy link
Contributor

knepley commented May 11, 2024

The way I had envisioned it, we would use the ExodusII system (which is why they created it). You specify (cell + local face) and it is translated to face.

@baagaard-usgs
Copy link
Contributor Author

Specifying a cell + its local side is easy to mess up in creating the unit tests, especially in 3D. Specifying a cell + vertices on a face is much easier to setup and check.

@knepley
Copy link
Contributor

knepley commented May 11, 2024

Could you specify it with local vertex numbers?

@baagaard-usgs
Copy link
Contributor Author

We could use local vertex numbers, but I think global vertex numbers is less prone to errors. With global vertex numbers there is a nice 1:1 match between a ASCII input file with cell and global vertex numbers and the test data, so it is very easy to setup and debug.

We have a lot of test data, so the simpler the better.

@knepley
Copy link
Contributor

knepley commented May 11, 2024

For that, you would have to get the closure of the cell and filter out the vertices (I do this in many places in plex.c), then all getRawFaces(), translate the local vertices to global vertices using your closure, put those vertices in a set or somehow do setwise comparison with your vertex set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clean up Clean up design At design stage
Projects
None yet
Development

No branches or pull requests

2 participants