aboutsummaryrefslogtreecommitdiff
path: root/src/input/d03edf.input.pamphlet
blob: e31739b14204a3b0443673d16c4b5fcd3a3a127c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input d03edf.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1994.
@
<<*>>=
<<license>>
)cl all
showArrayValues true
showScalarValues true

ngx := 9
ngy := 9
lda :=  134
alpha := 1.7
hx := 1/(ngx+1)
hy := 1/(ngy+1)
a := new(lda,7,0.0)$Matrix DoubleFloat;
rhs := new(1,lda,0.0)$Matrix DoubleFloat;
ub := new(1,ngx*ngy,0.0)$Matrix DoubleFloat;
for j in 1..ngy repeat
  for i in 1..ngx repeat
    k := (j-1)*ngx + i
    a(k,1) := 1 - 0.5*alpha 
    a(k,2) := 0.5*alpha
    a(k,3) := 1 - 0.5*alpha 
    a(k,4) := -4 + alpha
    a(k,5) := 1 - 0.5*alpha 
    a(k,6) := 0.5*alpha
    a(k,7) := 1 - 0.5*alpha
    rhs(1,k) := -4.0*hx*hy
for i in 2..(ngx-1) repeat
  ix := i
  a(ix,1) := 0
  a(ix,2) := 0
  ix := i + (ngy -1)*ngx
  a(ix,6) := 0
  a(ix,7) := 0
for j in 2..(ngy-1) repeat
  iy := (j-1)*ngx+1
  a(iy,3) := 0
  a(iy,6) := 0
  iy := j *ngx
  rhs(1,iy) := rhs(1,iy) - a(iy,5) - a(iy,2)
  a(iy,2) := 0
  a(iy,5) := 0
k := 1
a(1,1) := 0
a(1,2) := 0
a(1,3) := 0
a(1,6) := 0
k := 1 + (ngy-1)*ngx
a(k,3) := 0
a(k,6) := 0
a(k,7) := 0
k := ngx
rhs(1,k) := rhs(1,k) - a(k,2)*0.5 -a(k,5)
a(k,1) := 0
a(k,2) := 0
a(k,5) := 0
k := ngx * ngy
rhs(1,k) := rhs(1,k) - a(k,2) - a(k,5)
a(k,2) := 0
a(k,5) := 0
a(k,6) := 0
a(k,7) := 0
ifail := 0
maxit := 15
acc := 1.0e-4
iout := 0
result:=d03edf(ngx,ngy,lda,maxit,acc,iout,a,rhs,ub,ifail)
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}