Skip to content

Commit

Permalink
Convert to scipy.sparse.csc_matrix for PyPardiso
Browse files Browse the repository at this point in the history
  • Loading branch information
loganbvh committed Mar 5, 2024
1 parent ac8b2d9 commit c09cafe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tdgl/finite_volume/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,9 +295,12 @@ def build_operators(self) -> None:
self.edge_directions = cupy.array(self.edge_directions)
if self.sparse_solver is SparseSolver.CUPY:
assert cupy is not None
# https://github.com/loganbvh/py-tdgl/issues/74
# https://github.com/haasad/PyPardiso/issues/68
self.mu_laplacian = csc_matrix(self.mu_laplacian)
self.mu_laplacian_lu = factorized(self.mu_laplacian)
elif self.sparse_solver is SparseSolver.PARDISO:
self.mu_laplacian = sp.csc_matrix(self.mu_laplacian)

Check warning on line 303 in tdgl/finite_volume/operators.py

View check run for this annotation

Codecov / codecov/patch

tdgl/finite_volume/operators.py#L303

Added line #L303 was not covered by tests
self.mu_laplacian_lu = None
else:
use_umfpack = self.sparse_solver is SparseSolver.UMFPACK
Expand Down
2 changes: 1 addition & 1 deletion tdgl/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version_info__ = (0, 8, 1)
__version_info__ = (0, 8, 2)
__version__ = ".".join(map(str, __version_info__))


Expand Down

0 comments on commit c09cafe

Please sign in to comment.