Skip to content

Commit

Permalink
changed error message for semi-infinite bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerflex committed Apr 19, 2022
1 parent a1480b1 commit 88f6a4f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions tidy3d/components/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,13 +737,11 @@ def get_center(pt_min: float, pt_max: float) -> float:
if np.isneginf(pt_min) or np.isposinf(pt_max):
raise SetupError(
f"Bounds of ({pt_min}, {pt_max}) supplied along one dimension. "
"We currently don't support supplying a single `inf` value in bounds "
"for the construction of semi-infinite `Box`. "
"Instead, to construct a semi-infinite `Box`, "
"please supply a large number instead of `inf`. "
"For example, if the Box represents the geometry of a `Structure` in a "
"`Simulation`, its bound should extend outside of the `Simulation` domain "
"including PML."
"We currently don't support a single ``inf`` value in bounds for ``Box``. "
"To construct a semi-infinite ``Box``, "
"please supply a large enough number instead of ``inf``. "
"For example, a location extending outside of the "
"Simulation domain (including PML)."
)
return (pt_min + pt_max) / 2.0

Expand Down

0 comments on commit 88f6a4f

Please sign in to comment.