Overview
Comment:Octave 2.0.16 compatibility.
Removed static declarations - gave wrong results.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 29b9700f0a2d93df31a698b477b1c2737dfe0920b2a90be7bea757b29e7a52b1
User & Date: geraint@users.sourceforge.net on 2001-04-01 05:18:57.000
Other Links: branch diff | manifest | tags
Context
2001-04-02
08:19:18
Translates modulated parameters into reduce check-in: 801d56870d user: gawthrop@users.sourceforge.net tags: origin/master, trunk
2001-04-01
05:18:57
Octave 2.0.16 compatibility.
Removed static declarations - gave wrong results.
check-in: 29b9700f0a user: geraint@users.sourceforge.net tags: origin/master, trunk
05:17:22
Removed static declarations - gave wrong results with multiple calls of ode2odes. check-in: 6751d6e73d user: geraint@users.sourceforge.net tags: origin/master, trunk
Changes
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
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







-
-
-
-
+
+
+
+




-
-
-
-
+
+
+
+







			    const ColumnVector	&openx)
{
#else // !STANDALONE
DEFUN_DLD (mtt_implicit, args, ,
	   "implicit integration method")
{
#ifdef OCTAVE_DEV
  static ColumnVector  	x	= args(0).column_vector_value ();
  static ColumnVector	dx	= args(1).column_vector_value ();
  static Matrix		AA	= args(2).matrix_value ();
  static ColumnVector	AAx	= args(3).column_vector_value ();
  ColumnVector  	x	= args(0).column_vector_value ();
  ColumnVector		dx	= args(1).column_vector_value ();
  Matrix		AA	= args(2).matrix_value ();
  ColumnVector		AAx	= args(3).column_vector_value ();
  const  double		t	= args(4).double_value ();
  const  int		Nx	= (int) (args(5).double_value ());
  const  ColumnVector	openx	= args(6).column_vector_value ();
#else // !OCTAVE_DEV
  static ColumnVector	x	= args(0).vector_value ();
  static ColumnVector	dx	= args(1).vector_value ();
  static Matrix		AA	= args(2).matrix_value ();
  static ColumnVector	AAx	= args(3).vector_value ();
  ColumnVector		x	= args(0).vector_value ();
  ColumnVector		dx	= args(1).vector_value ();
  Matrix		AA	= args(2).matrix_value ();
  ColumnVector		AAx	= args(3).vector_value ();
  const  double		t	= args(4).double_value ();
  const  int		Nx	= (int) (args(5).double_value ());
  const  ColumnVector	openx	= args(6).vector_value ();
#endif // OCTAVE_DEV
#endif // STANDALONE

  register int row, col;
45
46
47
48
49
50
51

52








53
54
55
56
57
58
59
45
46
47
48
49
50
51
52

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67







+
-
+
+
+
+
+
+
+
+







	    {
	      AA (row,col) = 0.0;
	      AA (col,row) = 0.0;
	    }
	}
    }

#ifdef OCTAVE_DEV
  x = static_cast<ColumnVector> (xleftdiv (AA, static_cast<Matrix>(static_cast<ColumnVector>(AAx + dx * t))));
  x = static_cast<ColumnVector> (xleftdiv (AA, static_cast<Matrix>(AAx + dx * t)));
#else // !OCTAVE_DEV
  Matrix tmp = xleftdiv (AA, static_cast<Matrix>(static_cast<ColumnVector>(AAx + dx * t)));
  for (row = 0; row < Nx; row++)
    {
      x (row) = tmp (row,0);
    }
#endif // OCTAVE_DEV
  
  for (row = 0; row < Nx; row++)
    {
      if (openx (row) > 0.5)
	{
	  x (row) = 0.0;
	}

MTT: Model Transformation Tools
GitHub | SourceHut | Sourceforge | Fossil RSS ]