26 integer,
intent(in) :: ng
33 real(dp) :: gamma, scale
37 real(dp) :: cff1, cff2
39 real(r16) :: wsum, shift, cff
84 IF ((
nfast(ng).gt.0).and.(
weight(1,i,ng).lt.0.0_dp))
THEN
92 shift=shift+
weight(1,i,ng)*real(i,dp)
94 scale=scale*shift/(wsum*real(
ndtfast(ng),dp))
106 IF ((2.0_dp*abs(arg)).lt.
pi)
THEN
109 weight(1,i,ng)=0.0882_dp+(cos(arg))**2
136 shift=shift+real(i,dp)*
weight(1,i,ng)
144 IF (cff.gt.1.0_r16)
THEN
150 ELSE IF (cff.gt.0.0_r16)
THEN
156 ELSE IF (cff.lt.-1.0_r16)
THEN
162 ELSE IF (cff.lt.0.0_r16)
THEN
164 DO i=1,
nfast(ng)-1,+1
208 cff1=cff1+
weight(1,i,ng)*real(i,dp)
209 cff2=cff2+
weight(1,i,ng)*real(i*i,dp)
211 shift=shift+
weight(2,i,ng)*(real(i,dp)-0.5_dp)
216 shift=shift/real(
ndtfast(ng),dp)
220 WRITE (
stdout,40) cff1, cff2, shift, cff, wsum,
fgamma, gamma
221 IF (cff2.lt.1.0001_dp)
WRITE (
stdout,50)
225 10
FORMAT (/,
' Time Splitting Weights for Grid ',i2.2, &
226 &
':',4x,
'ndtfast = ',i3,4x,
'nfast = ',i3,/, &
227 &
' ==================================',/, &
228 & /,4x,
'Primary',12x,
'Secondary',12x, &
229 &
'Accumulated to Current Step',/)
230 20
FORMAT (i3,4f19.16)
231 30
FORMAT (/,1x,
'ndtfast, nfast = ',2i4,3x,
'nfast/ndtfast = ',f8.5)
233 40
FORMAT (/,1x,
'Centers of gravity and integrals ', &
234 &
'(values must be 1, 1, approx 1/2, 1, 1):',/, &
235 & /,3x,5f15.12,/,/,1x,
'Power filter parameters, ', &
236 &
'Fgamma, gamma = ', f8.5,2x,f8.5)
237 50
FORMAT (/,
' WARNING: unstable weights, reduce parameter', &
238 &
' Fgamma in mod_scalars.F',/)