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

Allow multiple receivers in an element. #425

Merged
merged 5 commits into from
Jan 27, 2025
Merged

Conversation

icui
Copy link
Collaborator

@icui icui commented Jan 23, 2025

Issue Number

Closes #422

Copy link
Collaborator

@Rohit-Kakodkar Rohit-Kakodkar left a comment

Choose a reason for hiding this comment

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

Can you add station

S0006    AA         2500.0000000         2500.0000000       0.0         0.0

to the stations file in tests/unit-tests/displacement_tests/Newmark/serial/test1? To amke sure that this code path gets tested. S0011 is the same receiver as S0006, and the seismograms for the station S0006 already exists within the traces folder

: Base(indices, ngllz, ngllx), mapping(mapping) {}

KOKKOS_INLINE_FUNCTION
const int imap(const int i) const {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you call the Base::operator(i) method to compute ielement here? Incase in the future we update the orientation of threads then we dont need to remember to update it in 2 locations.


KOKKOS_INLINE_FUNCTION
mapped_iterator_type mapped_league_iterator(const int start_index) const {
const int start = start_index;
Copy link
Collaborator

Choose a reason for hiding this comment

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

  1. Can this just be called league_iterator?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I got the error mapped_element_chunk and element_chunk are not compatible when trying to override league_iterator.

Base automatically changed from issue-414 to issue-228-anisotropy January 24, 2025 16:04
Copy link
Collaborator

@lsawade lsawade left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -84,7 +84,7 @@ void specfem::kokkos_kernels::impl::compute_seismograms(

receivers.set_seismogram_step(isig_step);

ChunkPolicy policy(elements, ngll, ngll);
ChunkPolicy policy(elements, receiver_indices, ngll, ngll);
Copy link
Collaborator

Choose a reason for hiding this comment

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

I ended up updating the naming of the policy, index, iterator etc. for more clarity:

policy -> mapped_policy
iterator -> mapped_iterator
index -> element_index

But it is fine the way it is here

@lsawade lsawade merged commit f09667d into issue-228-anisotropy Jan 27, 2025
3 checks passed
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.

3 participants