Skip to content

Commit 170fd64

Browse files
committed
Renamings
1 parent d25b948 commit 170fd64

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

docs/src/usage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
# Julia finalizers since destructors in petsc are
4949
# collective operations (in parallel runs).
5050
# Julia finalizers do not guarantee this.
51-
PETSC.ksp_destroy_setup!(setup)
51+
PETSC.ksp_finalize!(setup)
5252

5353
# The setup object cannot be used anymore.
5454
# This now would be provably a code dump:
@@ -109,7 +109,7 @@ First write the parallel code in a function in a file `demo.jl`.
109109
results = PETSC.ksp_solve!(x2,setup,b)
110110
@test 2*x ≈ x2
111111

112-
PETSC.ksp_destroy_setup!(setup)
112+
PETSC.ksp_finalize!(setup)
113113
end
114114

115115
Then, test your code with the debug back-end of PartitionedArrays.jl

src/ksp.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ Document me!
7272
function ksp_solve! end
7373

7474
"""
75-
PETSC.ksp_destroy_setup!(setup)
75+
PETSC.ksp_finalize!(setup)
7676
7777
Document me!
7878
"""
79-
function ksp_destroy_setup! end
79+
function ksp_finalize! end
8080

8181
function ksp_handles()
8282
ksp = Ref{KSP}()
@@ -171,7 +171,7 @@ function ksp_setup!(setup,A)
171171
setup
172172
end
173173

174-
function ksp_destroy_setup!(setup::KspSeqSetup)
174+
function ksp_finalize!(setup::KspSeqSetup)
175175
if ! setup.user_handles
176176
ksp_destroy_handles!(setup.handles)
177177
end
@@ -234,8 +234,8 @@ function ksp_setup!(setup::KspPartitionedSetup,A)
234234
setup
235235
end
236236

237-
function ksp_destroy_setup!(setup::KspPartitionedSetup)
238-
map_main(ksp_destroy_setup!,setup.setup_in_main)
237+
function ksp_finalize!(setup::KspPartitionedSetup)
238+
map_main(ksp_finalize!,setup.setup_in_main)
239239
nothing
240240
end
241241

@@ -371,7 +371,7 @@ function ksp_setup!(setup::KspMPISetup,A)
371371
setup
372372
end
373373

374-
function ksp_destroy_setup!(setup::KspMPISetup)
374+
function ksp_finalize!(setup::KspMPISetup)
375375
if ! setup.user_handles
376376
ksp_destroy_handles!(setup.handles)
377377
end

test/ksp_test.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ results = PETSC.ksp_solve!(x2,setup,b)
4545
# Julia finalizers since destructors in petsc are
4646
# collective operations (in parallel runs).
4747
# Julia finalizers do not guarantee this.
48-
PETSC.ksp_destroy_setup!(setup)
48+
PETSC.ksp_finalize!(setup)
4949

5050
# The setup object cannot be used anymore.
5151
# This now would be provably a code dump:

test/ksp_test_parallel.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function ksp_tests(distribute,np)
6161
results = PETSC.ksp_solve!(x2,setup,b)
6262
@test 2*x x2
6363

64-
PETSC.ksp_destroy_setup!(setup)
64+
PETSC.ksp_finalize!(setup)
6565

6666
# Now with an unordered partition
6767

@@ -89,7 +89,7 @@ function ksp_tests(distribute,np)
8989
results = PETSC.ksp_solve!(x2,setup,b)
9090
@test 2*x x2
9191

92-
PETSC.ksp_destroy_setup!(setup)
92+
PETSC.ksp_finalize!(setup)
9393
end
9494

9595
end

0 commit comments

Comments
 (0)