[cig-commits] [commit] devel, master: Remove unnecessary consistency check. (76d7cc9)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:31:08 PST 2014


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

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

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

commit 76d7cc9115e2c67405e5c503f77930d663583756
Author: Elliott Sales de Andrade <esalesde at physics.utoronto.ca>
Date:   Sat Sep 13 02:33:44 2014 -0400

    Remove unnecessary consistency check.
    
    The code no longer uses the ceiling function, so there's no need to
    verify that the result is correct. The code as it's now written will be
    guaranteed to never fail this test.


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

76d7cc9115e2c67405e5c503f77930d663583756
 src/specfem3D/setup_sources_receivers.f90 | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/src/specfem3D/setup_sources_receivers.f90 b/src/specfem3D/setup_sources_receivers.f90
index 6188c0a..ca39be5 100644
--- a/src/specfem3D/setup_sources_receivers.f90
+++ b/src/specfem3D/setup_sources_receivers.f90
@@ -802,12 +802,6 @@
   it_sub_adj = 0
   iadj_block = 1
   do it = 1,NSTEP
-
-    ! block number
-    ! e.g. increases from 1 (case it=1-1000), 2 (case it=1001-2000) to 3 (case it=2001-3000)
-    ! beware: the call below might return a wrong integer number due to machine precision, i.e. 1000./1000. -> 2
-    !it_sub_adj = ceiling( dble(it)/dble(NTSTEP_BETWEEN_READ_ADJSRC) )
-
     ! we are at the edge of a block
     if (mod(it-1,NTSTEP_BETWEEN_READ_ADJSRC) == 0) then
       ! sets it_sub_adj subset number
@@ -833,14 +827,6 @@
       iadj_block = iadj_block + 1
     endif
 
-    ! checks that ceiling function above returns correct integer values
-    if (it_sub_adj /= iadj_block-1) then
-      print*,'Error: confusing block number for reverse adjoint source indexing'
-      print*,'  it_sub_adj = ',it_sub_adj,'should be equal to ',iadj_block-1
-      print*,'  it = ',it,' istart/iend = ',istart,iend,' NTSTEP_BETWEEN_READ_ADJSRC = ',NTSTEP_BETWEEN_READ_ADJSRC
-      stop 'Error reverse adjoint source indexing'
-    endif
-
     ! time stepping for adjoint sources:
     ! adjoint time step that corresponds to time step in simulation (it).
     ! note, that adjoint source has to be time-reversed with respect to the forward wavefield



More information about the CIG-COMMITS mailing list