[cig-commits] [commit] master: tidy up (0c26ac3)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Fri Oct 17 05:30:27 PDT 2014


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

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/607f803cf074063627513d235f9ed0837fc1dd44...b6457db24acdde4a4e1c08935ae1b22adf87f5bf

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

commit 0c26ac3ede007d8b6181ac2e06ccf27360b38448
Author: martinvandriel <vandriel at erdw.ethz.ch>
Date:   Fri Oct 17 12:09:56 2014 +0200

    tidy up


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

0c26ac3ede007d8b6181ac2e06ccf27360b38448
 SOLVER/global_parameters.f90       |  28 +++---
 SOLVER/interpolation.f90           |  50 ++--------
 SOLVER/lateral_heterogeneities.F90 |   6 +-
 SOLVER/list.f90                    |  50 +---------
 SOLVER/main.f90                    |   1 +
 SOLVER/parameters.F90              |  13 +--
 SOLVER/pointwise_derivatives.f90   | 196 ++++++++++++-------------------------
 SOLVER/rotations.f90               |  18 ++--
 8 files changed, 97 insertions(+), 265 deletions(-)

diff --git a/SOLVER/global_parameters.f90 b/SOLVER/global_parameters.f90
index 9dbaef4..3e470d5 100644
--- a/SOLVER/global_parameters.f90
+++ b/SOLVER/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
+module global_parameters
 
-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
-!=============================
+end module global_parameters
+!=========================================================================================
diff --git a/SOLVER/interpolation.f90 b/SOLVER/interpolation.f90
index 62a33c6..da097e3 100644
--- a/SOLVER/interpolation.f90
+++ b/SOLVER/interpolation.f90
@@ -24,6 +24,8 @@
 !    http://flibs.sourceforge.net/robust_interp.f90
 !    and has been adapted for descending order arrays.
 !
+
+!=========================================================================================
 module interpolation
 
     use global_parameters, only: sp, dp
@@ -42,6 +44,7 @@ module interpolation
 
 contains
 
+!-----------------------------------------------------------------------------------------
 function interpolation_object( x, y, extrapolation )
     type(interpolation_data)        :: interpolation_object
     real(kind=dp), intent(in)       :: x(:)
@@ -62,18 +65,14 @@ function interpolation_object( x, y, extrapolation )
         deallocate(interpolation_object%y )
     endif
 
-    !
     ! Set the extrapolation method
-    !
     interpolation_object%extrapolation = extrapolation_none
     if ( extrapolation == extrapolation_constant .or. &
          extrapolation == extrapolation_linear        ) then
         interpolation_object%extrapolation = extrapolation
     endif
 
-    !
     ! Enough data? If not, simply return
-    !
     if ( size(x) < 2 .or. size(y) < size(x) ) then
         print *, 'ERROR: interpolation_object: Not enough data'
         print *, 'X: ', x
@@ -81,9 +80,7 @@ function interpolation_object( x, y, extrapolation )
         return
     endif
 
-    !
     ! Data sorted?
-    !
     success = .true.
 
     do i = 2,size(x)
@@ -98,9 +95,7 @@ function interpolation_object( x, y, extrapolation )
         return
     endif
 
-    !
     ! Copy the data
-    !
     n = size(x)
     allocate( interpolation_object%x(n), &
               interpolation_object%y(n), stat = ierr )
@@ -109,9 +104,7 @@ function interpolation_object( x, y, extrapolation )
         return
     endif
 
-    !
     ! We allow array y to be larger than x, so take care of that
-    !
     interpolation_object%x(1:n) = x(1:n)
     interpolation_object%y(1:n) = y(1:n)
 
@@ -119,7 +112,9 @@ function interpolation_object( x, y, extrapolation )
 
 
 end function interpolation_object
+!-----------------------------------------------------------------------------------------
 
+!-----------------------------------------------------------------------------------------
 subroutine interpolate( object, xp, estimate, success )
 
     type(interpolation_data)        :: object
