[cig-commits] [commit] master: removing useless num_simul, was 1 anyway since a few years (4059776)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Oct 17 05:30:02 PDT 2014


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

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/607f803cf074063627513d235f9ed0837fc1dd44...b6457db24acdde4a4e1c08935ae1b22adf87f5bf

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

commit 40597761085ae06b4ca319763abe2b3771ecd4e8
Author: martinvandriel <vandriel at erdw.ethz.ch>
Date:   Thu Oct 16 19:55:35 2014 +0200

    removing useless num_simul, was 1 anyway since a few years


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

40597761085ae06b4ca319763abe2b3771ecd4e8
 SOLVER/data_io.f90     |  3 +--
 SOLVER/data_source.f90 |  5 +++--
 SOLVER/main.f90        | 45 +++++++++++++++++----------------------------
 SOLVER/parameters.F90  |  8 +++-----
 4 files changed, 24 insertions(+), 37 deletions(-)

diff --git a/SOLVER/data_io.f90 b/SOLVER/data_io.f90
index 1f1a020..f370ab3 100644
--- a/SOLVER/data_io.f90
+++ b/SOLVER/data_io.f90
@@ -18,8 +18,7 @@
 !    You should have received a copy of the GNU General Public License
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
-
-!-----------------------------------------------------------------------------------------
+!=========================================================================================
 !> Miscellaneous variables relevant to any read/write process such as 
 !! paths, logicals describing what to save, sampling rate of dumps
 module data_io
diff --git a/SOLVER/data_source.f90 b/SOLVER/data_source.f90
index be8e7e9..2b3e915 100644
--- a/SOLVER/data_source.f90
+++ b/SOLVER/data_source.f90
@@ -18,7 +18,7 @@
 !    You should have received a copy of the GNU General Public License
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
-
+!=========================================================================================
 !> Variables describing anything related to the source
 module data_source
 
@@ -32,7 +32,7 @@ module data_source
   character(len=7)                 :: stf_type
   real(kind=dp)                    :: src_depth, zsrc, srccolat, srclon
   integer                          :: iel_src, ipol_src, jpol_src
-  integer                          :: isim, num_simul
+  integer                          :: isim
   logical                          :: have_src
   real(kind=realkind), allocatable :: stf(:)
   logical                          :: rot_src
@@ -53,3 +53,4 @@ module data_source
   character(len=4)    :: src_dump_type
 
 end module data_source
+!=========================================================================================
diff --git a/SOLVER/main.f90 b/SOLVER/main.f90
index a8c0a68..1835561 100644
--- a/SOLVER/main.f90
+++ b/SOLVER/main.f90
@@ -25,7 +25,7 @@ program axisem
   use data_io,        only : dump_xdmf, use_netcdf, verbose
   use nc_routines,    only : nc_end_output, nc_finish_prepare
   use nc_snapshots,   only : nc_close_snapfile
-  use data_source,    only : isim,num_simul
+  use data_source,    only : isim
   use data_mesh,      only : do_mesh_tests
   use parameters,     only : open_local_output_file, readin_parameters, &
                              read_inparam_basic_verbosity
@@ -68,38 +68,27 @@ program axisem
      call mesh_tests ! def_grid
   endif 
 
-  if (num_simul .ne. 1) then
-     write(6,*) 'ERROR: implementation of multiple simulations within one run'
-     write(6,*) '       not finished yet.'
-     write(6,*) '       For now set number of simulations in inparam to 1, splitting '
-     write(6,*) '       to the different sources is then done by the submit script.'
-     stop 2
-  endif
-
-  do isim=1, num_simul
+  if (lpr .and. verbose >= 1) &
+     write(6,*) 'MAIN: Starting wave preparation...........................'
+  call prepare_waves ! time_evol_wave
 
-     if (lpr .and. verbose >= 1) &
-        write(6,*) 'MAIN: Starting wave preparation...........................'
-     call prepare_waves ! time_evol_wave
+  ! Deallocate all the large arrays that are not needed in the time loop,
+  ! specifically those from data_mesh_preloop and data_pointwise
+  if (lpr .and. verbose >= 1) &
+     write(6,*) 'MAIN: Deallocating arrays not needed in the time loop.....'
+  call deallocate_preloop_arrays ! def_grid
  
-     ! Deallocate all the large arrays that are not needed in the time loop,
-     ! specifically those from data_mesh_preloop and data_pointwise
+  if (use_netcdf) then
      if (lpr .and. verbose >= 1) &
-        write(6,*) 'MAIN: Deallocating arrays not needed in the time loop.....'
-     call deallocate_preloop_arrays ! def_grid
- 
-     if (use_netcdf) then
-        if (lpr .and. verbose >= 1) &
-           write(6,*) 'MAIN: Finish preparation of NetCDF file...................'
-        call nc_finish_prepare
-     endif
+        write(6,*) 'MAIN: Finish preparation of NetCDF file...................'
+     call nc_finish_prepare
+  endif
   
-     call barrier ! Just making sure we're all ready to rupture...
+  call barrier ! Just making sure we're all ready to rupture...
   
-     if (lpr .and. verbose >= 1) &
-        write(6,*) 'MAIN: Starting wave propagation...........................'
-     call time_loop ! time_evol_wave
-  enddo
+  if (lpr .and. verbose >= 1) &
+     write(6,*) 'MAIN: Starting wave propagation...........................'
+  call time_loop ! time_evol_wave
 
   if (use_netcdf) then
      if (lpr .and. verbose >= 1) &
diff --git a/SOLVER/parameters.F90 b/SOLVER/parameters.F90
index 7157412..7dc3246 100644
--- a/SOLVER/parameters.F90
+++ b/SOLVER/parameters.F90
@@ -18,7 +18,7 @@
 !    You should have received a copy of the GNU General Public License
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
-
+!=========================================================================================
 !> Read parameters for the general solver (i.e. NOT mesh, sources, receivers);
 !! compute other parameters for the simulation;
 !! write out summaries of all relevant simulation settings.
@@ -86,7 +86,6 @@ subroutine readin_parameters
   ! now pre-set. Most of these are to be considered in the post processing stage now.
   sum_seis = .false.
   sum_fields = .false.
-  num_simul = 1
    
   ! netcdf format
   output_format = 'binary'
@@ -95,7 +94,7 @@ subroutine readin_parameters
   call barrier
   if (lpr) then
      write(6,20)
-     write(6,21) datapath, infopath, num_simul,  seislength_t, enforced_dt,  &
+     write(6,21) datapath, infopath, seislength_t, enforced_dt,  &
                  enforced_period, trim(simtype), rec_file_type, &
                  sum_seis, sum_fields, time_scheme, seis_dt,  &
                  dump_energy, dump_vtk, dump_wavefields, &
@@ -182,7 +181,6 @@ subroutine readin_parameters
    08x,'=============  I N P U T    P A R A M E T E R S ===============',/  &
    12x,'Data I/O path:                      ',a20,/                         &
    12x,'Info I/O path:                      ',a20,/                         &
-   12x,'Number of source simulations:       ',i2,/                          &
    12x,'Simulation length [s]:              ',f9.3,/                        &
    12x,'Enforced time step [s]:             ',f7.3,/                        &
    12x,'Enforced source period [s]:         ',f7.3,/                        &
@@ -1842,4 +1840,4 @@ end subroutine check_parameters
 !-----------------------------------------------------------------------------------------
 
 end module parameters
-
+!=========================================================================================



More information about the CIG-COMMITS mailing list