Skip to content

Commit 71ff533

Browse files
akarve1507jorgensd
andauthored
Update chapter2/monolithic_navierstokes_crp0.py
Co-authored-by: Jørgen Schartum Dokken <dokken92@gmail.com>
1 parent 72ccb23 commit 71ff533

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

chapter2/monolithic_navierstokes_crp0.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ def parse_args():
8383
# --- parameters / RHS ---
8484
nu = fem.Constant(domain, PETSc.ScalarType(args.nu))
8585
eps_p = fem.Constant(domain, PETSc.ScalarType(args.eps_p))
86-
zero = fem.Constant(domain, PETSc.ScalarType(0.0))
87-
f_vec = ufl.as_vector((zero, zero)) # zero body force
86+
f_vec = fem.Constant(domain, np.zeros(mesh.geometry.dim, dtype=dolfinx.default_scalar_type))
8887

8988
# --- Picard state (for convection) ---
9089
w = fem.Function(W) # holds (u_k, p_k)

0 commit comments

Comments
 (0)