Skip to content

Commit

Permalink
Update solve.py
Browse files Browse the repository at this point in the history
  • Loading branch information
loganbvh committed Sep 18, 2023
1 parent 2023b82 commit 160ce95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tdgl/solver/solve.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import itertools
import logging
import math
from datetime import datetime
from typing import Callable, Dict, Optional, Sequence, Union

Expand Down Expand Up @@ -367,7 +368,7 @@ def update(
)
if use_cupy:
threads_per_block = 1024
num_blocks = int(len(edges) / threads_per_block)
num_blocks = math.ceil(len(edges) / threads_per_block)
get_A_induced_cupy[num_blocks, threads_per_block](
J_site, areas, sites, edge_centers, new_A_induced
)
Expand All @@ -383,6 +384,7 @@ def update(
xp.linalg.norm(dA, axis=1) / xp.linalg.norm(A_induced, axis=1)
)
screening_error = float(screening_error)
print(screening_error)
del v[:-2]
del A_induced_vals[:-2]

Expand Down

0 comments on commit 160ce95

Please sign in to comment.