Belos  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
BelosInnerSolveResult.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Belos: Block Linear Solvers Package
4 //
5 // Copyright 2004-2016 NTESS and the Belos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef __Belos_InnerSolverResult_hpp
11 #define __Belos_InnerSolverResult_hpp
12 
13 #include <BelosTypes.hpp> // ReturnType
14 #include <map>
15 #include <string>
16 
17 namespace Belos {
18 
35  public:
53  InnerSolveResult (const ReturnType theResult,
54  const int theNumRestartCycles,
55  const int theTotalNumIters,
56  const std::map<std::string, double>& theExtraData);
57 
59  InnerSolveResult (const ReturnType theResult,
60  const int theNumRestartCycles,
61  const int theTotalNumIters);
62 
70  return result_;
71  }
72 
76  int totalNumIters() const {
77  return totalNumIters_;
78  }
79 
81  int numRestartCycles() const {
82  return numRestartCycles_;
83  }
84 
91  const std::map<std::string, double>& extraData () const {
92  return extraData_;
93  }
94 
95  private:
96  ReturnType result_;
97  int numRestartCycles_, totalNumIters_;
98  std::map<std::string, double> extraData_;
99 
100  static ReturnType
101  validatedReturnType (const ReturnType ret);
102 
103  static int
104  requireNonNegInt (const int k);
105  };
106 
107 } // namespace Belos
108 
109 
110 #endif // __Belos_InnerSolverResult_hpp
Collection of types and exceptions used within the Belos solvers.
InnerSolveResult(const ReturnType theResult, const int theNumRestartCycles, const int theTotalNumIters, const std::map< std::string, double > &theExtraData)
Constructor.
Represents the result of an inner solve.
int totalNumIters() const
Total number of iterations completed over all restarts.
int numRestartCycles() const
Total number of restart cycles.
ReturnType result()
Did the inner solve converge?
ReturnType
Whether the Belos solve converged for all linear systems.
Definition: BelosTypes.hpp:123
const std::map< std::string, double > & extraData() const
&quot;Extra&quot; data from the inner solve.

Generated on Fri Nov 22 2024 09:23:06 for Belos by doxygen 1.8.5