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