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

Pass Tolerance to trace_particle_through_mesh Instead of Computing it Everytime #138

Open
Fuad-HH opened this issue Jan 27, 2025 · 2 comments

Comments

@Fuad-HH
Copy link
Contributor

Fuad-HH commented Jan 27, 2025

In the following segment of the trace_particle_through_mesh function, the tolerance for search algorithms is computed based on the "minimum area" and it can be expensive.

    const auto elmArea = measure_elements_real(&mesh);
    o::Real tol = compute_tolerance_from_area(elmArea);

But it should also get the tolerance as a parameter (taking it as a reference) and if the tolerance is not passed (default to 0.0), it can calculate its own.

@Fuad-HH
Copy link
Contributor Author

Fuad-HH commented Jan 27, 2025

@jacobmerson, could you please take a look and let me know if it makes sense? Then I can create a pull request with the changes.

@jacobmerson
Copy link
Contributor

Yes, passing the tolerance in makes sense to me. Since the triangles aren't changing each iteration, you should only compute this once.

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 a pull request may close this issue.

2 participants