Skip to content

Commit

Permalink
bug fix in Near2FarFields class
Browse files Browse the repository at this point in the history
  • Loading branch information
oskooi committed Oct 15, 2022
1 parent 725b5f9 commit af1fb53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/adjoint/objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def register_monitors(self, frequencies):
*self.Near2FarRegions,
decimation_factor=self.decimation_factor,
)
if norm_near_fields is not None:
if self.norm_near_fields is not None:
self.sim.load_minus_near2far_data(
self._monitor,
self.norm_near_fields,
Expand Down
5 changes: 3 additions & 2 deletions python/tests/test_adjoint_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,9 @@ def adjoint_solver(
if mon_type.name == "EIGENMODE":
if len(frequencies) == 1:
if mat2 is None:
# compute the incident fields of the source
# in just the straight waveguide
# compute the incident fields of the mode source
# in just the straight waveguide for normalization
# of the reflectance (S11) measurement
ref_sim = mp.Simulation(
resolution=self.resolution,
cell_size=self.cell_size,
Expand Down

0 comments on commit af1fb53

Please sign in to comment.