Skip to content

Commit

Permalink
fix topography terms
Browse files Browse the repository at this point in the history
  • Loading branch information
jshipton committed Nov 14, 2024
1 parent ec1a5d4 commit cc3adef
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gusto/equations/shallow_water_equations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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]
Expand Down

0 comments on commit cc3adef

Please sign in to comment.