~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/nonlinear/dasrt.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH dasrt G "June 1993" "Scilab Group" "Scilab Function"
2
 
.so ../sci.an
3
 
.SH NAME
4
 
dasrt - DAE solver with zero crossing
5
 
.SH  CALLING SEQUENCE
6
 
.nf
7
 
[r,nn,[,hd]]=dasrt(x0,t0,t [,atol,[rtol]],res [,jac],ng, surf [,info] [,hd])
8
 
.fi
9
 
.SH PARAMETERS
10
 
.TP 10
11
 
x0  
12
 
: is either \fVy0\fR (\fVydot0\fR is estimated by \fVdassl\fR with zero as first estimate) or the matrix \fV[y0 ydot0]\fR. 
13
 
\fVg(t,y0,ydot0)\fR must be equal to zero. If you only know an estimate 
14
 
of \fVydot0\fR set \fVinfo(7)=1\fR
15
 
.RS
16
 
.TP 10
17
 
y0
18
 
: real column vector  of initial conditions.
19
 
.TP
20
 
ydot0 
21
 
: real column vector of the time derivative of \fVy\fR at \fVt0\fR
22
 
(may be an estimate).
23
 
.RE
24
 
.TP
25
 
t0 
26
 
: real number is the initial instant.
27
 
.TP
28
 
29
 
: real scalar or vector. Gives instants for which you want the solution. Note that you can get solution at each dassl's step point by setting \fVinfo(2)=1\fR.
30
 
.TP
31
 
nn
32
 
: a vector with two entries \fV[times num]\fR \fVtimes\fR is the value
33
 
of the time at which the surface is crossed, \fVnum\fR is the number
34
 
of the crossed surface
35
 
.TP
36
 
atol,rtol
37
 
: real scalars or column vectors of same size as \fVy\fR. \fVatol,rtol\fR give respectively  absolute and relative error tolerances of solution. 
38
 
If vectors the tolerances are specified for each component of \fVy\fR.
39
 
.TP
40
 
res 
41
 
: external (function or list or string). Computes the  value of \fVg(t,y,ydot)\fR.
42
 
.RS
43
 
.TP 8
44
 
function
45
 
: Its calling sequence must be \fV[r,ires]=res(t,y,ydot)\fR
46
 
and \fVres\fR must return the residue \fVr=g(t,y,ydot)\fR  and error flag 
47
 
\fVires\fR. \fVires = 0\fR if \fVres\fR succeeds to compute \fVr\fR, \fV=-1\fR 
48
 
if residue is locally not defined for \fV(t,y,ydot)\fR, \fV=-2\fR if 
49
 
parameters are out of admissible range.
50
 
.TP
51
 
list
52
 
: it must be as follows:
53
 
.nf
54
 
list(res,x1,x2,...)
55
 
.fi 
56
 
where the calling sequence of the function \fVres\fR is now
57
 
.nf
58
 
r=res(t,y,ydot,x1,x2,...)
59
 
.fi
60
 
\fVres\fR still returns \fVr=g(t,y,ydot)\fR as a function of
61
 
\fV(t,y,ydot,x1,x2,...)\fR.
62
 
.TP
63
 
string
64
 
: it must refer to the name of
65
 
a fortran subroutine (see source code of \fVfresd.f\fR).
66
 
.RE
67
 
.TP
68
 
jac
69
 
: external (function or list or string). Computes the  value 
70
 
of \fVdg/dy+cj*dg/dydot\fR for a given value of parameter \fVcj\fR
71
 
.RS
72
 
.TP 8
73
 
function
74
 
: Its calling sequence must be \fVr=jac(t,y,ydot,cj)\fR
75
 
and the \fVjac\fR function must return
76
 
\fVr=dg(t,y,ydot)/dy+cj*dg(t,y,ydot)/dydot\fR where \fVcj\fR is a real scalar
77
 
.TP
78
 
list
79
 
: it must be as follows
80
 
.nf
81
 
list(jac,x1,x2,...)
82
 
.fi 
83
 
where the calling sequence of the function \fVjac\fR is now
84
 
.nf
85
 
r=jac(t,y,ydot,x1,x2,...)
86
 
.fi
87
 
\fVjac\fR still returns \fVdg/dy+cj*dg/dydot\fR as a function of
88
 
\fV(t,y,ydot,cj,x1,x2,...)\fR.
89
 
.TP
90
 
character string
91
 
: it must refer to the name of a fortran subroutine 
92
 
(see source code of \fVjacdd.f\fR).
93
 
