File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -382,9 +382,6 @@ cdef class _cvLSSparseDQJac:
382382 self .groups = groups
383383 self .sparsity = aux.sparsity
384384
385- # store the instance in AuxData for access in wrappers
386- aux.jacfn = self
387-
388385 def __call__ (
389386 self ,
390387 sunrealtype t ,
@@ -697,6 +694,8 @@ cdef class CVODE:
697694 if self .aux.jacfn is None and self .aux.sparsity is not None :
698695 spjac = _cvLSSparseDQJac(self .aux) # setup/store jacfn in AuxData
699696 spjac._setup_memory(self .mem) # pass mem to access time step info
697+
698+ self .aux.jacfn = spjac # assign spjac as jacfn for use in wrapper
700699
701700 if self .aux.jacfn:
702701 flag = CVodeSetJacFn(self .mem, _jacfn_wrapper)
Original file line number Diff line number Diff line change @@ -388,9 +388,6 @@ cdef class _idaLSSparseDQJac:
388388 self .groups = groups
389389 self .sparsity = aux.sparsity
390390
391- # store the instance in AuxData for access in wrappers
392- aux.jacfn = self
393-
394391 def __call__ (
395392 self ,
396393 sunrealtype t ,
@@ -724,6 +721,8 @@ cdef class IDA:
724721 if self .aux.jacfn is None and self .aux.sparsity is not None :
725722 spjac = _idaLSSparseDQJac(self .aux) # setup/store jacfn in AuxData
726723 spjac._setup_memory(self .mem) # pass mem to access time step info
724+
725+ self .aux.jacfn = spjac # assign spjac as jacfn for use in wrapper
727726
728727 if self .aux.jacfn:
729728 flag = IDASetJacFn(self .mem, _jacfn_wrapper)
You can’t perform that action at this time.
0 commit comments