//--------------------------------------------------------- DVec& lu_solve(DMat& LU, const DVec& b) //--------------------------------------------------------- { // Solve a linear system using lu-factored square matrix. DVec *x = new DVec("x", OBJ_temp); try { LU.solve_LU(b, (*x), false, false); } catch(...) { x->Free(); } return (*x); }