From 4a4c9decf202d1c5ef742e4b1c8977870d53cc52 Mon Sep 17 00:00:00 2001 From: Logan Bishop-Van Horn Date: Mon, 18 Sep 2023 14:49:03 -0700 Subject: [PATCH] update --- tdgl/solver/screening.py | 4 ++-- tdgl/solver/solve.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tdgl/solver/screening.py b/tdgl/solver/screening.py index 13bedab..f8319f7 100644 --- a/tdgl/solver/screening.py +++ b/tdgl/solver/screening.py @@ -59,9 +59,9 @@ def get_A_induced_cupy( A_induced, ): i = cupyx.jit.grid(1) - for k in cupyx.jit.range(2): + for k in range(2): tmp = 0.0 - for j in cupyx.jit.range(sites.shape[0]): + for j in range(sites.shape[0]): dx = edge_centers[i, 0] - sites[j, 0] dy = edge_centers[i, 1] - sites[j, 1] dr = cupy.sqrt(dx * dx + dy * dy) diff --git a/tdgl/solver/solve.py b/tdgl/solver/solve.py index 84d87f8..7454b38 100644 --- a/tdgl/solver/solve.py +++ b/tdgl/solver/solve.py @@ -369,7 +369,6 @@ def update( get_A_induced_cupy[128, 1024]( J_site, areas, sites, edge_centers, new_A_induced ) - cupy.cuda.Stream.null.synchronize() else: new_A_induced = get_A_induced_numba(J_site, areas, sites, edge_centers) # Update induced vector potential using Polyak's method @@ -381,6 +380,7 @@ def update( screening_error = xp.max( xp.linalg.norm(dA, axis=1) / xp.linalg.norm(A_induced, axis=1) ) + screening_error = float(screening_error) del v[:-2] del A_induced_vals[:-2]