From 725c8423273b61b9b480dbf454400d1ece0634ee Mon Sep 17 00:00:00 2001 From: amartin Date: Sat, 30 Oct 2021 17:43:48 +1100 Subject: [PATCH] Using GridapPETSc.with(...) in PLaplacianTests --- test/PLaplacianTests.jl | 9 ++++----- test/mpi/PLaplacianTests.jl | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/PLaplacianTests.jl b/test/PLaplacianTests.jl index ff200cc..b742b3a 100644 --- a/test/PLaplacianTests.jl +++ b/test/PLaplacianTests.jl @@ -7,12 +7,11 @@ using Test function main(parts) options = "-snes_type newtonls -snes_linesearch_type basic -snes_linesearch_damping 1.0 -snes_rtol 1.0e-14 -snes_atol 0.0 -snes_monitor -pc_type jacobi -ksp_type gmres -ksp_monitor -snes_converged_reason" - GridapPETSc.Init(args=split(options)) - main(parts,FullyAssembledRows()) - main(parts,SubAssembledRows()) - - GridapPETSc.Finalize() + GridapPETSc.with(args=split(options)) do + main(parts,FullyAssembledRows()) + main(parts,SubAssembledRows()) + end end function main(parts,strategy) diff --git a/test/mpi/PLaplacianTests.jl b/test/mpi/PLaplacianTests.jl index d9455f6..2c188fa 100644 --- a/test/mpi/PLaplacianTests.jl +++ b/test/mpi/PLaplacianTests.jl @@ -1,3 +1,4 @@ include("../PLaplacianTests.jl") nparts = (2,2) prun(main,mpi,nparts) +prun(main,mpi,nparts)