You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use the FourierFields adjoint objective when the simulation is in 2D cylindrical coordinates returns an error with respect to the volume argument passed to FourierFields. This was found by modifying the example Adjoint FarField code to use cylindrical coordinates (which runs fine), and then try to change the objective to use FourierFields (which then fails).
Trying to call FourierFields with cylindrical coordinates returns the following error for the Volume (abbreviated):
The error is the same regardless of if dims or is_cylindrical are passed to mp.Volume
Interestingly this error occurs in the current *conda version of meep (1.24.0), but the older Ubuntu package manager version (1.17.1) does not produce any error.
The text was updated successfully, but these errors were encountered:
As the error appears at sim._fit_volume_to_simulation, the MWE can be further reduced as follows, which does not involve any part of the adjoint solver.
Adding the following three lines after this line can fix the bug exposed by the MWE.
if self.dimensions == mp.CYLINDRICAL:
self.dimensions = 2
self.is_cylindrical = True
I could not find the reason for the volume dimension to be set to -2.
When mp.CYLINDRICAL is printed, it gives -2.
Interestingly this error occurs in the current *conda version of meep (1.24.0), but the older Ubuntu package manager version (1.17.1) does not produce any error.
The FourierFields adjoint solver was overhauled before the version 1.23.0. The function _fit_volume_to_simulation was not used in the old version of FourierFields.
Trying to use the FourierFields adjoint objective when the simulation is in 2D cylindrical coordinates returns an error with respect to the volume argument passed to FourierFields. This was found by modifying the example Adjoint FarField code to use cylindrical coordinates (which runs fine), and then try to change the objective to use FourierFields (which then fails).
Trying to call FourierFields with cylindrical coordinates returns the following error for the Volume (abbreviated):
I could not find the reason for the volume dimension to be set to -2.
A MWE for reproducing:
The error is the same regardless of if
dims
oris_cylindrical
are passed to mp.VolumeInterestingly this error occurs in the current *conda version of meep (1.24.0), but the older Ubuntu package manager version (1.17.1) does not produce any error.
The text was updated successfully, but these errors were encountered: