Overview
Comment: | Removed temporary Matrices from mtt_implicit.cc |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2a56f894126ccaaec1207e6c45976c3d |
User & Date: | geraint@users.sourceforge.net on 2001-02-18 09:18:49 |
Other Links: | branch diff | manifest | tags |
Context
2001-02-19
| ||
06:32:02 | Octave path change, remove libblas check-in: b352ebad6c user: geraint@users.sourceforge.net tags: origin/master, trunk | |
2001-02-18
| ||
09:18:49 | Removed temporary Matrices from mtt_implicit.cc check-in: 2a56f89412 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
00:10:30 | Print message. check-in: e80a06d712 user: geraint@users.sourceforge.net tags: origin/master, trunk | |
Changes
Modified mttroot/mtt/bin/trans/make_ode2odes from [491cacbcda] to [4e2c06f136].
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.48 2001/02/11 07:08:59 geraint ## Static declarations of octave_value_lists: small .exe speed improvement ## ## Revision 1.47 2001/02/11 05:25:52 geraint ## Reduced number of matrix operations during .oct simulation data write ## ## Revision 1.46 2001/02/05 08:32:31 geraint | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #! /bin/sh ###################################### ##### Model Transformation Tools ##### ###################################### ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ ## Revision 1.49 2001/02/14 06:06:34 geraint ## Removed octave_value_list wrappers from standalone.exe - speed improvements ## ## Revision 1.48 2001/02/11 07:08:59 geraint ## Static declarations of octave_value_lists: small .exe speed improvement ## ## Revision 1.47 2001/02/11 05:25:52 geraint ## Reduced number of matrix operations during .oct simulation data write ## ## Revision 1.46 2001/02/05 08:32:31 geraint |
︙ | ︙ | |||
284 285 286 287 288 289 290 | #include <octave/${feval_header}> #endif #include "${sys}_def.h" #include "${sys}_sympar.h" #ifdef STANDALONE | | > | | | | | > | | | | | | | > | | | | > | | | | > | | | | > > > | < | > | | | | > | | | | | > | > | | | | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 | #include <octave/${feval_header}> #endif #include "${sys}_def.h" #include "${sys}_sympar.h" #ifdef STANDALONE extern ColumnVector Fmtt_euler ( ColumnVector &x, const ColumnVector &dx, const double &ddt, const int &nx, const ColumnVector &open_switches); extern ColumnVector Fmtt_implicit ( ColumnVector &x, ColumnVector &dx, Matrix &AA, const ColumnVector &AAx, const double &ddt, const int &nx, const ColumnVector &open_switches); extern ColumnVector F${sys}_${ode} ( ColumnVector &x, ColumnVector &u, const double &t, ColumnVector &par); extern ColumnVector F${sys}_${odeo} ( ColumnVector &x, ColumnVector &u, const double &t, ColumnVector &par); extern ColumnVector F${sys}_input ( ColumnVector &x, ColumnVector &y, const double &t, ColumnVector &par); extern ColumnVector F${sys}_numpar ( void); extern Octave_map F${sys}_simpar ( void); extern Matrix F${sys}_smxa ( ColumnVector &x, ColumnVector &u, const double &t, ColumnVector &par); extern ColumnVector F${sys}_smxax ( ColumnVector &x, ColumnVector &u, const double &t, ColumnVector &par); extern ColumnVector F${sys}_state ( ColumnVector &x); extern ColumnVector F${sys}_logic ( ColumnVector &x, ColumnVector &u, const double &t, ColumnVector &par); #endif // STANDALONE inline ColumnVector mtt_${ode} (ColumnVector &x, ColumnVector &u, const double &t, |
︙ | ︙ | |||
376 377 378 379 380 381 382 | f = feval ("${sys}_${odeo}", args, 1); return f(0).${vector_value} (); #endif } inline ColumnVector mtt_implicit (ColumnVector &x, | | | | 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 | f = feval ("${sys}_${odeo}", args, 1); return f(0).${vector_value} (); #endif } inline ColumnVector mtt_implicit (ColumnVector &x, ColumnVector &dx, Matrix &AA, const ColumnVector &AAx, const double &ddt, const int &nx, const ColumnVector &open_switches) { #ifdef STANDALONE return Fmtt_implicit (x, dx, AA, AAx, ddt, nx, open_switches); |
︙ | ︙ |
Modified mttroot/mtt/lib/cc/mtt_implicit.cc from [039828956b] to [e5b126ad31].
1 2 3 4 5 | #include <octave/oct.h> #include <octave/xdiv.h> #ifdef STANDALONE ColumnVector Fmtt_implicit ( ColumnVector &x, | | | | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <octave/oct.h> #include <octave/xdiv.h> #ifdef STANDALONE ColumnVector Fmtt_implicit ( ColumnVector &x, ColumnVector &dx, Matrix &AA, const ColumnVector &AAx, const double &t, const int &Nx, const ColumnVector &openx) { #else // !STANDALONE DEFUN_DLD (mtt_implicit, args, , |
︙ | ︙ | |||
29 30 31 32 33 34 35 | const 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 | < < | < | | < < < | < < < < | < | < < < < < < < < < | < | | < | | | < | < | < < < < < | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | const 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; for (row = 0; row < Nx; row++) { if (0 != openx (row)) { dx (row) = 0.0; for (col = 0; col < Nx; col++) { AA (row,col) = AA (col,row) = 0.0; } } } x = static_cast<ColumnVector> (xleftdiv (AA, static_cast<Matrix>(AAx + dx * t))); for (row = 0; row < Nx; row++) { if (0 != openx (row)) { x (row) = 0.0; } } #ifdef STANDALONE return x; #else // !STANDALONE return octave_value (x); #endif // STANDALONE } |