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

Diff of /MITgcm/pkg/generic_advdiff/gad_os7mp_adv_r.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 121  C        7th order correction [i+2 i+1 i Line 121  C        7th order correction [i+2 i+1 i
121           Phi = Phi - Msk * Fac * Del           Phi = Phi - Msk * Fac * Del
122    
123           DelIp = ( Qip - Qi ) * MskI           DelIp = ( Qip - Qi ) * MskI
124           Phi = sign(1.,Phi)*sign(1.,DelIp)*abs(Phi+Eps)/abs(DelIp+Eps)           Phi = sign(1. _d 0,Phi)*sign(1. _d 0,DelIp)
125         &        *abs(Phi+Eps)/abs(DelIp+Eps)
126    
127           DelI = ( Qi - Qim ) * MskIm           DelI = ( Qi - Qim ) * MskIm
128           rp1h =sign(1.,DelI)*sign(1.,DelIp)*abs(DelI+Eps)/abs(DelIp+Eps)           rp1h =sign(1. _d 0,DelI)*sign(1. _d 0,DelIp)
129         &        *abs(DelI+Eps)/abs(DelIp+Eps)
130    
131  C        TVD limiter  C        TVD limiter
132  !        Phi = max(0., min( 2./(1-cfl), Phi, 2.*rp1h/cfl ) )  !        Phi = max(0. _d 0, min( 2./(1-cfl), Phi, 2.*rp1h/cfl ) )
133    
134  C        MP limiter  C        MP limiter
135           d2   = ( ( Qip + Qim ) - 2.*Qi  ) * MskI * MskIm           d2   = ( ( Qip + Qim ) - 2.*Qi  ) * MskI * MskIm
# Line 137  C        MP limiter Line 139  C        MP limiter
139           B = 4.*d2p1 - d2           B = 4.*d2p1 - d2
140           C = d2           C = d2
141           D = d2p1;           D = d2p1;
142           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)
143           A = 4.*d2m1 - d2           A = 4.*d2m1 - d2
144           B = 4.*d2 - d2m1           B = 4.*d2 - d2m1
145           C = d2m1           C = d2m1
146           D = d2;           D = d2;
147           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)
148           qMD = 0.5*( ( Qi + Qip ) - dp1h )           qMD = 0.5*( ( Qi + Qip ) - dp1h )
149           qUL = Qi + (1.-cfl)/cfl*( Qi-Qim )           qUL = Qi + (1.-cfl)/cfl*( Qi-Qim )
150           qLC = Qi + 0.5*( 1.+dm1h/(Qi-Qim+Eps) )*(qUL-Qi)           qLC = Qi + 0.5*( 1.+dm1h/(Qi-Qim+Eps) )*(qUL-Qi)
151           PhiMD = 2./(1.-cfl)*(qMD-Qi+Eps)/(Qip-Qi+Eps)           PhiMD = 2./(1.-cfl)*(qMD-Qi+Eps)/(Qip-Qi+Eps)
152           PhiLC = 2.*rp1h/cfl*(qLC-Qi+Eps)/(qUL-Qi+Eps)           PhiLC = 2.*rp1h/cfl*(qLC-Qi+Eps)/(qUL-Qi+Eps)
153           PhiMin = max(min(0.,PhiMD),min(0.,2.*rp1h/cfl,PhiLC))           PhiMin = max(min(0. _d 0,PhiMD),
154           PhiMax = min(max(2./(1.-cfl),PhiMD),max(0.,2.*rp1h/cfl,PhiLC))       &        min(0. _d 0,2.*rp1h/cfl,PhiLC))
155             PhiMax = min(max(2. _d 0/(1.-cfl),PhiMD),
156         &        max(0. _d 0,2.*rp1h/cfl,PhiLC))
157           Phi = max(PhiMin,min(Phi,PhiMax))           Phi = max(PhiMin,min(Phi,PhiMax))
158    
159           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