From cc3adef915565c4d247d868d917dd78c28798390 Mon Sep 17 00:00:00 2001 From: jshipton Date: Thu, 14 Nov 2024 14:49:24 +0000 Subject: [PATCH] fix topography terms --- gusto/equations/shallow_water_equations.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gusto/equations/shallow_water_equations.py b/gusto/equations/shallow_water_equations.py index 715ed61e..90dcf772 100644 --- a/gusto/equations/shallow_water_equations.py +++ b/gusto/equations/shallow_water_equations.py @@ -295,8 +295,10 @@ def __init__(self, domain, parameters, equivalent_buoyancy=False, b_name = 'b_e' if equivalent_buoyancy else 'b' self.b_name = b_name + # Note: we do not pass bexpr to the parent class because we + # deal with topography terms here later super().__init__(domain, parameters, - fexpr=fexpr, bexpr=bexpr, + fexpr=fexpr, bexpr=None, space_names=space_names, u_transport_option=u_transport_option, linearisation_map=linearisation_map, @@ -311,7 +313,7 @@ def __init__(self, domain, parameters, equivalent_buoyancy=False, gamma = self.tests[2] u, D, b = split(self.X)[0:3] n = FacetNormal(domain.mesh) - topog = self.prescribed_fields('topography', domain.space('DG')).interpolate(bexpr) if bexpr else None + topog = self.prescribed_fields('topography', domain.spaces('DG')).interpolate(bexpr) if bexpr else None if equivalent_buoyancy: gamma_qt = self.tests[3] qt = split(self.X)[3]