From d71d366cdad2d1fb54c0de13df3a70d9f9bd6e43 Mon Sep 17 00:00:00 2001 From: Logan Bishop-Van Horn Date: Wed, 20 Sep 2023 15:16:57 -0700 Subject: [PATCH] Update operators.py --- tdgl/finite_volume/operators.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tdgl/finite_volume/operators.py b/tdgl/finite_volume/operators.py index ace8196..c88aff9 100644 --- a/tdgl/finite_volume/operators.py +++ b/tdgl/finite_volume/operators.py @@ -60,7 +60,7 @@ def _spmatrix_set_many(spmatrix, i, j, x): offsets, (i, j, M, N) = _get_spmatrix_offsets_cupy(spmatrix, i, j) mask = offsets > -1 - spmatrix.data[mask] = x[mask] + spmatrix.data[offsets[mask]] = x[mask] if not mask.all(): # only insertions remain mask = ~mask