Skip to content

Commit

Permalink
just remove the integer warning for BlochBoundaries
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerflex committed Aug 29, 2024
1 parent 6c987a0 commit bfaff3f
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions tidy3d/components/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3780,18 +3780,18 @@ def _check_bloch_vec(
test_val_is_int = np.isclose(test_val, np.round(test_val))
src_name = f" '{source.name}'" if source.name else ""

if test_val_is_int and not np.isclose(test_val, 0):
# the given Bloch vector is offset by an integer
log.warning(
f"The wave vector of source{src_name} along dimension "
f"'{dim}' is equal to the Bloch vector of the simulation "
"boundaries along that dimension plus an integer reciprocal "
"lattice vector. If using a 'DiffractionMonitor', diffraction "
"order 0 will not correspond to the angle of propagation "
"of the source. Consider using 'BlochBoundary.from_source()'.",
custom_loc=["boundary_spec", "xyz"[dim]],
)
elif not test_val_is_int:
# if test_val_is_int and not np.isclose(test_val, 0):
# # the given Bloch vector is offset by an integer
# log.warning(
# f"The wave vector of source{src_name} along dimension "
# f"'{dim}' is equal to the Bloch vector of the simulation "
# "boundaries along that dimension plus an integer reciprocal "
# "lattice vector. If using a 'DiffractionMonitor', diffraction "
# "order 0 will not correspond to the angle of propagation "
# "of the source. Consider using 'BlochBoundary.from_source()'.",
# custom_loc=["boundary_spec", "xyz"[dim]],
# )
if not test_val_is_int:
# the given Bloch vector is neither equal to the expected value, nor
# off by an integer
log.warning(
Expand Down

0 comments on commit bfaff3f

Please sign in to comment.