[cig-commits] r19690 - seismo/3D/CPML/trunk

dkomati1 at geodynamics.org dkomati1 at geodynamics.org
Mon Feb 27 17:02:12 PST 2012


Author: dkomati1
Date: 2012-02-27 17:02:12 -0800 (Mon, 27 Feb 2012)
New Revision: 19690

Modified:
   seismo/3D/CPML/trunk/Makefile
   seismo/3D/CPML/trunk/seismic_ADEPML_2D_RK4_eighth_order.f90
   seismo/3D/CPML/trunk/seismic_CPML_2D_anisotropic.f90
   seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_fourth_order.f90
   seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_second_order.f90
   seismo/3D/CPML/trunk/seismic_CPML_2D_poroelastic_fourth_order.f90
   seismo/3D/CPML/trunk/seismic_CPML_3D_isotropic_MPI_OpenMP.f90
   seismo/3D/CPML/trunk/seismic_CPML_3D_viscoelastic_MPI.f90
   seismo/3D/CPML/trunk/seismic_PML_Collino_2D_anisotropic_fourth.f90
   seismo/3D/CPML/trunk/seismic_PML_Collino_2D_isotropic.f90
   seismo/3D/CPML/trunk/seismic_PML_Collino_3D_isotropic_OpenMP.f90
Log:
fixed the calculation of potential energy in the 3D codes (incorrect formula detected by Chang Soo Cho, Korea Institute of Geoscience and Minreal resources, Korea)


Modified: seismo/3D/CPML/trunk/Makefile
===================================================================
--- seismo/3D/CPML/trunk/Makefile	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/Makefile	2012-02-28 01:02:12 UTC (rev 19690)
@@ -16,10 +16,10 @@
 #MEDIUM_MEMORY = -mcmodel=medium
 #OPEN_MP = -mp
 
-# Intel (leave option -ftz, which is *critical* for performance)
+# Intel (leave option -ftz, which can be *critical* for performance)
 #F90 = ifort
 #MPIF90 = mpif90
-#FLAGS = -O3 -xP -vec-report0 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds -fpe0 -ftz
+#FLAGS = -O3 -xSSE4.2 -vec-report0 -implicitnone -warn truncated_source -warn argument_checking -warn unused -warn declarations -warn alignments -warn ignore_loc -warn usage -check nobounds -fpe0 -ftz
 #MEDIUM_MEMORY = -mcmodel=medium
 #OPEN_MP = -openmp -openmp-report1
 

Modified: seismo/3D/CPML/trunk/seismic_ADEPML_2D_RK4_eighth_order.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_ADEPML_2D_RK4_eighth_order.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_ADEPML_2D_RK4_eighth_order.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -163,7 +163,7 @@
 !
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none

Modified: seismo/3D/CPML/trunk/seismic_CPML_2D_anisotropic.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_CPML_2D_anisotropic.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_CPML_2D_anisotropic.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -153,7 +153,7 @@
 !
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none

Modified: seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_fourth_order.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_fourth_order.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_fourth_order.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -133,7 +133,7 @@
 !
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none

Modified: seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_second_order.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_second_order.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_CPML_2D_isotropic_second_order.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -139,7 +139,7 @@
 !
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none

Modified: seismo/3D/CPML/trunk/seismic_CPML_2D_poroelastic_fourth_order.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_CPML_2D_poroelastic_fourth_order.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_CPML_2D_poroelastic_fourth_order.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -146,7 +146,7 @@
 !
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none

Modified: seismo/3D/CPML/trunk/seismic_CPML_3D_isotropic_MPI_OpenMP.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_CPML_3D_isotropic_MPI_OpenMP.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_CPML_3D_isotropic_MPI_OpenMP.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -122,7 +122,7 @@
 !
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none
@@ -1150,12 +1150,12 @@
 ! in the staggered grid cell but in a homogeneous medium we can safely ignore it
 
 ! compute total field from split components
