11
22function lu_solver ()
33 setup (x,op,b,options) = lu (op)
4- setup ! (state,op,options) = lu! (state,op)
4+ update ! (state,op,options) = lu! (state,op)
55 solve! (x,P,b,options) = ldiv! (x,P,b)
6- linear_solver (;setup,solve!,setup !)
6+ linear_solver (;setup,solve!,update !)
77end
88
99function jacobi_correction ()
1010 setup (x,op,b,options) = dense_diag! (similar (b),op)
11- setup ! (state,op,options) = dense_diag! (state,op)
11+ update ! (state,op,options) = dense_diag! (state,op)
1212 function solve! (x,state,b,options)
1313 x .= state .\ b
1414 end
15- linear_solver (;setup,setup !,solve!)
15+ linear_solver (;setup,update !,solve!)
1616end
1717
1818function richardson (solver;iters,omega= 1 )
@@ -23,10 +23,10 @@ function richardson(solver;iters,omega=1)
2323 P = PartitionedSolvers. setup (solver,dx,A,r)
2424 state = (r,dx,P,A_ref)
2525 end
26- function setup ! (state,A,options)
26+ function update ! (state,A,options)
2727 (r,dx,P,A_ref) = state
2828 A_ref[] = A
29- PartitionedSolvers. setup ! (P,A)
29+ PartitionedSolvers. update ! (P,A)
3030 state
3131 end
3232 function solve! (x,state,b,options)
@@ -45,7 +45,7 @@ function richardson(solver;iters,omega=1)
4545 (r,dx,P,A_ref) = state
4646 PartitionedSolvers. finalize! (P)
4747 end
48- linear_solver (;setup,setup !,solve!,finalize!)
48+ linear_solver (;setup,update !,solve!,finalize!)
4949end
5050
5151function jacobi (;kwargs... )
@@ -60,7 +60,7 @@ function gauss_seidel(;iters=1,sweep=:symmetric)
6060 A_ref = Ref (A)
6161 (diagA,A_ref)
6262 end
63- function setup ! (state,A,options)
63+ function update ! (state,A,options)
6464 (diagA,A_ref) = state
6565 dense_diag! (diagA,A)
6666 A_ref[] = A
@@ -96,7 +96,7 @@ function gauss_seidel(;iters=1,sweep=:symmetric)
9696 end
9797 x
9898 end
99- linear_solver (;setup,setup !,solve!)
99+ linear_solver (;setup,update !,solve!)
100100end
101101
102102function additive_schwarz (local_solver;iters= 1 )
@@ -137,9 +137,9 @@ function additive_schwarz_correction(local_solver)
137137 local_setup_options (A,options),
138138 ) |> AdditiveSchwarzSetup
139139 end
140- function setup ! (state:: AdditiveSchwarzSetup ,A,options)
140+ function update ! (state:: AdditiveSchwarzSetup ,A,options)
141141 map (
142- local_solver. setup !,
142+ local_solver. update !,
143143 state. local_setups,
144144 own_own_values (A),
145145 local_setup_options (A,options),
@@ -165,8 +165,8 @@ function additive_schwarz_correction(local_solver)
165165 function setup (x,A,b,options)
166166 local_solver. setup (x,A,b,options)
167167 end
168- function setup ! (state,A,options)
169- local_solver. setup ! (state,A,options)
168+ function update ! (state,A,options)
169+ local_solver. update ! (state,A,options)
170170 end
171171 function solve! (x,state,b,options)
172172 local_solver. solve! (x,state,b,options)
@@ -176,6 +176,6 @@ function additive_schwarz_correction(local_solver)
176176 local_solver. finalize! (state)
177177 nothing
178178 end
179- linear_solver (;setup,setup !,solve!,finalize!)
179+ linear_solver (;setup,update !,solve!,finalize!)
180180end
181181
0 commit comments