[cig-commits] [commit] devel: fixed a warning from the Cray compiler about an implicit (hidden) memory copy in a subroutine call that contained an arithmetic operation (dbf3bf9)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Mon Apr 7 16:20:55 PDT 2014
Repository : ssh://shell.geodynamics.org/specfem2d
On branch : devel
Link : https://github.com/geodynamics/specfem2d/compare/db407f7b459208d754fbfc3e3093a7b1243bdaf7...35e0e3747dd39bd7418991a98ceb247c58167a78
>---------------------------------------------------------------
commit dbf3bf9182be69e13d4abd4afd21be1c7efbf3f2
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date: Tue Apr 8 01:19:21 2014 +0200
fixed a warning from the Cray compiler about an implicit (hidden) memory copy in a subroutine call that contained an arithmetic operation
>---------------------------------------------------------------
dbf3bf9182be69e13d4abd4afd21be1c7efbf3f2
src/specfem2D/compute_coupling_acoustic_el.f90 | 16 ----------------
src/specfem2D/specfem2D.F90 | 10 ++++++++--
2 files changed, 8 insertions(+), 18 deletions(-)
diff --git a/src/specfem2D/compute_coupling_acoustic_el.f90 b/src/specfem2D/compute_coupling_acoustic_el.f90
index 935443e..ba0f2b2 100644
--- a/src/specfem2D/compute_coupling_acoustic_el.f90
+++ b/src/specfem2D/compute_coupling_acoustic_el.f90
@@ -148,16 +148,6 @@
displ_z = displ_elastic(3,iglob)
endif
-! if(SIMULATION_TYPE == 3) then
-! b_displ_x = b_displ_elastic(1,iglob)
-! b_displ_z = b_displ_elastic(3,iglob)
- !<YANGL
- ! new definition of adjoint displacement and adjoint potential
-! displ_x = -accel_elastic_adj_coupling(1,iglob)
-! displ_z = -accel_elastic_adj_coupling(3,iglob)
- !>YANGL
-! endif
-
! get point values for the acoustic side
i = ivalue(ipoin1D,iedge_acoustic)
j = jvalue(ipoin1D,iedge_acoustic)
@@ -229,15 +219,9 @@
potential_dot_dot_acoustic(iglob) = potential_dot_dot_acoustic(iglob) + weight*displ_n
-! if(SIMULATION_TYPE == 3) then
-! b_potential_dot_dot_acoustic(iglob) = b_potential_dot_dot_acoustic(iglob) + &
-! weight*(b_displ_x*nx + b_displ_z*nz)
-! endif !if(SIMULATION_TYPE == 3) then
-
enddo
enddo
end subroutine compute_coupling_acoustic_el
-
diff --git a/src/specfem2D/specfem2D.F90 b/src/specfem2D/specfem2D.F90
index 8737072..41c9891 100644
--- a/src/specfem2D/specfem2D.F90
+++ b/src/specfem2D/specfem2D.F90
@@ -479,7 +479,7 @@
veloc_elastic_LDDRK_temp
real(kind=CUSTOM_REAL), dimension(:,:,:), allocatable :: accel_elastic_rk,veloc_elastic_rk
real(kind=CUSTOM_REAL), dimension(:,:), allocatable :: veloc_elastic_initial_rk,displ_elastic_initial_rk
- real(kind=CUSTOM_REAL), dimension(:,:), allocatable :: accel_elastic_adj_coupling
+ real(kind=CUSTOM_REAL), dimension(:,:), allocatable :: accel_elastic_adj_coupling,accel_elastic_adj_coupling2
double precision, dimension(:,:), allocatable :: &
coord, flagrange,xinterp,zinterp,Uxinterp,Uzinterp,vector_field_display
@@ -2648,6 +2648,7 @@
allocate(veloc_elastic(3,nglob_elastic))
allocate(accel_elastic(3,nglob_elastic))
allocate(accel_elastic_adj_coupling(3,nglob_elastic))
+ allocate(accel_elastic_adj_coupling2(3,nglob_elastic))
allocate(rmass_inverse_elastic_one(nglob_elastic))
allocate(rmass_inverse_elastic_three(nglob_elastic))
@@ -5334,8 +5335,13 @@ if(coupled_elastic_poro) then
endif
if(SIMULATION_TYPE == 3)then
+
+! Zhinan Xie's new fluid-solid coupling formulation for adjoint runs
+! involves a change of sign compared to Yang Luo's initial formulation
+ accel_elastic_adj_coupling2 = - accel_elastic_adj_coupling
+
call compute_coupling_acoustic_el(nspec,nglob_elastic,nglob_acoustic,num_fluid_solid_edges,ibool,wxgll,wzgll,xix,xiz,&
- gammax,gammaz,jacobian,ivalue,jvalue,ivalue_inverse,jvalue_inverse,-accel_elastic_adj_coupling,displ_elastic_old,&
+ gammax,gammaz,jacobian,ivalue,jvalue,ivalue_inverse,jvalue_inverse,accel_elastic_adj_coupling2,displ_elastic_old,&
potential_dot_dot_acoustic,fluid_solid_acoustic_ispec,fluid_solid_acoustic_iedge, &
fluid_solid_elastic_ispec,fluid_solid_elastic_iedge,&
AXISYM,nglob,coord,is_on_the_axis,xiglj,wxglj, &
More information about the CIG-COMMITS
mailing list