File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 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
10441044floating point numbers or ForwardDiff.Dual.
10451045This e.g. allows for Automatic Differentiation (AD) of a sparse-matrix solve.
10461046"""
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
10491058end
10501059
10511060function init_cacheval (alg:: SparspakFactorization ,
You can’t perform that action at this time.
0 commit comments