[cig-commits] r19418 - seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D

xie.zhinan at geodynamics.org xie.zhinan at geodynamics.org
Mon Jan 23 11:15:39 PST 2012


Author: xie.zhinan
Date: 2012-01-23 11:15:39 -0800 (Mon, 23 Jan 2012)
New Revision: 19418

Added:
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_LDDRK.F90
Modified:
   seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90
Log:
adding code about reading LDDRK parameter when needed


Added: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_LDDRK.F90
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_LDDRK.F90	                        (rev 0)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/read_parameter_LDDRK.F90	2012-01-23 19:15:39 UTC (rev 19418)
@@ -0,0 +1,95 @@
+
+!========================================================================
+!
+!                   S P E C F E M 2 D  Version 6 . 2
+!                   ------------------------------
+!
+! Copyright Universite de Pau, CNRS and INRIA, France,
+! and Princeton University / California Institute of Technology, USA.
+! Contributors: Dimitri Komatitsch, dimitri DOT komatitsch aT univ-pau DOT fr
+!               Nicolas Le Goff, nicolas DOT legoff aT univ-pau DOT fr
+!               Roland Martin, roland DOT martin aT univ-pau DOT fr
+!               Christina Morency, cmorency aT princeton DOT edu
+!
+! This software is a computer program whose purpose is to solve
+! the two-dimensional viscoelastic anisotropic or poroelastic wave equation
+! using a spectral-element method (SEM).
+!
+! This software is governed by the CeCILL license under French law and
+! abiding by the rules of distribution of free software. You can use,
+! modify and/or redistribute the software under the terms of the CeCILL
+! license as circulated by CEA, CNRS and INRIA at the following URL
+! "http://www.cecill.info".
+!
+! As a counterpart to the access to the source code and rights to copy,
+! modify and redistribute granted by the license, users are provided only
+! with a limited warranty and the software's author, the holder of the
+! economic rights, and the successive licensors have only limited
+! liability.
+!
+! In this respect, the user's attention is drawn to the risks associated
+! with loading, using, modifying and/or developing or reproducing the
+! software by the user in light of its specific status of free software,
+! that may mean that it is complicated to manipulate, and that also
+! therefore means that it is reserved for developers and experienced
+! professionals having in-depth computer knowledge. Users are therefore
+! encouraged to load and test the software's suitability as regards their
+! requirements in conditions enabling the security of their systems and/or
+! data to be ensured and, more generally, to use and operate it in the
+! same conditions as regards security.
+!
+! The full text of the license is available in file "LICENSE".
+!
+!========================================================================
+
+module parameter_LDDRK
+
+  implicit none
+
+  ! LDDRK parameters
+   double precision, dimension(:),pointer ::  alpha_LDDRK, beta_LDDRK, c_LDDRK
+  contains
+
+  subroutine read_parameter_LDDRK()
+
+  ! reads in source file DATA/LDDRK
+
+  implicit none
+  include "constants.h"
+  
+  integer :: i_stage, ios
+
+  open(unit=IIN_Par_LDDRK,file='DATA/LDDRK',iostat=ios, status='old',action='read')
+!  if(ios /= 0)stop'error opening DATA/LDDRK
+
+   allocate(alpha_LDDRK(Stage))
+   allocate(beta_LDDRK(Stage))
+   allocate(c_LDDRK(Stage))
+
+   read(IIN_Par_LDDRK,'(a80)')
+   read(IIN_Par_LDDRK,'(a80)')
+   read(IIN_Par_LDDRK,'(a80)')
+   read(IIN_Par_LDDRK,'(a80)')
+
+  read(IIN_Par_LDDRK,'(a80)')
+  do i_stage=1,Stage
+    read(IIN_Par_LDDRK,*)alpha_LDDRK(i_stage)
+  enddo
+
+  read(IIN_Par_LDDRK,'(a80)')
+  do i_stage=1,Stage
+    read(IIN_Par_LDDRK,*)beta_LDDRK(i_stage)
+  enddo
+
+  read(IIN_Par_LDDRK,'(a80)')
+  do i_stage=1,Stage
+    read(IIN_Par_LDDRK,*)c_LDDRK(i_stage)
+  enddo   
+
+  close(IIN_Par_LDDRK)
+  
+
+  end subroutine read_parameter_LDDRK
+
+end module parameter_LDDRK
+

Modified: seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90
===================================================================
--- seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90	2012-01-23 19:05:31 UTC (rev 19417)
+++ seismo/2D/SPECFEM2D/branches/new_branch_for_Xie_Zhinan/trunk/src/meshfem2D/save_databases.f90	2012-01-23 19:15:39 UTC (rev 19418)
@@ -189,7 +189,7 @@
                   Mxx(i_source),Mzz(i_source),Mxz(i_source)
     enddo
 
-    if(time_stepping_scheme.eq.2)then
+    if(time_stepping_scheme == 2)then
 
     write(15,*) '# alpha_LDDRK'
     do i_stage=1,Stage



More information about the CIG-COMMITS mailing list