[cig-commits] r21857 - seismo/3D/SPECFEM3D/trunk/src/specfem3D

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Fri Apr 12 19:41:36 PDT 2013


Author: dkomati1
Date: 2013-04-12 19:41:35 -0700 (Fri, 12 Apr 2013)
New Revision: 21857

Modified:
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/finalize_simulation.f90
   seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90
Log:
added a test to exclude CPML elements in total energy calculation


Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/finalize_simulation.f90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/finalize_simulation.f90	2013-04-13 02:17:41 UTC (rev 21856)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/finalize_simulation.f90	2013-04-13 02:41:35 UTC (rev 21857)
@@ -28,12 +28,11 @@
 
   subroutine finalize_simulation()
 
-  use pml_par
-
   use specfem_par
   use specfem_par_elastic
   use specfem_par_acoustic
   use specfem_par_poroelastic
+  use pml_par
 
   implicit none
 

Modified: seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90
===================================================================
--- seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90	2013-04-13 02:17:41 UTC (rev 21856)
+++ seismo/3D/SPECFEM3D/trunk/src/specfem3D/iterate_time.F90	2013-04-13 02:41:35 UTC (rev 21857)
@@ -398,6 +398,8 @@
   use specfem_par
   use specfem_par_elastic
   use specfem_par_acoustic
+  use pml_par
+
   implicit none
 
 ! integer :: numat
@@ -442,11 +444,14 @@
 ! loop over spectral elements
   do ispec = 1,NSPEC_AB
 
+! if element is a CPML then do not compute energy in it, since it is non physical;
+! thus, we compute energy in the main domain only, without absorbing elements
+    if(PML_CONDITIONS) then
+      ! do not merge this second line with the first using an ".and." statement
+      ! because array is_CPML() is unallocated when PML_CONDITIONS is false
+      if(is_CPML(ispec)) cycle
+    endif
 
-! if element is a CPML then cycle
-! ............. YYYYYYYYYYYYY ...........
-
-
     !---
     !--- elastic spectral element
     !---



More information about the CIG-COMMITS mailing list