@@ -141,9 +136,7 @@ subroutine interpolate( object, xp, estimate, success )
         return
     endif
 
-    !
     ! Check extrapolation
-    !
     nd = size(object%x)
 
     if ( object%extrapolation == extrapolation_none ) then
@@ -171,11 +164,8 @@ subroutine interpolate( object, xp, estimate, success )
         endif
     endif
 
-    !
     ! Search for the interval that contains xp
-    ! (Linear extrapolation is taken care of
-    ! automatically)
-    !
+    ! (Linear extrapolation is taken care of automatically)
     idx = nd - 1
 
     do i = 2,nd - 1
@@ -197,31 +187,7 @@ subroutine interpolate( object, xp, estimate, success )
     success  = .true.
 
 end subroutine interpolate
-
-!real function simple_interpolate( x, y, xp )
-!
-!    real, dimension(:), intent(in) :: x
-!    real, dimension(:), intent(in)  :: y
-!    real, intent(in)                :: xp
-!
-!    integer                         :: i
-!    integer                         :: idx
-!
-!    !
-!    ! Search for the interval that contains xp
-!    !
-!    idx = size(x) - 1
-!
-!    do i = 2,size(x)-1
-!        if ( xp < x(i) ) then
-!            idx = i - 1
-!            exit
-!        endif
-!    enddo
-!
-!    simple_interpolate = y(idx) + (xp - x(idx)) * (y(idx+1) - y(idx)) / &
-!                      (x(idx+1) -  x(idx))
-!
-!end function simple_interpolate
+!-----------------------------------------------------------------------------------------
 
 end module interpolation
+!=========================================================================================
diff --git a/SOLVER/lateral_heterogeneities.F90 b/SOLVER/lateral_heterogeneities.F90
index 11b0198..fe79671 100644
--- a/SOLVER/lateral_heterogeneities.F90
+++ b/SOLVER/lateral_heterogeneities.F90
@@ -19,9 +19,8 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!========================
+!=========================================================================================
 module lateral_heterogeneities
-!========================
 
   use global_parameters
   use data_heterogeneous
@@ -1929,6 +1928,7 @@ subroutine write_VTK_bin_scal_pts(u2, mesh1, rows, filename, varname)
    !write(6,*)'...saved ',trim(filename)//'.vtk'
 
 end subroutine write_VTK_bin_scal_pts
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 
 end module lateral_heterogeneities
+!=========================================================================================
diff --git a/SOLVER/list.f90 b/SOLVER/list.f90
index 82e52f1..b04718d 100644
--- a/SOLVER/list.f90
+++ b/SOLVER/list.f90
@@ -19,9 +19,8 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!=================
+!=========================================================================================
 module linked_list
-!=================
 
   use global_parameters
   implicit none
@@ -292,50 +291,5 @@ subroutine free(this)
 end subroutine free
 !-----------------------------------------------------------------------------------------
 
-!=====================
 end module linked_list
-!=====================
-
-
-!program test_list
-!  use linked_list
-!  use global_parameters
-!  implicit none
-!
-!  type(list)            :: l
-!  class(link), pointer  :: ll
-!  real(kind=realkind)   :: a(2,2), b(1,2)
-!
-!  a = 0
-!  b = 1
-!  write(6,*) 'eol', l%eol()
-!  write(6,*) 'bol', l%bol()
-!  call l%append(a)
-!  call l%append(b)
-!
-!  write(6,*) 'first'
-!  ll => l%getFirst()
-!  write(6,*) ll%ldata
-!  a = 2
-!  call l%append(a(1:1,1:1))
-!  a = -1
-!  call l%insert(a)
-!  ll => l%getFirst()
-!
-!  write(6,*) ll%ldata
-!  ll => l%getNext()
-!  write(6,*) ll%ldata
-!
-!  call l%resetCurrent()
-!  do while(.not. l%eol())
-!    ll => l%getNext()
-!    write(6,*) 'fw loop', ll%ldata
-!    ll%ldata = 10
-!  enddo
-!
-!  call l%resetCurrent()
-!  do while(.not. l%eol())
-!    ll => l%getNext()
-!    write(6,*) 'fw loop', ll%ldata
-!  enddo
-!end program
+!=========================================================================================
diff --git a/SOLVER/main.f90 b/SOLVER/main.f90
index 701c8de..4a35db3 100644
--- a/SOLVER/main.f90
+++ b/SOLVER/main.f90
@@ -18,6 +18,7 @@
 !    You should have received a copy of the GNU General Public License
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
+
 !=========================================================================================
 program axisem 
 
diff --git a/SOLVER/parameters.F90 b/SOLVER/parameters.F90
index 5fc257b..371b449 100644
--- a/SOLVER/parameters.F90
+++ b/SOLVER/parameters.F90
@@ -18,6 +18,7 @@
 !    You should have received a copy of the GNU General Public License
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
+
 !=========================================================================================
 !> Read parameters for the general solver (i.e. NOT mesh, sources, receivers);
 !! compute other parameters for the simulation;
@@ -1658,18 +1659,6 @@ subroutine write_parameters
                     '3D_RTOP        ', router/1000.,&
                     '3D_RBOT         3190.'
            
-           ! deactivated because of bug #30 and to avoid confusion in the
-           ! tutorial
-           !write(9,'(a,/,a,/)') &
-           !         '# colatitude of meridional cross section', &
-           !         '3D_MERI_COLAT   60.'
-           !         
-           !write(9,'(a,/,a,/,a,/,a,/)') &
-           !         '# switches for bottom, top and meridonial surface', &
-           !         '3D_PLOT_TOP     T', &
-           !         '3D_PLOT_BOT     T', &
-           !         '3D_PLOT_MERI    F'
-
            write(9,'(a,/,a,/,a,/)') &
                     '# switches for bottom, top and meridonial surface', &
                     '3D_PLOT_TOP     T', &
diff --git a/SOLVER/pointwise_derivatives.f90 b/SOLVER/pointwise_derivatives.f90
index 796f4e1..0e3a557 100644
--- a/SOLVER/pointwise_derivatives.f90
+++ b/SOLVER/pointwise_derivatives.f90
@@ -19,10 +19,8 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!========================
-MODULE pointwise_derivatives
-!========================
-  !
+!=========================================================================================
+module pointwise_derivatives
   ! Various forms of the two basic spatial derivatives d/ds and d/dz.
   ! Pointwise refers to the notion that these derivatives are not embedded 
   ! into any integral, but merely the spectral-element based derivative. 
@@ -55,11 +53,10 @@ contains
 
 !-----------------------------------------------------------------------------------------
 pure function f_over_s_solid_el_cg4(f, iel)
-  !
   ! computes f/s using L'Hospital's rule lim f/s = lim df/ds at the axis (s = 0)
-  !
-  use data_pointwise,           ONLY: inv_s_solid
-  use data_mesh,                ONLY: naxel_solid, ax_el_solid
+
+  use data_pointwise,           only: inv_s_solid
+  use data_mesh,                only: naxel_solid, ax_el_solid
 
   real(kind=realkind),intent(in) :: f(0:,0:)
   integer,intent(in)             :: iel
@@ -78,11 +75,10 @@ end function
 
 !-----------------------------------------------------------------------------------------
 pure function f_over_s_solid_el(f, iel)
-  !
   ! computes f/s using L'Hospital's rule lim f/s = lim df/ds at the axis (s = 0)
-  !
-  use data_pointwise,           ONLY: inv_s_solid
-  use data_mesh,                ONLY: naxel_solid, ax_el_solid
+
+  use data_pointwise,           only: inv_s_solid
+  use data_mesh,                only: naxel_solid, ax_el_solid
 
   use data_mesh, only: npol
   
@@ -106,11 +102,10 @@ end function
 
 !-----------------------------------------------------------------------------------------
 pure function f_over_s_solid_el_4(f, iel)
-  !
   ! computes f/s using L'Hospital's rule lim f/s = lim df/ds at the axis (s = 0)
