[cig-commits] [commit] master: adapting to axisem style (71d69b1)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Oct 17 06:50:18 PDT 2014
Repository : https://github.com/geodynamics/axisem
On branch : master
Link : https://github.com/geodynamics/axisem/compare/310e69b719432ecd5a84ca462e72e3e9b78e68c8...71d69b1b4050069398bdbbb4b069ce8780f3b96b
>---------------------------------------------------------------
commit 71d69b1b4050069398bdbbb4b069ce8780f3b96b
Author: martinvandriel <vandriel at erdw.ethz.ch>
Date: Fri Oct 17 15:50:41 2014 +0200
adapting to axisem style
>---------------------------------------------------------------
71d69b1b4050069398bdbbb4b069ce8780f3b96b
MESHER/analytic_mapping.f90 | 2 ++
MESHER/data_bkgrdmodel.f90 | 7 ++---
MESHER/data_coarse.f90 | 3 ++
MESHER/data_diag.f90 | 6 ++--
MESHER/data_gllmesh.f90 | 2 ++
MESHER/data_grid.f90 | 2 ++
MESHER/data_mesh.f90 | 4 +++
MESHER/data_numbering.f90 | 10 ++++---
MESHER/data_pdb.f90 | 6 ++--
MESHER/data_spec.f90 | 13 +++++----
MESHER/data_time.f90 | 2 ++
MESHER/discont_meshing.f90 | 2 ++
MESHER/gllmeshgen.f90 | 2 ++
MESHER/global_parameters.f90 | 24 ++++++----------
MESHER/input.f90 | 6 ++--
MESHER/main.f90 | 19 ++++--------
MESHER/mesh_info.f90 | 2 ++
MESHER/meshgen.f90 | 2 ++
MESHER/model_discontinuities.f90 | 62 ++++++++++++++++++++--------------------
19 files changed, 94 insertions(+), 82 deletions(-)
diff --git a/MESHER/analytic_mapping.f90 b/MESHER/analytic_mapping.f90
index c9186c4..417dc14 100644
--- a/MESHER/analytic_mapping.f90
+++ b/MESHER/analytic_mapping.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module analytic_mapping
use analytic_spheroid_mapping
@@ -48,3 +49,4 @@ end function mapping_anal
!-----------------------------------------------------------------------------------------
end module analytic_mapping
+!=========================================================================================
diff --git a/MESHER/data_bkgrdmodel.f90 b/MESHER/data_bkgrdmodel.f90
index 862aa27..476d378 100644
--- a/MESHER/data_bkgrdmodel.f90
+++ b/MESHER/data_bkgrdmodel.f90
@@ -19,9 +19,8 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
-!===================
+!=========================================================================================
module data_bkgrdmodel
-!===================
use global_parameters, only : dp, sp
implicit none
@@ -49,6 +48,6 @@ module data_bkgrdmodel
! The following variables are only needed by external models
character(len=100) :: fnam_ext_model
-!===================
+
end module data_bkgrdmodel
-!===================
+!=========================================================================================
diff --git a/MESHER/data_coarse.f90 b/MESHER/data_coarse.f90
index 23a38d8..840337c 100644
--- a/MESHER/data_coarse.f90
+++ b/MESHER/data_coarse.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module data_coarse
implicit none
@@ -29,4 +30,6 @@ module data_coarse
! central region :
integer, dimension(:), allocatable :: iclevc
+
end module data_coarse
+!=========================================================================================
diff --git a/MESHER/data_diag.f90 b/MESHER/data_diag.f90
index fdbd36c..29af40e 100644
--- a/MESHER/data_diag.f90
+++ b/MESHER/data_diag.f90
@@ -19,9 +19,8 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
-!===================
+!=========================================================================================
module data_diag
-!===================
implicit none
public
@@ -33,6 +32,5 @@ module data_diag
character(len=200) :: diagpath
integer :: lfdiag
-!===================
end module data_diag
-!===================
+!=========================================================================================
diff --git a/MESHER/data_gllmesh.f90 b/MESHER/data_gllmesh.f90
index 74c4c1b..ca13c53 100644
--- a/MESHER/data_gllmesh.f90
+++ b/MESHER/data_gllmesh.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module data_gllmesh
use global_parameters, only: sp,dp
implicit none
@@ -39,3 +40,4 @@ module data_gllmesh
real(kind=dp) :: char_time_min_rad, char_time_min_theta
end module data_gllmesh
+!=========================================================================================
diff --git a/MESHER/data_grid.f90 b/MESHER/data_grid.f90
index 57f8b41..a44ecfa 100644
--- a/MESHER/data_grid.f90
+++ b/MESHER/data_grid.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module data_grid
use global_parameters, only: sp, dp
@@ -47,3 +48,4 @@ module data_grid
real(kind=dp), dimension(:), allocatable :: rmax_el, rmin_el
logical :: southern
end module data_grid
+!=========================================================================================
diff --git a/MESHER/data_mesh.f90 b/MESHER/data_mesh.f90
index 6117c4d..6f62f1c 100644
--- a/MESHER/data_mesh.f90
+++ b/MESHER/data_mesh.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module data_mesh
use global_parameters
@@ -81,8 +82,11 @@ module data_mesh
integer, allocatable :: central_is_iz_to_globiel(:,:)
contains
+!-----------------------------------------------------------------------------------------
subroutine empty_data_mesh
deallocate(rcom, scom, zcom, thetacom)
end subroutine empty_data_mesh
+!-----------------------------------------------------------------------------------------
end module data_mesh
+!=========================================================================================
diff --git a/MESHER/data_numbering.f90 b/MESHER/data_numbering.f90
index a710f25..d1f57f4 100644
--- a/MESHER/data_numbering.f90
+++ b/MESHER/data_numbering.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module data_numbering
implicit none
@@ -27,9 +28,10 @@ module data_numbering
integer, dimension(:), allocatable :: iglob
integer, dimension(:), allocatable :: iglob_fluid
integer, dimension(:), allocatable :: iglob_solid
- integer :: nglob
- integer :: nglobglob
- integer :: nglobflob
- integer :: nglobslob
+ integer :: nglob
+ integer :: nglobglob
+ integer :: nglobflob
+ integer :: nglobslob
end module data_numbering
+!=========================================================================================
diff --git a/MESHER/data_pdb.f90 b/MESHER/data_pdb.f90
index 4adc04c..7c2c1b4 100644
--- a/MESHER/data_pdb.f90
+++ b/MESHER/data_pdb.f90
@@ -19,9 +19,8 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
-!==================
+!=========================================================================================
module data_pdb
-!==================
use global_parameters, only : sp, dp
implicit none
@@ -100,6 +99,5 @@ module data_pdb
! global to glocal mapping
integer, dimension(:,:), allocatable :: glob2gloc
-!======================
end module data_pdb
-!======================
+!=========================================================================================
diff --git a/MESHER/data_spec.f90 b/MESHER/data_spec.f90
index 8115c25..a3a64f4 100644
--- a/MESHER/data_spec.f90
+++ b/MESHER/data_spec.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module data_spec
use global_parameters, only : sp, dp
@@ -27,9 +28,11 @@ module data_spec
public
integer :: npol
- real(kind=dp) , dimension(:),allocatable :: xi_k, eta
- real(kind=dp) , dimension(:),allocatable :: dxi
- real(kind=dp) , dimension (:), allocatable :: wt !Quadrature weights
- real(kind=dp) , dimension (:), allocatable :: wt_axial_k !Quad. wgts for the
- !nonaxisymmetric components
+ real(kind=dp), dimension(:), allocatable :: xi_k, eta
+ real(kind=dp), dimension(:), allocatable :: dxi
+ real(kind=dp), dimension(:), allocatable :: wt !Quadrature weights
+ real(kind=dp), dimension(:), allocatable :: wt_axial_k !Quad. wgts for the
+ !nonaxisymmetric components
+
end module data_spec
+!=========================================================================================
diff --git a/MESHER/data_time.f90 b/MESHER/data_time.f90
index a697dde..7b254db 100644
--- a/MESHER/data_time.f90
+++ b/MESHER/data_time.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
!> Various variables around timing
module data_time
@@ -42,3 +43,4 @@ use global_parameters
integer :: iclock14, idold14
end module data_time
+!=========================================================================================
diff --git a/MESHER/discont_meshing.f90 b/MESHER/discont_meshing.f90
index 738fa01..be456c2 100644
--- a/MESHER/discont_meshing.f90
+++ b/MESHER/discont_meshing.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module discont_meshing
use global_parameters
@@ -555,3 +556,4 @@ end function max_spacing
!-----------------------------------------------------------------------------------------
end module discont_meshing
+!=========================================================================================
diff --git a/MESHER/gllmeshgen.f90 b/MESHER/gllmeshgen.f90
index 0bfdca5..ad70586 100644
--- a/MESHER/gllmeshgen.f90
+++ b/MESHER/gllmeshgen.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module gllmeshgen
use data_mesh
@@ -226,3 +227,4 @@ end subroutine test_mapping
!-----------------------------------------------------------------------------------------
end module gllmeshgen
+!=========================================================================================
diff --git a/MESHER/global_parameters.f90 b/MESHER/global_parameters.f90
index 9dbaef4..5f53a27 100644
--- a/MESHER/global_parameters.f90
+++ b/MESHER/global_parameters.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
!> This determines the precision for the memory-/CPU-intensive time loop.
!! Set the parameter realkind to either
!! sp: single precision (half memory compared to 8, faster on many systems)
@@ -26,30 +27,26 @@
!! The mesher is intrinsically double precision, as are all precomputed, mesh
!! related variables. This distinction is only relevant for the global
!! arrays used in the time evolution.
-!=========================
module global_parameters
-!=========================
-!
-use, intrinsic :: iso_fortran_env
-implicit none
-public
+ use, intrinsic :: iso_fortran_env
-!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
+ implicit none
+ public
integer, parameter :: sp = selected_real_kind(6, 37)
integer, parameter :: dp = selected_real_kind(15, 307)
integer, parameter :: qp = selected_real_kind(33, 4931)
integer, parameter :: realkind = sp !< Choose solver precision here
-! Do not change these unless problems with any of the accuracy tests arise.
-! As floating point rounding is system-dependent, there might be different
-! numbers for different systems, but the below values seem generally reasonable.
+ ! Do not change these unless problems with any of the accuracy tests arise.
+ ! As floating point rounding is system-dependent, there might be different
+ ! numbers for different systems, but the below values seem generally reasonable.
real(kind=sp), parameter :: smallval_sngl = 1e-6
real(kind=dp), parameter :: smallval_dble = 1e-11
real(kind=realkind), parameter :: smallval = smallval_sngl !< Change for dp
-! Do not change these.
+ ! Do not change these.
real(kind=dp), parameter :: zero = 0d0, half = 5d-1, third = 1d0 / 3d0
real(kind=dp), parameter :: quart = 25d-2, one = 1d0, sixth = 1d0 / 6d0
real(kind=dp), parameter :: two = 2d0, three = 3d0, four = 4d0, five = 5d0
@@ -57,8 +54,5 @@ public
real(kind=dp), parameter :: pi = 3.1415926535898D0
real(kind=dp), parameter :: epsi = 1d-30
-!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-!=============================
end module global_parameters
-!=============================
+!=========================================================================================
diff --git a/MESHER/input.f90 b/MESHER/input.f90
index 7c45cb3..12b71ef 100644
--- a/MESHER/input.f90
+++ b/MESHER/input.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module input
use data_grid
@@ -33,7 +34,7 @@ module input
contains
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine read_params
use global_parameters
@@ -177,6 +178,7 @@ subroutine read_params
call flush(6)
end subroutine read_params
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
end module input
+!=========================================================================================
diff --git a/MESHER/main.f90 b/MESHER/main.f90
index 4815672..ba72562 100644
--- a/MESHER/main.f90
+++ b/MESHER/main.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
program gllmesh
use data_grid
@@ -115,15 +116,11 @@ program gllmesh
write(6,*)'....DONE WITH MESHER !'
end program gllmesh
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine start_clock
- !
! Driver routine to start the timing, using the clocks_mod module.
- !
- !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
use data_time
use clocks_mod, only : clock_id, clocks_init
@@ -156,16 +153,12 @@ subroutine start_clock
idold13 = clock_id('define_sflocal_numbering')
idold14 = clock_id('generate_serendipity_per_proc')
-
end subroutine start_clock
-!=============================================================================
+!-----------------------------------------------------------------------------------------
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine end_clock
- !
! Wapper routine to end timing and display clock informations.
- !
- !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
use clocks_mod, only : clocks_exit
@@ -180,4 +173,4 @@ subroutine end_clock
write(6,*)
end subroutine end_clock
-!=============================================================================
+!=========================================================================================
diff --git a/MESHER/mesh_info.f90 b/MESHER/mesh_info.f90
index da4de96..b96f1fc 100644
--- a/MESHER/mesh_info.f90
+++ b/MESHER/mesh_info.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module mesh_info
use data_gllmesh
@@ -891,3 +892,4 @@ end subroutine check_boundary
!-----------------------------------------------------------------------------------------
end module mesh_info
+!=========================================================================================
diff --git a/MESHER/meshgen.f90 b/MESHER/meshgen.f90
index 0aaea00..fb949f1 100644
--- a/MESHER/meshgen.f90
+++ b/MESHER/meshgen.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module meshgen
use global_parameters, only: sp, dp
@@ -1623,3 +1624,4 @@ end subroutine donot_generate_southern_hemisphere
!-----------------------------------------------------------------------------------------
end module meshgen
+!=========================================================================================
diff --git a/MESHER/model_discontinuities.f90 b/MESHER/model_discontinuities.f90
index 9355e61..636016d 100644
--- a/MESHER/model_discontinuities.f90
+++ b/MESHER/model_discontinuities.f90
@@ -19,6 +19,7 @@
! along with AxiSEM. If not, see <http://www.gnu.org/licenses/>.
!
+!=========================================================================================
module model_discontinuities
use data_bkgrdmodel
@@ -30,7 +31,7 @@ module model_discontinuities
contains
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine define_discont
use data_diag, only: dump_1dmodel
@@ -88,9 +89,9 @@ subroutine define_discont
end if
end subroutine define_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine ak135f_discont
! Montagner and Kennett 1996
@@ -190,9 +191,9 @@ subroutine ak135f_discont
discont = discont * 1000.
end subroutine ak135f_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine ak135_discont
! Kennett et al., 1995: Constrains on seismic velocities in the Earth
@@ -267,11 +268,10 @@ subroutine ak135_discont
discont = discont * 1000.
end subroutine ak135_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_discont
-
! PREM discontinuities to be honored by the mesh
! each index represents the layer *below* its corresponding discontinuity
@@ -360,9 +360,9 @@ subroutine prem_discont
discont = discont * 1000.
end subroutine prem_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_ani_discont
! PREM discontinuities to be honored by the mesh
@@ -455,9 +455,9 @@ subroutine prem_ani_discont
discont = discont * 1000.
end subroutine prem_ani_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_solid_discont
! PREM discontinuities to be honored by the mesh
@@ -549,9 +549,9 @@ subroutine prem_solid_discont
discont = discont * 1000.
end subroutine prem_solid_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_onecrust_discont
! PREM discontinuities to be honored by the mesh
@@ -638,9 +638,9 @@ subroutine prem_onecrust_discont
discont = discont * 1000.
end subroutine prem_onecrust_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_onecrust_ani_discont
! PREM discontinuities to be honored by the mesh
@@ -728,9 +728,9 @@ subroutine prem_onecrust_ani_discont
discont = discont * 1000.
end subroutine prem_onecrust_ani_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_light_discont
! PREM LIGHT discontinuities to be honored by the mesh:
@@ -812,9 +812,9 @@ subroutine prem_light_discont
discont = discont * 1000.
end subroutine prem_light_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_light_ani_discont
! PREM discontinuities to be honored by the mesh
@@ -897,11 +897,10 @@ subroutine prem_light_ani_discont
discont = discont * 1000.
end subroutine prem_light_ani_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine prem_solid_light_discont
-
! PREM LIGHT discontinuities to be honored by the mesh:
! isotropic PREM without the crust, extending the upper mantle to the surface
! No fluid outer core, but instead vs=vp/sqrt(3)
@@ -982,11 +981,10 @@ subroutine prem_solid_light_discont
discont = discont * 1000.
end subroutine prem_solid_light_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine iasp91_discont
-
! IASP91 discontinuities to be honored by the mesh
! each index represents the layer *below* its corresponding discontinuity
@@ -1101,9 +1099,9 @@ subroutine iasp91_discont
discont = discont * 1000.
end subroutine iasp91_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine arbitrmodel_discont
use background_models, only: get_ext_disc
@@ -1121,8 +1119,9 @@ subroutine arbitrmodel_discont
end do
end subroutine arbitrmodel_discont
-!--------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
subroutine write_1Dmodel(discontinuities)
! Write out the current model in a .bm file, which can be reused by the mesher.
use global_parameters, only: smallval_dble
@@ -1350,7 +1349,8 @@ subroutine write_1Dmodel(discontinuities)
end do
close(2000)
-
-
end subroutine write_1Dmodel
+!-----------------------------------------------------------------------------------------
+
end module model_discontinuities
+!=========================================================================================
More information about the CIG-COMMITS
mailing list