Commit 433d7cca authored by Samuel Kemmler's avatar Samuel Kemmler
Browse files

Make client.py flake8 conform

parent 7755e2ff
......@@ -4,8 +4,8 @@ import random
def jacobi_iteration(u):
for i in range(1, len(u) - 1):
u[i] = 0.5 * (u[i - 1] + u[i + 1])
for i in range(1, len(u) - 1):
u[i] = 0.5 * (u[i - 1] + u[i + 1])
context = zmq.Context()
......@@ -25,9 +25,9 @@ u[len(u) - 1] = 0.0
socket.send("-".join(str(x) for x in u).encode("ascii"))
while True:
# if requested, perform jacobi iteration and send result
message = socket.recv().decode("ascii")
if message != "next":
break
jacobi_iteration(u)
socket.send("-".join(str(x) for x in u).encode("ascii"))
# if requested, perform jacobi iteration and send result
message = socket.recv().decode("ascii")
if message != "next":
break
jacobi_iteration(u)
socket.send("-".join(str(x) for x in u).encode("ascii"))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment