[cig-commits] [commit] devel: fix one error in pml_compute_memory_variables.f90, answer one commit from Dimitri in compute_forces_viscoelastic_noDev.f90 (d1b916c)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Jul 1 18:15:06 PDT 2014


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

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d/compare/09df28d549901f97fc8e82a5f7498a5f95e85d79...3141b3ecc17fdd63f7e5a4959c65863f4d61d82b

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

commit d1b916ca2b75e93cc77951376a70d16935e8258e
Author: Xie Zhinan <xiezhinan1984 at gmail.com>
Date:   Wed Jul 2 08:59:38 2014 +0800

    fix one error in pml_compute_memory_variables.f90, answer one commit from Dimitri in compute_forces_viscoelastic_noDev.f90


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

d1b916ca2b75e93cc77951376a70d16935e8258e
 .../compute_forces_viscoelastic_noDev.f90          |  1 +
 src/specfem3D/pml_compute_memory_variables.f90     | 51 ++++++++++++++++++++--
 2 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/src/specfem3D/compute_forces_viscoelastic_noDev.f90 b/src/specfem3D/compute_forces_viscoelastic_noDev.f90
index a9b45fe..a721475 100644
--- a/src/specfem3D/compute_forces_viscoelastic_noDev.f90
+++ b/src/specfem3D/compute_forces_viscoelastic_noDev.f90
@@ -747,6 +747,7 @@ subroutine compute_forces_viscoelastic_noDev(iphase, &
 !! DK DK that when PML_CONDITIONS is on then you do not compute the tempx, tempy, tempz arrays
 !! DK DK (even in non-PML elements!!), even though such arrays are needed below;
 !! DK DK shouldn't there be at least a "if (is_CPML(ispec))" test as well here, or something like that?
+!! ZN ZN The tempx, tempy, tempz arrays in PML region is computed in pml_compute_memory_variables_elastic
           if (PML_CONDITIONS .and. (.not. backward_simulation)  .and. NSPEC_CPML > 0) 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
diff --git a/src/specfem3D/pml_compute_memory_variables.f90 b/src/specfem3D/pml_compute_memory_variables.f90
index d729f30..c9bd6c9 100644
--- a/src/specfem3D/pml_compute_memory_variables.f90
+++ b/src/specfem3D/pml_compute_memory_variables.f90
@@ -117,6 +117,7 @@ subroutine pml_compute_memory_variables_elastic(ispec,ispec_CPML,tempx1,tempy1,t
         gammazl = gammaz(i,j,k,ispec)
         jacobianl = jacobian(i,j,k,ispec)
 
+        !---------------------- A6, A7, A8, A9 --------------------------
         kappa_x = k_store_x(i,j,k,ispec_CPML)
         kappa_y = k_store_y(i,j,k,ispec_CPML)
         kappa_z = k_store_z(i,j,k,ispec_CPML)
@@ -126,8 +127,6 @@ subroutine pml_compute_memory_variables_elastic(ispec,ispec_CPML,tempx1,tempy1,t
         alpha_x = alpha_store_x(i,j,k,ispec_CPML)
         alpha_y = alpha_store_y(i,j,k,ispec_CPML)
         alpha_z = alpha_store_z(i,j,k,ispec_CPML)
-
-        !---------------------- A6, A7, A8, A9 --------------------------
         call lijk_parameter_computation(time_nplus1,deltat,&   
                                         kappa_z,d_z,alpha_z,kappa_y,d_y,alpha_y,kappa_x,d_x,alpha_x,&   
                                         CPML_region_local,231,A6,A7,A8,A9,&
@@ -156,6 +155,15 @@ subroutine pml_compute_memory_variables_elastic(ispec,ispec_CPML,tempx1,tempy1,t
 
 
         !---------------------- A10,A11,A12,A13 --------------------------
+        kappa_x = k_store_x(i,j,k,ispec_CPML)
+        kappa_y = k_store_y(i,j,k,ispec_CPML)
+        kappa_z = k_store_z(i,j,k,ispec_CPML)
+        d_x = d_store_x(i,j,k,ispec_CPML)
+        d_y = d_store_y(i,j,k,ispec_CPML)
+        d_z = d_store_z(i,j,k,ispec_CPML)
+        alpha_x = alpha_store_x(i,j,k,ispec_CPML)
+        alpha_y = alpha_store_y(i,j,k,ispec_CPML)
+        alpha_z = alpha_store_z(i,j,k,ispec_CPML)
         call lijk_parameter_computation(time_nplus1,deltat,&   
                                         kappa_x,d_x,alpha_x,kappa_z,d_z,alpha_z,kappa_y,d_y,alpha_y,&   
                                         CPML_region_local,132,A10,A11,A12,A13,&
@@ -183,6 +191,15 @@ subroutine pml_compute_memory_variables_elastic(ispec,ispec_CPML,tempx1,tempy1,t
                + PML_duz_dyl_new(i,j,k) * coef1_3 + PML_duz_dyl_old(i,j,k) * coef2_3
 
         !---------------------- A14,A15,A16,A17 --------------------------
+        kappa_x = k_store_x(i,j,k,ispec_CPML)
+        kappa_y = k_store_y(i,j,k,ispec_CPML)
+        kappa_z = k_store_z(i,j,k,ispec_CPML)
+        d_x = d_store_x(i,j,k,ispec_CPML)
+        d_y = d_store_y(i,j,k,ispec_CPML)
+        d_z = d_store_z(i,j,k,ispec_CPML)
+        alpha_x = alpha_store_x(i,j,k,ispec_CPML)
+        alpha_y = alpha_store_y(i,j,k,ispec_CPML)
+        alpha_z = alpha_store_z(i,j,k,ispec_CPML)
         call lijk_parameter_computation(time_nplus1,deltat,&   
                                         kappa_x,d_x,alpha_x,kappa_y,d_y,alpha_y,kappa_z,d_z,alpha_z,&   
                                         CPML_region_local,123,A14,A15,A16,A17,&
@@ -211,6 +228,9 @@ subroutine pml_compute_memory_variables_elastic(ispec,ispec_CPML,tempx1,tempy1,t
                + PML_duz_dzl_new(i,j,k) * coef1_3 + PML_duz_dzl_old(i,j,k) * coef2_3
 
         !---------------------- A18 and A19 --------------------------
+        kappa_x = k_store_x(i,j,k,ispec_CPML)
+        d_x = d_store_x(i,j,k,ispec_CPML)
+        alpha_x = alpha_store_x(i,j,k,ispec_CPML)
         call lx_parameter_computation(deltat,kappa_x,d_x,alpha_x,&   
                                       CPML_region_local,A18,A19,&
                                       coef0_1,coef1_1,coef2_1)
@@ -227,6 +247,9 @@ subroutine pml_compute_memory_variables_elastic(ispec,ispec_CPML,tempx1,tempy1,t
                + PML_duy_dyl_new(i,j,k) * coef1_1 + PML_duy_dyl_old(i,j,k) * coef2_1
 
         !---------------------- A20 and A21 --------------------------
+        kappa_y = k_store_y(i,j,k,ispec_CPML)
+        d_y = d_store_y(i,j,k,ispec_CPML)
+        alpha_y = alpha_store_y(i,j,k,ispec_CPML)
         call ly_parameter_computation(deltat,kappa_y,d_y,alpha_y, &   
                                       CPML_region_local,A20,A21,&
                                       coef0_1,coef1_1,coef2_1)
@@ -243,6 +266,9 @@ subroutine pml_compute_memory_variables_elastic(ispec,ispec_CPML,tempx1,tempy1,t
                + PML_dux_dxl_new(i,j,k) * coef1_1 + PML_dux_dxl_old(i,j,k) * coef2_1
 
         !---------------------- A22 and A23 --------------------------
+        kappa_z = k_store_z(i,j,k,ispec_CPML)
+        d_z = d_store_z(i,j,k,ispec_CPML)
+        alpha_z = alpha_store_z(i,j,k,ispec_CPML)
         call lz_parameter_computation(deltat,kappa_z,d_z,alpha_z, &   
                                       CPML_region_local,A22,A23,&
                                       coef0_1,coef1_1,coef2_1)
@@ -396,6 +422,7 @@ subroutine pml_compute_memory_variables_acoustic(ispec,ispec_CPML,temp1,temp2,te
           rhoin_jacob_ij = rho_invl_jacob * wgllwgll_xy(i,j)
         endif
 
+        !---------------------- A6, A7, A8, A9 --------------------------
         kappa_x = k_store_x(i,j,k,ispec_CPML)
         kappa_y = k_store_y(i,j,k,ispec_CPML)
         kappa_z = k_store_z(i,j,k,ispec_CPML)
@@ -405,8 +432,6 @@ subroutine pml_compute_memory_variables_acoustic(ispec,ispec_CPML,temp1,temp2,te
         alpha_x = alpha_store_x(i,j,k,ispec_CPML)
         alpha_y = alpha_store_y(i,j,k,ispec_CPML)
         alpha_z = alpha_store_z(i,j,k,ispec_CPML)
-
-        !---------------------- A6, A7, A8, A9 --------------------------
         call lijk_parameter_computation(time_nplus1,deltat,&   
                                         kappa_z,d_z,alpha_z,kappa_y,d_y,alpha_y,kappa_x,d_x,alpha_x,&   
                                         CPML_region_local,231,A6,A7,A8,A9,&
@@ -424,6 +449,15 @@ subroutine pml_compute_memory_variables_acoustic(ispec,ispec_CPML,temp1,temp2,te
                 coef1_3 * PML_dpotential_dxl_new(i,j,k) + coef2_3 * PML_dpotential_dxl_old(i,j,k)
 
         !---------------------- A10,A11,A12,A13 --------------------------
+        kappa_x = k_store_x(i,j,k,ispec_CPML)
+        kappa_y = k_store_y(i,j,k,ispec_CPML)
+        kappa_z = k_store_z(i,j,k,ispec_CPML)
+        d_x = d_store_x(i,j,k,ispec_CPML)
+        d_y = d_store_y(i,j,k,ispec_CPML)
+        d_z = d_store_z(i,j,k,ispec_CPML)
+        alpha_x = alpha_store_x(i,j,k,ispec_CPML)
+        alpha_y = alpha_store_y(i,j,k,ispec_CPML)
+        alpha_z = alpha_store_z(i,j,k,ispec_CPML)
         call lijk_parameter_computation(time_nplus1,deltat,&    
                                         kappa_x,d_x,alpha_x,kappa_z,d_z,alpha_z,kappa_y,d_y,alpha_y,&    
                                         CPML_region_local,132,A10,A11,A12,A13,&
@@ -440,6 +474,15 @@ subroutine pml_compute_memory_variables_acoustic(ispec,ispec_CPML,temp1,temp2,te
                 coef1_3 * PML_dpotential_dyl_new(i,j,k) + coef2_3 * PML_dpotential_dyl_old(i,j,k)
 
         !---------------------- A14,A15,A16,A17 --------------------------
+        kappa_x = k_store_x(i,j,k,ispec_CPML)
+        kappa_y = k_store_y(i,j,k,ispec_CPML)
+        kappa_z = k_store_z(i,j,k,ispec_CPML)
+        d_x = d_store_x(i,j,k,ispec_CPML)
+        d_y = d_store_y(i,j,k,ispec_CPML)
+        d_z = d_store_z(i,j,k,ispec_CPML)
+        alpha_x = alpha_store_x(i,j,k,ispec_CPML)
+        alpha_y = alpha_store_y(i,j,k,ispec_CPML)
+        alpha_z = alpha_store_z(i,j,k,ispec_CPML)
         call lijk_parameter_computation(time_nplus1,deltat,&   
                                         kappa_x,d_x,alpha_x,kappa_y,d_y,alpha_y,kappa_z,d_z,alpha_z,&   
                                         CPML_region_local,123,A14,A15,A16,A17,&



More information about the CIG-COMMITS mailing list