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

Identify duplicate pins in an MPACT model #153

Open
KyleVaughn opened this issue May 7, 2024 · 0 comments
Open

Identify duplicate pins in an MPACT model #153

KyleVaughn opened this issue May 7, 2024 · 0 comments
Labels

Comments

@KyleVaughn
Copy link
Owner

Similar to MPACT, we would like to identify when a pin or pin mesh are redundant. This is especially relevant in the case of an automatically generated mesh with distance-based mesh coarsening. Here we may have hundreds of identical reflector pins, all of which were created as unique pins.

Suggested method for detecting duplicate pins:

  1. Check that the mesh has the same type, number of vertices, and number of faces
  2. Morton sort the mesh
  3. Compare vertices using v0.isApprox(v1), since we want to allow some amount of wiggle room for floating point precision.
  4. Check that the connectivity of each face is the same (allowing for cyclic permutations of the second face). E.g. (1, 2, 3) == (3, 1, 2)
  5. At this point, the mesh is the same. We can forego storing the mesh.
  6. Check if the material IDs in each face are the same (remembering to permute the material IDs according to the sorting of the faces). If the IDs are the same, don't add the pin. Return the ID of existing pin.
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

1 participant