[cig-commits] [commit] master: tidy up (899c913)

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


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

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

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

commit 899c913c4435b304273fbf64675fb2fc15ceb8ba
Author: martinvandriel <vandriel at erdw.ethz.ch>
Date:   Thu Oct 16 21:37:25 2014 +0200

    tidy up


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

899c913c4435b304273fbf64675fb2fc15ceb8ba
 SOLVER/apply_masks.f90        | 16 ++++---
 SOLVER/attenuation.f90        |  2 +
 SOLVER/commpi.F90             | 97 +++++++++++++++++++++----------------------
 SOLVER/data_comm.f90          |  6 +--
 SOLVER/data_heterogeneous.f90 | 45 ++++++++++----------
 SOLVER/data_io.f90            |  1 +
 SOLVER/data_matr.f90          | 13 +++---
 SOLVER/data_mesh.f90          |  1 +
 SOLVER/data_pointwise.f90     |  6 +--
 SOLVER/data_proc.f90          |  7 +---
 SOLVER/data_source.f90        |  1 +
 SOLVER/source.f90             |  1 -
 12 files changed, 93 insertions(+), 103 deletions(-)

diff --git a/SOLVER/apply_masks.f90 b/SOLVER/apply_masks.f90
index fe61d6d..a1029ab 100644
--- a/SOLVER/apply_masks.f90
+++ b/SOLVER/apply_masks.f90
@@ -19,9 +19,8 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!=====================
+!=========================================================================================
   module apply_masks 
-!=====================
 
   use global_parameters, only: zero, realkind
 
@@ -33,11 +32,11 @@
 
 contains
 
-  ! These routine applies a mask by retaining in the array those components which do not 
-  ! belong to the axis of rotation. It sets to zero the axial components of the array, 
-  ! for the non-axisymmetric components of the variables have to vanish on the axis of 
-  ! rotation
 !-----------------------------------------------------------------------------------------
+! These routine applies a mask by retaining in the array those components which do not 
+! belong to the axis of rotation. It sets to zero the axial components of the array, 
+! for the non-axisymmetric components of the variables have to vanish on the axis of 
+! rotation
 pure subroutine apply_axis_mask_scal(u, nel, ax_array, nax_array)
   ! for a scalar array
 
@@ -100,6 +99,5 @@ pure subroutine apply_axis_mask_threecomp(u, nel, ax_array, nax_array)
 
 end subroutine apply_axis_mask_threecomp
 
-!========================
-  end module apply_masks 
-!========================
+end module apply_masks 
+!=========================================================================================
diff --git a/SOLVER/attenuation.f90 b/SOLVER/attenuation.f90
index b0610e3..abd05dd 100644
--- a/SOLVER/attenuation.f90
+++ b/SOLVER/attenuation.f90
@@ -19,6 +19,7 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
+!=========================================================================================
 module attenuation
 !< Variables and routines for viscoelastic wave propagation
 
@@ -1343,3 +1344,4 @@ end subroutine
 !-----------------------------------------------------------------------------------------
 
 end module
+!=========================================================================================
diff --git a/SOLVER/commpi.F90 b/SOLVER/commpi.F90
index f1e6ad9..196438a 100644
--- a/SOLVER/commpi.F90
+++ b/SOLVER/commpi.F90
@@ -19,9 +19,8 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!===============
+!=========================================================================================
 module commpi
-!===============
   
   ! Wrapper routines to invoke the MPI library. 
   ! This routine is the sole place for parallel interactions. 
@@ -53,7 +52,7 @@ module commpi
 
 contains
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine ppcheck(test, errmsg)
 !< Routine that checks if an  error has occured at all ranks, at some ranks, or
 !! not at all. The message is only printed once if the error occured on all
@@ -102,9 +101,9 @@ subroutine ppcheck(test, errmsg)
 #endif
 
 end subroutine
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 pure function parse_nl(str)
 !< returns the input string with all '\n' in it converted to newlines
 
@@ -121,9 +120,9 @@ pure function parse_nl(str)
   enddo
 
 end function
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine ppinit
 !< Start message-passing interface, assigning the total number of processors 
 !! nproc and each processor with its local number mynum=0,...,nproc-1.
@@ -143,9 +142,9 @@ subroutine ppinit
 #endif
 
 end subroutine ppinit
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine ppend
 !< Calls MPI_FINALIZE
   integer :: ierror
@@ -155,9 +154,9 @@ subroutine ppend
 #endif
 
 end subroutine ppend
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine pbroadcast_char(input_char,input_proc)
 
   integer, intent(in)           :: input_proc
@@ -172,9 +171,9 @@ subroutine pbroadcast_char(input_char,input_proc)
 #endif
 
 end subroutine pbroadcast_char
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine pbroadcast_log(input_log,input_proc)
 
   integer, intent(in)    :: input_proc
@@ -187,9 +186,9 @@ subroutine pbroadcast_log(input_log,input_proc)
 #endif
 
 end subroutine pbroadcast_log
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine pbroadcast_int(input_int,input_proc)
 
   integer, intent(in)    :: input_proc
@@ -202,9 +201,9 @@ subroutine pbroadcast_int(input_int,input_proc)
 #endif
 
 end subroutine pbroadcast_int
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine pbroadcast_int_arr(input_int, input_proc)
 
   integer, intent(in)    :: input_proc
@@ -212,14 +211,15 @@ subroutine pbroadcast_int_arr(input_int, input_proc)
   integer                :: ierror
 
 #ifndef serial
-  call mpi_bcast(input_int, size(input_int), MPI_INTEGER, input_proc, MPI_COMM_WORLD, ierror)
+  call mpi_bcast(input_int, size(input_int), MPI_INTEGER, input_proc, MPI_COMM_WORLD, &
+                 ierror)
   call mpi_barrier(MPI_COMM_WORLD, ierror)
 #endif
 
 end subroutine pbroadcast_int_arr
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine pbroadcast_dble(input_dble,input_proc)
 
   integer, intent(in)             :: input_proc
@@ -233,9 +233,9 @@ subroutine pbroadcast_dble(input_dble,input_proc)
 #endif
 
 end subroutine pbroadcast_dble
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 real(kind=dp) function ppmin(scal)
 
   real(kind=dp)    :: scal
@@ -252,9 +252,9 @@ real(kind=dp) function ppmin(scal)
   ppmin = buff2
 
 end function ppmin
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 real(kind=dp) function ppmax(scal)
 
   real(kind=dp)    :: scal
@@ -270,9 +270,9 @@ real(kind=dp) function ppmax(scal)
   ppmax = buff2
 
 end function ppmax
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 integer function ppmax_int(scal)
 
   integer :: scal
@@ -288,9 +288,9 @@ integer function ppmax_int(scal)
   ppmax_int = buff2
   
 end function ppmax_int
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 real(kind=realkind) function ppsum(scal)
 
   use data_comm, only: mpi_realkind
@@ -308,9 +308,9 @@ real(kind=realkind) function ppsum(scal)
   ppsum = buff2
 
 end function ppsum
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 real(kind=dp) function ppsum_dble(scal)
 
   real(kind=dp)    :: scal
@@ -327,9 +327,9 @@ real(kind=dp) function ppsum_dble(scal)
   ppsum_dble = buff2
 
 end function ppsum_dble
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 integer function ppsum_int(scal)
 
   integer :: scal
@@ -346,9 +346,9 @@ integer function ppsum_int(scal)
   ppsum_int = buff2
 
 end function ppsum_int
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine pbarrier
   integer :: ierror
  
@@ -357,9 +357,9 @@ subroutine pbarrier
 #endif
 
 end subroutine pbarrier
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine feed_buffer_solid(vec, nc)
 
   use data_comm
@@ -394,9 +394,9 @@ subroutine feed_buffer_solid(vec, nc)
 #endif
 
 end subroutine feed_buffer_solid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine send_recv_buffers_solid(nc)
 !< Solid asynchronous communication pattern with one message per proc-proc pair.
 !! for a nc-component field gvec. The arrays to map global numbers along 
@@ -439,9 +439,9 @@ subroutine send_recv_buffers_solid(nc)
 #endif
 
 end subroutine send_recv_buffers_solid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine extract_from_buffer_solid(vec,nc)
 
   use data_mesh,        only: npol, gvec_solid, igloc_solid
@@ -490,9 +490,9 @@ subroutine extract_from_buffer_solid(vec,nc)
 #endif
 
 end subroutine extract_from_buffer_solid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine feed_buffer_fluid(f)
 !< Fluid asynchronous communication pattern with one message per proc-proc pair
 !! for a single-component field gvec. The arrays to map global numbers along 
@@ -530,9 +530,9 @@ subroutine feed_buffer_fluid(f)
 #endif
 
 end subroutine feed_buffer_fluid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine send_recv_buffers_fluid
 !< Fluid asynchronous communication pattern with one message per proc-proc pair
 !! for a single-component field gvec. The arrays to map global numbers along 
@@ -573,9 +573,9 @@ subroutine send_recv_buffers_fluid
 #endif
 
 end subroutine send_recv_buffers_fluid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!-----------------------------------------------------------------------------
+!-----------------------------------------------------------------------------------------
 subroutine extract_from_buffer_fluid(f)
 !< Fluid asynchronous communication pattern with one message per proc-proc pair
 !! for a single-component field gvec. The arrays to map global numbers along 
@@ -627,8 +627,7 @@ subroutine extract_from_buffer_fluid(f)
 #endif
 
 end subroutine extract_from_buffer_fluid
-!=============================================================================
+!-----------------------------------------------------------------------------------------
 
-!===================
 end module commpi
-!===================
+!=========================================================================================
diff --git a/SOLVER/data_comm.f90 b/SOLVER/data_comm.f90
index 1e01a05..68a331c 100644
--- a/SOLVER/data_comm.f90
+++ b/SOLVER/data_comm.f90
@@ -19,12 +19,11 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!===================
+!=========================================================================================
 !> Message-passing communication variables
 !! Note: For the easy serialization of the code (see commun.f90 and commpi.f90),
 !! one still needs this module as these quantities are read in from the mesher.
 module data_comm
-!===================
 
   use global_parameters
   use linked_list
@@ -72,6 +71,5 @@ module data_comm
 
   integer, dimension(:), allocatable   :: recv_request_fluid, send_request_fluid
 
-!=======================
 end module data_comm
-!=======================
+!=========================================================================================
diff --git a/SOLVER/data_heterogeneous.f90 b/SOLVER/data_heterogeneous.f90
index c21f24d..80cd9fc 100644
--- a/SOLVER/data_heterogeneous.f90
+++ b/SOLVER/data_heterogeneous.f90
@@ -19,34 +19,31 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!===================
+!=========================================================================================
 module data_heterogeneous
-!===================
 
-use global_parameters
-implicit none
-public 
+  use global_parameters
+  implicit none
+  public 
   
-! Heterogeneous region
-   integer  :: num_het
-   character(len=10), allocatable :: het_format(:),het_funct_type(:)
-   character(len=200), allocatable :: het_file_discr(:), het_ani_discr(:), het_rel_discr(:)
-   logical, allocatable :: rdep(:),grad(:)
-   logical :: add_up, ani_hetero
-   real(kind=dp)   , allocatable :: gradrdep1(:),gradrdep2(:)
-   real(kind=dp)   , allocatable :: p_inv_dist(:), R_inv_dist(:)
-   real(kind=dp)   , allocatable :: r_het1(:),r_het2(:),th_het1(:),th_het2(:)
-   real(kind=dp)   , allocatable :: delta_rho(:), delta_vp(:), delta_vs(:)
-   real(kind=dp)   , allocatable :: a_ica(:), b_ica(:), c_ica(:), fa_theta_ica(:), &
-                                    fa_phi_ica(:), theta_slices(:)
-   integer, allocatable :: inverseshape(:)
-   integer :: num_slices
-   real(kind=dp)    :: rhetmin, rhetmax, thhetmin, thhetmax
+  ! Heterogeneous region
+  integer  :: num_het
+  character(len=10), allocatable    :: het_format(:),het_funct_type(:)
+  character(len=200), allocatable   :: het_file_discr(:), het_ani_discr(:), &
+                                       het_rel_discr(:)
+  logical, allocatable              :: rdep(:),grad(:)
+  logical                           :: add_up, ani_hetero
 
+  real(kind=dp), allocatable        :: gradrdep1(:),gradrdep2(:)
+  real(kind=dp), allocatable        :: p_inv_dist(:), R_inv_dist(:)
+  real(kind=dp), allocatable        :: r_het1(:),r_het2(:),th_het1(:),th_het2(:)
+  real(kind=dp), allocatable        :: delta_rho(:), delta_vp(:), delta_vs(:)
+  real(kind=dp), allocatable        :: a_ica(:), b_ica(:), c_ica(:), fa_theta_ica(:), &
+                                       fa_phi_ica(:), theta_slices(:)
 
+  integer, allocatable              :: inverseshape(:)
+  integer                           :: num_slices
+  real(kind=dp)                     :: rhetmin, rhetmax, thhetmin, thhetmax
 
-!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
-
-!=======================
 end module data_heterogeneous
-!=======================
+!=========================================================================================
diff --git a/SOLVER/data_io.f90 b/SOLVER/data_io.f90
index f13fc27..898c6be 100644
--- a/SOLVER/data_io.f90
+++ b/SOLVER/data_io.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/>.
 !
+
 !=========================================================================================
 !> Miscellaneous variables relevant to any read/write process such as 
 !! paths, logicals describing what to save, sampling rate of dumps
diff --git a/SOLVER/data_matr.f90 b/SOLVER/data_matr.f90
index 61e504b..4bd6432 100644
--- a/SOLVER/data_matr.f90
+++ b/SOLVER/data_matr.f90
@@ -19,10 +19,8 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
-!===================
+!=========================================================================================
 module data_matr
-!===================
-  !
   ! Global arrays (i.e. defined on each GLL point) that are
   ! needed for the mass, stiffness and boundary terms of the 
   ! temporal ODE. 
@@ -115,7 +113,9 @@ module data_matr
 
 contains
 
-subroutine set_mass_matrices(npol, nel_solid, nel_fluid, inv_mass_rho_loc, inv_mass_fluid_loc)
+!-----------------------------------------------------------------------------------------
+subroutine set_mass_matrices(npol, nel_solid, nel_fluid, inv_mass_rho_loc, &
+                             inv_mass_fluid_loc)
 
   integer, intent(in)        :: npol, nel_solid, nel_fluid
   real(kind=realkind), intent(in)  :: inv_mass_rho_loc(:,:,:), inv_mass_fluid_loc(:,:,:)
@@ -127,8 +127,7 @@ subroutine set_mass_matrices(npol, nel_solid, nel_fluid, inv_mass_rho_loc, inv_m
   inv_mass_fluid = inv_mass_fluid_loc
   
 end subroutine set_mass_matrices
+!-----------------------------------------------------------------------------------------
 
-
-!=====================
 end module data_matr
-!=====================
+!=========================================================================================
diff --git a/SOLVER/data_mesh.f90 b/SOLVER/data_mesh.f90
index 97b0fd6..f004936 100644
--- a/SOLVER/data_mesh.f90
+++ b/SOLVER/data_mesh.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/>.
 !
+
 !=========================================================================================
 module data_mesh
 
diff --git a/SOLVER/data_pointwise.f90 b/SOLVER/data_pointwise.f90
index c615655..bf38cea 100644
--- a/SOLVER/data_pointwise.f90
+++ b/SOLVER/data_pointwise.f90
@@ -19,12 +19,11 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
+!=========================================================================================
 !> This module is only known during the time loop if the strain tensor 
 !! is computed on-the-fly. The fluid section is additionally known if global 
 !! snapshots are dumped (to compute the displacement in the fluid).
-!===================
  module data_pointwise
-!===================
   
   use global_parameters, only: realkind
   
@@ -63,6 +62,5 @@
   real(kind=realkind), allocatable :: DsDxi_over_J_flu(:,:,:)
   real(kind=realkind), allocatable :: DzDxi_over_J_flu(:,:,:)
 
-!=======================
  end module data_pointwise
-!=======================
+!=========================================================================================
diff --git a/SOLVER/data_proc.f90 b/SOLVER/data_proc.f90
index ceee1ad..be02f38 100644
--- a/SOLVER/data_proc.f90
+++ b/SOLVER/data_proc.f90
@@ -19,11 +19,9 @@
 !    along with AxiSEM.  If not, see <http://www.gnu.org/licenses/>.
 !
 
+!=========================================================================================
 !> General variables pertaining to process identification
-!===================
 module data_proc
-!===================
-!
 
   implicit none
   public 
@@ -34,6 +32,5 @@ module data_proc
   logical          :: lpr                !< last processor logical flag, for write stdout 
   character(len=8) :: procstrg           !< String containing mynum to include in writes
 
-!=======================
 end module data_proc
-!=======================
+!=========================================================================================
diff --git a/SOLVER/data_source.f90 b/SOLVER/data_source.f90
index 2b3e915..8353cca 100644
--- a/SOLVER/data_source.f90
+++ b/SOLVER/data_source.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/>.
 !
+
 !=========================================================================================
 !> Variables describing anything related to the source
 module data_source
diff --git a/SOLVER/source.f90 b/SOLVER/source.f90
index 373c1e0..8f6bbe3 100644
--- a/SOLVER/source.f90
+++ b/SOLVER/source.f90
@@ -928,7 +928,6 @@ end subroutine define_bodyforce
 subroutine define_moment_tensor(iel_src2, ipol_src2, jpol_src2, source_term)
   
   use data_mesh
-  use data_spec, only : shp_deri_k
   
   use apply_masks
   use utlity



More information about the CIG-COMMITS mailing list