[cig-commits] [commit] devel: Modifs earth chunk meshfem3d (3677217)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 20 10:08:00 PST 2014


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

On branch  : devel
Link       : https://github.com/geodynamics/specfem3d/compare/b43c63c4cea034e3e6f647cebc591fb4c2ab3894...fb5ff57e01f82037a9b22ebd3c3c184e9e4f14f6

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

commit 36772176bbbd2fef382350879cd8e2a1d3660636
Author: Clément Durochat <c.durochat at gmail.com>
Date:   Fri Oct 31 12:17:45 2014 +0100

    Modifs earth chunk meshfem3d


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

36772176bbbd2fef382350879cd8e2a1d3660636
 src/meshfem3D/earth_chunk_HEX8_Mesher.f90                     | 11 +++++++----
 ...h_chunk_HEX8_ReadIasp91.f90 => earth_chunk_ReadIasp91.f90} |  4 ++--
 src/meshfem3D/meshfem3D.f90                                   |  6 +++---
 src/meshfem3D/rules.mk                                        |  2 +-
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/meshfem3D/earth_chunk_HEX8_Mesher.f90 b/src/meshfem3D/earth_chunk_HEX8_Mesher.f90
index e8b6b50..194fea7 100644
--- a/src/meshfem3D/earth_chunk_HEX8_Mesher.f90
+++ b/src/meshfem3D/earth_chunk_HEX8_Mesher.f90
@@ -25,7 +25,9 @@
 !
 !=====================================================================
 
-  subroutine earth_chunk_HEX8_Mesher()
+  subroutine earth_chunk_HEX8_Mesher(NGNOD)
+
+  use constants, only: NGLLX, NGLLY, NGLLZ, NDIM
 
   implicit none
 
@@ -34,7 +36,7 @@
 !  Singular option of meshfem3D : MESH OF A GLOBE EARTH CHUNK FOR THE INTERFACE DSM-SPECFEM3D  !
 !  Case of 8 nodes per element (HEX8)                                                          !
 !                                                                                              !
-!  Vadim Monteiller, February 2013                                                             !
+!  VM, February 2013                                                             !
 !  Integrated in meshfem3d by CD, September 2014                                               !
 !                                                                                              !
 !  WARNING : A local convention is used for the mapping of                                     !
@@ -46,7 +48,6 @@
 !--- Parameters
 !
 
-  integer, parameter :: NGLLX  = 5, NGLLY = 5, NGLLZ = 5, NGNOD = 8, NDIM = 3
   integer, parameter :: myrank = 0
   integer, parameter :: nlayer = 12 !! (number of layer in the model iasp91, or ak135, or prem (one more layer than the model)
 
@@ -58,6 +59,8 @@
 !--- Other
 !
 
+  integer NGNOD
+
   integer  nel_lat, nel_lon, nel_depth, NX, NY, NZ, Ndepth, nglob, kglob, ilocnum, ieoff, npointot
   integer ilat, ilon, ispec, iz, i, j, k, nspec, ia, izshift, index_mat
   integer ispec2Dxmin, ispec2Dxmax, ispec2Dymin, ispec2Dymax, ispec2Dzmin, ispec2Dzmax
@@ -116,7 +119,7 @@
   TINYVAL = 1.d-9
   ZERO    = 0.d0
 
-  open(49, file=trim(MESH)//'output_mesher_chunk.txt')
+  open(49, file=trim(MESH)//'output_mesher_chunk_HEX8.txt')
 
   if (RUN_BENCHMARK) then
 !
diff --git a/src/meshfem3D/earth_chunk_HEX8_ReadIasp91.f90 b/src/meshfem3D/earth_chunk_ReadIasp91.f90
similarity index 99%
rename from src/meshfem3D/earth_chunk_HEX8_ReadIasp91.f90
rename to src/meshfem3D/earth_chunk_ReadIasp91.f90
index 68d8d7d..7762da7 100644
--- a/src/meshfem3D/earth_chunk_HEX8_ReadIasp91.f90
+++ b/src/meshfem3D/earth_chunk_ReadIasp91.f90
@@ -26,7 +26,7 @@
 !===========================================================================
 !
 
-  subroutine earth_chunk_HEX8_ReadIasp91(vp,vs,rho,rb,n)
+  subroutine earth_chunk_ReadIasp91(vp,vs,rho,rb,n)
 
   implicit none
 
@@ -91,7 +91,7 @@
 
   return
 
-  end subroutine earth_chunk_HEX8_ReadIasp91
+  end subroutine earth_chunk_ReadIasp91
 
 !
 !===========================================================================
diff --git a/src/meshfem3D/meshfem3D.f90 b/src/meshfem3D/meshfem3D.f90
index ec2d9f0..7c4c5dd 100644
--- a/src/meshfem3D/meshfem3D.f90
+++ b/src/meshfem3D/meshfem3D.f90
@@ -414,16 +414,16 @@
 
     if (NGNOD == 8) then
       ! creates mesh in MESH/
-      call earth_chunk_HEX8_Mesher()
+      call earth_chunk_HEX8_Mesher(NGNOD)
       ! done with mesher
       stop 'Done creating a chunk of the earth Mesh (HEX8 elements), see directory MESH/'
 
     elseif (NGNOD == 27) then
       ! creates mesh in MESH/
-!! to uncomment when finished ==> call earth_chunk_HEX27_Mesher()
+! to uncomment when finished ==> ! call earth_chunk_HEX27_Mesher(NGNOD)
       ! done with mesher
       stop 'Creating a chunk of the earth Mesh not implmented yet with HEX27 elements'
-!! to uncomment when finished ==> stop 'Done creating a chunk of the earth Mesh (HEX27 elements), see directory MESH/'
+! to uncomment when finished ==> ! stop 'Done creating a chunk of the earth Mesh (HEX27 elements), see directory MESH/'
 
     else
       stop 'Bad number of nodes per hexahedron : NGNOD must be equal to 8 or 27'
diff --git a/src/meshfem3D/rules.mk b/src/meshfem3D/rules.mk
index 33fc882..7a42a3c 100644
--- a/src/meshfem3D/rules.mk
+++ b/src/meshfem3D/rules.mk
@@ -43,7 +43,7 @@ meshfem3D_TARGETS = \
 meshfem3D_OBJECTS = \
 	$O/check_mesh_quality.mesh.o \
     $O/earth_chunk_HEX8_Mesher.mesh.o \
-    $O/earth_chunk_HEX8_ReadIasp91.mesh.o \
+    $O/earth_chunk_ReadIasp91.mesh.o \
 	$O/compute_parameters.mesh.o \
 	$O/create_regions_mesh.mesh.o \
 	$O/create_visual_files.mesh.o \



More information about the CIG-COMMITS mailing list