Skip to content

Commit

Permalink
Allow epsilon < -1 (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
loganbvh authored Feb 9, 2024
1 parent 4926f81 commit ac8b2d9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tdgl/solver/solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ class TDGLSolver:
terminal_currents: A dict of ``{terminal_name: current}`` or a callable with signature
``func(time: float) -> {terminal_name: current}``, where ``current`` is a float
in units of ``current_units`` and ``time`` is the dimensionless time.
disorder_epsilon: A float in range [-1, 1], or a function that returns
:math:`\\epsilon\\in[-1, 1]` as a function of position ``r=(x, y)`` or
disorder_epsilon: A float <= 1, or a function that returns
:math:`\\epsilon\\leq 1` as a function of position ``r=(x, y)`` or
position and time ``(x, y, *, t)``.
Setting :math:`\\epsilon(\\mathbf{r}, t)=T_c/T - 1 < 1` suppresses the
order parameter at position :math:`\\mathbf{r}=(x, y)`, which can be used
Expand Down Expand Up @@ -211,8 +211,8 @@ def disorder_epsilon(r):
epsilon = disorder_epsilon(self.sites, **kw)
else:
epsilon = np.array([float(disorder_epsilon(r, **kw)) for r in self.sites])
if np.any(epsilon < -1) or np.any(epsilon > 1):
raise ValueError("The disorder parameter epsilon must be in range [-1, 1].")
if np.any(epsilon > 1):
raise ValueError("The disorder parameter epsilon must be <= 1")

# Find the current terminal sites.
self.terminal_info = device.terminal_info()
Expand Down

0 comments on commit ac8b2d9

Please sign in to comment.