diff --git a/gusto/equations/common_forms.py b/gusto/equations/common_forms.py index 91ce01368..8bb606511 100644 --- a/gusto/equations/common_forms.py +++ b/gusto/equations/common_forms.py @@ -14,7 +14,6 @@ "kinetic_energy_form", "advection_equation_circulation_form", "diffusion_form", "diffusion_form_1d", "linear_advection_form", "linear_continuity_form", - "linear_continuity_form_1d", "split_continuity_form", "tracer_conservative_form"] @@ -134,26 +133,7 @@ def linear_continuity_form(test, qbar, ubar): :class:`LabelledForm`: a labelled transport form. """ - L = qbar*test*div(ubar)*dx - form = transporting_velocity(L, ubar) - - return transport(form, TransportEquationType.conservative) - - -def linear_continuity_form_1d(test, qbar, ubar): - """ - The form corresponding to the linearised continuity transport operator. - - Args: - test (:class:`TestFunction`): the test function. - qbar (:class:`ufl.Expr`): the variable to be transported. - ubar (:class:`ufl.Expr`): the transporting velocity. - - Returns: - :class:`LabelledForm`: a labelled transport form. - """ - - L = qbar*test*ubar.dx(0)*dx + L = test*div(qbar*ubar)*dx form = transporting_velocity(L, ubar) return transport(form, TransportEquationType.conservative) diff --git a/gusto/equations/shallow_water_equations.py b/gusto/equations/shallow_water_equations.py index cad6e12cb..854266952 100644 --- a/gusto/equations/shallow_water_equations.py +++ b/gusto/equations/shallow_water_equations.py @@ -9,7 +9,7 @@ advection_form, advection_form_1d, continuity_form, continuity_form_1d, vector_invariant_form, kinetic_energy_form, advection_equation_circulation_form, diffusion_form_1d, - linear_continuity_form, linear_continuity_form_1d + linear_continuity_form ) from gusto.equations.prognostic_equations import PrognosticEquationSet @@ -361,7 +361,7 @@ def __init__(self, domain, parameters, # Transport term needs special linearisation if self.linearisation_map(D_adv.terms[0]): - linear_D_adv = linear_continuity_form_1d(phi, H, u_trial) + linear_D_adv = linear_continuity_form(phi, H, u_trial) # Add linearisation to D_adv D_adv = linearisation(D_adv, linear_D_adv) diff --git a/gusto/solvers/linear_solvers.py b/gusto/solvers/linear_solvers.py index cdbb6cc2a..72dcea7a9 100644 --- a/gusto/solvers/linear_solvers.py +++ b/gusto/solvers/linear_solvers.py @@ -666,7 +666,7 @@ def _setup_solver(self): - beta_u * 0.5 * bbar * div(w*(D-Dbar)) * dx + beta_u * 0.5 * jump((D-Dbar)*w, n) * avg(bbar) * dS + inner(phi, (D - D_in)) * dx - + beta_d * phi * Dbar * div(u) * dx + + beta_d * phi * div(Dbar*u) * dx ) if 'coriolis' in equation.prescribed_fields._field_names: @@ -882,7 +882,7 @@ def _setup_solver(self): inner(w, (u - u_in)) * dx - beta_u * (D - Dbar) * div(w*g) * dx + inner(phi, (D - D_in)) * dx - + beta_d * phi * Dbar * div(u) * dx + + beta_d * phi * div(Dbar*u) * dx ) if 'coriolis' in equation.prescribed_fields._field_names: