Skip to content

Commit

Permalink
Update the divergence for B and remove unncessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
rfj82982 committed Apr 17, 2024
1 parent 7e99211 commit c34d869
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Case-TGV.f90
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ subroutine init_tgv (ux1,uy1,uz1,ep1,phi1)
use variables
use param
use MPI
use mhd, only: mhd_active,Bm,Bmean,test_magnetic
use mhd, only: mhd_active,Bm,Bmean
use dbg_schemes, only: sin_prec, cos_prec

implicit none
Expand Down
6 changes: 2 additions & 4 deletions src/mhd.f90
Original file line number Diff line number Diff line change
Expand Up @@ -882,8 +882,6 @@ function divergence_scalar(vec,nlock) result(pp3)
USE var, ONLY: ta1, tb1, tc1, pp1, pgy1, pgz1, di1, &
duxdxp2, uyp2, uzp2, duydypi2, upi2, ta2, dipp2, &
duxydxyp3, uzp3, po3, dipp3, nxmsize, nymsize, nzmsize
USE MPI
USE ibm_param

implicit none

Expand Down Expand Up @@ -951,8 +949,8 @@ function divergence_scalar(vec,nlock) result(pp3)
enddo
tmoy=tmoy/nvect3

call MPI_REDUCE(tmax,tmax1,1,real_type,MPI_MAX,0,MPI_COMM_WORLD,code)
call MPI_REDUCE(tmoy,tmoy1,1,real_type,MPI_SUM,0,MPI_COMM_WORLD,code)
tmax1 = pmax(tmax)
tmoy1 = psum(tmoy)

if ((nrank == 0) .and. (nlock > 0).and.(mod(itime, ilist) == 0 .or. itime == ifirst .or. itime==ilast)) then
if (nlock == 2) then
Expand Down

0 comments on commit c34d869

Please sign in to comment.