-
Notifications
You must be signed in to change notification settings - Fork 629
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
WIP: allow add_srcdata to place sources on non-owned points #1959
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
std::sort(boundarysources.begin(), boundarysources.end(), compare); | ||
|
||
// collect 2d (row-major) arrays offsets and numcomm, | ||
// where numcomm[i,j] is the number of srcpt_info items |
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.
Note: numcomm[i,j]
here is stored at numcomm[i*P + j]
(this is "row major order").
In Furthermore, in the two places, |
…(const src_time &t) in meep.hpp, add a ifdef-endif sentence in fix_boundary_sources.cpp, add needs_boundary_fix in IndexedSource
997a1a7
to
439778c
Compare
The error message of the online check is as follows, but that c++ file already has
There is no error when it is checked offline. |
See my suggested patch above. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## master #1959 +/- ##
==========================================
+ Coverage 73.57% 73.58% +0.01%
==========================================
Files 17 17
Lines 4896 4898 +2
==========================================
+ Hits 3602 3604 +2
Misses 1294 1294
|
@@ -273,12 +273,12 @@ def place_adjoint_source(self, dJ): | |||
scale = amp_arr * self._adj_src_scale(include_resolution=False) | |||
|
|||
if self.num_freq == 1: | |||
sources += [mp.IndexedSource(time_src, fourier_data, scale[:,0])] | |||
sources += [mp.IndexedSource(time_src, fourier_data, scale[:,0], not self.yee_grid)] |
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.
Note that this only affects code that use Fourier fields yee_grid=false
.
This PR continues @stevengj 's work in #1547. At present, it still fails when too many processes are involved, which can be illustrated by the example with 7 processes. The error is
unknown src_time_id (missing registration?)
.