File: simblk.c

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (48 lines) | stat: -rw-r--r-- 1,479 bytes parent folder | download
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
/* Copyright INRIA */
#include "../machine.h"
#include "import.h"
struct {
    integer nblk, nordptr, nout, ng, nrwp, niwp, ncord, noord, nzord;
} C2F(cossiz);

struct {
    integer iero;
} C2F(ierode);

ScicosImport  scicos_imp;
struct {
    integer kfun;
} C2F(curblk);

int C2F(simblk)(neq, t, xc, xcdot)
     integer *neq;
     double *t, *xc, *xcdot;
    
     
     /* 
	!purpose 
	compute state derivative of the continuous part
	!calling sequence 
	neq   : integer the size of the  continuous state
	t     : current time 
	xc    : double precision vector whose  contains the continuous state. 
	xcdot : double precision vector, contain the computed derivative 
	of the state 
	*/
    { integer nordclk;
	C2F(ierode).iero = 0;
	nordclk=scicos_imp.ordptr[C2F(cossiz).nordptr-1]-1;
	C2F(odoit)(neq, xcdot, xc, scicos_imp.xptr, scicos_imp.z, scicos_imp.zptr, scicos_imp.iz, 
	       scicos_imp.izptr, t, 
	       scicos_imp.tevts, scicos_imp.evtspt, &scicos_imp.nevts, &scicos_imp.pointi, 
	       scicos_imp.inpptr, scicos_imp.inplnk, scicos_imp.outptr, scicos_imp.outlnk, 
	       scicos_imp.lnkptr, 
	       scicos_imp.clkptr, scicos_imp.ordptr, &C2F(cossiz).nordptr, scicos_imp.ordclk, 
	       &nordclk, scicos_imp.cord, 
	       scicos_imp.oord, scicos_imp.zord, 
	       scicos_imp.critev, scicos_imp.rpar, scicos_imp.rpptr, scicos_imp.ipar, 
	       scicos_imp.ipptr, scicos_imp.funptr, scicos_imp.funtyp, scicos_imp.outtb, 
	       &C2F(ierode).iero);
	    
    }