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

« back to all changes in this revision

Viewing changes to man/fr/nonlinear/dasrt.xml

  • 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
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
 
2
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
 
3
<MAN>
 
4
  <LANGUAGE>eng</LANGUAGE>
 
5
  <TITLE>dasrt</TITLE>
 
6
  <TYPE>Scilab Function</TYPE>
 
7
  <DATE>June 1993</DATE>
 
8
  <SHORT_DESCRIPTION name="dasrt"> DAE solver with zero crossing</SHORT_DESCRIPTION>
 
9
  <CALLING_SEQUENCE>
 
10
    <CALLING_SEQUENCE_ITEM>[r,nn,[,hd]]=dasrt(x0,t0,t [,atol,[rtol]],res [,jac],ng, surf [,info] [,hd])  </CALLING_SEQUENCE_ITEM>
 
11
  </CALLING_SEQUENCE>
 
12
  <PARAM>
 
13
    <PARAM_INDENT>
 
14
      <PARAM_ITEM>
 
15
        <PARAM_NAME>x0</PARAM_NAME>
 
16
        <PARAM_DESCRIPTION>
 
17
          <SP>: is either <VERB>y0</VERB> (<VERB>ydot0</VERB> is estimated by
 
18
  <VERB>dassl</VERB> with zero as first estimate) or the matrix
 
19
  <VERB>[y0 ydot0]</VERB>.  <VERB>g(t,y0,ydot0)</VERB> must be equal
 
20
  to zero. If you only know an estimate  of <VERB>ydot0</VERB> set
 
21
  <VERB>info(7)=1</VERB></SP>
 
22
          <PARAM_INDENT>
 
23
            <PARAM_ITEM>
 
24
              <PARAM_NAME>y0</PARAM_NAME>
 
25
              <PARAM_DESCRIPTION>
 
26
                <SP>: real column vector  of initial conditions.</SP>
 
27
              </PARAM_DESCRIPTION>
 
28
            </PARAM_ITEM>
 
29
            <PARAM_ITEM>
 
30
              <PARAM_NAME>ydot0</PARAM_NAME>
 
31
              <PARAM_DESCRIPTION>
 
32
                <SP>: real column vector of the time derivative of <VERB>y</VERB> at <VERB>t0</VERB> (may be an estimate).</SP>
 
33
              </PARAM_DESCRIPTION>
 
34
            </PARAM_ITEM>
 
35
          </PARAM_INDENT>
 
36
        </PARAM_DESCRIPTION>
 
37
      </PARAM_ITEM>
 
38
      <PARAM_ITEM>
 
39
        <PARAM_NAME>t0</PARAM_NAME>
 
40
        <PARAM_DESCRIPTION>
 
41
          <SP>: real number is the initial instant.</SP>
 
42
        </PARAM_DESCRIPTION>
 
43
      </PARAM_ITEM>
 
44
      <PARAM_ITEM>
 
45
        <PARAM_NAME>t</PARAM_NAME>
 
46
        <PARAM_DESCRIPTION>
 
47
          <SP>: real scalar or vector. Gives instants for which you want the
 
48
  solution. Note that you can get solution at each dassl's step
 
49
  point by setting <VERB>info(2)=1</VERB>.</SP>
 
50
        </PARAM_DESCRIPTION>
 
51
      </PARAM_ITEM>
 
52
      <PARAM_ITEM>
 
53
        <PARAM_NAME>nn</PARAM_NAME>
 
54
        <PARAM_DESCRIPTION>
 
55
          <SP>: a vector with two entries <VERB>[times num]</VERB>
 
56
  <VERB>times</VERB> is the value of the time at which the surface is
 
57
  crossed, <VERB>num</VERB> is the number of the crossed surface</SP>
 
58
        </PARAM_DESCRIPTION>
 
59
      </PARAM_ITEM>
 
60
      <PARAM_ITEM>
 
61
        <PARAM_NAME>atol,rtol</PARAM_NAME>
 
62
        <PARAM_DESCRIPTION>
 
63
          <SP>: real scalars or column vectors of same size as
 
64
  <VERB>y</VERB>. <VERB>atol,rtol</VERB> give respectively  absolute
 
65
  and relative error tolerances of solution.  If vectors the
 
66
  tolerances are specified for each component of <VERB>y</VERB>.</SP>
 
67
        </PARAM_DESCRIPTION>
 
68
      </PARAM_ITEM>
 
69
      <PARAM_ITEM>
 
70
        <PARAM_NAME>res</PARAM_NAME>
 
71
        <PARAM_DESCRIPTION>
 
72
          <SP>: external (function or list or string). Computes the  value of <VERB>g(t,y,ydot)</VERB>.</SP>
 
73
          <PARAM_INDENT>
 
74
            <PARAM_ITEM>
 
