[cig-commits] [commit] devel: added two missing parameters in src/specfem2D/define_external_model.f90, and fixed a minor bug in src/specfem2D/read_external_model.f90 when detecting if an element is both fluid and solid (a5ff68e)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Dec 9 16:29:02 PST 2014


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

On branch  : devel
Link       : https://github.com/geodynamics/specfem2d/compare/20c47473dc196747e7375664700e1c190984616f...a5ff68e512b4d8857b36b9f35d0ed5b0823303fb

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

commit a5ff68e512b4d8857b36b9f35d0ed5b0823303fb
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Wed Dec 10 01:18:31 2014 +0100

    added two missing parameters in src/specfem2D/define_external_model.f90, and fixed a minor bug in src/specfem2D/read_external_model.f90 when detecting if an element is both fluid and solid


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

a5ff68e512b4d8857b36b9f35d0ed5b0823303fb
 src/specfem2D/define_external_model.f90 | 11 ++++++++---
 src/specfem2D/read_external_model.f90   |  2 +-
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/specfem2D/define_external_model.f90 b/src/specfem2D/define_external_model.f90
index 1437fb9..90e1763 100644
--- a/src/specfem2D/define_external_model.f90
+++ b/src/specfem2D/define_external_model.f90
@@ -41,8 +41,9 @@
 !
 !========================================================================
 
-  subroutine define_external_model_dummy(coord,material_element,ibool,rho,vp,vs,QKappa_attenuation,Qmu_attenuation, &
-                                             c11,c13,c15,c33,c35,c55,c12,c23,c25,nspec,nglob)
+  subroutine define_external_model_dummy(coord,material_element,ibool, &
+              rho,vp,vs,QKappa_attenuation,Qmu_attenuation,gravity,Nsq, &
+              c11,c13,c15,c33,c35,c55,c12,c23,c25,nspec,nglob)
 
   implicit none
 
@@ -63,7 +64,7 @@
 
   integer, dimension(NGLLX,NGLLZ,nspec), intent(in) :: ibool
 
-  double precision, dimension(NGLLX,NGLLZ,nspec), intent(out) :: rho,vp,vs,QKappa_attenuation,Qmu_attenuation, &
+  double precision, dimension(NGLLX,NGLLZ,nspec), intent(out) :: rho,vp,vs,QKappa_attenuation,Qmu_attenuation,gravity,Nsq, &
                                                                  c11,c15,c13,c33,c35,c55,c12,c23,c25
 
   integer :: i,j,ispec,iglob
@@ -73,6 +74,10 @@
 ! completely dummy routine here, just to demonstrate how the model can be assigned
 ! and how such a routine can be written
 
+! leave these arrays here even if you do not assign them to use them because they need to be cleared
+  gravity(:,:,:) = 0.d0
+  Nsq(:,:,:) = 0.d0
+
 ! loop on all the elements of the mesh, and inside each element loop on all the GLL points
   do ispec = 1,nspec
     do j = 1,NGLLZ
diff --git a/src/specfem2D/read_external_model.f90 b/src/specfem2D/read_external_model.f90
index e016647..4a7620f 100644
--- a/src/specfem2D/read_external_model.f90
+++ b/src/specfem2D/read_external_model.f90
@@ -146,7 +146,7 @@
 
   do ispec = 1,nspec
 
-    previous_vsext = -1.d0
+    previous_vsext = vsext(1,1,ispec)
 
     do j = 1,NGLLZ
       do i = 1,NGLLX



More information about the CIG-COMMITS mailing list