File tree 1 file changed +11
-2
lines changed
1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -1044,8 +1044,17 @@ dispatch to route around standard BLAS routines in the case e.g. of arbitrary-pr
1044
1044
floating point numbers or ForwardDiff.Dual.
1045
1045
This e.g. allows for Automatic Differentiation (AD) of a sparse-matrix solve.
1046
1046
"""
1047
- Base. @kwdef struct SparspakFactorization <: AbstractSparseFactorization
1048
- reuse_symbolic:: Bool = true
1047
+ struct SparspakFactorization <: AbstractSparseFactorization
1048
+ reuse_symbolic:: Bool
1049
+
1050
+ function SparspakFactorization (;reuse_symbolic = true )
1051
+ ext = Base. get_extension (@__MODULE__ , :LinearSolveSparspakExt )
1052
+ if ext === nothing
1053
+ error (" SparspakFactorization requires that Sparspak is loaded, i.e. `using Sparspak`" )
1054
+ else
1055
+ new (reuse_symbolic)
1056
+ end
1057
+ end
1049
1058
end
1050
1059
1051
1060
function init_cacheval (alg:: SparspakFactorization ,
You can’t perform that action at this time.
0 commit comments