File indexing completed on 2018-03-02 18:41:06 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
8e4c181d69 Jean*0001 # include "GAD_OPTIONS.h"
0002
0003 SUBROUTINE GAD_PQM_HAT_R(bi,bj,ix,iy,
0004 & method,mask,fbar,edge,
0005 & ohat,fhat,myThid)
0006
0007
0008
0009
0010 implicit none
0011
0012
0013 # include "SIZE.h"
0014 # include "GRID.h"
0015 # include "GAD.h"
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033 integer bi,bj
0034 integer ix,iy
0035 integer method
0036 _RL mask(1-3:Nr+3)
0037 _RL fbar(1-3:Nr+3)
0038 _RL edge(1:2,
0039 & 1-0:Nr+1)
0040 _RL ohat(1:2,
0041 & 1-3:Nr+3)
0042 _RL fhat(1:5,
0043 & 1-0:Nr+0)
0044 integer myThid
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059 integer ii,ir
0060 _RL ff00
0061 _RL ffll,ffrr
0062 _RL rhat
0063 _RL fell,ferr
0064 _RL dell,derr
0065 _RL dfds(-1:+1)
0066 _RL uhat(+1:+5)
0067 _RL lhat(+1:+5)
0068 _RL scal(+1:+2)
0069 _RL fmag,fdel
0070 integer mono
0071
0072 do ir = +1, Nr
0073
0074
0075 rhat = drF(ir) * .5 _d 0
0076
0077
0078 ff00 = fbar(ir+0)
0079 ffll = ff00
0080 & + mask(ir-1)*(fbar(ir-1)-ff00)
0081 ffrr = ff00
0082 & + mask(ir+1)*(fbar(ir+1)-ff00)
0083
0084 fell = edge(+1,ir-0)
0085 ferr = edge(+1,ir+1)
0086
0087 dell = edge(+2,ir-0)
0088 derr = edge(+2,ir+1)
0089
0090 dell = dell * rhat
0091 derr = derr * rhat
0092
0093
0094
0095 if ( method.eq.ENUM_PQM_NULL_LIMIT ) then
0096
0097 CALL GAD_PQM_FUN_NULL ( ff00,
0098 & fell,ferr,dell,derr,lhat,mono)
0099
0100
0101 elseif ( method.eq.ENUM_PQM_MONO_LIMIT ) then
0102
0103 CALL GAD_PLM_FUN_U(ffll,ff00,ffrr,dfds)
0104
0105 CALL GAD_PQM_FUN_MONO ( ff00,ffll,ffrr,
0106 & fell,ferr,dell,derr,dfds,lhat,
0107 & mono)
0108
0109
0110 elseif ( method.eq.ENUM_PQM_WENO_LIMIT ) then
0111
0112 CALL GAD_PLM_FUN_U(ffll,ff00,ffrr,dfds)
0113
0114 CALL GAD_PQM_FUN_NULL ( ff00,
0115 & fell,ferr,dell,derr,uhat,mono)
0116
0117 CALL GAD_PQM_FUN_MONO ( ff00,ffll,ffrr,
0118 & fell,ferr,dell,derr,dfds,lhat,
0119 & mono)
0120
0121 if ( mono .gt. 0) then
0122
0123
0124 fdel = abs(ffrr-ff00)+abs(ff00-ffll)
0125 fmag = abs(ffll)+abs(ff00)+abs(ffrr)
0126
0127 if (fdel .gt. 1. _d -6 * fmag) then
0128
0129
0130 CALL GAD_OSC_MUL_R(ir,+2,mask,
0131 & ohat,scal)
0132
0133 do ii = +1, +5
0134
0135 lhat(ii) = scal(1) * uhat(ii)
0136 & + scal(2) * lhat(ii)
0137 end do
0138
0139 end if
0140
0141 end if
0142
0143
0144 endif
0145
0146 do ii = +1, +5
0147
0148 fhat(ii,ir) = lhat(ii)
0149 end do
0150
0151 end do
0152
0153 return
0154
0155
0156 end