aboutsummaryrefslogtreecommitdiff
path: root/src/algebra/d03.spad.pamphlet
blob: 58e3653856f3a1ff4adabb2ddd52f87c5669fb6d (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
\documentclass{article}
\usepackage{open-axiom}
\begin{document}
\title{\$SPAD/src/algebra d03.spad}
\author{Godfrey Nolan, Mike Dewar}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{package NAGD03 NagPartialDifferentialEquationsPackage}
<<package NAGD03 NagPartialDifferentialEquationsPackage>>=
)abbrev package NAGD03 NagPartialDifferentialEquationsPackage
++ Author: Godfrey Nolan and Mike Dewar
++ Date Created: Jan 1994
++ Date Last Updated: Thu May 12 17:44:51 1994
++Description:
++This package uses the NAG Library to solve partial
++differential equations.
++See \downlink{Manual Page}{manpageXXd03}.
NagPartialDifferentialEquationsPackage(): Exports == Implementation where
  S ==> Symbol
  FOP ==> FortranOutputStackPackage

  Exports ==> with
    d03edf : (Integer,Integer,Integer,Integer,_
	DoubleFloat,Integer,Matrix DoubleFloat,Matrix DoubleFloat,Matrix DoubleFloat,Integer) -> Result 
     ++ d03edf(ngx,ngy,lda,maxit,acc,iout,a,rhs,ub,ifail)
     ++ solves seven-diagonal systems of linear equations which 
     ++ arise from the discretization of an elliptic partial differential
     ++ equation on a rectangular region. This routine uses a multigrid 
     ++ technique.
     ++ See \downlink{Manual Page}{manpageXXd03edf}.
    d03eef : (DoubleFloat,DoubleFloat,DoubleFloat,DoubleFloat,_
	Integer,Integer,Integer,String,Integer,Union(fn:FileName,fp:Asp73(PDEF)),Union(fn:FileName,fp:Asp74(BNDY))) -> Result 
     ++ d03eef(xmin,xmax,ymin,ymax,ngx,ngy,lda,scheme,ifail,pdef,bndy)
     ++ discretizes a second order elliptic partial differential 
     ++ equation (PDE) on a rectangular region.
     ++ See \downlink{Manual Page}{manpageXXd03eef}.
    d03faf : (DoubleFloat,DoubleFloat,Integer,Integer,_
	Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,DoubleFloat,Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,DoubleFloat,Integer,Integer,Matrix DoubleFloat,Matrix DoubleFloat,DoubleFloat,Integer,Integer,Integer,ThreeDimensionalMatrix DoubleFloat,Integer) -> 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)
     ++ solves the Helmholtz equation in Cartesian co-ordinates in
     ++ three dimensions using the standard seven-point finite difference
     ++ approximation. This routine is designed to be particularly 
     ++ efficient on vector processors.
     ++ See \downlink{Manual Page}{manpageXXd03faf}.
  Implementation ==> add

    import Lisp
    import DoubleFloat
    import Any
    import Record
    import Integer
    import Matrix DoubleFloat
    import Boolean
    import NAGLinkSupportPackage
    import AnyFunctions1(Integer)
    import AnyFunctions1(String)
    import AnyFunctions1(DoubleFloat)
    import AnyFunctions1(Matrix DoubleFloat)
    import AnyFunctions1(ThreeDimensionalMatrix DoubleFloat)
    import FortranPackage
    import Union(fn:FileName,fp:Asp73(PDEF))
    import Union(fn:FileName,fp:Asp74(BNDY))




    d03edf(ngxArg:Integer,ngyArg:Integer,ldaArg:Integer,_
	maxitArg:Integer,accArg:DoubleFloat,ioutArg:Integer,_
	aArg:Matrix DoubleFloat,rhsArg:Matrix DoubleFloat,ubArg:Matrix DoubleFloat,_
	ifailArg:Integer): Result == 
	[(invokeNagman(NIL$Lisp,_
	"d03edf",_
	["ngx"::S,"ngy"::S,"lda"::S,"maxit"::S,"acc"::S_
	,"iout"::S,"numit"::S,"ifail"::S,"us"::S,"u"::S,"a"::S,"rhs"::S,"ub"::S_
	]$Lisp,_
	["us"::S,"u"::S,"numit"::S]$Lisp,_
	[["double"::S,"acc"::S,["us"::S,"lda"::S]$Lisp_
	,["u"::S,"lda"::S]$Lisp,["a"::S,"lda"::S,7$Lisp]$Lisp,["rhs"::S,"lda"::S]$Lisp,["ub"::S,["*"::S,"ngx"::S,"ngy"::S]$Lisp]$Lisp_
	]$Lisp_
	,["integer"::S,"ngx"::S,"ngy"::S,"lda"::S,"maxit"::S_
	,"iout"::S,"numit"::S,"ifail"::S]$Lisp_
	]$Lisp,_
	["us"::S,"u"::S,"numit"::S,"a"::S,"rhs"::S,"ub"::S,"ifail"::S]$Lisp,_
	[([ngxArg::Any,ngyArg::Any,ldaArg::Any,maxitArg::Any,accArg::Any,ioutArg::Any,ifailArg::Any,aArg::Any,rhsArg::Any,ubArg::Any ])_
	@List Any]$Lisp)$Lisp)_
	pretend List (Record(key:Symbol,entry:Any))]$Result

    d03eef(xminArg:DoubleFloat,xmaxArg:DoubleFloat,yminArg:DoubleFloat,_
	ymaxArg:DoubleFloat,ngxArg:Integer,ngyArg:Integer,_
	ldaArg:Integer,schemeArg:String,ifailArg:Integer,_
	pdefArg:Union(fn:FileName,fp:Asp73(PDEF)),bndyArg:Union(fn:FileName,fp:Asp74(BNDY))): Result == 
	pushFortranOutputStack(pdefFilename := aspFilename "pdef")$FOP
	if pdefArg case fn
		  then outputAsFortran(pdefArg.fn)
		  else outputAsFortran(pdefArg.fp)
	popFortranOutputStack()$FOP
	pushFortranOutputStack(bndyFilename := aspFilename "bndy")$FOP
	if bndyArg case fn
		  then outputAsFortran(bndyArg.fn)
		  else outputAsFortran(bndyArg.fp)
	popFortranOutputStack()$FOP
	[(invokeNagman([pdefFilename,bndyFilename]$Lisp,_
	"d03eef",_
	["xmin"::S,"xmax"::S,"ymin"::S,"ymax"::S,"ngx"::S_
	,"ngy"::S,"lda"::S,"scheme"::S,"ifail"::S,"pdef"::S_
	,"bndy"::S,"a"::S,"rhs"::S]$Lisp,_
	["a"::S,"rhs"::S,"pdef"::S,"bndy"::S]$Lisp,_
	[["double"::S,"xmin"::S,"xmax"::S,"ymin"::S_
	,"ymax"::S,["a"::S,"lda"::S,7$Lisp]$Lisp,["rhs"::S,"lda"::S]$Lisp,"pdef"::S,"bndy"::S]$Lisp_
	,["integer"::S,"ngx"::S,"ngy"::S,"lda"::S,"ifail"::S_
	]$Lisp_
	,["character"::S,"scheme"::S]$Lisp_
	]$Lisp,_
	["a"::S,"rhs"::S,"ifail"::S]$Lisp,_
	[([xminArg::Any,xmaxArg::Any,yminArg::Any,ymaxArg::Any,ngxArg::Any,ngyArg::Any,ldaArg::Any,schemeArg::Any,ifailArg::Any ])_
	@List Any]$Lisp)$Lisp)_
	pretend List (Record(key:Symbol,entry:Any))]$Result

    d03faf(xsArg:DoubleFloat,xfArg:DoubleFloat,lArg:Integer,_
	lbdcndArg:Integer,bdxsArg:Matrix DoubleFloat,bdxfArg:Matrix DoubleFloat,_
	ysArg:DoubleFloat,yfArg:DoubleFloat,mArg:Integer,_
	mbdcndArg:Integer,bdysArg:Matrix DoubleFloat,bdyfArg:Matrix DoubleFloat,_
	zsArg:DoubleFloat,zfArg:DoubleFloat,nArg:Integer,_
	nbdcndArg:Integer,bdzsArg:Matrix DoubleFloat,bdzfArg:Matrix DoubleFloat,_
	lambdaArg:DoubleFloat,ldimfArg:Integer,mdimfArg:Integer,_
	lwrkArg:Integer,fArg:ThreeDimensionalMatrix DoubleFloat,ifailArg:Integer): Result == 
	[(invokeNagman(NIL$Lisp,_
	"d03faf",_
	["xs"::S,"xf"::S,"l"::S,"lbdcnd"::S,"ys"::S_
	,"yf"::S,"m"::S,"mbdcnd"::S,"zs"::S,"zf"::S_
	,"n"::S,"nbdcnd"::S,"lambda"::S,"ldimf"::S,"mdimf"::S_
	,"lwrk"::S,"pertrb"::S,"ifail"::S,"bdxs"::S,"bdxf"::S,"bdys"::S,"bdyf"::S,"bdzs"::S_
	,"bdzf"::S,"f"::S,"w"::S]$Lisp,_
	["pertrb"::S,"w"::S]$Lisp,_
	[["double"::S,"xs"::S,"xf"::S,["bdxs"::S,"mdimf"::S,["+"::S,"n"::S,1$Lisp]$Lisp]$Lisp_
	,["bdxf"::S,"mdimf"::S,["+"::S,"n"::S,1$Lisp]$Lisp]$Lisp,"ys"::S,"yf"::S,["bdys"::S,"ldimf"::S,["+"::S,"n"::S,1$Lisp]$Lisp]$Lisp_
	,["bdyf"::S,"ldimf"::S,["+"::S,"n"::S,1$Lisp]$Lisp]$Lisp,"zs"::S_
	,"zf"::S,["bdzs"::S,"ldimf"::S,["+"::S,"m"::S,1$Lisp]$Lisp]$Lisp,["bdzf"::S,"ldimf"::S,["+"::S,"m"::S,1$Lisp]$Lisp]$Lisp_
	,"lambda"::S,"pertrb"::S,["f"::S,"ldimf"::S,"mdimf"::S,["+"::S,"n"::S,1$Lisp]$Lisp]$Lisp,["w"::S,"lwrk"::S]$Lisp]$Lisp_
	,["integer"::S,"l"::S,"lbdcnd"::S,"m"::S,"mbdcnd"::S_
	,"n"::S,"nbdcnd"::S,"ldimf"::S,"mdimf"::S,"lwrk"::S,"ifail"::S]$Lisp_
	]$Lisp,_
	["pertrb"::S,"f"::S,"ifail"::S]$Lisp,_
	[([xsArg::Any,xfArg::Any,lArg::Any,lbdcndArg::Any,ysArg::Any,yfArg::Any,mArg::Any,mbdcndArg::Any,zsArg::Any,zfArg::Any,nArg::Any,nbdcndArg::Any,lambdaArg::Any,ldimfArg::Any,mdimfArg::Any,lwrkArg::Any,ifailArg::Any,bdxsArg::Any,bdxfArg::Any,bdysArg::Any,bdyfArg::Any,bdzsArg::Any,bdzfArg::Any,fArg::Any ])_
	@List Any]$Lisp)$Lisp)_
	pretend List (Record(key:Symbol,entry:Any))]$Result

@
\section{License}
<<license>>=
--Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
--All rights reserved.
--
--Redistribution and use in source and binary forms, with or without
--modification, are permitted provided that the following conditions are
--met:
--
--    - Redistributions of source code must retain the above copyright
--      notice, this list of conditions and the following disclaimer.
--
--    - Redistributions in binary form must reproduce the above copyright
--      notice, this list of conditions and the following disclaimer in
--      the documentation and/or other materials provided with the
--      distribution.
--
--    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
--      names of its contributors may be used to endorse or promote products
--      derived from this software without specific prior written permission.
--
--THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
--IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
--TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
--PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
--OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
--EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
--PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
--PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
--LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
--NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
--SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@
<<*>>=
<<license>>

<<package NAGD03 NagPartialDifferentialEquationsPackage>>
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}