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

Add check for cylindrical coordinates to get_array_metadata #2684

Merged
merged 1 commit into from
Oct 23, 2023
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 python/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4053,7 +4053,7 @@ def get_array_metadata(
or `center`/`size`. In both cases, the return value is a tuple `(x,y,z,w)`, where:

+ `x,y,z` are 1d NumPy arrays storing the $x,y,z$ coordinates of the points in the
grid slice
grid slice. Cylindrical coordinates is not supported.
+ `w` is a NumPy array of the same dimensions as the array returned by
`get_array`/`get_dft_array`, whose entries are the weights in a cubature rule
for integrating over the spatial region (with the points in the cubature rule
Expand Down
2 changes: 2 additions & 0 deletions src/array_slice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,8 @@ complex<realnum> *fields::get_source_slice(const volume &where, component source
/***************************************************************/
/***************************************************************/
std::vector<double> fields::get_array_metadata(const volume &where) {
if (where.dim == Dcyl)
meep::abort("get_array_metadata does not support cylindrical coordinates.");

/* get extremal corners of subgrid and array of weights, collapsed if necessary */
size_t dims[3];
Expand Down