From bd76e75eb6f80b4c463f449b39cceb29dd9bedaa Mon Sep 17 00:00:00 2001 From: atb1995 Date: Wed, 14 Aug 2024 10:55:03 +0100 Subject: [PATCH] lint fixes --- gusto/solvers/linear_solvers.py | 9 +++++---- gusto/timestepping/semi_implicit_quasi_newton.py | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/gusto/solvers/linear_solvers.py b/gusto/solvers/linear_solvers.py index b0823eaf..0608e5d2 100644 --- a/gusto/solvers/linear_solvers.py +++ b/gusto/solvers/linear_solvers.py @@ -57,10 +57,11 @@ def __init__(self, equations, alpha=0.5, tau_u=0.5, tau_r=0.5, tau_t=0.5, self.equations = equations self.dt = equations.domain.dt self.alpha = alpha + # Set relaxation parameters. - self.tau_u=tau_u - self.tau_t=tau_t - self.tau_r=tau_r + self.tau_u = tau_u + self.tau_t = tau_t + self.tau_r = tau_r if solver_parameters is not None: if not overwrite_solver_parameters: @@ -145,7 +146,7 @@ class CompressibleSolver(TimesteppingSolver): 'pc_type': 'bjacobi', 'sub_pc_type': 'ilu'}}} - def __init__(self, equations, alpha=0.5, tau_u = 0.5, tau_r = 0.5, tau_t = 0.5, + def __init__(self, equations, alpha=0.5, tau_u=0.5, tau_r=0.5, tau_t=0.5, quadrature_degree=None, solver_parameters=None, overwrite_solver_parameters=False): """ diff --git a/gusto/timestepping/semi_implicit_quasi_newton.py b/gusto/timestepping/semi_implicit_quasi_newton.py index 63d73fac..af2c8b1c 100644 --- a/gusto/timestepping/semi_implicit_quasi_newton.py +++ b/gusto/timestepping/semi_implicit_quasi_newton.py @@ -485,14 +485,14 @@ def apply(self, x_in, x_nl, x_out, label): x_out.assign(x_in(self.field_name)) x_out += self.xF - + def zero_forcing_terms(self, equation, x_in, x_out, transported_field_names): """ Zero forcing term F(x) for non-wind transport. This takes x_in and x_out, where \n x_out = x_in + scale*F(x_nl) \n - for some field x_nl and sets x_out = x_in for all non-wind transport terms + for some field x_nl and sets x_out = x_in for all non-wind transport terms Args: equation (:class:`PrognosticEquationSet`): the prognostic