New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
solsor_tam.F90 in NEMO/branches/NERC/dev_release-3.4_NEMOTAM_consolidated/NEMOGCM/NEMO/OPATAM_SRC/SOL – NEMO

source: NEMO/branches/NERC/dev_release-3.4_NEMOTAM_consolidated/NEMOGCM/NEMO/OPATAM_SRC/SOL/solsor_tam.F90 @ 10771

Last change on this file since 10771 was 4586, checked in by pabouttier, 10 years ago

Fix relative precision norme computing in sol_sor_tan, using zta, see Ticket #1279

  • Property svn:executable set to *
File size: 21.5 KB
Line 
1MODULE solsor_tam
2   !!======================================================================
3   !!                     ***  MODULE  solsor  ***
4   !! Ocean solver :  Tangent linear and Adjoint of Successive Over-Relaxation solver
5   !!=====================================================================
6   !! History :  OPA  ! 1990-10  (G. Madec)  Original code
7   !!            7.1  ! 1993-04  (G. Madec)  time filter
8   !!                 ! 1996-05  (G. Madec)  merge sor and pcg formulations
9   !!                 ! 1996-11  (A. Weaver)  correction to preconditioning
10   !!   NEMO     1.0  ! 2003-04  (C. Deltel, G. Madec)  Red-Black SOR in free form
11   !!            2.0  ! 2005-09  (R. Benshila, G. Madec)  MPI optimization
12   !!----------------------------------------------------------------------
13   !!
14   !!----------------------------------------------------------------------
15   !!   sol_sor     : Red-Black Successive Over-Relaxation solver
16   !!----------------------------------------------------------------------
17   !! * Modules used
18   USE par_oce
19   USE in_out_manager
20   USE sol_oce
21   USE solmat
22   USE lib_mpp
23   USE lbclnk
24   USE lbclnk_tam
25   USE sol_oce_tam
26   USE dom_oce
27   USE gridrandom
28   USE dotprodfld
29   USE tstool_tam
30   USE lib_fortran
31   USE wrk_nemo
32   USE timing
33   !
34   IMPLICIT NONE
35   PRIVATE
36   !
37   !! * Routine accessibility
38   PUBLIC sol_sor_adj          !
39   PUBLIC sol_sor_tan          !
40   PUBLIC sol_sor_adj_tst      ! called by tamtst.F90
41   !!----------------------------------------------------------------------
42   !! NEMO/OPA 3.3 , NEMO Consortium (2010)
43   !! $Id$
44   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
45   !!----------------------------------------------------------------------
46CONTAINS
47
48   SUBROUTINE sol_sor_tan( kt, kindic )
49      !!----------------------------------------------------------------------
50      !!                  ***  ROUTINE sol_sor_tan : TL of sol_sor  ***
51      !!
52      !! ** Purpose :   Solve the ellipic equation for the barotropic stream
53      !!      function system (lk_dynspg_rl=T) or the transport divergence
54      !!      system (lk_dynspg_flt=T) using a red-black successive-over-
55      !!      relaxation method.
56      !!       In the former case, the barotropic stream function trend has a
57      !!     zero boundary condition along all coastlines (i.e. continent
58      !!     as well as islands) while in the latter the boundary condition
59      !!     specification is not required.
60      !!       This routine provides a MPI optimization to the existing solsor
61      !!     by reducing the number of call to lbc.
62      !!
63      !! ** Method  :   Successive-over-relaxation method using the red-black
64      !!      technique. The former technique used was not compatible with
65      !!      the north-fold boundary condition used in orca configurations.
66      !!      Compared to the classical sol_sor, this routine provides a
67      !!      mpp optimization by reducing the number of calls to lnc_lnk
68      !!      The solution is computed on a larger area and the boudary
69      !!      conditions only when the inside domain is reached.
70      !!
71      !! References :
72      !!      Madec et al. 1988, Ocean Modelling, issue 78, 1-6.
73      !!      Beare and Stevens 1997 Ann. Geophysicae 15, 1369-1377
74      !!
75      !! History of the direct routine:
76      !!        !  90-10  (G. Madec)  Original code
77      !!        !  91-11  (G. Madec)
78      !!   7.1  !  93-04  (G. Madec)  time filter
79      !!        !  96-05  (G. Madec)  merge sor and pcg formulations
80      !!   9.0  !  03-04  (C. Deltel, G. Madec)  Red-Black SOR in free form
81      !!   9.0  !  05-09  (R. Benshila, G. Madec)  MPI optimization
82      !! History of the  T&A routine:
83      !!        !  96-11  (A. Weaver)  correction to preconditioning
84      !!   8.2  !  03-02  (C. Deltel) OPAVAR tangent-linear version
85      !!   9.0  !  07-09  (K. Mogensen) tangent of the 03-04 version
86      !!   9.0  !  09-02  (A. Vidard)   tangent of the 05-09 version
87      !!----------------------------------------------------------------------
88      !! * Arguments
89      INTEGER, INTENT( in    ) ::   kt       ! Current timestep.
90      INTEGER, INTENT( inout ) ::   kindic   ! solver indicator, < 0 if the conver-
91      !                                      ! gence is not reached: the model is
92      !                                      ! stopped in step
93      !                                      ! set to zero before the call of solsor
94      !! * Local declarations
95      INTEGER  ::   ji, jj, jn               ! dummy loop indices
96      INTEGER  ::   ishift, icount, istp
97      REAL(wp) ::   ztmp, zres, zres2
98
99      INTEGER  ::   ijmppodd, ijmppeven
100      INTEGER  ::   ijpr2d
101      REAL(wp), POINTER, DIMENSION(:,:) ::   ztab                 ! 2D workspace
102      !!----------------------------------------------------------------------
103      !
104      IF( nn_timing == 1 )  CALL timing_start('sol_sor_tan')
105      !
106      CALL wrk_alloc( jpi, jpj, ztab )
107      !
108      ijmppeven = MOD(nimpp+njmpp+jpr2di+jpr2dj  ,2)
109      ijmppodd  = MOD(nimpp+njmpp+jpr2di+jpr2dj+1,2)
110      ijpr2d = MAX(jpr2di,jpr2dj)
111      icount = 0
112      !                                                       ! ==============
113      DO jn = 1,  nn_nmax                                         ! Iterative loop
114         !                                                    ! ==============
115         ! applied the lateral boundary conditions
116         IF( MOD(icount,ijpr2d+1) == 0 ) CALL lbc_lnk_e( gcx_tl, c_solver_pt, 1.0_wp )
117         ! Residuals
118         ! ---------
119         ! Guess black update
120         DO jj = 2-jpr2dj, nlcj - 1 + jpr2dj
121            ishift = MOD( jj-ijmppodd-jpr2dj, 2 )
122            DO ji = 2-jpr2di+ishift, nlci - 1 + jpr2di, 2
123               ztmp =                  gcb_tl(ji  ,jj  )   &
124                  &   - gcp(ji,jj,1) * gcx_tl(ji  ,jj-1)   &
125                  &   - gcp(ji,jj,2) * gcx_tl(ji-1,jj  )   &
126                  &   - gcp(ji,jj,3) * gcx_tl(ji+1,jj  )   &
127                  &   - gcp(ji,jj,4) * gcx_tl(ji  ,jj+1)
128               ! Estimate of the residual
129               zres = ztmp - gcx_tl(ji,jj)
130               gcr_tl(ji,jj) = zres * gcdmat(ji,jj) * zres
131               ! Guess update
132               gcx_tl(ji,jj) = rn_sor * ztmp + ( 1.0_wp - rn_sor ) * gcx_tl(ji,jj)
133            END DO
134         END DO
135         icount = icount + 1
136         ! applied the lateral boundary conditions
137         IF( MOD(icount,ijpr2d+1) == 0 ) CALL lbc_lnk_e( gcx_tl, c_solver_pt, 1.0_wp )
138         ! Guess red update
139         DO jj = 2-jpr2dj, nlcj-1+jpr2dj
140            ishift = MOD( jj-ijmppeven-jpr2dj, 2 )
141            DO ji = 2-jpr2di+ishift, nlci-1+jpr2di, 2
142               ztmp =                  gcb_tl(ji  ,jj  )   &
143                  &   - gcp(ji,jj,1) * gcx_tl(ji  ,jj-1)   &
144                  &   - gcp(ji,jj,2) * gcx_tl(ji-1,jj  )   &
145                  &   - gcp(ji,jj,3) * gcx_tl(ji+1,jj  )   &
146                  &   - gcp(ji,jj,4) * gcx_tl(ji  ,jj+1)
147               ! Estimate of the residual
148               zres = ztmp - gcx_tl(ji,jj)
149               gcr_tl(ji,jj) = zres * gcdmat(ji,jj) * zres
150               ! Guess update
151               gcx_tl(ji,jj) = rn_sor * ztmp + ( 1.0_wp - rn_sor ) * gcx_tl(ji,jj)
152            END DO
153         END DO
154         icount = icount + 1
155         ! test of convergence
156         IF ( (jn > nn_nmin .AND. MOD( jn-nn_nmin, nn_nmod ) == 0) .OR. jn==nn_nmax) THEN
157            SELECT CASE ( nn_sol_arp )
158            CASE ( 0 )
159               ! absolute precision (maximum value of the residual)
160               zres2 = MAXVAL( gcr_tl(2:nlci - 1,2:nlcj - 1) )
161               IF( lk_mpp )  CALL mpp_max( zres2 ) ! max over the global domain
162               ! test of convergence
163               res = SQRT( zres2 )
164               IF( zres2 < rn_resmax .OR. jn == nn_nmax ) THEN
165                  niter = jn
166                  ncut = 999
167                  ! Store number of iterations for adjoint computation
168                  istp = kt - nit000 + 1
169                  nitsor(istp) = niter
170               ENDIF
171            CASE ( 1 )                 ! relative precision
172               ztab(:,:) = 0.0_wp
173               ztab(2:nlci-1,2:nlcj-1) = gcr_tl(2:nlci-1,2:nlcj-1)
174               rnorme = glob_sum(ztab)
175               ! test of convergence
176               res = SQRT( rnorme )
177               IF( rnorme < epsr .OR. jn == nn_nmax ) THEN
178                  niter = jn
179                  ncut = 999
180                  ! Store number of iterations for adjoint computation
181                  istp = kt - nit000 + 1
182                  nitsor(istp) = niter
183               ENDIF
184            END SELECT
185            !****
186            IF(lwp)WRITE(numsol,9300) jn, res, sqrt( epsr ) / eps
1879300        FORMAT('          niter :',i6,' res :',e20.10,' b :',e20.10)
188            !****
189         ENDIF
190         ! indicator of non-convergence or explosion
191         IF( jn == nn_nmax ) nitsor(istp) = jn
192         IF( jn == nn_nmax .OR. SQRT(epsr)/eps > 1.e+20 ) kindic = -2
193         IF( ncut == 999 ) GOTO 999
194         !                                              ! =====================
195      END DO                                            ! END of iterative loop
196      !                                                 ! =====================
197999   CONTINUE
198      !  Output in gcx_tl
199      !  ----------------
200      CALL lbc_lnk_e( gcx_tl, c_solver_pt, 1.0_wp )    ! Lateral BCs
201      !
202      CALL wrk_dealloc( jpi, jpj, ztab )
203      !
204      IF( nn_timing == 1 )  CALL timing_stop('sol_sor_tan')
205      !
206   END SUBROUTINE sol_sor_tan
207   SUBROUTINE sol_sor_adj( kt, kindic )
208      !!----------------------------------------------------------------------
209      !!                  ***  ROUTINE sol_sor_adj : adjoint of sol_sor  ***
210      !!
211      !! ** Purpose :   Solve the ellipic equation for the barotropic stream
212      !!      function system (lk_dynspg_rl=T) or the transport divergence
213      !!      system (lk_dynspg_flt=T) using a red-black successive-over-
214      !!      relaxation method.
215      !!       In the former case, the barotropic stream function trend has a
216      !!     zero boundary condition along all coastlines (i.e. continent
217      !!     as well as islands) while in the latter the boundary condition
218      !!     specification is not required.
219      !!       This routine provides a MPI optimization to the existing solsor
220      !!     by reducing the number of call to lbc.
221      !!
222      !! ** Method  :   Successive-over-relaxation method using the red-black
223      !!      technique. The former technique used was not compatible with
224      !!      the north-fold boundary condition used in orca configurations.
225      !!      Compared to the classical sol_sor, this routine provides a
226      !!      mpp optimization by reducing the number of calls to lbc_lnk
227      !!      The solution is computed on a larger area and the boudary
228      !!      conditions only when the inside domain is reached.
229      !! ** Comments on adjoint routine :
230      !!      When the step in a tangent-linear DO loop is an arbitrary
231      !!      integer then care must be taken in computing the lower bound
232      !!      of the adjoint DO loop; i.e.,
233      !!
234      !!      If the tangent-linear DO loop is:  low_tl, up_tl, step
235      !!
236      !!      then the adjoint DO loop is:  low_ad, up_ad, -step
237      !!
238      !!      where  low_ad = low_tl + step * INT( ( up_tl - low_tl ) / step )
239      !!             up_ad  = low_tl
240      !!
241      !!      NB. If step = 1 then low_ad = up_tl
242      !!
243      !! References :
244      !!      Madec et al. 1988, Ocean Modelling, issue 78, 1-6.
245      !!      Beare and Stevens 1997 Ann. Geophysicae 15, 1369-1377
246      !!
247      !! History of the direct routine:
248      !!        !  90-10  (G. Madec)  Original code
249      !!        !  91-11  (G. Madec)
250      !!   7.1  !  93-04  (G. Madec)  time filter
251      !!        !  96-05  (G. Madec)  merge sor and pcg formulations
252      !!   9.0  !  03-04  (C. Deltel, G. Madec)  Red-Black SOR in free form
253      !!   9.0  !  05-09  (R. Benshila, G. Madec)  MPI optimization
254      !! History of the  T&A routine:
255      !!        !  96-11  (A. Weaver)  correction to preconditioning
256      !!   8.2  !  03-02  (C. Deltel) OPAVAR tangent-linear version
257      !!   9.0  !  07-09  (K. Mogensen, A. Weaver) adjoint of the 03-04 version
258      !!   9.0  !  09-02  (A. Vidard)  adjoint of the 05-09 version
259      !!----------------------------------------------------------------------
260      !! * Arguments
261      INTEGER, INTENT( in    ) ::   kt       ! Current timestep.
262      INTEGER, INTENT( inout ) ::   kindic   ! solver indicator, < 0 if the conver-
263      !                                      ! gence is not reached: the model is
264      !                                      ! stopped in step
265      !                                      ! set to zero before the call of solsor
266      !! * Local declarations
267      INTEGER  ::   ji, jj, jn               ! dummy loop indices
268      INTEGER  ::   ishift, icount, istp, iter, ilower
269      REAL(wp) ::   ztmpad
270
271      INTEGER  ::   ijmppodd, ijmppeven
272      INTEGER  ::   ijpr2d
273      !!----------------------------------------------------------------------
274      IF( nn_timing == 1 )  CALL timing_start('sol_sor_adj')
275      !
276      ijmppeven = MOD(nimpp+njmpp+jpr2di+jpr2dj,2)
277      ijmppodd  = MOD(nimpp+njmpp+jpr2di+jpr2dj+1,2)
278      ijpr2d = MAX(jpr2di,jpr2dj)
279      !
280      ! Fixed number of iterations
281      istp = kt - nit000 + 1
282      iter = nitsor(istp)
283      icount = iter * 2
284      !  Output in gcx_ad
285      !  ----------------
286      CALL lbc_lnk_e_adj( gcx_ad, c_solver_pt, 1.0_wp )    ! Lateral BCs
287      !                                                    ! ==============
288      DO jn = iter, 1, -1                                  ! Iterative loop
289         !                                                 ! ==============
290         ! Guess red update
291         DO jj =  nlcj-1+jpr2dj, 2-jpr2dj, -1
292            ishift = MOD( jj-ijmppeven-jpr2dj, 2 )
293            ! this weird computation is to cope with odd end of loop in the tangent
294            ilower = 2-jpr2dj+ishift + 2 * INT( ( ( nlci-1+jpr2dj )-( 2-jpr2dj+ishift ) ) / 2 )
295            DO ji = ilower, 2-jpr2dj+ishift, -2
296               ! Guess update
297               ztmpad = rn_sor * gcx_ad(ji,jj)
298               gcx_ad(ji  ,jj  ) = gcx_ad(ji  ,jj  ) * ( 1.0_wp - rn_sor )
299
300               gcb_ad(ji  ,jj  ) = gcb_ad(ji  ,jj  ) + ztmpad
301               gcx_ad(ji  ,jj-1) = gcx_ad(ji  ,jj-1) - ztmpad * gcp(ji,jj,1)
302               gcx_ad(ji-1,jj  ) = gcx_ad(ji-1,jj  ) - ztmpad * gcp(ji,jj,2)
303               gcx_ad(ji+1,jj  ) = gcx_ad(ji+1,jj  ) - ztmpad * gcp(ji,jj,3)
304               gcx_ad(ji  ,jj+1) = gcx_ad(ji  ,jj+1) - ztmpad * gcp(ji,jj,4)
305            END DO
306         END DO
307         icount = icount - 1
308         ! applied the lateral boundary conditions
309         IF( MOD(icount,ijpr2d+1) == 0 ) CALL lbc_lnk_e_adj( gcx_ad, c_solver_pt, 1.0_wp )   ! Lateral BCs
310         ! Residus
311         ! -------
312         ! Guess black update
313         DO jj = nlcj-1+jpr2dj, 2-jpr2dj, -1
314            ishift = MOD( jj-ijmppodd-jpr2dj, 2 )
315            ilower = 2-jpr2dj+ishift + 2 * INT( ( ( nlci-1+jpr2dj )-( 2-jpr2dj+ishift ) ) / 2 )
316            DO ji = ilower, 2-jpr2dj+ishift, -2
317               ! Guess update
318               ztmpad = rn_sor * gcx_ad(ji,jj)
319               gcx_ad(ji  ,jj  ) = gcx_ad(ji  ,jj  ) * ( 1.0_wp - rn_sor )
320
321               gcb_ad(ji  ,jj  ) = gcb_ad(ji  ,jj  ) + ztmpad
322               gcx_ad(ji  ,jj-1) = gcx_ad(ji  ,jj-1) - ztmpad * gcp(ji,jj,1)
323               gcx_ad(ji-1,jj  ) = gcx_ad(ji-1,jj  ) - ztmpad * gcp(ji,jj,2)
324               gcx_ad(ji+1,jj  ) = gcx_ad(ji+1,jj  ) - ztmpad * gcp(ji,jj,3)
325               gcx_ad(ji  ,jj+1) = gcx_ad(ji  ,jj+1) - ztmpad * gcp(ji,jj,4)
326            END DO
327         END DO
328        icount = icount - 1
329         ! applied the lateral boundary conditions
330         IF( MOD(icount,ijpr2d+1) == 0 ) CALL lbc_lnk_e_adj( gcx_ad, c_solver_pt, 1.0_wp )   ! Lateral BCs
331         !                                              ! =====================
332      END DO                                            ! END of iterative loop
333      !                                                 ! =====================
334      IF( nn_timing == 1 )  CALL timing_stop('sol_sor_adj')
335
336   END SUBROUTINE sol_sor_adj
337   SUBROUTINE sol_sor_adj_tst( kumadt )
338      !!-----------------------------------------------------------------------
339      !!
340      !!                  ***  ROUTINE example_adj_tst ***
341      !!
342      !! ** Purpose : Test the adjoint routine.
343      !!
344      !! ** Method  : Verify the scalar product
345      !!
346      !!                 ( L dx )^T W dy  =  dx^T L^T W dy
347      !!
348      !!              where  L   = tangent routine
349      !!                     L^T = adjoint routine
350      !!                     W   = diagonal matrix of scale factors
351      !!                     dx  = input perturbation (random field)
352      !!                     dy  = L dx
353      !!
354      !!
355      !! History :
356      !!        ! 08-08 (A. Vidard)
357      !!-----------------------------------------------------------------------
358      !! * Modules used
359
360      !! * Arguments
361      INTEGER, INTENT(IN) :: &
362         & kumadt             ! Output unit
363
364      !! * Local declarations
365      INTEGER ::  &
366         & ji,    &        ! dummy loop indices
367         & jj,    &
368         & jn,    &
369         & jk,    &
370         & kindic,&        ! flags fo solver convergence
371         & kmod,  &        ! frequency of test for the SOR solver
372         & kt              ! number of iteration
373      REAL(KIND=wp) :: &
374         & zsp1,         & ! scalar product involving the tangent routine
375         & zsp2            ! scalar product involving the adjoint routine
376      REAL(KIND=wp), DIMENSION(:,:), ALLOCATABLE :: &
377         & zgcb_tlin ,     & ! Tangent input
378         & zgcx_tlin ,     & ! Tangent input
379         & zgcx_tlout,     & ! Tangent output
380         & zgcx_adin ,     & ! Adjoint input
381         & zgcb_adout,     & ! Adjoint output
382         & zgcx_adout,     & ! Adjoint output
383         & zr             ! 3D random field
384      CHARACTER(LEN=14) :: cl_name
385      ! Allocate memory
386
387
388      ALLOCATE( &
389         & zgcb_tlin( jpi,jpj),     &
390         & zgcx_tlin( jpi,jpj),     &
391         & zgcx_tlout(jpi,jpj),     &
392         & zgcx_adin( jpi,jpj),     &
393         & zgcx_adout(jpi,jpj),     &
394         & zgcb_adout(jpi,jpj),     &
395         & zr(        jpi,jpj)      &
396         & )
397
398      ! Initialize the matrix of the elliptic equation
399
400      CALL sol_mat( nit000 + 1 )
401
402      !==================================================================
403      ! 1) dx = ( un_tl, vn_tl, hdivn_tl ) and
404      !    dy = ( hdivb_tl, hdivn_tl )
405      !==================================================================
406
407      !--------------------------------------------------------------------
408      ! Reset the tangent and adjoint variables
409      !--------------------------------------------------------------------
410      zgcb_tlin( :,:) = 0.0_wp
411      zgcx_tlin( :,:) = 0.0_wp
412      zgcx_tlout(:,:) = 0.0_wp
413      zgcx_adin( :,:) = 0.0_wp
414      zgcx_adout(:,:) = 0.0_wp
415      zgcb_adout(:,:) = 0.0_wp
416      zr(        :,:) = 0.0_wp
417      !--------------------------------------------------------------------
418      ! Initialize the tangent input with random noise: dx
419      !--------------------------------------------------------------------
420      kt=nit000
421      kindic=0
422!      kmod = nn_nmod  ! store frequency of test for the SOR solver
423!      nn_nmod = 1     ! force frequency to one (remove adj_tst dependancy to nn_nmin)
424
425      CALL grid_random( zr, c_solver_pt, 0.0_wp, stdgc )
426      DO jj = nldj, nlej
427         DO ji = nldi, nlei
428            zgcb_tlin(ji,jj) = zr(ji,jj)
429         END DO
430      END DO
431      CALL grid_random( zr, c_solver_pt, 0.0_wp, stdgc )
432      DO jj = nldj, nlej
433         DO ji = nldi, nlei
434            zgcx_tlin(ji,jj) = zr(ji,jj)
435         END DO
436      END DO
437      ncut = 1 ! reinitialize the solver convergence flag
438      gcr_tl(:,:) = 0.0_wp
439      gcb_tl(:,:) = zgcb_tlin(:,:)
440      gcx_tl(:,:) = zgcx_tlin(:,:)
441      CALL sol_sor_tan(kt, kindic)
442      zgcx_tlout(:,:) = gcx_tl(:,:)
443
444      !--------------------------------------------------------------------
445      ! Initialize the adjoint variables: dy^* = W dy
446      !--------------------------------------------------------------------
447
448      DO jj = nldj, nlej
449         DO ji = nldi, nlei
450            zgcx_adin(ji,jj) = zgcx_tlout(ji,jj)         &
451               &               * e1t(ji,jj) * e2t(ji,jj) &
452               &               * tmask(ji,jj,1)
453         END DO
454      END DO
455      !--------------------------------------------------------------------
456      ! Compute the scalar product: ( L dx )^T W dy
457      !--------------------------------------------------------------------
458      zsp1 = DOT_PRODUCT( zgcx_tlout, zgcx_adin )
459      !--------------------------------------------------------------------
460      ! Call the adjoint routine: dx^* = L^T dy^*
461      !--------------------------------------------------------------------
462      gcb_ad(:,:) = 0.0_wp
463      gcx_ad(:,:) = zgcx_adin(:,:)
464      CALL sol_sor_adj(kt, kindic)
465      zgcx_adout(:,:) = gcx_ad(:,:)
466      zgcb_adout(:,:) = gcb_ad(:,:)
467
468      zsp2 =  DOT_PRODUCT( zgcx_tlin, zgcx_adout ) &
469         & + DOT_PRODUCT( zgcb_tlin, zgcb_adout )
470
471      cl_name = 'sol_sor_adj  '
472      CALL prntst_adj( cl_name, kumadt, zsp1, zsp2 )
473!      nn_nmod = kmod  ! restore initial frequency of test for the SOR solver
474
475      nitsor(:) = jp_it0adj
476
477      DEALLOCATE(      &
478         & zgcb_tlin,  &
479         & zgcx_tlin,  &
480         & zgcx_tlout, &
481         & zgcx_adin,  &
482         & zgcx_adout, &
483         & zgcb_adout, &
484         & zr          &
485         & )
486   END SUBROUTINE sol_sor_adj_tst
487END MODULE solsor_tam
488
Note: See TracBrowser for help on using the repository browser.