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.
sol_oce.F90 in trunk/NEMO/OPA_SRC/SOL – NEMO

source: trunk/NEMO/OPA_SRC/SOL/sol_oce.F90 @ 120

Last change on this file since 120 was 120, checked in by opalod, 20 years ago

CT : UPDATE070 : Optimisation of the Red-Black SOR algorithm convergence

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
1MODULE sol_oce
2   !!======================================================================
3   !!                    ***  MODULE  sol_oce  ***
4   !! Ocean solver :  solver variables defined in memory
5   !!=====================================================================
6   !!
7   !! ** Purpose :   Define in memory solver variables
8   !!
9   !! History :
10   !!   9.0  !  02-11  (G. Madec)  F90: Free form and module
11   !!----------------------------------------------------------------------
12   !!  OPA 9.0 , LODYC-IPSL (2003)
13   !!----------------------------------------------------------------------
14   !! * Modules used
15   USE par_oce         ! ocean parameters
16
17   IMPLICIT NONE
18   PRIVATE
19
20   !!-----------------------------------
21   !! elliptic solver: SOR, PCG or FETI
22   !! ----------------------------------
23   INTEGER , PUBLIC ::      & !!: namsol   elliptic solver / island / free surface
24      nsolv    =    1 ,     &  !: = 1/2/3 type of elliptic solver
25      nsol_arp =    0 ,     &  !: = 0/1 absolute/relative precision convergence test
26      nmin     =  300 ,     &  !: minimum of iterations for the SOR solver
27      nmax     =  800 ,     &  !: maximum of iterations for the SOR solver
28      nmod     =   10 ,     &  !: frequency of test for the SOR solver
29      nmisl    = 4000          !: maximum pcg iterations for island
30     
31   REAL(wp), PUBLIC ::      & !!: namsol   elliptic solver / island / free surface
32      eps    =  1.e-6_wp ,  &  !: absolute precision of the solver
33      resmax = 1.e-14_wp ,  &  !: absolute precision for the SOR solver
34      sor    =   1.92_wp ,  &  !: optimal coefficient for the SOR solver
35      epsisl = 1.e-10_wp ,  &  !: absolute precision on stream function solver
36      rnu    =    1.0_wp       !: strength of the additional force used in free surface
37
38   CHARACTER(len=1), PUBLIC ::   &  !:
39      c_solver_pt = 'T'        !: nature of grid-points T (S) for free surface case
40      !                        !                        F (G) for rigid-lid case
41
42   INTEGER , PUBLIC ::   &  !:
43      ncut,         &  !: indicator of solver convergence
44      niter            !: number of iteration done by the solver
45
46   REAL(wp), PUBLIC ::   &  !:
47      epsr,         &  !: relative precision for SOR & PCG solvers
48      epsilo,       &  !: precision for the FETI solver
49      rnorme, res,  &  !: intermediate modulus, solver residu
50      alph,         &  !: coefficient  =(gcr,gcr)/(gcx,gccd)
51      beta,         &  !: coefficient  =(rn+1,rn+1)/(rn,rn)
52      radd,         &  !: coefficient  =(gccd,gcdes)
53      rr               !: coefficient  =(rn,rn)
54
55   REAL(wp), PUBLIC, DIMENSION(jpi,jpj,4) ::   &  !:
56      gcp              !: barotropic matrix extra-diagonal elements
57
58   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !:
59      gcx, gcxb,    &  !: now, before solution of the elliptic equation
60      gcdprc,       &  !: inverse diagonal preconditioning matrix
61      gcdmat,       &  !: diagonal preconditioning matrix
62      gcb,          &  !: second member of the barotropic linear system
63      gcr,          &  !: residu =b-a.x
64      gcdes,        &  !: vector descente
65      gccd             !: vector such that ca.gccd=a.d (ca-1=gcdprc)
66
67#if defined key_feti
68   !!----------------------------------------------------------------------
69   !!   'key_feti' :                                            FETI solver
70   !!----------------------------------------------------------------------
71   !!      noeuds           : total number of nodes for a subdomnain
72   !!      ninterf          : neighbour subdomain number
73   !!      nni              : interface point number
74   !!      ndvois()         : neighbour subdomain list
75   !!      maplistin()      : node pointer at each interface
76   !!      malistin()       : concatened list of interface nodes
77
78   INTEGER, PUBLIC :: nim,nxm,   &
79       malxm,malim,malxmax,malimax,   &
80       nifmat,njfmat,nelem,npe,matopo,   &
81       noeuds,nmorse,maan,   &
82       ninterf,ninterfc,nni,nnic,nnih,nnitot,ndir,   &
83       mandvois,mandvoisc,   &
84       maplistin,maplistih,malistin,   &
85       malisdir,npblo,mablo,ndlblo,ndkerep,   &
86       malisblo,mansp,ndimax,   &
87       miax,may,maz,mapoids,   &
88       nmaxd,mjj0,nitmax,ntest,   &
89       mabitw,mautilu,malambda,mag,mamg,mapg,mawj,madwj,madwwj,   &
90       magh,maw,madw,   &
91       mautil,mav,madia,mabufin,mabufout,mawork,maae,magamm,   &
92       maxnul,maynul,numit0ete,nitmaxete,maeteg,maeteag,   &
93       maeted,maetead,maeteadd,maetegamm,maetev,maetew,   &
94       madwork
95
96   INTEGER, PUBLIC :: mfet(jpi*jpj+2*jpi+2*jpj+51)
97
98   REAL(wp), PUBLIC ::   &  !:
99      wfeti(jpj*jpi*jpi+13*jpi*jpj+19*(jpi+jpj)   &
100       +4*jpnij+33   &
101       +2*(jpi+jpj)*(jpnij-jpni)*jpi   &
102       +2*(jpi+jpj)*(jpnij-jpnj+jperio)*jpj   &
103       +3*(jpnij-jpni)*jpi   &
104       +3*(jpnij-jpnj+jperio)*jpj) 
105
106   REAL(wp), PUBLIC ::   res2, rcompt
107
108#endif
109
110   !!----------------------------------------------------------------------
111END MODULE sol_oce
Note: See TracBrowser for help on using the repository browser.