75
              <PARAM_NAME>function</PARAM_NAME>
 
76
              <PARAM_DESCRIPTION>
 
77
                <P>
 
78
    : Its calling sequence must be <VERB>[r,ires]=res(t,y,ydot)</VERB>
 
79
  and <VERB>res</VERB> must return the residue
 
80
  <VERB>r=g(t,y,ydot)</VERB>  and error flag
 
81
  <VERB>ires</VERB>. <VERB>ires = 0</VERB> if <VERB>res</VERB>
 
82
  succeeds to compute <VERB>r</VERB>, <VERB>=-1</VERB>  if residue is
 
83
  locally not defined for <VERB>(t,y,ydot)</VERB>, <VERB>=-2</VERB> if
 
84
  parameters are out of admissible range. </P>
 
85
              </PARAM_DESCRIPTION>
 
86
            </PARAM_ITEM>
 
87
            <PARAM_ITEM>
 
88
              <PARAM_NAME>list</PARAM_NAME>
 
89
              <PARAM_DESCRIPTION>
 
90
                <SP>: it must be as follows:</SP>
 
91
                <VERBATIM>
 
92
<![CDATA[
 
93
list(res,x1,x2,...)
 
94
   ]]>
 
95
                </VERBATIM>
 
96
                <P>
 
97
    where the calling sequence of the function <VERB>res</VERB> is now
 
98
  </P>
 
99
                <VERBATIM>
 
100
<![CDATA[
 
101
r=res(t,y,ydot,x1,x2,...)
 
102
   ]]>
 
103
                </VERBATIM>
 
104
                <P><VERB>res</VERB> still returns <VERB>r=g(t,y,ydot)</VERB> as a function of <VERB>(t,y,ydot,x1,x2,...)</VERB>.
 
105
  </P>
 
106
              </PARAM_DESCRIPTION>
 
107
            </PARAM_ITEM>
 
108
            <PARAM_ITEM>
 
109
              <PARAM_NAME>string</PARAM_NAME>
 
110
              <PARAM_DESCRIPTION>
 
111
                <SP>: it must refer to the name of a fortran subroutine (see source code of <VERB>fresd.f</VERB>).</SP>
 
112
              </PARAM_DESCRIPTION>
 
113
            </PARAM_ITEM>
 
114
          </PARAM_INDENT>
 
115
        </PARAM_DESCRIPTION>
 
116
      </PARAM_ITEM>
 
117
      <PARAM_ITEM>
 
118
        <PARAM_NAME>jac</PARAM_NAME>
 
119
        <PARAM_DESCRIPTION>
 
120
          <SP>: external (function or list or string). Computes the  value  of <VERB>dg/dy+cj*dg/dydot</VERB> for a given value of parameter <VERB>cj</VERB></SP>
 
121
          <PARAM_INDENT>
 
122
            <PARAM_ITEM>
 
123
              <PARAM_NAME>function</PARAM_NAME>
 
124
              <PARAM_DESCRIPTION>
 
125
                <SP>: Its calling sequence must be <VERB>r=jac(t,y,ydot,cj)</VERB> and the <VERB>jac</VERB> function must return <VERB>r=dg(t,y,ydot)/dy+cj*dg(t,y,ydot)/dydot</VERB> where <VERB>cj</VERB> is a real scalar</SP>
 
126
              </PARAM_DESCRIPTION>
 
127
            </PARAM_ITEM>
 
128
            <PARAM_ITEM>
 
129
              <PARAM_NAME>list</PARAM_NAME>
 
130
              <PARAM_DESCRIPTION>
 
131
                <SP>: it must be as follows</SP>
 
132
                <VERBATIM>
 
133
<![CDATA[
 
134
list(jac,x1,x2,...)
 
135
   ]]>
 
136
                </VERBATIM>
 
137
                <P>
 
138
    where the calling sequence of the function <VERB>jac</VERB> is now
 
139
  </P>
 
140
                <VERBATIM>
 
141
<![CDATA[
 
142
r=jac(t,y,ydot,x1,x2,...)
 
143
   ]]>
 
144
                </VERBATIM>
 
145
                <P><VERB>jac</VERB> still returns <VERB>dg/dy+cj*dg/dydot</VERB> as a function of <VERB>(t,y,ydot,cj,x1,x2,...)</VERB>.
 
146
  </P>
 
147
              </PARAM_DESCRIPTION>
 
148
            </PARAM_ITEM>
 
149
            <PARAM_ITEM>
 
150
              <PARAM_NAME>character string</PARAM_NAME>
 
151
              <PARAM_DESCRIPTION>
 
152
                <SP>: it must refer to the name of a fortran subroutine  (see source code of <VERB>jacdd.f</VERB>).</SP>
 
153
              </PARAM_DESCRIPTION>
 
154
            </PARAM_ITEM>
 
155
          </PARAM_INDENT>
 
156
        </PARAM_DESCRIPTION>
 
157
      </PARAM_ITEM>
 
158
      <PARAM_ITEM>
 
159
        <PARAM_NAME>surf</PARAM_NAME>
 
160
        <PARAM_DESCRIPTION>
 
161
          <SP>: external (function or list or string). Computes the  value  of the column vector <VERB>surf(t,y)</VERB> with ng components. Each component defines a surface.</SP>
 
162
          <PARAM_INDENT>
 
163
            <PARAM_ITEM>
 
164
              <PARAM_NAME>function</PARAM_NAME>
 
165
              <PARAM_DESCRIPTION>
 
166
                <SP>: Its calling sequence must be <VERB>surf(t,y)</VERB></SP>
 
167
              </PARAM_DESCRIPTION>
 
168
            </PARAM_ITEM>
 
169
            <PARAM_ITEM>
 
170
              <PARAM_NAME>list</PARAM_NAME>
 
171
              <PARAM_DESCRIPTION>
 
172
                <SP>: it must be as follows</SP>
 
173
                <VERBATIM>
 
174
<![CDATA[
 
175
list(surf,x1,x2,...)
 
176
   ]]>
 
177
                </VERBATIM>
 
178
                <P>
 
179
    where the calling sequence of the function <VERB>surf</VERB> is now
 
180
  </P>
 
181
                <VERBATIM>
 
182
<![CDATA[
 
183
r=surf(t,y,x1,x2,...)
 
184
   ]]>
 
185
                </VERBATIM>
 
186
              </PARAM_DESCRIPTION>
 
187
            </PARAM_ITEM>
 
188
            <PARAM_ITEM>
 
189
              <PARAM_NAME>character string</PARAM_NAME>
 
190
              <PARAM_DESCRIPTION>
 
191
                <SP>: it must refer to the name of a fortran subroutine  (see source code of <VERB>fsurfd.f</VERB>) in directory <VERB>SCDIR/default</VERB></SP>
 
192
              </PARAM_DESCRIPTION>
 
193
            </PARAM_ITEM>
 
194
          </PARAM_INDENT>
 
195
        </PARAM_DESCRIPTION>
 
196
      </PARAM_ITEM>
 
197
      <PARAM_ITEM>
 
198
        <PARAM_NAME>info</PARAM_NAME>
 
199
        <PARAM_DESCRIPTION>
 
200
          <SP>: list which contains <VERB>7</VERB> elements, default value is list([],0,[],[],[],0,0)</SP>
 
201
          <PARAM_INDENT>
 
202
            <PARAM_ITEM>
 
203
              <PARAM_NAME>info(1)  </PARAM_NAME>
 
204
              <PARAM_DESCRIPTION>
 
205
                <SP>: real scalar which gives the maximum time for which <VERB>g</VERB> is allowed  to be evaluated or an empty matrix <VERB>[]</VERB> if no limits imposed for time.</SP>
 
206
              </PARAM_DESCRIPTION>
 
207
            </PARAM_ITEM>
 
208
            <PARAM_ITEM>
 
209
              <PARAM_NAME>info(2)  </PARAM_NAME>
 
210
              <PARAM_DESCRIPTION>
 
211
                <SP>: flag which indicates if <VERB>dassl</VERB> returns its intermediate  computed values (<VERB>flag=1</VERB>) or only the user specified time point  values (<VERB>flag=0</VERB>).</SP>
 
212
              </PARAM_DESCRIPTION>
 
213
            </PARAM_ITEM>
 
214
            <PARAM_ITEM>
 
215
              <PARAM_NAME>info(3)  </PARAM_NAME>
 
216
              <PARAM_DESCRIPTION>
 
217
                <SP>: <VERB>2</VERB> components vector which give the definition <VERB>[ml,mu]</VERB> of band  matrix computed by <VERB>jac</VERB>; <VERB>r(i - j + ml + mu + 1,j) = &quot;dg(i)/dy(j)+cj*dg(i)/dydot(j)&quot;</VERB>.  If <VERB>jac</VERB> returns a full matrix set <VERB>info(3)=[]</VERB>.</SP>
 
218
              </PARAM_DESCRIPTION>
 
219
            </PARAM_ITEM>
 
220
            <PARAM_ITEM>
 
221
              <PARAM_NAME>info(4)  </PARAM_NAME>
 
222
              <PARAM_DESCRIPTION>
 
223
                <SP>: real scalar which gives the maximum step size. Set <VERB>info(4)=[]</VERB> if no  limitation.</SP>
 
224
              </PARAM_DESCRIPTION>
 
225
            </PARAM_ITEM>
 
226
            <PARAM_ITEM>
 
227
              <PARAM_NAME>info(5)  </PARAM_NAME>
 
228
              <PARAM_DESCRIPTION>
 
229
                <SP>: real scalar which gives the initial step size. Set <VERB>info(4)=[]</VERB> if  not specified.</SP>
 
230
              </PARAM_DESCRIPTION>
 
231
            </PARAM_ITEM>
 
232
            <PARAM_ITEM>
 
233
              <PARAM_NAME>info(6)  </PARAM_NAME>
 
234
              <PARAM_DESCRIPTION>
 
235
                <SP>: set <VERB>info(6)=1</VERB> if the solution is known to be non negative,  else set <VERB>info(6)=0</VERB>.</SP>
 
236
              </PARAM_DESCRIPTION>
 
237
            </PARAM_ITEM>
 
238
            <PARAM_ITEM>
 
239
              <PARAM_NAME>info(7)  </PARAM_NAME>
 
240
              <PARAM_DESCRIPTION>
 
241
                <SP>: set <VERB>info(7)=1</VERB> if <VERB>ydot0</VERB> is just an estimation, <VERB>info(7)=0</VERB> if <VERB>g(t0,y0,ydot0)=0</VERB>.</SP>
 
242
              </PARAM_DESCRIPTION>
 
243
            </PARAM_ITEM>
 
244
          </PARAM_INDENT>
 
245
        </PARAM_DESCRIPTION>
 
246
      </PARAM_ITEM>
 
247
      <PARAM_ITEM>
 
248
        <PARAM_NAME>hd</PARAM_NAME>
 
249
        <PARAM_DESCRIPTION>
 
250
          <SP>: real vector which allows to store the <VERB>dassl</VERB> context and to  resume integration</SP>
 
251
        </PARAM_DESCRIPTION>
 
252
      </PARAM_ITEM>
 
253
      <PARAM_ITEM>
 
254
        <PARAM_NAME>r</PARAM_NAME>
 
255
        <PARAM_DESCRIPTION>
 
256
          <SP>: real matrix . Each column is the vector [t;x(t);xdot(t)] where t is time index for which the solution had been computed</SP>
 
257
        </PARAM_DESCRIPTION>
 
258
      </PARAM_ITEM>
 
259
    </PARAM_INDENT>
 
260
  </PARAM>
 
261
  <DESCRIPTION>
 
262
    <P>
 
263
    Solution of the implicit differential equation</P>
 
264
    <VERBATIM>
 
265
<![CDATA[
 
266
    g(t,y,ydot)=0
 
267
    y(t0)=y0  and   ydot(t0)=ydot0
 
268
   ]]>
 
269
    </VERBATIM>
 
270
    <P>
 
271
    Returns the surface crossing instants and the number of the
 
272
    surface reached in <VERB>nn</VERB>.</P>
 
273
    <P>
 
274
    Detailed examples can be found in SCIDIR/tests/dassldasrt.tst</P>
 
275
  </DESCRIPTION>
 
276
  <EXAMPLE>
 
277
<![CDATA[
 
278
//dy/dt = ((2*log(y)+8)/t -5)*y,  y(1) = 1,  1<=t<=6
 
279
//g1 = ((2*log(y)+8)/t - 5)*y 
 
280
//g2 = log(y) - 2.2491 
 
281
y0=1;t=2:6;t0=1;y0d=3;
 
282
atol=1.d-6;rtol=0;ng=2;
 
283
 
 
284
deff('[delta,ires]=res1(t,y,ydot)','ires=0;delta=ydot-((2*log(y)+8)/t-5)*y')
 
285
deff('[rts]=gr1(t,y)','rts=[((2*log(y)+8)/t-5)*y;log(y)-2.2491]')
 
286
 
 
287
[yy,nn]=dasrt([y0,y0d],t0,t,atol,rtol,res1,ng,gr1);
 
288
//(Should return nn=[2.4698972 2])
 
289
 ]]>
 
290
  </EXAMPLE>
 
291
  <SEE_ALSO>
 
292
    <SEE_ALSO_ITEM>
 
293
      <LINK>ode</LINK>
 
294
    </SEE_ALSO_ITEM>
 
295
    <SEE_ALSO_ITEM>
 
296
      <LINK>dassl</LINK>
 
297
    </SEE_ALSO_ITEM>
 
298
    <SEE_ALSO_ITEM>
 
299
      <LINK>impl</LINK>
 
300
    </SEE_ALSO_ITEM>
 
301
    <SEE_ALSO_ITEM>
 
302
      <LINK>fort</LINK>
 
303
    </SEE_ALSO_ITEM>
 
304
    <SEE_ALSO_ITEM>
 
305
      <LINK>link</LINK>
 
306
    </SEE_ALSO_ITEM>
 
307
    <SEE_ALSO_ITEM>
 
308
      <LINK>external</LINK>
 
309
    </SEE_ALSO_ITEM>
 
310
  </SEE_ALSO>
 
311
</MAN>