diff --git a/src/build_system_wsmp.f90 b/src/build_system_wsmp.f90 index 19c14a32d0b849c3fb2c94090192163edc8a91e2..dfca942931714273add1387a14170204f3c77e0d 100644 --- a/src/build_system_wsmp.f90 +++ b/src/build_system_wsmp.f90 @@ -200,9 +200,9 @@ do ileaves=1,osolve%nleaves iloc=ifind_loc_wsmp(i1loc,i1,ja,ia,n_iproc,nz_loc) elem_dz=(osolve%z(osolve%icon(5,ileaves))-osolve%z(osolve%icon(1,ileaves)))*params%vex if (k1 < 5) then - avals(iloc)=avals(iloc)-(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz) + avals(iloc)=avals(iloc)-params%damp_factor*(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz) else - avals(iloc)=avals(iloc)+(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz) + avals(iloc)=avals(iloc)+params%damp_factor*(params%dt*(-weightel(ileaves)))/(2.d0*elem_dz) endif endif endif diff --git a/src/module_definitions.f90 b/src/module_definitions.f90 index ab5c6aaa92cfd6b387e1e2c3955c3ac43b7a46f0..bb5ef91448964154e465095ea00af04c7f907849 100644 --- a/src/module_definitions.f90 +++ b/src/module_definitions.f90 @@ -274,6 +274,7 @@ module definitions double precision e2d0 double precision minp double precision pressure0 + double precision damp_factor character*128 restartfile character*40 infile end type diff --git a/src/read_input_file.f90 b/src/read_input_file.f90 index 82af4eb8b2bbdd95043ca6ae5b972e6870f62789..146e8f5b65729a0c686bd006deb0c82a56c5cf13 100644 --- a/src/read_input_file.f90 +++ b/src/read_input_file.f90 @@ -484,6 +484,10 @@ if (iproc==0) then end if call mpi_bcast(params%damp_surface,1,mpi_logical,0,mpi_comm_world,ierr) +params%damp_factor=1.0d0 +if (iproc==0) call scanfile (params%infile,'damp_factor',params%damp_factor,ires) +call mpi_bcast(params%damp_factor,1,mpi_double_precision,0,mpi_comm_world,ierr) + params%remove_surf_pts=.false. if (iproc==0) then call scanfile (params%infile,'remove_surf_pts',answer,ires) @@ -1158,6 +1162,7 @@ if (params%debug.gt.0 .and. iproc.eq.0) then write(*,'(a,i4)') shift//'initial_refine_level ',params%initial_refine_level write(*,'(a,e11.4)') shift//'dt ',params%dt write(*,'(a,l1)') shift//'damp_surface ',params%damp_surface + write(*,'(a,e11.4)') shift//'damp_factor ',params%damp_factor write(*,'(a,l1)') shift//'remove_surf_pts ',params%remove_surf_pts write(*,'(a,e11.4)') shift//'penalty ',params%penalty write(*,'(a,e11.4)') shift//'tempscale ',params%tempscale @@ -1381,6 +1386,7 @@ if (params%debug.gt.1) then write(threadinfo%Logunit,'(a32,i4)') 'initial_refine_level ',params%initial_refine_level write(threadinfo%Logunit,'(a32,e11.4)') 'dt ',params%dt write(threadinfo%Logunit,'(a32,l1)') 'damp_surface ',params%damp_surface + write(threadinfo%Logunit,'(a32,e11.4)') 'damp_factor ',params%damp_factor write(threadinfo%Logunit,'(a32,l1)') 'remove_surf_pts ',params%remove_surf_pts write(threadinfo%Logunit,'(a32,e11.4)') 'penalty ',params%penalty write(threadinfo%Logunit,'(a32,e11.4)') 'tempscale ',params%tempscale