Skip to content

Commit 0cb2c69

Browse files
committed
tests/misc/rge_sm.py: Remove unused code from the test.
This cleans up the test to remove all unused code, making it smaller, a bit faster to deploy to a target to run, and also use less RAM on the target (which may help it run on targets that are just slightly out of memory running it). Signed-off-by: Damien George <damien@micropython.org>
1 parent c16fe5b commit 0cb2c69

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

tests/misc/rge_sm.py

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,6 @@ def solve(self, finishtime):
3939
if not self.iterate():
4040
break
4141

42-
def solveNSteps(self, nSteps):
43-
for i in range(nSteps):
44-
if not self.iterate():
45-
break
46-
47-
def series(self):
48-
return zip(*self.Trajectory)
49-
5042

5143
# 1-loop RGES for the main parameters of the SM
5244
# couplings are: g1, g2, g3 of U(1), SU(2), SU(3); yt (top Yukawa), lambda (Higgs quartic)
@@ -79,45 +71,6 @@ def series(self):
7971
)
8072

8173

82-
def drange(start, stop, step):
83-
r = start
84-
while r < stop:
85-
yield r
86-
r += step
87-
88-
89-
def phaseDiagram(system, trajStart, trajPlot, h=0.1, tend=1.0, range=1.0):
90-
tstart = 0.0
91-
for i in drange(0, range, 0.1 * range):
92-
for j in drange(0, range, 0.1 * range):
93-
rk = RungeKutta(system, trajStart(i, j), tstart, h)
94-
rk.solve(tend)
95-
# draw the line
96-
for tr in rk.Trajectory:
97-
x, y = trajPlot(tr)
98-
print(x, y)
99-
print()
100-
# draw the arrow
101-
continue
102-
l = (len(rk.Trajectory) - 1) / 3
103-
if l > 0 and 2 * l < len(rk.Trajectory):
104-
p1 = rk.Trajectory[l]
105-
p2 = rk.Trajectory[2 * l]
106-
x1, y1 = trajPlot(p1)
107-
x2, y2 = trajPlot(p2)
108-
dx = -0.5 * (y2 - y1) # orthogonal to line
109-
dy = 0.5 * (x2 - x1) # orthogonal to line
110-
# l = math.sqrt(dx*dx + dy*dy)
111-
# if abs(l) > 1e-3:
112-
# l = 0.1 / l
113-
# dx *= l
114-
# dy *= l
115-
print(x1 + dx, y1 + dy)
116-
print(x2, y2)
117-
print(x1 - dx, y1 - dy)
118-
print()
119-
120-
12174
def singleTraj(system, trajStart, h=0.02, tend=1.0):
12275
is_REPR_C = float("1.0000001") == float("1.0")
12376
tstart = 0.0
@@ -141,7 +94,5 @@ def singleTraj(system, trajStart, h=0.02, tend=1.0):
14194
print(tr_str)
14295

14396

144-
# phaseDiagram(sysSM, (lambda i, j: [0.354, 0.654, 1.278, 0.8 + 0.2 * i, 0.1 + 0.1 * j]), (lambda a: (a[4], a[5])), h=0.1, tend=math.log(10**17))
145-
14697
# initial conditions at M_Z
14798
singleTraj(sysSM, [0.354, 0.654, 1.278, 0.983, 0.131], h=0.5, tend=math.log(10**17)) # true values

0 commit comments

Comments
 (0)