Skip to content

Commit

Permalink
move call perturbation to solvers.f90
Browse files Browse the repository at this point in the history
  • Loading branch information
zhucaoxiang committed May 18, 2022
1 parent 2cf4608 commit 3758198
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
10 changes: 1 addition & 9 deletions sources/focus.f90
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ PROGRAM focus

use globals, only: dp, ncpu, myid, ounit, ierr, astat, eunit, case_surface, case_coils, case_optimize, &
case_postproc, xdof, time_initialize, time_optimize, time_postproc, &
version, Npert, weight_sbnorm, MPI_COMM_FOCUS, plasma_surf_boozer
version, MPI_COMM_FOCUS, plasma_surf_boozer

use mpi !to enable gfortran mpi_wtime bugs; 07/20/2017
implicit none
Expand Down Expand Up @@ -75,14 +75,6 @@ PROGRAM focus

call MPI_BARRIER( MPI_COMM_FOCUS, ierr )

! Call stochastic construction if neccessary
if ( weight_sbnorm .gt. 0.0 .or. Npert .gt. 0 ) then
if(myid==0) write(ounit, '(8X,": weight_sbnorm = ", ES12.5, "; Npert = ", I10)') weight_sbnorm, Npert
call perturbation(0)
endif

call MPI_BARRIER( MPI_COMM_FOCUS, ierr )

tfinish = MPI_Wtime()
time_initialize = tfinish - tstart
if( myid == 0 ) write(ounit, '(A, ES12.5, A3)') "focus : Initialization took ", time_initialize," S."
Expand Down
3 changes: 3 additions & 0 deletions sources/solvers.f90
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ subroutine solvers
endif
endif

! Call stochastic construction if neccessary
if ( weight_sbnorm .gt. 0.0 .or. Npert .gt. 0 ) call perturbation(0)

if (abs(case_optimize) >= 1) call AllocData(1)
if (abs(case_optimize) >= 2) call AllocData(2)

Expand Down

0 comments on commit 3758198

Please sign in to comment.