28 parameter(xdmin = 0.0001, xdmax = 0.9999)
33 else if (x.le.xdmax)
then
34 math_stepf = 1./( 1. + exp(1./(x - 1.) + 1./x) )
66 $ fcoeff(2)*ix*iy + fcoeff(3)*ix
69 $ fcoeff(2)*iz*ix + fcoeff(3)*iz
123 real zbqlix(43), br, cr
124 common /math_zbql01/ zbqlix, br, cr
127 integer curpos,id22,id43
128 save curpos,id22,id43
129 data curpos,id22,id43 /1,22,43/
136 xr = zbqlix(id22) - zbqlix(id43) - cr
151 if (curpos.eq.0)
then
153 elseif (id22.eq.0)
then
155 elseif (id43.eq.0)
then
186 real zbqlix(43), br, cr
187 common /math_zbql01/ zbqlix, br, cr
199 real zbq_ini(43),b_ini,c_ini
200 data (zbq_ini(il),il=1,43) /8.001441d7,5.5321801d8,
201 $ 1.69570999d8,2.88589940d8,2.91581871d8,1.03842493d8,
202 $ 7.9952507d7,3.81202335d8,3.11575334d8,4.02878631d8,
203 $ 2.49757109d8,1.15192595d8,2.10629619d8,3.99952890d8,
204 $ 4.12280521d8,1.33873288d8,7.1345525d7,2.23467704d8,
205 $ 2.82934796d8,9.9756750d7,1.68564303d8,2.86817366d8,
206 $ 1.14310713d8,3.47045253d8,9.3762426d7 ,1.09670477d8,
207 $ 3.20029657d8,3.26369301d8,9.441177d6,3.53244738d8,
208 $ 2.44771580d8,1.59804337d8,2.07319904d8,3.37342907d8,
209 $ 3.75423178d8,7.0893571d7 ,4.26059785d8,3.95854390d8,
210 $ 2.0081010d7,5.9250059d7,1.62176640d8,3.20429173d8,
212 data b_ini / 4.294967291d9 /
220 if (icall.gt.0)
return
227 tmpvar1 = mod(dnekclock(),br)
229 tmpvar1 = mod(real(seed),br)
233 tmpvar1 = zbq_ini(il-1)*3.0269d4
234 tmpvar1 = mod(tmpvar1,br)
259 integer istart,istop,iskip,iedg,nx,ny,nz
262 integer ivrt, icx, icy, icz
268 icy = mod((ivrt-1)/2,2)
270 istart = 1 + (nx-1)*icx + nx*(ny-1)*icy + nx*ny*(nz-1)*icz
275 icy = mod((ivrt-1)/2,2)
277 istop = 1 + (nx-1)*icx + nx*(ny-1)*icy + nx*ny*(nz-1)*icz
282 elseif (iedg.le.8)
then
310 integer is, ie, isk, il, jl
339 real vo(ldim), vi(ldim), va(ldim), an
343 real mat(ldim,ldim), ta(ldim)
344 real rtmp, can, can1, san, epsl
345 parameter(epsl = 1.0e-10)
351 if (abs(vi(il)-va(il)).gt.epsl) if_same = .false.
354 if (an.eq.0.0.or.if_same)
then
355 call copy(vo,vi,ldim)
360 rtmp = rtmp + va(il)**2
363 rtmp = 1.0/sqrt(rtmp)
371 mat(1,1) = can + ta(1)*ta(1)*can1
372 mat(2,1) = ta(1)*ta(2)*can1 - ta(3)*san
373 mat(1,2) = ta(1)*ta(2)*can1 + ta(3)*san
374 mat(3,1) = ta(1)*ta(3)*can1 + ta(2)*san
375 mat(1,3) = ta(1)*ta(3)*can1 - ta(2)*san
376 mat(2,2) = can + ta(2)*ta(2)*can1
377 mat(3,2) = ta(2)*ta(3)*can1 - ta(1)*san
378 mat(2,3) = ta(2)*ta(3)*can1 + ta(1)*san
379 mat(3,3) = can + ta(3)*ta(3)*can1
384 vo(il) = vo(il) + mat(jl,il)*vi(jl)
subroutine math_etovec(vec, edg, vfld, nx, ny, nz)
Extract 3D element edge.
subroutine math_zbqlini(seed)
Initialise Marsaglia-Zaman random number generator.
subroutine math_rot3da(vo, vi, va, an)
3D rotation of a vector along given axis.
real function math_zbqlu01()
Marsaglia-Zaman random number generator.
real function math_stepf(x)
Step function.
subroutine math_edgind(istart, istop, iskip, iedg, nx, ny, nz)
Give bounds for loops to extract edge of a 3D element.
real function math_ran_dst(ix, iy, iz, ieg, xl, fcoeff)
Give random distribution depending on position.
real function math_ran_rng(lower, upper)
Give random number in the defined range.