~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/nonlinear/impl.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
impl             Scilab Group             Scilab Function              impl
 
2
NAME
 
3
   impl - differential algebraic equation
 
4
  
 
5
DESCRIPTION
 
6
 y=impl([type],y0,ydot0,t0,t [,atol, [rtol]],res,adda [,jac])
 
7
PARAMETERS
 
8
 y0,ydot0   : real vectors or matrix (initial conditions).
 
9
            
 
10
 t0         : real scalar (initial time).
 
11
            
 
12
 t          : real vector (times at which the solution is computed).
 
13
            
 
14
 res,adda   : externals (function or character string or list).
 
15
            
 
16
 type       : string 'adams' or 'stiff'
 
17
            
 
18
 atol,rtol  : real scalar or real vector of the same size as  as y.
 
19
            
 
20
 jac        : external (function or character string or list).
 
21
            
 
22
DESCRIPTION
 
23
   Solution of the linear implicit differential equation
 
24
  
 
25
   A(t,y) dy/dt=g(t,y), y(t0)=y0
 
26
  
 
27
   t0 is the initial instant, y0 is the vector of initial conditions Vector
 
28
  ydot0 of the time derivative of y at t0 must also be given. r The input
 
29
  res is an external i.e. a function with specified syntax, or the name a
 
30
  Fortran subroutine or a C function  (character string) with specified
 
31
  calling sequence or a list.
 
32
  
 
33
   If res is a function, its syntax must be as follows:
 
34
  
 
35
 r = res(t,y,ydot)
 
36
   where t is a real scalar (time) and y and ydot are real vector (state and
 
37
  derivative of the state).  This function must return
 
38
  r=g(t,y)-A(t,y)*ydot.  If res is a character string, it refers to the
 
39
  name of a Fortran subroutine or a C function. See
 
40
  SCIDIR/routines/default/Ex-impl.f for an example to do that.  res can
 
41
  also be a list: see the help of ode.  The input adda is also an external.
 
42
  
 
43
   If adda is a function, its syntax must be as follows:
 
44
  
 
45
 r = adda(t,y,p)
 
46
   and it must return r=A(t,y)+p where p is a matrix to be added to A(t,y). 
 
47
  If adda is a character string, it refers to the name of a Fortran
 
48
  subroutine or a C function. See SCIDIR/routines/default/Ex-impl.f for an
 
49
  example to do that.  adda can also be a list: see the help of ode.  The
 
50
  input jac is also an external.
 
51
  
 
52
   If adda is a function, its syntax must be as follows:
 
53
  
 
54
 j = jac(t,y,ydot)
 
55
   and it must return the Jacobian of r=g(t,y)-A(t,y)*ydot with respect to
 
56
  y.  If jac is a character string, it refers to the name of a Fortran
 
57
  subroutine or a C function. See SCIDIR/routines/default/Ex-impl.f for an
 
58
  example to do that.  jac can also be a list: see the help of ode. 
 
59
  
 
60
EXAMPLES
 
61
 y=impl([1;0;0],[-0.04;0.04;0],0,0.4,'resid','aplusp');
 
62
 // Using hot restart 
 
63
 //[x1,w,iw]=impl([1;0;0],[-0.04;0.04;0],0,0.2,'resid','aplusp');
 
64
 // hot start from previous call 
 
65
 //[x1]=impl([1;0;0],[-0.04;0.04;0],0.2,0.4,'resid','aplusp',w,iw);
 
66
 //maxi(abs(x1-x))
 
67
SEE ALSO
 
68
   dassl, ode, external
 
69