[cig-commits] [commit] master: Number of dumps was estimated one too large (c73403f)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Aug 27 07:02:11 PDT 2014


Repository : https://github.com/geodynamics/axisem

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/a068ba899ff1c4c8fdab9bee422b2fd1b6f53802...c73403f1eba05b06fc3beba19d1451f3c26a84e9

>---------------------------------------------------------------

commit c73403f1eba05b06fc3beba19d1451f3c26a84e9
Author: Simon Stähler <staehler at geophysik.uni-muenchen.de>
Date:   Wed Aug 27 15:57:08 2014 +0200

    Number of dumps was estimated one too large
    
     * Usage of floor()+1 makes more sense than ceiling()+1
     * This fixes the issue with the kernel wavefields being shifted in time weirdly. The bug was introduced in commit 4fdc3be0b9163702cd293f978f30a53c8313fa17


>---------------------------------------------------------------

c73403f1eba05b06fc3beba19d1451f3c26a84e9
 SOLVER/parameters.F90 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/SOLVER/parameters.F90 b/SOLVER/parameters.F90
index ceb1a41..c1c9c9d 100644
--- a/SOLVER/parameters.F90
+++ b/SOLVER/parameters.F90
@@ -904,7 +904,7 @@ subroutine compute_numerical_parameters
   if (dump_vtk .or. dump_xdmf .or. dump_memory_vars) then
      snap_it = floor(snap_dt / deltat)
      open(unit=2900+mynum, file=datapath(1:lfdata)//'/snap_info.dat'//appmynum)
-     nsnap = ceiling(real(niter) / real(snap_it)) 
+     nsnap = floor(real(niter) / real(snap_it)) + 1
      
      write(2900+mynum,*) nsnap 
      do ielem=1, nsnap
@@ -1047,7 +1047,7 @@ subroutine compute_numerical_parameters
   ! strain tensor output, convert from num of dumps per period into 
   ! incremental time steps
   if (dump_wavefields) then
-     nstrain = ceiling(real(niter)/real(strain_it)) + 1
+     nstrain = floor(real(niter)/real(strain_it)) + 1
 
      open(unit=2900+mynum,file=datapath(1:lfdata)//'/strain_info.dat'//appmynum)
      write(2900+mynum,*) nstrain 



More information about the CIG-COMMITS mailing list