.RE
94
 
.TP
95
 
surf
96
 
: external (function or list or string). Computes the  value 
97
 
of the column vector \fVsurf(t,y)\fR with ng components.
98
 
Each component defines a surface.
99
 
.RS
100
 
.TP 8
101
 
function
102
 
: Its calling sequence must be \fVsurf(t,y)\fR
103
 
.TP
104
 
list
105
 
: it must be as follows
106
 
.nf
107
 
list(surf,x1,x2,...)
108
 
.fi 
109
 
where the calling sequence of the function \fVsurf\fR is now
110
 
.nf
111
 
r=surf(t,y,x1,x2,...)
112
 
.fi
113
 
.TP
114
 
character string
115
 
: it must refer to the name of a fortran subroutine 
116
 
(see source code of \fVfsurfd.f\fR) in directory \fVSCDIR/default\fR
117
 
.RE
118
 
.TP
119
 
info
120
 
: list which contains \fV7\fR elements, default value is list([],0,[],[],[],0,0)
121
 
.RS
122
 
.TP 8
123
 
info(1)
124
 
: real scalar which gives the maximum time for which \fVg\fR is allowed 
125
 
to be evaluated or an empty matrix \fV[]\fR if no limits imposed for time.
126
 
.TP
127
 
info(2)
128
 
: flag which indicates if \fVdassl\fR returns its intermediate 
129
 
computed values (\fVflag=1\fR) or only the user specified time point 
130
 
values (\fVflag=0\fR).
131
 
.TP
132
 
info(3)
133
 
: \fV2\fR components vector which give the definition \fV[ml,mu]\fR of band 
134
 
matrix computed by \fVjac\fR;
135
 
\fVr(i - j + ml + mu + 1,j) = "dg(i)/dy(j)+cj*dg(i)/dydot(j)"\fR. 
136
 
If \fVjac\fR returns a full matrix set \fVinfo(3)=[]\fR.
137
 
.TP
138
 
info(4)
139
 
: real scalar which gives the maximum step size. Set \fVinfo(4)=[]\fR if no 
140
 
limitation.
141
 
.TP
142
 
info(5)
143
 
: real scalar which gives the initial step size. Set \fVinfo(4)=[]\fR if 
144
 
not specified.
145
 
.TP
146
 
info(6)
147
 
: set \fVinfo(6)=1\fR if the solution is known to be non negative, 
148
 
else set \fVinfo(6)=0\fR.
149
 
.TP
150
 
info(7)
151
 
: set \fVinfo(7)=1\fR if \fVydot0\fR is just an estimation, \fVinfo(7)=0\fR
152
 
if \fVg(t0,y0,ydot0)=0\fR.
153
 
.RE
154
 
.TP
155
 
hd
156
 
: real vector which allows to store the \fVdassl\fR context and to 
157
 
resume integration
158
 
.TP
159
 
r
160
 
: real matrix . Each column is the vector [t;x(t);xdot(t)] where t is time
161
 
index for which the solution had been computed
162
 
.SH DESCRIPTION
163
 
Solution of the implicit differential equation
164
 
.nf
165
 
    g(t,y,ydot)=0
166
 
    y(t0)=y0  and   ydot(t0)=ydot0
167
 
.fi
168
 
Returns the surface crossing instants and the number of the
169
 
surface reached in \fVnn\fR. 
170
 
 
171
 
Detailed examples can be found in SCIDIR/tests/dassldasrt.tst
172
 
.SH EXAMPLE
173
 
.nf
174
 
//dy/dt = ((2*log(y)+8)/t -5)*y,  y(1) = 1,  1<=t<=6
175
 
//g1 = ((2*log(y)+8)/t - 5)*y 
176
 
//g2 = log(y) - 2.2491 
177
 
y0=1;t=2:6;t0=1;y0d=3;
178
 
atol=1.d-6;rtol=0;ng=2;
179
 
 
180
 
deff('[delta,ires]=res1(t,y,ydot)','ires=0;delta=ydot-((2*log(y)+8)/t-5)*y')
181
 
deff('[rts]=gr1(t,y)','rts=[((2*log(y)+8)/t-5)*y;log(y)-2.2491]')
182
 
 
183
 
[yy,nn]=dasrt([y0,y0d],t0,t,atol,rtol,res1,ng,gr1);
184
 
//(Should return nn=[2.4698972 2])
185
 
.fi
186
 
.SH SEE ALSO
187
 
ode, dassl, impl, fort, link, external 
188