[cig-commits] r20770 - seismo/2D/SPECFEM2D/trunk/src/specfem2D

xie.zhinan at geodynamics.org xie.zhinan at geodynamics.org
Mon Sep 24 07:22:07 PDT 2012


Author: xie.zhinan
Date: 2012-09-24 07:22:06 -0700 (Mon, 24 Sep 2012)
New Revision: 20770

Modified:
   seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
Log:
move the line "allocate(is_PML(nspec))" under line 2851 "if( PML_BOUNDARY_CONDITIONS .and. anyabs_glob ) then" to avoid a error like "twice allocate the same array"


Modified: seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90
===================================================================
--- seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90	2012-09-24 08:39:52 UTC (rev 20769)
+++ seismo/2D/SPECFEM2D/trunk/src/specfem2D/specfem2D.F90	2012-09-24 14:22:06 UTC (rev 20770)
@@ -1225,8 +1225,7 @@
     allocate(antecedent_list(nspec))
     allocate(perm(nspec))
   endif
-
-  allocate(is_PML(nspec))       
+     
 !   DK DK add support for using pml in mpi mode with external mesh  
   allocate(region_CPML(nspec))    
   call read_databases_mato(ipass,nspec,ngnod,kmato,knods, &
@@ -2853,6 +2852,7 @@
     if( PML_BOUNDARY_CONDITIONS .and. anyabs_glob ) then
 
       !PML code
+      allocate(is_PML(nspec))  
       allocate(icorner_iglob(nglob))
       allocate(which_PML_elem(4,nspec))
       allocate(spec_to_PML(nspec))



More information about the CIG-COMMITS mailing list