Skip to content

Commit

Permalink
add n_threads as a kwarg on Pardiso
Browse files Browse the repository at this point in the history
  • Loading branch information
jcapriot committed Sep 28, 2024
1 parent 7876f77 commit 76c9c34
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pymatsolver/direct/pardiso.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ class Pardiso(Base):

_transposed = False

def __init__(self, A, **kwargs):
def __init__(self, A, n_threads=None, **kwargs):
super().__init__(A, **kwargs)
self.solver = MKLPardisoSolver(
self.A,
matrix_type=self._matrixType(),
factor=False
)
if n_threads is not None:
self.n_threads = n_threads

def _matrixType(self):
"""
Expand Down

0 comments on commit 76c9c34

Please sign in to comment.