Skip to content

Commit be6b654

Browse files
committed
pickup on boundaries changed
1 parent f6ffaf9 commit be6b654

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

aeolis/utils.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -543,10 +543,10 @@ def sweep(Ct, Cu, mass, dt, Ts, ds, dn, us, un, w):
543543
# lateral boundaries circular
544544
if circ_lateral:
545545
Ct[0,:,0],Ct[-1,:,0] = Ct[-1,:,0].copy(),Ct[0,:,0].copy()
546-
pickup[0,:,0],pickup[-1,:,0] = pickup[-1,:,0].copy(),pickup[0,:,0].copy()
546+
# pickup[0,:,0],pickup[-1,:,0] = pickup[-1,:,0].copy(),pickup[0,:,0].copy()
547547
if circ_offshore:
548548
Ct[:,0,0],Ct[:,-1,0] = Ct[:,-1,0].copy(),Ct[:,0,0].copy()
549-
pickup[:,0,0],pickup[:,-1,0] = pickup[:,-1,0].copy(),pickup[:,0,0].copy()
549+
# pickup[:,0,0],pickup[:,-1,0] = pickup[:,-1,0].copy(),pickup[:,0,0].copy()
550550

551551
if recirc_offshore:
552552
Ct[:,0,0],Ct[:,-1,0] = np.mean(Ct[:,-2,0]), np.mean(Ct[:,1,0])
@@ -575,7 +575,11 @@ def sweep(Ct, Cu, mass, dt, Ts, ds, dn, us, un, w):
575575
# Generic stencil for remaining cells including boundaries (Numba-optimized)
576576
_solve_generic_stencil(Ct, Cu, mass, pickup, dt, Ts, ds, dn, ufs, ufn, w, visited, quad, nf)
577577

578-
578+
# check the boundaries of the pickup matrix for unvisited cells
579+
# print(np.shape(visited[0,:]==False))
580+
pickup[0,:,0] = pickup[1,:,0].copy()
581+
pickup[-1,:,0] = pickup[-2,:,0].copy()
582+
579583
k+=1
580584

581585
# # plot Ct

0 commit comments

Comments
 (0)