Index: mttroot/mtt/lib/cc/mtt_Hybrd_Solver.cc ================================================================== --- mttroot/mtt/lib/cc/mtt_Hybrd_Solver.cc +++ mttroot/mtt/lib/cc/mtt_Hybrd_Solver.cc @@ -4,19 +4,10 @@ // http://www.netlib.org/minpack/hybrd.f // used by Octave's fsolve MTT::Hybrd_Solver *MTT::Hybrd_Solver::static_ptr; -MTT::Hybrd_Solver (const int npar, - const int nu, - const int nx, - const int ny, - const int nyz) -{ - static_ptr = this; -} - ColumnVector MTT::Hybrd_Solver::f_hybrd (const ColumnVector &tryUi) { MTT::Hybrd_Solver::static_ptr->_yz = MTT::Hybrd_Solver::static_ptr->eval(tryUi); return MTT::Hybrd_Solver::static_ptr->_yz; Index: mttroot/mtt/lib/cc/mtt_Hybrd_Solver.hh ================================================================== --- mttroot/mtt/lib/cc/mtt_Hybrd_Solver.hh +++ mttroot/mtt/lib/cc/mtt_Hybrd_Solver.hh @@ -19,11 +19,14 @@ Hybrd_Solver (const int npar, const int nu, const int nx, const int ny, const int nyz) - : MTT::AlgebraicSolver (npar,nu,nx,ny,nyz); + : MTT::AlgebraicSolver (npar,nu,nx,ny,nyz) + { + static_ptr = this; + } static ColumnVector f_hybrd (const ColumnVector &tryUi); ~Hybrd_Solver (void) {};