Commit 6e06a2eb authored by Martin Marinov's avatar Martin Marinov
Browse files

NewtonSolver: Minor const code improvements.

parent 79c0f713
......@@ -122,11 +122,12 @@ int NewtonSolver::solve(NProblemInterface* _problem, const SMatrixD& _A,
DEB_time_func_def;
// number of unknowns
int n = _problem->n_unknowns();
const int n = _problem->n_unknowns();
// number of constraints
int m = _b.size();
const int m = _b.size();
DEB_line(2, "optimize via Newton with " << n << " unknowns and " << m << " linear constraints");
DEB_line(2, "optimize via Newton with " << n << " unknowns and " << m <<
" linear constraints");
// initialize vectors of unknowns
VectorD x(n);
......@@ -386,7 +387,7 @@ bool NewtonSolver::numerical_factorization(SMatrixD& _KKT)
//-----------------------------------------------------------------------------
void NewtonSolver::solve_kkt_system( VectorD& _rhs, VectorD& _dx)
void NewtonSolver::solve_kkt_system(const VectorD& _rhs, VectorD& _dx)
{
DEB_enter_func;
switch(solver_type_)
......
......@@ -101,7 +101,7 @@ protected:
bool numerical_factorization(SMatrixD& _KKT);
void solve_kkt_system(VectorD& _rhs, VectorD& _dx);
void solve_kkt_system(const VectorD& _rhs, VectorD& _dx);
// deprecated function!
// solve
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment