Artifact 021b3b02c08e239056b43024c4d9f0ffe70f3383aab648ed43ca51af324f5433:
- File mtt/lib/cc/mtt_AlgebraicSolver.cc — part of check-in [af3953deae] at 2021-03-01 11:39:42 on branch master — Cleanup repository after cvs2git conversion. (user: jeff@gridfinity.com, size: 530) [annotate] [blame] [check-ins using] [more...]
- File
mttroot/mtt/lib/cc/mtt_AlgebraicSolver.cc
— part of check-in
[eb84d8e84b]
at
2002-07-15 12:50:51
on branch origin/master
— The solution vector (_ui) is no longer re-zeroed each step.
Retaining the previous value appears to give dramatically better performance.Messages to the console are now buffered through clog instead of using cerr. (user: geraint@users.sourceforge.net, size: 530) [annotate] [blame] [check-ins using]
#include "mtt_AlgebraicSolver.hh" ColumnVector MTT::AlgebraicSolver::solve (const ColumnVector &x, const ColumnVector &u, const double &t, const ColumnVector &par) { if (_nyz > 0) { _x = x; _uui.insert(u,0); _t = t; _par = par; Solve(); _uui.insert(_ui,_nu); } else { _uui = u; } return _uui; } ColumnVector MTT::AlgebraicSolver::eval (const ColumnVector &ui) { if (_nyz > 0) _uui.insert(ui,_nu); return mtt_ae(_x,_uui,_t,_par); }