Skip to content

Commit

Permalink
Incorporate review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
connoramoreno committed Nov 11, 2024
1 parent 4270974 commit 12f55ff
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions parastell/source_mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ def toroidal_extent(self):

@toroidal_extent.setter
def toroidal_extent(self, angle):
if angle > 360.0:
angle = np.deg2rad(angle)

if angle > 2 * np.pi:
e = AttributeError("Toroidal extent cannot exceed 360.0 degrees.")
self._logger.error(e.args[0])
raise e

if angle == 360.0 and self._num_toroidal_pts % 2 != 1:
if angle == 2 * np.pi and self._num_toroidal_pts % 2 != 1:
e = AttributeError(
"To ensure that tetrahedral faces are coincident at the end of "
"the closed toroidal loop, the number of toroidal intervals "
Expand All @@ -180,7 +182,7 @@ def toroidal_extent(self, angle):
self._logger.error(e.args[0])
raise e

self._toroidal_extent = np.deg2rad(angle)
self._toroidal_extent = angle

@property
def logger(self):
Expand Down

0 comments on commit 12f55ff

Please sign in to comment.