Skip to content

Commit

Permalink
add check for cylindrical coordinates to get_array_metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
oskooi committed Oct 23, 2023
1 parent e2ecb36 commit 31c9b4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
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

0 comments on commit 31c9b4b

Please sign in to comment.