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

change to is_H_or_B when appropriate #2290

Merged
merged 1 commit into from
Oct 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void fields_chunk::update_dfts(double timeE, double timeH, int current_step) {
if (doing_solve_cw) return;
for (dft_chunk *cur = dft_chunks; cur; cur = cur->next_in_chunk) {
if ((current_step % cur->get_decimation_factor()) == 0) {
cur->update_dft(is_magnetic(cur->c) ? timeH : timeE);
cur->update_dft(is_H_or_B(cur->c) ? timeH : timeE);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ static void src_vol_chunkloop(fields_chunk *fc, int ichunk, component c, ivec is
if (idx_vol > npts)
meep::abort("add_volume_source: computed wrong npts (%zd vs. %zd)", npts, idx_vol);

field_type ft = is_magnetic(c) ? B_stuff : D_stuff;
field_type ft = is_H_or_B(c) ? B_stuff : D_stuff;
fc->add_source(ft, src_vol(c, data->src, std::move(index_array), std::move(amps_array)));
}

Expand All @@ -302,7 +302,7 @@ void fields::add_srcdata(struct sourcedata cur_data, src_time *src, size_t n,
std::vector<ptrdiff_t> index_arr(cur_data.idx_arr);
std::vector<std::complex<double> > amplitudes(amp_arr, amp_arr + n);
component c = cur_data.near_fd_comp;
field_type ft = is_magnetic(c) ? B_stuff : D_stuff;
field_type ft = is_H_or_B(c) ? B_stuff : D_stuff;
if (0 > cur_data.fc_idx or cur_data.fc_idx >= num_chunks)
meep::abort("fields chunk index out of range");
fields_chunk *fc = chunks[cur_data.fc_idx];
Expand Down