Skip to content

Commit f6c82fb

Browse files
committed
Fix the boundary conditions
1 parent 7b83195 commit f6c82fb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/mismip_test.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def form_momentum_balance(z, w, h, s, f, H, α, rheo1, rheo3):
8383
)
8484

8585

86-
8786
def run_simulation(ny: int):
8887
nx = int(lx / ly) * ny
8988
mesh = firedrake.RectangleMesh(nx, ny, lx, ly, diagonal="crossed")
@@ -123,8 +122,8 @@ def run_simulation(ny: int):
123122

124123
# Friction coefficient in MPa (m yr⁻¹)⁻¹ᐟ³
125124
C = Constant(1e-2)
126-
K = C ** (-m) ## TODO: just use 1e6
127-
u_c = K * τ_c ** m
125+
K = Constant(C ** (-m)) ## TODO: just use 1e6
126+
u_c = Constant(K * τ_c ** m)
128127

129128
rheo3 = {
130129
"flow_law_exponent": n,
@@ -164,8 +163,8 @@ def run_simulation(ny: int):
164163
"floating": f,
165164
}
166165

167-
inflow_bc = firedrake.DirichletBC(Z.sub(0), Constant((0, 0)), [1])
168-
side_wall_bc = firedrake.DirichletBC(Z.sub(0).sub(1), Constant(0), [3, 4])
166+
inflow_bc = firedrake.DirichletBC(Z.sub(0), 0, [1])
167+
side_wall_bc = firedrake.DirichletBC(Z.sub(0).sub(1), 0, [3, 4])
169168
bcs = [inflow_bc, side_wall_bc]
170169

171170
degree = 1

0 commit comments

Comments
 (0)