Skip to content

Commit 763ec50

Browse files
committed
Fix petsc finaliser
1 parent 2bd3703 commit 763ec50

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/heatflow.f90

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ program HEATFLOW_V0_3
6565
!-------------------------------------------------------------!
6666
! run simulation for 'ntime' time steps !
6767
!-------------------------------------------------------------!
68+
CALL petsc_init()
69+
6870
do itime=1,ntime
6971

7072
if (iverb.eq.0) then
@@ -81,17 +83,17 @@ program HEATFLOW_V0_3
8183
if (itime .eq. 1) CALL initial_evolve
8284

8385
! run the time evolution
84-
CALL petsc_init()
8586
CALL simulate(itime)
86-
CALL petsc_finalize()
8787

8888

8989

9090
! Write results
9191
CALL data_write(itime)
9292
if (IVERB.ge.3) CALL final_print
9393

94-
end do
94+
end do
95+
CALL petsc_finalize()
96+
9597
!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^!
9698

9799
!-------------------------------------------------------------!

src/heatflow/mod_evolve.f90

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,6 @@ subroutine simulate(itime)
152152
iter= 0
153153
err=E
154154

155-
print *, "Calling solver..."
156155
! call bicgstab(acsr, ia, ja, S, itmax, Temp_p, x, iter)
157156
if (.not. allocated(ia32)) then
158157
allocate(ia32(size(ia)), ja32(size(ja)))
@@ -164,7 +163,6 @@ subroutine simulate(itime)
164163
call solve_petsc_csr(NA32, ia32, ja32, acsr, S, x, tol, itmax)
165164
if (allocated(ia32)) deallocate(ia32, ja32)
166165

167-
print *, "Solver finished."
168166

169167
! CALL solve_pardiso(acsr, S, ia, ja, x)
170168
! CALL linbcg(S,x,itol=int(itol,I4B),tol=tol, itmax=int(itmax,I4B), iter=iter, &

0 commit comments

Comments
 (0)