[cig-commits] [commit] devel, master: better comments in src/meshfem3D/model_crust.f90 (b7d1c98)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:10:19 PST 2014


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

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

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

commit b7d1c98b71ee6f66e0e8e162cc1dcabfd535c5cd
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Sat Apr 12 12:58:24 2014 +0200

    better comments in src/meshfem3D/model_crust.f90


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

b7d1c98b71ee6f66e0e8e162cc1dcabfd535c5cd
 src/meshfem3D/model_crust.f90 | 16 ++++++++++------
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/meshfem3D/model_crust.f90 b/src/meshfem3D/model_crust.f90
index addc293..896c4b2 100644
--- a/src/meshfem3D/model_crust.f90
+++ b/src/meshfem3D/model_crust.f90
@@ -312,15 +312,15 @@
   integer :: i,icolat,ilon
   character(len=2) :: crustaltype
 
-  ! small hash map to convert crustal types to key
+  ! small hash table to convert crustal types to key
   integer, dimension(128*128) :: crustalhash_to_key
   integer :: ihash, crustalkey
 
-  ! fill in the hash map
+  ! fill in the hash table
   crustalhash_to_key = -1
   do i=1,NKEYS_CRUST
     call hash_crustal_type(code(i), ihash)
-    if (crustalhash_to_key(ihash) /= -1) stop 'error in crust_CAPsmoothed: hash collision'
+    if (crustalhash_to_key(ihash) /= -1) stop 'error in crust_CAPsmoothed: hash table collision'
     crustalhash_to_key(ihash) = i
   enddo
 
@@ -407,9 +407,14 @@
 ! hash table to define the crustal type using an integer instead of characters
 ! because working with integers in the rest of the routines results in much faster code
   subroutine hash_crustal_type(crustaltype, ihash)
+
+    implicit none
+
     character(len=2), intent(in) :: crustaltype
     integer, intent(out) :: ihash
+
     ihash = iachar(crustaltype(1:1)) + 128*iachar(crustaltype(2:2)) + 1
+
   end subroutine hash_crustal_type
 
 !
@@ -420,7 +425,6 @@
 
   implicit none
 
-
 ! argument variables
   double precision :: xlat,xlon
   integer :: icolat,ilon
@@ -443,8 +447,7 @@
 !-------------------------------------------------------------------------------------------------
 !
 
-  subroutine get_crust_structure(ikey,vptyp,vstyp,rhtyp,thtp, &
-               thlr,velocp,velocs,dens)
+  subroutine get_crust_structure(ikey,vptyp,vstyp,rhtyp,thtp,thlr,velocp,velocs,dens)
 
   use model_crust_par,only: NLAYERS_CRUST,NKEYS_CRUST
 
@@ -606,3 +609,4 @@
   endif
 
   end subroutine CAP_vardegree
+



More information about the CIG-COMMITS mailing list