Skip to content

Commit 06de329

Browse files
committed
fix error
1 parent 84814ce commit 06de329

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

gusto/equations/boussinesq_equations.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,10 @@ def __init__(self, domain, parameters,
173173
# -------------------------------------------------------------------- #
174174
if compressible:
175175
cs = parameters.cs
176+
# On assuming ``cs`` as a constant, it is right keep it out of the
177+
# integration.
176178
linear_div_form = divergence(subject(
177-
prognostic(cs**2 * phi * div(u_trial) * dx, 'p'), self.X))
179+
prognostic(cs**2 * (phi * div(u_trial) * dx), 'p'), self.X))
178180
divergence_form = divergence(linearisation(
179181
subject(prognostic(cs**2 * phi * div(u) * dx, 'p'), self.X),
180182
linear_div_form))

gusto/equations/shallow_water_equations.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,9 @@ def _setup_residual(self, fexpr, topog_expr, u_transport_option):
169169
# -------------------------------------------------------------------- #
170170
# Pressure Gradient Term
171171
# -------------------------------------------------------------------- #
172+
# On assuming ``g``, it is right to keep it out of the integral.
172173
pressure_gradient_form = pressure_gradient(
173-
subject(prognostic(-g*div(w)*D*dx, 'u'), self.X))
174+
subject(prognostic(-g*(div(w)*D*dx), 'u'), self.X))
174175

175176
residual = (mass_form + adv_form + pressure_gradient_form)
176177

0 commit comments

Comments
 (0)