Skip to content

Commit

Permalink
fix variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
tarun-mitruka committed Apr 3, 2024
1 parent a96df51 commit fb7d426
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/iks005_newtonRaphson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ void newtonRaphsonVeryBasicExample() {
/// Implementation with Ikarus
Ikarus::NewtonRaphson nr(nonLinOp);
nr.setup({eps, maxIter});
const auto solverInfo = nr.solve(x);
const auto solverState = nr.solve(x);

std::cout << "success: " << solverInfo.success << "\n";
std::cout << "iterations: " << solverInfo.iterations << "\n";
std::cout << "residuum: " << solverInfo.residualNorm << "\n";
std::cout << "success: " << solverState.success << "\n";
std::cout << "iterations: " << solverState.iterations << "\n";
std::cout << "residuum: " << solverState.residualNorm << "\n";
std::cout << "solution: " << x << "\n";
std::cout << "expected solution: " << xExpected << "\n";
}
Expand Down Expand Up @@ -73,8 +73,8 @@ void newtonRaphsonBasicExampleWithLogger() {
auto ourSimpleObserver = std::make_shared<OurFirstObserver>();
nr.subscribe(Ikarus::NonLinearSolverMessages::ITERATION_STARTED, ourSimpleObserver);

const auto solverInfo = nr.solve(x);
if (solverInfo.success)
const auto solverState = nr.solve(x);
if (solverState.success)
std::cout << "solution: " << x << "\n";
else
std::cout << "The Newton-Raphson procedure failed to converge" << std::endl;
Expand Down

0 comments on commit fb7d426

Please sign in to comment.