Skip to content

Commit 05dbcac

Browse files
committed
Add stored initial residual
1 parent e150cad commit 05dbcac

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/solvers/solver_base.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ class SolverBase {
7070

7171
virtual void SetConstantProlongation(bool const_pro) {}
7272

73+
Real GetInitialResidual() const { return initial_residual; }
7374
Real GetFinalResidual() const { return final_residual; }
74-
int GetFinalIterations() const { return final_iteration; }
75+
int GetFinalIterations() const { return final_iteration + 1; }
7576

7677
void SetRHSContainerLabel(const std::string &rhs) { container_rhs = rhs; }
7778
const std::string &GetBaseContainerLabel() const { return container_base; }
@@ -96,7 +97,8 @@ class SolverBase {
9697
std::string container_u;
9798
// User defined container containing the rhs vector, only needs to contain sol_fields
9899
std::string container_rhs;
99-
100+
101+
Real initial_residual{-1.0};
100102
Real final_residual;
101103
int final_iteration;
102104
};

0 commit comments

Comments
 (0)