From 84ca9bdc387d1bbc272fe68752546108d20f64cf Mon Sep 17 00:00:00 2001 From: Logan Bishop-Van Horn Date: Wed, 20 Sep 2023 14:32:03 -0700 Subject: [PATCH] Update solve.py --- tdgl/solver/solve.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tdgl/solver/solve.py b/tdgl/solver/solve.py index 85b29a0..6e3329a 100644 --- a/tdgl/solver/solve.py +++ b/tdgl/solver/solve.py @@ -222,7 +222,7 @@ def current_func(t): edge_directions = cupy.asarray(edge_directions) vector_potential = cupy.asarray(vector_potential) - new_A_induced = None + new_A_induced = laplacian_A_applied = None if options.include_screening: A_scale = (ureg("mu_0") / (4 * np.pi) * K0 / Bc2).to_base_units().magnitude areas = A_scale * mesh.areas @@ -234,7 +234,6 @@ def current_func(t): edge_centers = cupy.asarray(edge_centers) sites = cupy.asarray(sites) new_A_induced = cupy.empty((num_edges, 2), dtype=float) - laplacian_A_applied = cupy.asarray(laplacian_A_applied) laplacian_A_applied = A_laplacian @ mesh.get_quantity_on_site( A_dot_dr, use_cupy=use_cupy ) @@ -261,7 +260,7 @@ def update( induced_vector_potential, applied_vector_potential=None, ): - nonlocal tentative_dt, vector_potential, new_A_induced + nonlocal tentative_dt, vector_potential, new_A_induced, laplacian_A_applied if isinstance(psi, np.ndarray): xp = np else: