Skip to content

Commit 02d50c8

Browse files
committed
hit_looks_ok
1 parent eb9fa48 commit 02d50c8

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

channel/main.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ program main
460460
do j=1, piX%shape(2)
461461
do i=1,nx
462462
! compute distance function psi (used to compute normals)
463-
val = min(phi_eval(i,j,k),1.0d0)
463+
val = max(0.0d0, min(phi_eval(i,j,k), 1.0d0))
464464
psidi(i,j,k) = eps*log((val+enum)/(1.d0-val+enum))
465465
enddo
466466
enddo

hit/main.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,13 @@ program main
365365
CHECK_CUDECOMP_EXIT(cudecompUpdateHalosX(handle, grid_desc, w, work_halo_d, CUDECOMP_DOUBLE, piX%halo_extents, halo_periods, 3))
366366
!$acc end host_data
367367

368+
! find local maximum velocity (for ACDI)
369+
uc=maxval(u)
370+
vc=maxval(v)
371+
wc=maxval(w)
372+
umax=max(wc,max(uc,vc))
373+
call MPI_Allreduce(umax,gumax,1,MPI_DOUBLE_PRECISION,MPI_MAX,MPI_COMM_WORLD, ierr)
374+
368375
! initialize phase-field
369376
#if phiflag == 1
370377
if (restart .eq. 0) then
@@ -441,7 +448,6 @@ program main
441448
! First step use Euler
442449
alpha=1.0d0
443450
beta=0.0d0
444-
gumax=1.d0
445451
tstart=tstart+1
446452
gamma=1.d0*gumax
447453
!$acc data copyin(piX)
@@ -460,11 +466,9 @@ program main
460466
write(itcount,'(i4)') t
461467
! Range with custom color (uncomment for profiling)
462468
! call nvtxStartRange("Iteration "//itcount,t)
463-
464469
if (rank.eq.0) write(*,*) "Time step",t,"of",tfin
465470
call cpu_time(times)
466471

467-
468472
!########################################################################################################################################
469473
! START STEP 4: PARTICLES (TRACERS)
470474
!########################################################################################################################################
@@ -514,10 +518,6 @@ program main
514518
! END STEP 4: PARTICLES
515519
!########################################################################################################################################
516520

517-
518-
519-
520-
521521

522522
! (uncomment for profiling)
523523
! call nvtxStartRange("Phase-field")
@@ -587,7 +587,7 @@ program main
587587
do j=1, piX%shape(2)
588588
do i=1,nx
589589
! compute distance function psi (used to compute normals)
590-
val = min(phi_eval(i,j,k),1.0d0)
590+
val = max(0.0d0, min(phi_eval(i,j,k), 1.0d0))
591591
psidi(i,j,k) = eps*log((val+enum)/(1.d0-val+enum))
592592
enddo
593593
enddo

0 commit comments

Comments
 (0)