Skip to content

Commit 0202753

Browse files
committed
Renamied pgc -> cg
1 parent 5bc7566 commit 0202753

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

PartitionedSolvers/src/krylov_solvers.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function update(o::KrylovOptions;kwargs...)
6868
KrylovOptions(iterations,abstol,reltol,norm,Pl,update_Pl,verbose,output_prefix)
6969
end
7070

71-
function pcg_state(p)
71+
function cg_state(p)
7272
x = solution(p)
7373
A = matrix(p)
7474
dx = similar(x,axes(A,2))
@@ -181,14 +181,14 @@ function print_progress(a::KrylovWorkspace)
181181
v && @printf "%s%10i %10i %10.2e %10.2e\n" s iteration iterations current target
182182
end
183183

184-
function pcg(p;kwargs...)
184+
function cg(p;kwargs...)
185185
options = krylov_options(p;kwargs...)
186-
state = pcg_state(p)
186+
state = cg_state(p)
187187
workspace = KrylovWorkspace(options,state)
188-
linear_solver(pcg_update,pcg_step,p,workspace)
188+
linear_solver(cg_update,cg_step,p,workspace)
189189
end
190190

191-
function pcg_update(ws,A)
191+
function cg_update(ws,A)
192192
(;Pl,update_Pl) = ws.options
193193
if update_Pl
194194
Pl = update(Pl,matrix=A)
@@ -197,7 +197,7 @@ function pcg_update(ws,A)
197197
update(ws;iteration,Pl,A)
198198
end
199199

200-
function pcg_step(x,ws,b,phase=:start;kwargs...)
200+
function cg_step(x,ws,b,phase=:start;kwargs...)
201201
(;dx,r,u,A,ρ,iteration,current,target) = ws.state
202202
(;reltol,abstol,norm,Pl) = ws.options
203203
s = u

PartitionedSolvers/test/krylov_solvers_tests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ y = similar(x)
1616
y .= 0
1717
p = PS.linear_problem(y,A,b)
1818
Pl = PS.preconditioner(PS.amg,p)
19-
s = PS.pcg(p;verbose=true,Pl)
19+
s = PS.cg(p;verbose=true,Pl)
2020
s = PS.solve(s)
2121
@test x PS.solution(p)
2222
s = PS.update(s,matrix=2*A)
@@ -37,7 +37,7 @@ y = similar(x)
3737
y .= 0
3838
p = PS.linear_problem(y,A,b)
3939
Pl = PS.preconditioner(PS.amg,p)
40-
s = PS.pcg(p;verbose=true,Pl)
40+
s = PS.cg(p;verbose=true,Pl)
4141
s = PS.solve(s)
4242
@test x PS.solution(p)
4343
s = PS.update(s,matrix=2*A)

0 commit comments

Comments
 (0)