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

Generalized search_mesh that takes a functor to execute at element boundary or destination #130

Merged
merged 4 commits into from
Nov 21, 2024

Conversation

Fuad-HH
Copy link
Contributor

@Fuad-HH Fuad-HH commented Nov 11, 2024

This new particle_search method allows passing a functor that takes all the necessary objects it wants to handle. It is run every time the particle reaches an element boundary or its destination i.e. after every call of find_exit_face. It will allow various things including handling different boundary conditions, recording information, etc.

@cwsmith
Copy link
Contributor

cwsmith commented Nov 12, 2024

Thank you. Does this support 2d and/or 3d meshes? Are there any tests available?

@Fuad-HH
Copy link
Contributor Author

Fuad-HH commented Nov 13, 2024

Yes, as the original search_mesh function, it supports both 2D and 3D. Actually, this is exactly the original search_mesh method except what it did when particles reach element boundaries is encapsulated in the functor that is passed in the new particle_search method. There are two test cases (search_adj_2d and search_adj_3d) that use the search_mesh method for 2D and 3D searches. It tests the search_mesh method and it is passing.

@jacobmerson
Copy link
Contributor

@Fuad-HH is #128 ready as well? That has the unit tests you put in place for all of the component functions of search_mesh correct?

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.

Thanks for putting this together. There are a few minor issues that need to be resolved to clean up the interfaces so we are not requiring implementation specific data to be passed around, but this is looking very good.

Thanks!

src/pumipic_adjacency.tpp Outdated Show resolved Hide resolved
src/pumipic_adjacency.tpp Show resolved Hide resolved
src/pumipic_adjacency.tpp Show resolved Hide resolved
src/pumipic_adjacency.tpp Outdated Show resolved Hide resolved
src/pumipic_adjacency.tpp Outdated Show resolved Hide resolved
src/pumipic_adjacency.tpp Show resolved Hide resolved
src/pumipic_adjacency.tpp Outdated Show resolved Hide resolved
suggested changes made: removed the requireIntersection flag from the () operator, kept set_new_element in particle search rather than calling in the function, side_is_exposed array computed once during the construction and saved there instead of computing it every functor call.
@Fuad-HH
Copy link
Contributor Author

Fuad-HH commented Nov 18, 2024

I have added a brief description for renamed trace_particle_through_mesh. Does the description look good?

@Fuad-HH
Copy link
Contributor Author

Fuad-HH commented Nov 18, 2024

There shouldn't be any merge conflict, but it's showing an "empty" line coming from master.

Copy link
Contributor

@cwsmith cwsmith left a comment

Choose a reason for hiding this comment

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

Looks good. Thank you.

@jacobmerson jacobmerson merged commit 8130075 into SCOREC:master Nov 21, 2024
@Fuad-HH Fuad-HH deleted the functor_parameter_for_search_mesh branch November 22, 2024 16:20
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.

4 participants