-      epsilon_xx = ((lambda + 2.d0*mu) * sigmaxx(i,j,k) - lambda * sigmayy(i,j,k) - &
-          lambda*sigmazz(i,j,k)) / (4.d0 * mu * (lambda + mu))
-      epsilon_yy = ((lambda + 2.d0*mu) * sigmayy(i,j,k) - lambda * sigmaxx(i,j,k) - &
-          lambda*sigmazz(i,j,k)) / (4.d0 * mu * (lambda + mu))
-      epsilon_zz = ((lambda + 2.d0*mu) * sigmazz(i,j,k) - lambda * sigmaxx(i,j,k) - &
-          lambda*sigmayy(i,j,k)) / (4.d0 * mu * (lambda + mu))
+      epsilon_xx = (2.d0*(lambda + mu) * sigmaxx(i,j,k) - lambda * sigmayy(i,j,k) - &
+          lambda*sigmazz(i,j,k)) / (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
+      epsilon_yy = (2.d0*(lambda + mu) * sigmayy(i,j,k) - lambda * sigmaxx(i,j,k) - &
+          lambda*sigmazz(i,j,k)) / (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
+      epsilon_zz = (2.d0*(lambda + mu) * sigmazz(i,j,k) - lambda * sigmaxx(i,j,k) - &
+          lambda*sigmayy(i,j,k)) / (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
       epsilon_xy = sigmaxy(i,j,k) / (2.d0 * mu)
       epsilon_xz = sigmaxz(i,j,k) / (2.d0 * mu)
       epsilon_yz = sigmayz(i,j,k) / (2.d0 * mu)

Modified: seismo/3D/CPML/trunk/seismic_CPML_3D_viscoelastic_MPI.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_CPML_3D_viscoelastic_MPI.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_CPML_3D_viscoelastic_MPI.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -125,7 +125,7 @@
 !
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none
@@ -1352,12 +1352,12 @@
 ! in the staggered grid cell but in a homogeneous medium we can safely ignore it
 
 ! compute total field from split components
-      epsilon_xx = ((lambda + 2.d0*mu) * sigmaxx_R(i,j,k) - lambda * sigmayy_R(i,j,k) - &
-          lambda*sigmazz_R(i,j,k)) / (4.d0 * mu * (lambda + mu))
-      epsilon_yy = ((lambda + 2.d0*mu) * sigmayy_R(i,j,k) - lambda * sigmaxx_R(i,j,k) - &
-          lambda*sigmazz_R(i,j,k)) / (4.d0 * mu * (lambda + mu))
-      epsilon_zz = ((lambda + 2.d0*mu) * sigmazz_R(i,j,k) - lambda * sigmaxx_R(i,j,k) - &
-          lambda*sigmayy_R(i,j,k)) / (4.d0 * mu * (lambda + mu))
+      epsilon_xx = (2.d0*(lambda + mu) * sigmaxx(i,j,k) - lambda * sigmayy(i,j,k) - &
+          lambda*sigmazz(i,j,k)) / (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
+      epsilon_yy = (2.d0*(lambda + mu) * sigmayy(i,j,k) - lambda * sigmaxx(i,j,k) - &
+          lambda*sigmazz(i,j,k)) / (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
+      epsilon_zz = (2.d0*(lambda + mu) * sigmazz(i,j,k) - lambda * sigmaxx(i,j,k) - &
+          lambda*sigmayy(i,j,k)) / (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
       epsilon_xy = sigmaxy_R(i,j,k) / (2.d0 * mu)
       epsilon_xz = sigmaxz_R(i,j,k) / (2.d0 * mu)
       epsilon_yz = sigmayz_R(i,j,k) / (2.d0 * mu)

Modified: seismo/3D/CPML/trunk/seismic_PML_Collino_2D_anisotropic_fourth.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_PML_Collino_2D_anisotropic_fourth.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_PML_Collino_2D_anisotropic_fourth.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -48,7 +48,7 @@
   program seismic_PML_Collino_2D_ani_4th
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none

Modified: seismo/3D/CPML/trunk/seismic_PML_Collino_2D_isotropic.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_PML_Collino_2D_isotropic.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_PML_Collino_2D_isotropic.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -38,7 +38,7 @@
   program seismic_PML_Collino_2D_iso
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none

Modified: seismo/3D/CPML/trunk/seismic_PML_Collino_3D_isotropic_OpenMP.f90
===================================================================
--- seismo/3D/CPML/trunk/seismic_PML_Collino_3D_isotropic_OpenMP.f90	2012-02-28 00:02:26 UTC (rev 19689)
+++ seismo/3D/CPML/trunk/seismic_PML_Collino_3D_isotropic_OpenMP.f90	2012-02-28 01:02:12 UTC (rev 19690)
@@ -39,7 +39,7 @@
   program seismic_PML_Collino_3D_iso
 
 ! IMPORTANT : all our CPML codes work fine in single precision as well (which is significantly faster).
-!             If you want you can thus force automatic conversion to single precision at compile time 
+!             If you want you can thus force automatic conversion to single precision at compile time
 !             or change all the declarations and constants in the code from double precision to single.
 
   implicit none
@@ -795,9 +795,12 @@
       sigmaxz_total = sigmaxz_1(i,j,k) + sigmaxz_3(i,j,k)
       sigmayz_total = sigmayz_2(i,j,k) + sigmayz_3(i,j,k)
 
-      epsilon_xx = ((lambda + 2.d0*mu) * sigmaxx_total - lambda * sigmayy_total -lambda*sigmazz_total) / (4.d0 * mu * (lambda + mu))
-      epsilon_yy = ((lambda + 2.d0*mu) * sigmayy_total - lambda * sigmaxx_total -lambda*sigmazz_total) / (4.d0 * mu * (lambda + mu))
-      epsilon_zz = ((lambda + 2.d0*mu) * sigmazz_total - lambda * sigmaxx_total -lambda*sigmayy_total) / (4.d0 * mu * (lambda + mu))
+      epsilon_xx = (2.d0*(lambda + mu) * sigmaxx_total - lambda * sigmayy_total -lambda*sigmazz_total) / &
+               (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
+      epsilon_yy = (2.d0*(lambda + mu) * sigmayy_total - lambda * sigmaxx_total -lambda*sigmazz_total) / &
+               (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
+      epsilon_zz = (2.d0*(lambda + mu) * sigmazz_total - lambda * sigmaxx_total -lambda*sigmayy_total) / &
+               (2.d0 * mu * (3.d0*lambda + 2.d0*mu))
       epsilon_xy = sigmaxy_total / (2.d0 * mu)
       epsilon_xz = sigmaxz_total / (2.d0 * mu)
       epsilon_yz = sigmayz_total / (2.d0 * mu)



More information about the CIG-COMMITS mailing list