-
Notifications
You must be signed in to change notification settings - Fork 626
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
Adjoint near2far with vol_src #1329
Conversation
Note: issue #1365 will make this even more efficient. |
@@ -1346,11 +1357,12 @@ class fields_chunk { | |||
structure_chunk *new_s; | |||
structure_chunk *s; | |||
const char *outdir; | |||
int chunk_idx; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was it necessary to add a new member variable chunk_idx
to the fields_chunk
class? It doesn't seem to be actually used for anything. There is a member function n_proc()
which already returns the chunk ID (equivalent to the MPI rank) and thus adding a chunk_idx
variable seems redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't a proc have multiple chunks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes for the PML regions but still chunk_idx
doesn't seem to be used for anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chunk_idx
is first used in dft_near2far::near_sourcedata
, as the fc_idx
in the structure sourcedata
. That information is later used in fields::add_srcdata
to find the right field chunk to add source.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, it is necessary to add a chunk_idx
variable to the fields_chunk
class because there is no way from within a dft_near2far
object to identify each fields_chunk
associated with each dft_chunk
object.
* add yee grid to array slice * add yee grid to array slice * fix gradients * rebase * try better gradients * cleanup from revert * fix multifreq bug * mpi memory fixes * fix memory leaks * setup branch * correct scale * offset issue * offset issue * several frequencies * several frequencies * several frequencies * fourier * update example * near2far * near2far * fix factor * typo * yee grid * rebase * rebase * rebase * weight * add example * Fix Fourier * change example * typo * rebase * fix rebase * fix rebase * fix rebase * srcdata * vol_src * src_vol * src_vol * src_vol * src_vol * add example * add example * clean up * clean up * delete extra blank lines * resolve issues * fix issues * fix issues Co-authored-by: Alec Hammond <[email protected]> Co-authored-by: smartalecH <[email protected]> Co-authored-by: MoChen <[email protected]> Co-authored-by: Mo Chen <[email protected]> Co-authored-by: Mo Chen <[email protected]> Co-authored-by: Mo Chen <[email protected]> Co-authored-by: Mo Chen <[email protected]> Co-authored-by: Mo Chen <[email protected]>
No description provided.