-  !
-  use data_pointwise,           ONLY: inv_s_solid
-  use data_mesh,                ONLY: naxel_solid, ax_el_solid
+
+  use data_pointwise,           only: inv_s_solid
+  use data_mesh,                only: naxel_solid, ax_el_solid
 
   integer, parameter             :: npol = 4 
   real(kind=realkind),intent(in) :: f(0:,0:)
@@ -133,11 +128,10 @@ end function
 
 !-----------------------------------------------------------------------------------------
 pure function f_over_s_solid(f)
-  !
   ! computes f/s using L'Hospital's rule lim f/s = lim df/ds at the axis (s = 0)
-  !
-  use data_pointwise,           ONLY: inv_s_solid
-  use data_mesh,                ONLY: naxel_solid, ax_el_solid
+ 
+  use data_pointwise,           only: inv_s_solid
+  use data_mesh,                only: naxel_solid, ax_el_solid
 
   use data_mesh,              only: npol, nel_solid
   
@@ -160,11 +154,10 @@ end function
 
 !-----------------------------------------------------------------------------------------
 pure function f_over_s_fluid(f)
-  !
   ! computes f/s using L'Hospital's rule lim f/s = lim df/ds at the axis (s = 0)
-  !
-  use data_pointwise,           ONLY: inv_s_fluid
-  use data_mesh,                ONLY: naxel_fluid, ax_el_fluid
+
+  use data_pointwise,           only: inv_s_fluid
+  use data_mesh,                only: naxel_fluid, ax_el_fluid
 
   use data_mesh,              only: npol, nel_fluid
   
@@ -185,15 +178,12 @@ pure function f_over_s_fluid(f)
 end function
 !-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_dsdf_solid(f, dsdf)
-  !
   ! Computes the partial derivative
   ! dsdf = \partial_s(f)
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_sol, DzDxi_over_J_sol
+  use data_pointwise, only: DzDeta_over_J_sol, DzDxi_over_J_sol
   use unrolled_loops
   
   use data_mesh,              only: npol, nel_solid
@@ -220,20 +210,15 @@ pure subroutine axisym_dsdf_solid(f, dsdf)
   enddo
 
 end subroutine
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_gradient_solid_el_cg4(f,grad,iel)
-  !
   ! Computes the axisymmetric gradient of scalar field f in the solid region:
   ! grad = \nabla {f} = \partial_s(f) \hat{s} + \partial_z(f) \hat{z}
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
-  !use data_pointwise, ONLY: DzDeta_over_J_sol, DzDxi_over_J_sol
-  !use data_pointwise, ONLY: DsDeta_over_J_sol, DsDxi_over_J_sol
-  use data_pointwise, ONLY: DzDeta_over_J_sol_cg4, DzDxi_over_J_sol_cg4
-  use data_pointwise, ONLY: DsDeta_over_J_sol_cg4, DsDxi_over_J_sol_cg4
+  use data_pointwise, only: DzDeta_over_J_sol_cg4, DzDxi_over_J_sol_cg4
+  use data_pointwise, only: DsDeta_over_J_sol_cg4, DsDxi_over_J_sol_cg4
   use unrolled_loops
   
   
@@ -243,27 +228,6 @@ pure subroutine axisym_gradient_solid_el_cg4(f,grad,iel)
   real(kind=realkind),dimension(1:4)    :: mxm1, mxm2
   real(kind=realkind),dimension(1:4)    :: dsdxi, dzdxi, dsdeta, dzdeta
 
