Skip to content

Commit f6ffaf9

Browse files
committed
Merge branch 'Sierd-patch-1' of https://github.com/openearth/aeolis-python into Sierd-patch-1
2 parents 8c8f4f7 + 068e189 commit f6ffaf9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

aeolis/avalanching.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def avalanche(s, p):
9898
ny = p['ny'] + 1
9999

100100
# parameters - only dynamic angle used in loop for now.
101-
# Static angle can be used for more complex criterions in later
101+
# Static angle can be used for more complex criteria in later
102102
# tan_stat = np.tan(np.deg2rad(s['theta_stat']))
103103
tan_dyn = np.tan(np.deg2rad(s['theta_dyn']))
104104

aeolis/utils.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,10 @@ def calc_mean_grain_size(p, s):
449449
D_mean[yi, xi] = np.sum(diameters*weights)
450450
return D_mean
451451

452-
# @njit(cache=True) this function is an orchestrator njit will not be faster
452+
# Note: @njit(cache=True) is intentionally not used here.
453+
# This function acts as an orchestrator, delegating work to Numba-compiled helper functions.
454+
# Decorating the orchestrator itself with njit provides no performance benefit,
455+
# since most of the computation is already handled by optimized Numba functions.
453456
def sweep(Ct, Cu, mass, dt, Ts, ds, dn, us, un, w):
454457

455458

@@ -506,7 +509,7 @@ def sweep(Ct, Cu, mass, dt, Ts, ds, dn, us, un, w):
506509
ufn[0,:,:] = (ufn[0,:,:]+ufn[-1,:,:])/2
507510
ufn[-1,:,:] = ufn[0,:,:]
508511

509-
# now make sure that there is no gradients at the bondaries
512+
# now make sure that there is no gradients at the boundaries
510513
ufs[:,1,:] = ufs[:,0,:]
511514
ufs[:,-2,:] = ufs[:,-1,:]
512515
ufs[1,:,:] = ufs[0,:,:]
@@ -549,7 +552,7 @@ def sweep(Ct, Cu, mass, dt, Ts, ds, dn, us, un, w):
549552
Ct[:,0,0],Ct[:,-1,0] = np.mean(Ct[:,-2,0]), np.mean(Ct[:,1,0])
550553

551554
# Track visited cells and quadrant classification
552-
visited = np.zeros(Cu.shape[:2], dtype=np.bool_)
555+
visited = np.zeros(Cu.shape[:2], dtype=bool)
553556
quad = np.zeros(Cu.shape[:2], dtype=np.uint8)
554557

555558
########################################################################################

0 commit comments

Comments
 (0)