104 if (icalld.eq.0) tinv3=0.0
120 REAL A(1),B(1),C(1),D(1)
142 REAL A(1),B(1),C(1),D(1)
147 a(i)=a(i)+b(i)*c(i)*d(i)
153 REAL A(1),B(1),C(1),D(1),E(1)
158 a(i) = b(i)*c(i)-d(i)*e(i)
197 REAL A(1),B(1),C(1),D(1)
202 a(i)=a(i)-b(i)*c(i)*d(i)
281 CHARACTER*1 A(1), B(1)
361 tmin = min(tmin,vec(i))
375 tmin = min(tmin,vec(i))
389 tmax = max(tmax,vec(i))
399 tmax = max(tmax,vec(i))
410 tamax = max(tamax,abs(vec(i)))
429 subroutine vcross (u1,u2,u3,v1,v2,v3,w1,w2,w3,n)
433 dimension u1(1),u2(1),u3(1)
434 dimension v1(1),v2(1),v3(1)
435 dimension w1(1),w2(1),w3(1)
439 u1(i) = v2(i)*w3(i) - v3(i)*w2(i)
440 u2(i) = v3(i)*w1(i) - v1(i)*w3(i)
441 u3(i) = v1(i)*w2(i) - v2(i)*w1(i)
446 subroutine vdot2 (dot,u1,u2,v1,v2,n)
451 dimension u1(1),u2(1)
452 dimension v1(1),v2(1)
456 dot(i) = u1(i)*v1(i) + u2(i)*v2(i)
461 subroutine vdot3 (dot,u1,u2,u3,v1,v2,v3,n)
466 dimension u1(1),u2(1),u3(1)
467 dimension v1(1),v2(1),v3(1)
471 dot(i) = u1(i)*v1(i) + u2(i)*v2(i) + u3(i)*v3(i)
481 dimension h1(1),h2(1),h3(1)
482 dimension s(nx,ny,nz)
488 s(ix,iy,iz)=s(ix,iy,iz)+hh*h1(ix)
494 CHARACTER*1 string(l)
500 IF (string(i).NE.blnk)
GOTO 200
518 $
'WARNING: Attempt to take MOD(I,0) in function mod1.'
549 INTEGER B(1),IND(1),TEMP(1)
569 if (icalld.eq.0)
then
603 if (icalld.eq.0)
then
627 if (icalld.eq.0)
then
659 if (icalld.eq.0)
then
696 if (icalld.eq.0)
then
728 REAL A(1),B(1),C(1),D(1)
760 s = s + x(i)*x(i)*y(i)
779 REAL a(1),b(1),mult(1)
786 tmp = tmp + a(i)*b(i)*mult(i)
788 CALL gop(tmp,work,
'+ ',1)
806 CALL gop(tmp,work,
'+ ',1)
820 ds=ds+x(i)*x(i)*y(i)*z(i)
823 call gop(tmp,work,
'+ ',1)
835 common /scrsf/ w1(lx1,ly1,lz1,lelt)
851 common /scrsf/ w1(lx2*ly2*lz2*lelt)
862 dimension tmp(1),work(1)
868 CALL gop(tmp,work,
'+ ',1)
875 dimension tmp(1),work(1)
878 tmax = max(tmax,abs(a(i)))
881 CALL gop(tmp,work,
'M ',1)
888 dimension tmp(1),work(1)
891 tmin = min(tmin,abs(a(i)))
894 call gop(tmp,work,
'm ',1)
901 integer tmp(1),work(1)
907 call igop(tmp,work,
'm ',1)
914 integer tmp(1),work(1)
920 call igop(tmp,work,
'M ',1)
927 integer tmp(1),work(1)
933 call igop(tmp,work,
'+ ',1)
948 integer*8 tmp(1),work(1)
954 call i8gop(tmp,work,
'+ ',1)
961 dimension tmp(1),work(1)
967 CALL gop(tmp,work,
'M ',1)
974 dimension tmp(1),work(1)
980 CALL gop(tmp,work,
'm ',1)
990 dimension tmp(1),work(1)
996 IF (.NOT.la) tmp(1)=0.0
998 CALL gop(tmp,work,
'* ',1)
999 IF (tmp(1).EQ.0.0) la=lb
1007 dimension work1(5),work2(5)
1017 guess=(gmax+gmin)/2.0
1019 IF (eps.EQ.0.0)
THEN
1024 CALL gop(work1,work2,
'+ ',1)
1028 WRITE(6,8) nid,n,(a(i),i=1,n)
1029 WRITE(6,9) nid,ntot,n2,n,gmin,gmax
1030 8
FORMAT(i5,
'N,A:',i5,10(6f10.5,/))
1031 9
FORMAT(i5,
'mnx:',3i6,2f10.5)
1040 IF (ii.LE.100) gues(ii)=guess
1042 IF (itry.GT.2*ntot)
GOTO 9000
1050 IF (aa.NE.guess)
THEN
1051 IF (aa.LT.guess)
THEN
1054 IF (aa.GT.clt) clt=aa
1056 IF (aa.GT.guess)
THEN
1059 IF (aa.LT.cgt) cgt=aa
1061 dum=1./(eps+abs(aa-guess))
1062 work1(1)=work1(1)+dum
1063 work1(2)=work1(2)+dum*aa
1066 work1(5)=work1(5)+1.0
1076 CALL gop(work1,work2,
'+ ',5)
1080 WRITE(6,101) nid,guess,clt,cgt
1081 WRITE(6,102) nid,(work1(i),i=1,5)
1082 101
FORMAT(i5,
'Glg:',3f12.5)
1083 102
FORMAT(i5,
'WORK1:',5f12.5)
1088 IF (nlt.GT.n2.OR.ngt.GT.n2)
THEN
1090 IF (ngt.GT.nlt)
THEN
1093 g2=cgt+max(0.,work1(2)/work1(1)-guess)*amp
1094 IF (g2.GT.gmax) g2=0.5*(guess+gmax)
1095 eps=afac*abs(g2-guess)
1099 ELSE IF (nlt.GT.ngt)
THEN
1102 g2=clt+min(0.,work1(2)/work1(1)-guess)*amp
1103 IF (g2.LT.gmin) g2=0.5*(guess+gmin)
1104 eps=afac*abs(g2-guess)
1112 IF (work1(5).NE.0)
THEN
1115 IF (work1(5).EQ.1.0)
THEN
1116 IF (mod(ntot,2).EQ.0)
THEN
1117 IF (ngt.GT.nlt)
THEN
1123 IF (ngt.EQ.nlt)
THEN
1125 ELSE IF(ngt.GT.nlt)
THEN
1133 IF (mod(ntot,2).EQ.0)
THEN
1134 IF (ngt.EQ.nlt)
THEN
1136 ELSE IF(ngt.GT.nlt)
THEN
1142 IF (ngt.EQ.nlt)
THEN
1144 ELSE IF(ngt.GT.nlt)
THEN
1153 IF (.NOT.ifok)
WRITE(6,*) nid,
'FMDIAN2',
fmdian,(a(i),i=1,n)
1159 WRITE(6,11) ntot,gmin0,gmax0,guess
1160 11
FORMAT(
'ABORTING IN FMDIAN: N,AMIN,AMAX:',i6,3g14.6)
1164 WRITE(6,12) nid,(a(i),i=i1,in)
1165 12
FORMAT(i4,
' FMA:',5g14.6)
1170 WRITE(6,14) nid,(gues(i),i=i1,in)
1171 14
FORMAT(i4,
' FMG:',5g14.6)
1211 CHARACTER*6 B(1),TEMP(1)
1244 real xout(1),xin(1),work(1)
1245 call copy(xout,xin,n)
1246 call sort(xout,work,n)
1308 if ( a(j).lt.a(j+1) ) j=j+1
1310 if (aa.lt.a(j))
then
1360 if ( a(j).lt.a(j+1) ) j=j+1
1362 if (aa.lt.a(j))
then
1391 write(6,*)
'Hey! iswap_ip problem.',j,k,n,next
1393 elseif (next.eq.loop_start)
then
1423 next = p(loop_start)
1427 write(6,*)
'Hey! iswapt_ip problem.',j,k,n,next
1429 elseif (next.eq.loop_start)
then
1466 write(6,*)
'Hey! swap_ip problem.',j,k,n,next
1468 elseif (next.eq.loop_start)
then
1498 next = p(loop_start)
1502 write(6,*)
'Hey! swapt_ip problem.',j,k,n,next
1504 elseif (next.eq.loop_start)
then
1529 call gop(x,w,
'+ ',n)
1534 real x(1),y(1),z(1),c1,c2
1536 x(i) = c1*y(i)+c2*z(i)
1543 integer*8 tmp(1),work(1)
1549 call i8gop(tmp,work,
'M ',1)
1556 REAL A(1),B(1),C(1),D
1559 a(i)=a(i)+b(i)*c(i)*d
1568 a(i) = a(i) + b(i)*c(i)
1577 x(i) = a*x(i) + b*y(i)
1594 real a(lda,1),b(ldb,1)
1622 diff = abs(a(i)-b(i))
subroutine setnekcomm(comm_in)
subroutine igop(x, w, op, n)
subroutine gop(x, w, op, n)
real *8 function dnekclock()
subroutine i8gop(x, w, op, n)
real function dot(V1, V2, N)
function glsc3_ms(a, b, c, n)
subroutine iswap(b, ind, n, temp)
subroutine dadd2(a, b, n)
subroutine cadd(a, const, n)
subroutine col3(a, b, c, n)
subroutine iadd(i1, iscal, n)
subroutine ascol5(a, b, c, d, e, n)
subroutine invers2(a, b, n)
subroutine invcol2(a, b, n)
integer function ivlmin(vec, n)
subroutine ifill(ia, ib, n)
subroutine transpose(a, lda, b, ldb)
subroutine add3s12(x, y, z, c1, c2, n)
subroutine add2col2(a, b, c, n)
real function difmax(a, b, n)
subroutine icopy(a, b, n)
subroutine addcol3(a, b, c, n)
subroutine dsub2(a, b, n)
subroutine admcol3(a, b, c, d, n)
subroutine copyi4(a, b, n)
subroutine isort(a, ind, n)
real function vlsc21(x, y, n)
function glsc3(a, b, mult, n)
real function vlamax(vec, n)
subroutine icopy84(a, b, n)
real function gl2norm2(a, n)
subroutine add2s2(a, b, c1, n)
real function vlmax(vec, n)
subroutine addcol4(a, b, c, d, n)
subroutine rrcopy(r, d, N)
subroutine addtnsr(s, h1, h2, h3, nx, ny, nz)
real function glamin(a, n)
subroutine add2sxy(x, a, y, b, n)
subroutine iswapt_ip(x, p, n)
subroutine sorts(xout, xin, work, n)
subroutine swapt_ip(x, p, n)
subroutine xaddcol3(a, b, c, n)
subroutine vdot2(dot, u1, u2, v1, v2, n)
subroutine glvadd(x, w, n)
subroutine add3(a, b, c, n)
subroutine iswap_ip(x, p, n)
subroutine col4(a, b, c, d, n)
real function vlsum(vec, n)
subroutine dcadd(a, const, n)
subroutine col2s2(x, y, s, n)
subroutine add4(a, b, c, d, n)
integer *8 function i8glsum(a, n)
subroutine icadd(a, c, n)
subroutine col2c(a, b, c, n)
integer *8 function i8glmax(a, n)
subroutine chswapr(b, L, ind, n, temp)
real function vlsc2(x, y, n)
subroutine subcol3(a, b, c, n)
function ltrunc(string, l)
subroutine cadd2(a, b, const, n)
function fmdian(a, n, ifok)
integer function ivlmax(vec, n)
subroutine transpose1(a, n)
subroutine drcopy(r, d, N)
subroutine add3s2(a, b, c, c1, c2, n)
subroutine subcol4(a, b, c, d, n)
subroutine sub3(a, b, c, n)
subroutine swap_ip(x, p, n)
subroutine cmult(a, const, n)
real function glamax(a, n)
subroutine chcopy(a, b, n)
subroutine icopy48(a, b, n)
subroutine cfill(a, b, n)
subroutine i8copy(a, b, n)
subroutine invcol3(a, b, c, n)
subroutine add2s1(a, b, c1, n)
function glsc2_ms(a, b, n)
real function vlmin(vec, n)
subroutine vdot3(dot, u1, u2, u3, v1, v2, v3, n)
subroutine vcross(u1, u2, u3, v1, v2, v3, w1, w2, w3, n)
real function gl2norm(a, n)
function glsc23(x, y, z, n)
subroutine sort(a, ind, n)