-  ! less memory
-  !dzdeta(1) = DzDeta_over_J_sol(1,1,iel)
-  !dzdeta(2) = DzDeta_over_J_sol(1,3,iel)
-  !dzdeta(3) = DzDeta_over_J_sol(3,1,iel)
-  !dzdeta(4) = DzDeta_over_J_sol(3,3,iel)
-
-  !dzdxi(1) = DzDxi_over_J_sol(1,1,iel)
-  !dzdxi(2) = DzDxi_over_J_sol(1,3,iel)
-  !dzdxi(3) = DzDxi_over_J_sol(3,1,iel)
-  !dzdxi(4) = DzDxi_over_J_sol(3,3,iel)
-
-  !dsdeta(1) = DsDeta_over_J_sol(1,1,iel)
-  !dsdeta(2) = DsDeta_over_J_sol(1,3,iel)
-  !dsdeta(3) = DsDeta_over_J_sol(3,1,iel)
-  !dsdeta(4) = DsDeta_over_J_sol(3,3,iel)
-
-  !dsdxi(1) = DsDxi_over_J_sol(1,1,iel)
-  !dsdxi(2) = DsDxi_over_J_sol(1,3,iel)
-  !dsdxi(3) = DsDxi_over_J_sol(3,1,iel)
-  !dsdxi(4) = DsDxi_over_J_sol(3,3,iel)
-  
   ! 10% faster
   dzdeta(:) = DzDeta_over_J_sol_cg4(:,iel)
   dzdxi(:)  =  DzDxi_over_J_sol_cg4(:,iel)
@@ -282,15 +246,12 @@ pure subroutine axisym_gradient_solid_el_cg4(f,grad,iel)
   grad(:,2) = dsdeta * mxm1 + dsdxi * mxm2 ! dzdf
 
 end subroutine axisym_gradient_solid_el_cg4
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_gradient_solid_el_4(f,grad,iel)
-  !
   ! Computes the axisymmetric gradient of scalar field f in the solid region:
   ! grad = \nabla {f} = \partial_s(f) \hat{s} + \partial_z(f) \hat{z}
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
   use data_pointwise, only: DzDeta_over_J_sol, DzDxi_over_J_sol
   use data_pointwise, only: DsDeta_over_J_sol, DsDxi_over_J_sol
@@ -323,15 +284,12 @@ pure subroutine axisym_gradient_solid_el_4(f,grad,iel)
   grad(:,:,2) = dzdf
 
 end subroutine axisym_gradient_solid_el_4
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_gradient_solid_el(f,grad,iel)
-  !
   ! Computes the axisymmetric gradient of scalar field f in the solid region:
   ! grad = \nabla {f} = \partial_s(f) \hat{s} + \partial_z(f) \hat{z}
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
   use data_pointwise, only: DzDeta_over_J_sol, DzDxi_over_J_sol
   use data_pointwise, only: DsDeta_over_J_sol, DsDxi_over_J_sol
@@ -365,18 +323,15 @@ pure subroutine axisym_gradient_solid_el(f,grad,iel)
   grad(:,:,2) = dzdf
 
 end subroutine axisym_gradient_solid_el
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_gradient_solid(f,grad)
-  !
   ! Computes the axisymmetric gradient of scalar field f in the solid region:
   ! grad = \nabla {f} = \partial_s(f) \hat{s} + \partial_z(f) \hat{z}
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_sol, DzDxi_over_J_sol
-  use data_pointwise, ONLY: DsDeta_over_J_sol, DsDxi_over_J_sol
+  use data_pointwise, only: DzDeta_over_J_sol, DzDxi_over_J_sol
+  use data_pointwise, only: DsDeta_over_J_sol, DsDxi_over_J_sol
   use unrolled_loops
   
   use data_mesh, only   : npol, nel_solid
@@ -408,11 +363,10 @@ pure subroutine axisym_gradient_solid(f,grad)
   enddo
 
 end subroutine axisym_gradient_solid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_gradient_solid_add(f,grad)
-  !
   ! Computes the axisymmetric gradient of scalar field f in the solid region:
   ! grad = \nabla {f} = \partial_s(f) \hat{s} + \partial_z(f) \hat{z}
   ! This routine takes a previously calculated derivative and adds it
