Skip to content

Commit

Permalink
remove integer parameter in InteriorSquirmer - was messing shit up wi…
Browse files Browse the repository at this point in the history
…th param perturbations
  • Loading branch information
jbial committed Dec 9, 2024
1 parent 9a65c9c commit c25c505
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion dysts/data/chaotic_attractors.json
Original file line number Diff line number Diff line change
Expand Up @@ -2020,7 +2020,6 @@
"parameters": {
"a": [0.5, 0.5, 0.5, 0.5, 0.5],
"g": [0.5, 0.5, 0.5, 0.5, 0.5],
"n": 5,
"tau": 3
},
"period": 28.822573200111794,
Expand Down
10 changes: 5 additions & 5 deletions dysts/flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,8 @@ class BlinkingVortex(BlinkingRotlet):

class InteriorSquirmer(DynSys):
@staticjit
def _rhs_static(r, th, t, a, g, n):
def _rhs_static(r, th, t, a, g):
n = a.shape[0]
nvals = np.arange(1, n + 1)
sinvals, cosvals = np.sin(th * nvals), np.cos(th * nvals)
rnvals = r**nvals
Expand All @@ -514,7 +515,8 @@ def _rhs_static(r, th, t, a, g, n):
return np.sum(vrn), np.sum(vth) / r

@staticjit
def _jac_static(r, th, t, a, g, n):
def _jac_static(r, th, t, a, g):
n = a.shape[0]
nvals = np.arange(1, n + 1)
sinvals, cosvals = np.sin(th * nvals), np.cos(th * nvals)
rnvals = r**nvals
Expand Down Expand Up @@ -566,9 +568,7 @@ def rhs(self, X, t):
r, th, tt = X
phase = self._protocol(tt, self.tau)
dtt = 1
dr, dth = self._rhs_static(
r, th, t, self.a * phase, self.g * (1 - phase), self.n
)
dr, dth = self._rhs_static(r, th, t, self.a * phase, self.g * (1 - phase))
return dr, dth, dtt


Expand Down
1 change: 1 addition & 0 deletions tests/test_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_ensemble_generation_parameter_sampling(self):
scale=1e-4, random_seed=random.randint(0, 1000000)
)
system_sample = random.sample(get_attractor_list(sys_class="continuous"), 4)
system_sample += ["InteriorSquirmer"]
systems = [getattr(dfl, sys)() for sys in system_sample]
unperturbed_sols = make_trajectory_ensemble(
256,
Expand Down

0 comments on commit c25c505

Please # to comment.