$SPAD/src/input d03faf.input

The Axiom Team December 3, 2016

Abstract

Contents

2

1 License

— license —

--Copyright The Numerical Algorithms Group Limited 1994.

———-

— * —

\getchunk{license}
)cl all
showArrayValues true
showScalarValues true
xs := 0.0
xf := 1.0
l := 16
lbdcnd := 1
m := 32
n := 20
maxlm := 32
mdimf := m+1
ldimf := l+1
lwrk := 2*(n+1)*maxlm+3*l+3*m+4*n+6000
bdxs := new(mdimf,n+1,0.0)$Matrix DoubleFloat;
bdxf := new(mdimf,n+1,0.0)$Matrix DoubleFloat;
ys := 0.0
yf := 2*numeric(%pi)
mbdcnd := 0
bdys := new(ldimf,n+1,0.0)$Matrix DoubleFloat;
bdyf := new(ldimf,n+1,0.0)$Matrix DoubleFloat;
zs := 0.0
zf := numeric(%pi)/2
nbdcnd := 2
bdzs := new(ldimf,m+1,0.0)$Matrix DoubleFloat;
bdzf := new(ldimf,m+1,0.0)$Matrix DoubleFloat;
lambda := -2
ifail := 0
-- define grid points
dx := (xf-xs)/l
x := [[xs + (i-1)*dx for i in 1..l+1]] :: Matrix DoubleFloat;
dy := (yf-ys)/m
y := [[ys + (i-1)*dy for i in 1..m+1]] :: Matrix DoubleFloat;
dz := (zf-zs)/n
z := [[zs + (i-1)*dz for i in 1..n+1]] :: Matrix DoubleFloat;
f:=zeroMatrix(ldimf,mdimf,n+1)$M3D DFLOAT;
--speed up these loops by compiling

foo()==
 for k in 1..n+1 repeat
  for j in 1..m+1 repeat
    setelt!(f,1,j,k,sin(y(1,j))*cos(z(1,k)))
 for j in 1..m+1 repeat
  for i in 1..l+1 repeat
    setelt!(f,i,j,1,x(1,i)**4*sin(y(1,j)))
 for k in 2..n+1 repeat
  for j in 1..m+1 repeat
    for i in 2..l repeat
      setelt!(f,i,j,k,4*x(1,i)**2*(3-x(1,i)**2)*sin(y(1,j))*cos(z(1,k)))
 for j in 1..m+1 repeat
  for i in 1..l+1 repeat
    bdzf(i,j):=-x(1,i)**4*sin(y(1,j))
foo()
result:=d03faf(xs,xf,l,lbdcnd,bdxs,bdxf,ys,yf,m,mbdcnd,bdys,bdyf,_
zs,zf,n,nbdcnd,bdzs,bdzf,lambda,ldimf,mdimf,lwrk,f,ifail)

———-

References^{[1] nothing}

5