@@ -420,11 +374,9 @@ pure subroutine axisym_gradient_solid_add(f,grad)
   ! This saves the strain dump output two global fields, as the strain 
   ! trace will hereby be dumped as well as the entire E_31 term instead 
   ! of its two cross-derivative contributions.
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_sol,DzDxi_over_J_sol
-  use data_pointwise, ONLY: DsDeta_over_J_sol,DsDxi_over_J_sol
+  use data_pointwise, only: DzDeta_over_J_sol,DzDxi_over_J_sol
+  use data_pointwise, only: DsDeta_over_J_sol,DsDxi_over_J_sol
   use unrolled_loops
   
   use data_mesh, only   : npol, nel_solid
@@ -461,17 +413,14 @@ pure subroutine axisym_gradient_solid_add(f,grad)
  enddo
 
 end subroutine axisym_gradient_solid_add
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine dsdf_elem_solid(dsdf,f,iel)
-  !
   ! Computes the elemental s-derivative of scalar field f in the solid region.
   ! This is used to compute the source term within the source element only.
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_sol,DzDxi_over_J_sol
+  use data_pointwise, only: DzDeta_over_J_sol,DzDxi_over_J_sol
   use unrolled_loops
  
   use data_mesh, only: npol
@@ -495,17 +444,14 @@ pure subroutine dsdf_elem_solid(dsdf,f,iel)
   dsdf = dzdeta * mxm1 + dzdxi * mxm2
 
 end subroutine dsdf_elem_solid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine dzdf_elem_solid(dzdf,f,iel)
-  !
   ! Computes the elemental z-derivative of scalar field f in the solid region.
   ! This is used to compute the source term within the source element only.
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DsDeta_over_J_sol,DsDxi_over_J_sol
+  use data_pointwise, only: DsDeta_over_J_sol,DsDxi_over_J_sol
   use unrolled_loops
   
   use data_mesh, only: npol
@@ -528,17 +474,14 @@ pure subroutine dzdf_elem_solid(dzdf,f,iel)
   dzdf = dsdeta * mxm1 + dsdxi * mxm2
 
 end subroutine dzdf_elem_solid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine dsdf_solid_allaxis(f,dsdf)
-  !
   ! Computes the pointwise derivative of scalar f in the s-direction 
-  ! within the solid region, ONLY AT THE AXIS (needed for solid displacement)
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
+  ! within the solid region, only AT THE AXIS (needed for solid displacement)
   
-  use data_pointwise, ONLY: DzDeta_over_J_sol, DzDxi_over_J_sol
+  use data_pointwise, only: DzDeta_over_J_sol, DzDxi_over_J_sol
   use unrolled_loops
 
   use data_mesh, only: npol, nel_solid
@@ -560,18 +503,15 @@ pure subroutine dsdf_solid_allaxis(f,dsdf)
   enddo
 
 end subroutine dsdf_solid_allaxis
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_gradient_fluid(f,grad)
-  !
   ! Computes the axisymmetric gradient of scalar field f in the fluid region:
   ! grad = \nabla {f}  = \partial_s(f) \hat{s} + \partial_z(f) \hat{z}
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_flu,DzDxi_over_J_flu
-  use data_pointwise, ONLY: DsDeta_over_J_flu,DsDxi_over_J_flu
+  use data_pointwise, only: DzDeta_over_J_flu,DzDxi_over_J_flu
+  use data_pointwise, only: DsDeta_over_J_flu,DsDxi_over_J_flu
   use unrolled_loops
   
   use data_mesh, only: npol, nel_fluid
@@ -602,11 +542,10 @@ pure subroutine axisym_gradient_fluid(f,grad)
  enddo
 
 end subroutine axisym_gradient_fluid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine axisym_gradient_fluid_add(f,grad)
-  !
   ! Computes the axisymmetric gradient of scalar field f in the fluid region:
   ! grad = \nabla {f} = \partial_s(f) \hat{s} + \partial_z(f) \hat{z}
   ! This routine takes a previously calculated derivative and adds it
