Skip to content

Conversation

@Fuad-HH
Copy link
Contributor

@Fuad-HH Fuad-HH commented Feb 18, 2025

  • Replace ray_intersects_triangle with line_segment_intersects_triangle.
  • Standardize* the behavior of arrays used as parameters.
  • Move set_new_element function inside the functor.
  • Add next_element parameter that holds the next element and passes to the functor.
  • Fix closeness algorithm in find_exit_face
  • Add test case for search_mesh

*After adding the callback functor, it is necessary for the user to know a clearly defined meaning of the particle state arrays.

- passing all tests except smoke_test_particle
It is giving a warning for MPI oversubscribing
and "Structure not initalized at Particle"
- passing all tests
instead of checking if tol was passed using negative values,
it is made optional. In the future, tol will be calculated
outside according to the standardization plan and for this
reason, we don't need it to be passed as reference or pointer
it is passed as a parameter rather than computing it every time
the search is called.
it's an initial step to make the function standard with
proper docuemntation. [important] there are some breaking
changes and the function is under heavy development
the functor decides what happens to the particles at the boundary
next_element parameter holds the next element when a particle
intersects a face. This is added to both the trace_particle_through_mesh
and the functor. The functor may or may not use the value, but there's
a high chance to be used.

[Important] The test is failing. This is because although the particles
doesn't intersect face 0 (it is along the way of the ray going forward)
the closeness algorithm finds it as the intersected face.
@Fuad-HH Fuad-HH marked this pull request as ready for review February 18, 2025 20:03
@Fuad-HH Fuad-HH marked this pull request as draft February 18, 2025 20:08
@Fuad-HH
Copy link
Contributor Author

Fuad-HH commented Feb 18, 2025

@jacobmerson I will keep it draft until I bring the test case here. But please start reviewing the changes. I will commit the new test case for search_mesh and some other small changes later, maybe after we discuss them. The changes are based on master and #142 is not merged yet here.

- works for particles going to a new element
- or remains in the same

- [to be fixed] particles leaking out
next_element becomes -1 when particle leaks
fix search_mesh in accordance with changes in
trace_particle_through_mesh

[future fixes]
- interPoints should give the face intersection location when leaking
  out instead of the destination
@Fuad-HH Fuad-HH marked this pull request as ready for review February 26, 2025 20:29
@Fuad-HH Fuad-HH mentioned this pull request Feb 27, 2025
9 tasks
Copy link
Contributor

@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 put some relevant comments here: #144

Mostly just a few naming things.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants