Index: palm/trunk/SOURCE/tridia_solver.f90
===================================================================
--- palm/trunk/SOURCE/tridia_solver.f90	(revision 1407)
+++ palm/trunk/SOURCE/tridia_solver.f90	(revision 1682)
@@ -1,4 +1,3 @@
- MODULE tridia_solver
-
+!> @file tridia_solver.f90
 !--------------------------------------------------------------------------------!
 ! This file is part of PALM.
@@ -20,5 +19,5 @@
 ! Current revisions:
 ! ------------------
-! 
+! Code annotations made doxygen readable 
 ! 
 ! Former revisions:
@@ -64,12 +63,14 @@
 ! Description:
 ! ------------
-! solves the linear system of equations:
-!
-! -(4 pi^2(i^2/(dx^2*nnx^2)+j^2/(dy^2*nny^2))+
-!   1/(dzu(k)*dzw(k))+1/(dzu(k-1)*dzw(k)))*p(i,j,k)+
-! 1/(dzu(k)*dzw(k))*p(i,j,k+1)+1/(dzu(k-1)*dzw(k))*p(i,j,k-1)=d(i,j,k)
-!
-! by using the Thomas algorithm
-!------------------------------------------------------------------------------!
+!> solves the linear system of equations:
+!>
+!> -(4 pi^2(i^2/(dx^2*nnx^2)+j^2/(dy^2*nny^2))+
+!>   1/(dzu(k)*dzw(k))+1/(dzu(k-1)*dzw(k)))*p(i,j,k)+
+!> 1/(dzu(k)*dzw(k))*p(i,j,k+1)+1/(dzu(k-1)*dzw(k))*p(i,j,k-1)=d(i,j,k)
+!>
+!> by using the Thomas algorithm
+!------------------------------------------------------------------------------!
+ MODULE tridia_solver
+ 
 
     USE indices,                                                               &
@@ -83,5 +84,5 @@
     IMPLICIT NONE
 
-    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddzuw !: 
+    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ddzuw !< 
 
     PRIVATE
@@ -100,4 +101,9 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> @todo Missing subroutine description.
+!------------------------------------------------------------------------------!
     SUBROUTINE tridia_init
 
@@ -109,5 +115,5 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) ::  k !: 
+       INTEGER(iwp) ::  k !< 
 
        ALLOCATE( ddzuw(0:nz-1,3) )
@@ -129,9 +135,17 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Computes the i- and j-dependent component of the matrix
+!> Provide the constant coefficients of the tridiagonal matrix for solution
+!> of the Poisson equation in Fourier space.
+!> The coefficients are computed following the method of
+!> Schmidt et al. (DFVLR-Mitteilung 84-15), which departs from Stephan
+!> Siano's original version by discretizing the Poisson equation,
+!> before it is Fourier-transformed.
+!------------------------------------------------------------------------------!
     SUBROUTINE maketri
 
-!------------------------------------------------------------------------------!
-! Computes the i- and j-dependent component of the matrix
-!------------------------------------------------------------------------------!
 
           USE arrays_3d,                                                       &
@@ -152,11 +166,11 @@
           IMPLICIT NONE
 
-          INTEGER(iwp) ::  i    !: 
-          INTEGER(iwp) ::  j    !: 
-          INTEGER(iwp) ::  k    !: 
-          INTEGER(iwp) ::  nnxh !: 
-          INTEGER(iwp) ::  nnyh !: 
-
-          REAL(wp)    ::  ll(nxl_z:nxr_z,nys_z:nyn_z) !: 
+          INTEGER(iwp) ::  i    !< 
+          INTEGER(iwp) ::  j    !< 
+          INTEGER(iwp) ::  k    !< 
+          INTEGER(iwp) ::  nnxh !< 
+          INTEGER(iwp) ::  nnyh !< 
+
+          REAL(wp)    ::  ll(nxl_z:nxr_z,nys_z:nyn_z) !< 
           !$acc declare create( ll )
 
@@ -164,12 +178,4 @@
           nnxh = ( nx + 1 ) / 2
           nnyh = ( ny + 1 ) / 2
-
-!
-!--       Provide the constant coefficients of the tridiagonal matrix for solution
-!--       of the Poisson equation in Fourier space.
-!--       The coefficients are computed following the method of
-!--       Schmidt et al. (DFVLR-Mitteilung 84-15), which departs from Stephan
-!--       Siano's original version by discretizing the Poisson equation,
-!--       before it is Fourier-transformed.
 
           !$acc kernels present( tric )
@@ -235,9 +241,11 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Substitution (Forward and Backward) (Thomas algorithm)
+!------------------------------------------------------------------------------!
     SUBROUTINE tridia_substi( ar )
 
-!------------------------------------------------------------------------------!
-! Substitution (Forward and Backward) (Thomas algorithm)
-!------------------------------------------------------------------------------!
 
           USE arrays_3d,                                                       & 
@@ -251,11 +259,11 @@
           IMPLICIT NONE
 
-          INTEGER(iwp) ::  i !: 
-          INTEGER(iwp) ::  j !: 
-          INTEGER(iwp) ::  k !: 
-
-          REAL(wp)     ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz) !: 
-
-          REAL(wp), DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1)   ::  ar1 !: 
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  j !< 
+          INTEGER(iwp) ::  k !< 
+
+          REAL(wp)     ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz) !< 
+
+          REAL(wp), DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1)   ::  ar1 !< 
           !$acc declare create( ar1 )
 
@@ -316,9 +324,11 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Substitution (Forward and Backward) (Thomas algorithm)
+!------------------------------------------------------------------------------!
     SUBROUTINE tridia_substi_overlap( ar, jj )
 
-!------------------------------------------------------------------------------!
-! Substitution (Forward and Backward) (Thomas algorithm)
-!------------------------------------------------------------------------------!
 
           USE arrays_3d,                                                       &
@@ -332,12 +342,12 @@
           IMPLICIT NONE
 
-          INTEGER(iwp) ::  i  !: 
-          INTEGER(iwp) ::  j  !: 
-          INTEGER(iwp) ::  jj !: 
-          INTEGER(iwp) ::  k  !: 
-
-          REAL(wp)     ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz) !: 
-
-          REAL(wp), DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1) ::  ar1 !:
+          INTEGER(iwp) ::  i  !< 
+          INTEGER(iwp) ::  j  !< 
+          INTEGER(iwp) ::  jj !< 
+          INTEGER(iwp) ::  k  !< 
+
+          REAL(wp)     ::  ar(nxl_z:nxr_z,nys_z:nyn_z,1:nz) !< 
+
+          REAL(wp), DIMENSION(nxl_z:nxr_z,nys_z:nyn_z,0:nz-1) ::  ar1 !<
           !$acc declare create( ar1 )
 
@@ -399,9 +409,11 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Splitting of the tridiagonal matrix (Thomas algorithm)
+!------------------------------------------------------------------------------!
     SUBROUTINE split
 
-!------------------------------------------------------------------------------!
-! Splitting of the tridiagonal matrix (Thomas algorithm)
-!------------------------------------------------------------------------------!
 
           USE arrays_3d,                                                       & 
@@ -412,7 +424,7 @@
           IMPLICIT NONE
 
-          INTEGER(iwp) ::  i !: 
-          INTEGER(iwp) ::  j !: 
-          INTEGER(iwp) ::  k !: 
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  j !< 
+          INTEGER(iwp) ::  k !< 
 !
 !--       Splitting
@@ -443,17 +455,20 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Solves the linear system of equations for a 1d-decomposition along x (see
+!> tridia)
+!>
+!> @attention when using the intel compilers older than 12.0, array tri must
+!>            be passed as an argument to the contained subroutines. Otherwise
+!>            addres faults will occur. This feature can be activated with
+!>            cpp-switch __intel11
+!>            On NEC, tri should not be passed (except for routine substi_1dd)
+!>            because this causes very bad performance.
+!------------------------------------------------------------------------------!
+ 
     SUBROUTINE tridia_1dd( ddx2, ddy2, nx, ny, j, ar, tri_for_1d )
 
-!------------------------------------------------------------------------------!
-! Solves the linear system of equations for a 1d-decomposition along x (see
-! tridia)
-!
-! Attention:  when using the intel compilers older than 12.0, array tri must
-!             be passed as an argument to the contained subroutines. Otherwise
-!             addres faults will occur. This feature can be activated with
-!             cpp-switch __intel11
-!             On NEC, tri should not be passed (except for routine substi_1dd)
-!             because this causes very bad performance.
-!------------------------------------------------------------------------------!
 
        USE arrays_3d,                                                          &
@@ -467,18 +482,18 @@
        IMPLICIT NONE
 
-       INTEGER(iwp) ::  i                  !: 
-       INTEGER(iwp) ::  j                  !: 
-       INTEGER(iwp) ::  k                  !: 
-       INTEGER(iwp) ::  nnyh               !: 
-       INTEGER(iwp) ::  nx                 !: 
-       INTEGER(iwp) ::  ny                 !: 
-       INTEGER(iwp) ::  omp_get_thread_num !: 
-       INTEGER(iwp) ::  tn                 !: 
-
-       REAL(wp)     ::  ddx2 !: 
-       REAL(wp)     ::  ddy2 !: 
-
-       REAL(wp), DIMENSION(0:nx,1:nz)     ::  ar         !: 
-       REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !: 
+       INTEGER(iwp) ::  i                  !< 
+       INTEGER(iwp) ::  j                  !< 
+       INTEGER(iwp) ::  k                  !< 
+       INTEGER(iwp) ::  nnyh               !< 
+       INTEGER(iwp) ::  nx                 !< 
+       INTEGER(iwp) ::  ny                 !< 
+       INTEGER(iwp) ::  omp_get_thread_num !< 
+       INTEGER(iwp) ::  tn                 !< 
+
+       REAL(wp)     ::  ddx2 !< 
+       REAL(wp)     ::  ddy2 !< 
+
+       REAL(wp), DIMENSION(0:nx,1:nz)     ::  ar         !< 
+       REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !< 
 
 
@@ -525,4 +540,10 @@
     CONTAINS
 
+
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> computes the i- and j-dependent component of the matrix
+!------------------------------------------------------------------------------!
 #if defined( __intel11 )
        SUBROUTINE maketri_1dd( j, tri_for_1d )
@@ -531,8 +552,4 @@
 #endif
 
-!------------------------------------------------------------------------------!
-! computes the i- and j-dependent component of the matrix
-!------------------------------------------------------------------------------!
-
           USE constants,                                                       &
               ONLY:  pi
@@ -542,16 +559,16 @@
           IMPLICIT NONE
 
-          INTEGER(iwp) ::  i    !: 
-          INTEGER(iwp) ::  j    !: 
-          INTEGER(iwp) ::  k    !: 
-          INTEGER(iwp) ::  nnxh !: 
-
-          REAL(wp)     ::  a !: 
-          REAL(wp)     ::  c !: 
-
-          REAL(wp), DIMENSION(0:nx) ::  l !: 
+          INTEGER(iwp) ::  i    !< 
+          INTEGER(iwp) ::  j    !< 
+          INTEGER(iwp) ::  k    !< 
+          INTEGER(iwp) ::  nnxh !< 
+
+          REAL(wp)     ::  a !< 
+          REAL(wp)     ::  c !< 
+
+          REAL(wp), DIMENSION(0:nx) ::  l !< 
 
 #if defined( __intel11 )
-          REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !: 
+          REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !< 
 #endif
 
@@ -599,4 +616,9 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Splitting of the tridiagonal matrix (Thomas algorithm)
+!------------------------------------------------------------------------------!
 #if defined( __intel11 )
        SUBROUTINE split_1dd( tri_for_1d )
@@ -605,15 +627,12 @@
 #endif
 
-!------------------------------------------------------------------------------!
-! Splitting of the tridiagonal matrix (Thomas algorithm)
-!------------------------------------------------------------------------------!
 
           IMPLICIT NONE
 
-          INTEGER(iwp) ::  i !: 
-          INTEGER(iwp) ::  k !: 
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  k !< 
 
 #if defined( __intel11 )
-          REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !: 
+          REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !< 
 #endif
 
@@ -634,18 +653,20 @@
 
 
+!------------------------------------------------------------------------------!
+! Description:
+! ------------
+!> Substitution (Forward and Backward) (Thomas algorithm)
+!------------------------------------------------------------------------------!
        SUBROUTINE substi_1dd( ar, tri_for_1d )
 
-!------------------------------------------------------------------------------!
-! Substitution (Forward and Backward) (Thomas algorithm)
-!------------------------------------------------------------------------------!
 
           IMPLICIT NONE
 
-          INTEGER(iwp) ::  i !: 
-          INTEGER(iwp) ::  k !: 
-
-          REAL(wp), DIMENSION(0:nx,nz)       ::  ar         !: 
-          REAL(wp), DIMENSION(0:nx,0:nz-1)   ::  ar1        !: 
-          REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !: 
+          INTEGER(iwp) ::  i !< 
+          INTEGER(iwp) ::  k !< 
+
+          REAL(wp), DIMENSION(0:nx,nz)       ::  ar         !< 
+          REAL(wp), DIMENSION(0:nx,0:nz-1)   ::  ar1        !< 
+          REAL(wp), DIMENSION(5,0:nx,0:nz-1) ::  tri_for_1d !< 
 
 !
