@@ -154,19 +154,12 @@ function alg_cache(alg::Rosenbrock23, u, rate_prototype, ::Type{uEltypeNoUnits},
154154
155155 grad_config = build_grad_config (alg, f, tf, du1, t)
156156 jac_config = build_jac_config (alg, f, uf, du1, uprev, u, tmp, du2)
157-
158157 J, W = build_J_W (alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val (true ))
159-
160- linprob = LinearProblem (W, _vec (linsolve_tmp); u0 = _vec (tmp))
161- Pl, Pr = wrapprecs (
162- alg. precs (W, nothing , u, p, t, nothing , nothing , nothing ,
163- nothing )... , weight, tmp)
164- linsolve = init (
165- linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
166- Pl = Pl, Pr = Pr,
158+ linprob = LinearProblem (W, _vec (linsolve_tmp), (nothing ,u,p,t); u0 = _vec (tmp))
159+ linsolve = init (linprob, alg. linsolve,
160+ alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
167161 assumptions = LinearSolve. OperatorAssumptions (true ))
168162
169-
170163 algebraic_vars = f. mass_matrix === I ? nothing :
171164 [all (iszero, x) for x in eachcol (f. mass_matrix)]
172165
@@ -201,22 +194,12 @@ function alg_cache(alg::Rosenbrock32, u, rate_prototype, ::Type{uEltypeNoUnits},
201194 tf = TimeGradientWrapper (f, uprev, p)
202195 uf = UJacobianWrapper (f, t, p)
203196 linsolve_tmp = zero (rate_prototype)
204-
205197 grad_config = build_grad_config (alg, f, tf, du1, t)
206198 jac_config = build_jac_config (alg, f, uf, du1, uprev, u, tmp, du2)
207-
208199 J, W = build_J_W (alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val (true ))
209-
210- linprob = LinearProblem (W, _vec (linsolve_tmp); u0 = _vec (tmp))
211-
212- Pl, Pr = wrapprecs (
213- alg. precs (W, nothing , u, p, t, nothing , nothing , nothing ,
214- nothing )... , weight, tmp)
215- linsolve = init (
216- linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
217- Pl = Pl, Pr = Pr,
200+ linprob = LinearProblem (W, _vec (linsolve_tmp), (nothing ,u,p,t); u0 = _vec (tmp))
201+ linsolve = init (linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
218202 assumptions = LinearSolve. OperatorAssumptions (true ))
219-
220203 algebraic_vars = f. mass_matrix === I ? nothing :
221204 [all (iszero, x) for x in eachcol (f. mass_matrix)]
222205
@@ -355,20 +338,13 @@ function alg_cache(alg::ROS3P, u, rate_prototype, ::Type{uEltypeNoUnits},
355338 tf = TimeGradientWrapper (f, uprev, p)
356339 uf = UJacobianWrapper (f, t, p)
357340 linsolve_tmp = zero (rate_prototype)
358-
341+
359342 grad_config = build_grad_config (alg, f, tf, du1, t)
360343 jac_config = build_jac_config (alg, f, uf, du1, uprev, u, tmp, du2)
361344 J, W = build_J_W (alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val (true ))
362-
363- linprob = LinearProblem (W, _vec (linsolve_tmp); u0 = _vec (tmp))
364- Pl, Pr = wrapprecs (
365- alg. precs (W, nothing , u, p, t, nothing , nothing , nothing ,
366- nothing )... , weight, tmp)
367- linsolve = init (
368- linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
369- Pl = Pl, Pr = Pr,
345+ linprob = LinearProblem (W, _vec (linsolve_tmp), (nothing , u, p, t); u0 = _vec (tmp))
346+ linsolve = init (linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
370347 assumptions = LinearSolve. OperatorAssumptions (true ))
371-
372348 Rosenbrock33Cache (u, uprev, du, du1, du2, k1, k2, k3, k4,
373349 fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf,
374350 linsolve_tmp,
@@ -445,21 +421,13 @@ function alg_cache(alg::Rodas3, u, rate_prototype, ::Type{uEltypeNoUnits},
445421 tf = TimeGradientWrapper (f, uprev, p)
446422 uf = UJacobianWrapper (f, t, p)
447423 linsolve_tmp = zero (rate_prototype)
448-
424+
449425 grad_config = build_grad_config (alg, f, tf, du1, t)
450426 jac_config = build_jac_config (alg, f, uf, du1, uprev, u, tmp, du2)
451-
452427 J, W = build_J_W (alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val (true ))
453-
454- linprob = LinearProblem (W, _vec (linsolve_tmp); u0 = _vec (tmp))
455- Pl, Pr = wrapprecs (
456- alg. precs (W, nothing , u, p, t, nothing , nothing , nothing ,
457- nothing )... , weight, tmp)
458- linsolve = init (
459- linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
460- Pl = Pl, Pr = Pr,
428+ linprob = LinearProblem (W, _vec (linsolve_tmp), (nothing , u, p, t); u0 = _vec (tmp))
429+ linsolve = init (linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
461430 assumptions = LinearSolve. OperatorAssumptions (true ))
462-
463431 Rosenbrock34Cache (u, uprev, du, du1, du2, k1, k2, k3, k4,
464432 fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf,
465433 linsolve_tmp,
@@ -643,21 +611,12 @@ function alg_cache(alg::Rodas23W, u, rate_prototype, ::Type{uEltypeNoUnits},
643611 tf = TimeGradientWrapper (f, uprev, p)
644612 uf = UJacobianWrapper (f, t, p)
645613 linsolve_tmp = zero (rate_prototype)
646-
647614 grad_config = build_grad_config (alg, f, tf, du1, t)
648615 jac_config = build_jac_config (alg, f, uf, du1, uprev, u, tmp, du2)
649-
650616 J, W = build_J_W (alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val (true ))
651-
652- linprob = LinearProblem (W, _vec (linsolve_tmp); u0 = _vec (tmp))
653- Pl, Pr = wrapprecs (
654- alg. precs (W, nothing , u, p, t, nothing , nothing , nothing ,
655- nothing )... , weight, tmp)
656- linsolve = init (
657- linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
658- Pl = Pl, Pr = Pr,
617+ linprob = LinearProblem (W, _vec (linsolve_tmp), (nothing , u, p, t); u0 = _vec (tmp))
618+ linsolve = init (linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
659619 assumptions = LinearSolve. OperatorAssumptions (true ))
660-
661620 Rodas23WCache (u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5,
662621 fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp,
663622 linsolve, jac_config, grad_config, reltol, alg, alg. step_limiter!,
@@ -691,22 +650,13 @@ function alg_cache(alg::Rodas3P, u, rate_prototype, ::Type{uEltypeNoUnits},
691650
692651 tf = TimeGradientWrapper (f, uprev, p)
693652 uf = UJacobianWrapper (f, t, p)
694-
653+ linsolve_tmp = zero (rate_prototype)
695654 grad_config = build_grad_config (alg, f, tf, du1, t)
696655 jac_config = build_jac_config (alg, f, uf, du1, uprev, u, tmp, du2)
697-
698656 J, W = build_J_W (alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val (true ))
699-
700- linsolve_tmp = zero (rate_prototype)
701- linprob = LinearProblem (W, _vec (linsolve_tmp); u0 = _vec (tmp))
702- Pl, Pr = wrapprecs (
703- alg. precs (W, nothing , u, p, t, nothing , nothing , nothing ,
704- nothing )... , weight, tmp)
705- linsolve = init (
706- linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
707- Pl = Pl, Pr = Pr,
657+ linprob = LinearProblem (W, _vec (linsolve_tmp), (nothing , u, p, t); u0 = _vec (tmp))
658+ linsolve = init (linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
708659 assumptions = LinearSolve. OperatorAssumptions (true ))
709-
710660 Rodas3PCache (u, uprev, dense1, dense2, dense3, du, du1, du2, k1, k2, k3, k4, k5,
711661 fsalfirst, fsallast, dT, J, W, tmp, atmp, weight, tab, tf, uf, linsolve_tmp,
712662 linsolve, jac_config, grad_config, reltol, alg, alg. step_limiter!,
@@ -804,25 +754,15 @@ function alg_cache(
804754
805755 tf = TimeGradientWrapper (f, uprev, p)
806756 uf = UJacobianWrapper (f, t, p)
807-
757+ linsolve_tmp = zero (rate_prototype)
808758 grad_config = build_grad_config (alg, f, tf, du1, t)
809759 jac_config = build_jac_config (alg, f, uf, du1, uprev, u, tmp, du2)
810-
811760 J, W = build_J_W (alg, u, uprev, p, t, dt, f, jac_config, uEltypeNoUnits, Val (true ))
761+ linprob = LinearProblem (W, _vec (linsolve_tmp), (nothing , u, p, t); u0 = _vec (tmp))
762+ linsolve = init (linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A = true , alias_b = true ),
763+ assumptions = LinearSolve. OperatorAssumptions (true ))
812764
813- Pl, Pr = wrapprecs (
814- alg. precs (W, nothing , u, p, t, nothing , nothing , nothing ,
815- nothing )... , weight, tmp)
816-
817- linsolve_tmp = zero (rate_prototype)
818- linprob = LinearProblem (W, _vec (linsolve_tmp); u0= _vec (tmp))
819-
820- linsolve = init (
821- linprob, alg. linsolve, alias = LinearAliasSpecifier (alias_A= true , alias_b= true ),
822- Pl= Pl, Pr= Pr,
823- assumptions= LinearSolve. OperatorAssumptions (true ))
824765
825-
826766 # Return the cache struct with vectors
827767 RosenbrockCache (
828768 u, uprev, dense, du, du1, du2, dtC, dtd, ks, fsalfirst, fsallast,
0 commit comments