/[MITgcm]/MITgcm/pkg/generic_advdiff/gad_os7mp_adv_x.F
ViewVC logotype

Diff of /MITgcm/pkg/generic_advdiff/gad_os7mp_adv_x.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by adcroft, Sat Jan 20 21:20:11 2007 UTC revision 1.2 by mlosch, Sun Jan 21 17:25:31 2007 UTC
# Line 120  C        7th order correction [i+2 i+1 i Line 120  C        7th order correction [i+2 i+1 i
120           Phi = Phi - Msk * Fac * Del           Phi = Phi - Msk * Fac * Del
121    
122           DelIp = ( Qip - Qi ) * MskI           DelIp = ( Qip - Qi ) * MskI
123           Phi = sign(1.,Phi)*sign(1.,DelIp)*abs(Phi+Eps)/abs(DelIp+Eps)           Phi = sign(1. _d 0,Phi)*sign(1. _d 0,DelIp)
124         &        *abs(Phi+Eps)/abs(DelIp+Eps)
125    
126           DelI = ( Qi - Qim ) * MskIm           DelI = ( Qi - Qim ) * MskIm
127           rp1h =sign(1.,DelI)*sign(1.,DelIp)*abs(DelI+Eps)/abs(DelIp+Eps)           rp1h =sign(1. _d 0,DelI)*sign(1. _d 0,DelIp)
128         &        *abs(DelI+Eps)/abs(DelIp+Eps)
129    
130  C        TVD limiter  C        TVD limiter
131  !        Phi = max(0., min( 2./(1-cfl), Phi, 2.*rp1h/cfl ) )  !        Phi = max(0. _d 0, min( 2./(1-cfl), Phi, 2.*rp1h/cfl ) )
132    
133  C        MP limiter  C        MP limiter
134           d2   = ( ( Qip + Qim ) - 2.*Qi  ) * MskI * MskIm           d2   = ( ( Qip + Qim ) - 2.*Qi  ) * MskI * MskIm
# Line 136  C        MP limiter Line 138  C        MP limiter
138           B = 4.*d2p1 - d2           B = 4.*d2p1 - d2
139           C = d2           C = d2
140           D = d2p1;           D = d2p1;
141           dp1h = max(min(A,B,C,D),0.)+min(max(A,B,C,D),0.)           dp1h = max(min(A,B,C,D),0. _d 0)+min(max(A,B,C,D),0. _d 0)
142           A = 4.*d2m1 - d2           A = 4.*d2m1 - d2
143           B = 4.*d2 - d2m1           B = 4.*d2 - d2m1
144           C = d2m1           C = d2m1
145           D = d2;           D = d2;
146           dm1h = max(min(A,B,C,D),0.)+min(max(A,B,C,D),0.)           dm1h = max(min(A,B,C,D),0. _d 0)+min(max(A,B,C,D),0. _d 0)
147           qMD = 0.5*( ( Qi + Qip ) - dp1h )           qMD = 0.5*( ( Qi + Qip ) - dp1h )
148           qUL = Qi + (1.-cfl)/cfl*( Qi-Qim )           qUL = Qi + (1.-cfl)/cfl*( Qi-Qim )
149           qLC = Qi + 0.5*( 1.+dm1h/(Qi-Qim+Eps) )*(qUL-Qi)           qLC = Qi + 0.5*( 1.+dm1h/(Qi-Qim+Eps) )*(qUL-Qi)
150           PhiMD = 2./(1.-cfl)*(qMD-Qi+Eps)/(Qip-Qi+Eps)           PhiMD = 2./(1.-cfl)*(qMD-Qi+Eps)/(Qip-Qi+Eps)
151           PhiLC = 2.*rp1h/cfl*(qLC-Qi+Eps)/(qUL-Qi+Eps)           PhiLC = 2.*rp1h/cfl*(qLC-Qi+Eps)/(qUL-Qi+Eps)
152           PhiMin = max(min(0.,PhiMD),min(0.,2.*rp1h/cfl,PhiLC))           PhiMin = max(min(0. _d 0,PhiMD),
153           PhiMax = min(max(2./(1.-cfl),PhiMD),max(0.,2.*rp1h/cfl,PhiLC))       &        min(0. _d 0,2.*rp1h/cfl,PhiLC))
154             PhiMax = min(max(2. _d 0/(1.-cfl),PhiMD),
155         &        max(0. _d 0,2.*rp1h/cfl,PhiLC))
156           Phi = max(PhiMin,min(Phi,PhiMax))           Phi = max(PhiMin,min(Phi,PhiMax))
157    
158           Psi = Phi * 0.5 * (1. - cfl)           Psi = Phi * 0.5 * (1. - cfl)

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22