Amesos2 - Direct Sparse Solver Interfaces  Version of the Day
Amesos2_Status.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Amesos2: Templated Direct Sparse Solver Package
4 //
5 // Copyright 2011 NTESS and the Amesos2 contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
18 #ifndef AMESOS2_STATUS_HPP
19 #define AMESOS2_STATUS_HPP
20 
21 #include <Teuchos_ParameterList.hpp>
22 #include <Teuchos_RCP.hpp>
23 #include <Teuchos_Comm.hpp>
24 
25 #include "Amesos2_TypeDecl.hpp"
26 
27 namespace Amesos2 {
28 
29  template < template <class,class> class ConcreteSolver, class Matrix, class Vector > class SolverCore;
30 
39  class Status {
40  public:
41  template < template <class,class> class ConcreteSolver, class Matrix, class Vector >
42  friend class SolverCore;
43 
44  Status()
45  : numPreOrder_(0)
46  , numSymbolicFact_(0)
47  , numNumericFact_(0)
48  , numSolve_(0)
49 
50  , last_phase_(CLEAN)
51 
52  , lu_nnz_(0)
53  { }
54 
55 
57  ~Status() { };
58 
60  inline int getNumPreOrder() const
61  { return( numPreOrder_ ); }
62 
64  inline int getNumSymbolicFact() const
65  { return( numSymbolicFact_ ); }
66 
68  inline int getNumNumericFact() const
69  { return( numNumericFact_ ); }
70 
72  inline int getNumSolve() const
73  { return( numSolve_ ); }
74 
76  inline bool preOrderingDone() const
77  { return( last_phase_ >= PREORDERING ); }
78 
80  inline bool symbolicFactorizationDone() const
81  { return( last_phase_ >= SYMBFACT ); }
82 
84  inline bool numericFactorizationDone() const
85  { return( last_phase_ >= NUMFACT ); }
86 
93  inline size_t getNnzLU() const
94  { return( lu_nnz_ ); }
95 
96 
97  private:
98 
101 
104 
107 
110 
113 
115  size_t lu_nnz_;
116 
117  }; // end class Amesos2::Status
118 
119 
120 } // end namespace Amesos2
121 
122 #endif // AMESOS2_STATUS_HPP
int getNumNumericFact() const
Returns the number of numeric factorizations performed by the owning solver.
Definition: Amesos2_Status.hpp:68
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers...
Definition: Amesos2_SolverCore_decl.hpp:71
int getNumSymbolicFact() const
Returns the number of symbolic factorizations performed by the owning solver.
Definition: Amesos2_Status.hpp:64
int getNumPreOrder() const
Returns the number of pre-orderings performed by the owning solver.
Definition: Amesos2_Status.hpp:60
Holds internal status data about the owning Amesos2 solver.
Definition: Amesos2_Status.hpp:39
EPhase
Used to indicate a phase in the direct solution.
Definition: Amesos2_TypeDecl.hpp:31
EPhase last_phase_
The last phase of computation that was performed by the owning solver object.
Definition: Amesos2_Status.hpp:112
int numNumericFact_
Number of numeric factorization phases.
Definition: Amesos2_Status.hpp:106
int numPreOrder_
Number of pre-ordering phases.
Definition: Amesos2_Status.hpp:100
bool preOrderingDone() const
If true , then pre-ordering has been performed.
Definition: Amesos2_Status.hpp:76
bool symbolicFactorizationDone() const
If true , then symbolic factorization has been performed.
Definition: Amesos2_Status.hpp:80
int numSymbolicFact_
Number of symbolic factorization phases.
Definition: Amesos2_Status.hpp:103
bool numericFactorizationDone() const
If true , then numeric factorization has been performed.
Definition: Amesos2_Status.hpp:84
size_t getNnzLU() const
Get the number of non-zero entries in the and factors.
Definition: Amesos2_Status.hpp:93
Enum and other types declarations for Amesos2.
int numSolve_
Number of solves.
Definition: Amesos2_Status.hpp:109
~Status()
Default destructor.
Definition: Amesos2_Status.hpp:57
int getNumSolve() const
Returns the number of solves performed by the owning solver.
Definition: Amesos2_Status.hpp:72
size_t lu_nnz_
The number of non-zeros in the factors.
Definition: Amesos2_Status.hpp:115