@@ -614,11 +553,9 @@ pure subroutine axisym_gradient_fluid_add(f,grad)
   ! This saves the strain dump output two global fields, as the strain 
   ! trace will hereby be dumped as well as the entire E_31 term instead 
   ! of its two cross-derivative contributions.
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_flu,DzDxi_over_J_flu
-  use data_pointwise, ONLY: DsDeta_over_J_flu,DsDxi_over_J_flu
+  use data_pointwise, only: DzDeta_over_J_flu,DzDxi_over_J_flu
+  use data_pointwise, only: DsDeta_over_J_flu,DsDxi_over_J_flu
   use unrolled_loops
   
   use data_mesh, only: npol, nel_fluid
@@ -655,18 +592,15 @@ pure subroutine axisym_gradient_fluid_add(f,grad)
  enddo
 
 end subroutine axisym_gradient_fluid_add
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine dsdf_fluid_axis(f, iel, jpol, dsdf)
-  !
   ! Computes the pointwise derivative of scalar f in the s-direction 
-  ! within the fluid region, ONLY AT THE AXIS (needed for fluid displacement)
+  ! within the fluid region, only AT THE AXIS (needed for fluid displacement)
   ! and for a specific element iel and etsa coordinate index jpol.
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_flu, DzDxi_over_J_flu
+  use data_pointwise, only: DzDeta_over_J_flu, DzDxi_over_J_flu
   use unrolled_loops
   use data_mesh, only: npol
   
@@ -684,18 +618,15 @@ pure subroutine dsdf_fluid_axis(f, iel, jpol, dsdf)
   dsdf = dsdf_el(0,jpol)
 
 end subroutine dsdf_fluid_axis
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure subroutine dsdf_fluid_allaxis(f,dsdf)
-  !
   ! Computes the pointwise derivative of scalar f in the s-direction 
-  ! within the fluid region, ONLY AT THE AXIS (needed for fluid displacement)
+  ! within the fluid region, only AT THE AXIS (needed for fluid displacement)
   ! for all axial elements.
-  !
-  !-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
   
-  use data_pointwise, ONLY: DzDeta_over_J_flu, DzDxi_over_J_flu
+  use data_pointwise, only: DzDeta_over_J_flu, DzDxi_over_J_flu
   use unrolled_loops
   
   use data_mesh, only: npol, nel_fluid
@@ -717,8 +648,7 @@ pure subroutine dsdf_fluid_allaxis(f,dsdf)
   enddo
 
 end subroutine dsdf_fluid_allaxis
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!========================
 end module pointwise_derivatives
-!========================
+!=========================================================================================
diff --git a/SOLVER/rotations.f90 b/SOLVER/rotations.f90
index 7901811..31407d5 100644
--- a/SOLVER/rotations.f90
+++ b/SOLVER/rotations.f90
@@ -19,7 +19,7 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!-----------------------------------------------------------------------------
+!=========================================================================================
 module rotations
 
   use global_parameters
@@ -35,7 +35,7 @@ module rotations
 
 contains
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine def_rot_matrix
 
   if (lpr) then
@@ -60,9 +60,9 @@ subroutine def_rot_matrix
   trans_rot_mat = transpose(rot_mat)
 
 end subroutine def_rot_matrix
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine rotate_receivers_recfile(num_rec_glob, rcvcolat, rcvlon1, receiver_name)
 
   integer, intent(in)             :: num_rec_glob
@@ -134,12 +134,10 @@ subroutine rotate_receivers_recfile(num_rec_glob, rcvcolat, rcvlon1, receiver_na
      close(99991)
   endif
 
-
-
 end subroutine rotate_receivers_recfile
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine save_google_earth_kml(srccolat1, srclon1, rcvcolat, rcvlon, &
                                  num_rec_glob, fname, receiver_name)
 
@@ -253,7 +251,7 @@ subroutine save_google_earth_kml(srccolat1, srclon1, rcvcolat, rcvlon, &
 20 format(A18,f8.2,f8.2)
 
 end subroutine save_google_earth_kml
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
 end module rotations
-!-----------------------------------------------------------------------------
+!=========================================================================================



More information about the CIG-COMMITS mailing list