Skip to content

Commit

Permalink
fstring flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
JHopeCollins committed Jul 24, 2024
1 parent a075e5d commit ae9e6ad
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
10 changes: 5 additions & 5 deletions case_studies/gusto/advection.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ def form_function(*trials_and_tests):
# Set up asQ stepper
# ------------------------------------------------------------------------ #

Print(f"{equation.function_space = }")
Print(f"{V = }")
Print(f"{equation.function_space=}")
Print(f"{V=}")
params = {
'snes_type': 'ksponly',
'ksp_type': 'preonly',
Expand All @@ -162,10 +162,10 @@ def form_function(*trials_and_tests):
# ------------------------------------------------------------------------ #

gusto_error = norm(stepper.fields('f') - f_end) / norm(f_end)
Print(f"{gusto_error = }")
Print(f"{gusto_error=}")

asq_error = norm(asqstep.w1 - f_end) / norm(f_end)
Print(f"{asq_error = }")
Print(f"{asq_error=}")

gusto_asq_error = norm(stepper.fields('f') - asqstep.w1) / norm(f_end)
Print(f"{gusto_asq_error = }")
Print(f"{gusto_asq_error=}")
8 changes: 4 additions & 4 deletions case_studies/gusto/diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
f_end_expr = (1/(1+4*tmax))*f_init**(1/(1+4*tmax))

V = domain.spaces("DG")
Print(f"{V = }")
Print(f"{V=}")

mu = 5.

Expand Down Expand Up @@ -55,12 +55,12 @@
# Run gusto stepper
timestepper.run(0., tmax)
gusto_f_end = timestepper.fields('f')
Print(f"{errornorm(f_end_expr, gusto_f_end) = }")
Print(f"{errornorm(f_end_expr, gusto_f_end)=}")

# Run asQ stepper
asqstepper.solve(nt=timestepper.step-1)
asq_f_end = asqstepper.w1
Print(f"{errornorm(f_end_expr, asq_f_end) = }")
Print(f"{errornorm(f_end_expr, asq_f_end)=}")

# error
Print(f"{errornorm(gusto_f_end, asq_f_end) = }")
Print(f"{errornorm(gusto_f_end, asq_f_end)=}")
8 changes: 4 additions & 4 deletions case_studies/gusto/swe.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ def postprocess(app, step, t):
# ------------------------------------------------------------------------ #

uinit, Dinit = w0.subfunctions
Print(f"{errornorm(asq_u, uinit)/norm(uinit) = }")
Print(f"{errornorm(asq_D, Dinit)/norm(Dinit) = }")
Print(f"{errornorm(asq_u, uinit)/norm(uinit)=}")
Print(f"{errornorm(asq_D, Dinit)/norm(Dinit)=}")

Print(f"{errornorm(asq_u, gusto_u)/norm(uinit) = }")
Print(f"{errornorm(asq_D, gusto_D)/norm(uinit) = }")
Print(f"{errornorm(asq_u, gusto_u)/norm(uinit)=}")
Print(f"{errornorm(asq_D, gusto_D)/norm(uinit)=}")

0 comments on commit ae9e6ad

Please sign in to comment.