Amesos2 - Direct Sparse Solver Interfaces Version of the Day
Amesos2_Status.hpp
Go to the documentation of this file.
1// @HEADER
2//
3// ***********************************************************************
4//
5// Amesos2: Templated Direct Sparse Solver Package
6// Copyright 2011 Sandia Corporation
7//
8// Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
9// the U.S. Government retains certain rights in this software.
10//
11// Redistribution and use in source and binary forms, with or without
12// modification, are permitted provided that the following conditions are
13// met:
14//
15// 1. Redistributions of source code must retain the above copyright
16// notice, this list of conditions and the following disclaimer.
17//
18// 2. Redistributions in binary form must reproduce the above copyright
19// notice, this list of conditions and the following disclaimer in the
20// documentation and/or other materials provided with the distribution.
21//
22// 3. Neither the name of the Corporation nor the names of the
23// contributors may be used to endorse or promote products derived from
24// this software without specific prior written permission.
25//
26// THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
27// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
30// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
34// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
35// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
36// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37//
38// Questions? Contact Michael A. Heroux (maherou@sandia.gov)
39//
40// ***********************************************************************
41//
42// @HEADER
43
52#ifndef AMESOS2_STATUS_HPP
53#define AMESOS2_STATUS_HPP
54
55#include <Teuchos_ParameterList.hpp>
56#include <Teuchos_RCP.hpp>
57#include <Teuchos_Comm.hpp>
58
59#include "Amesos2_TypeDecl.hpp"
60
61namespace Amesos2 {
62
63 template < template <class,class> class ConcreteSolver, class Matrix, class Vector > class SolverCore;
64
73 class Status {
74 public:
75 template < template <class,class> class ConcreteSolver, class Matrix, class Vector >
76 friend class SolverCore;
77
78 Status()
79 : numPreOrder_(0)
82 , numSolve_(0)
83
84 , last_phase_(CLEAN)
85
86 , lu_nnz_(0)
87 { }
88
89
91 ~Status() { };
92
94 inline int getNumPreOrder() const
95 { return( numPreOrder_ ); }
96
98 inline int getNumSymbolicFact() const
99 { return( numSymbolicFact_ ); }
100
102 inline int getNumNumericFact() const
103 { return( numNumericFact_ ); }
104
106 inline int getNumSolve() const
107 { return( numSolve_ ); }
108
110 inline bool preOrderingDone() const
111 { return( last_phase_ >= PREORDERING ); }
112
114 inline bool symbolicFactorizationDone() const
115 { return( last_phase_ >= SYMBFACT ); }
116
118 inline bool numericFactorizationDone() const
119 { return( last_phase_ >= NUMFACT ); }
120
127 inline size_t getNnzLU() const
128 { return( lu_nnz_ ); }
129
130
131 private:
132
135
138
141
144
147
149 size_t lu_nnz_;
150
151 }; // end class Amesos2::Status
152
153
154} // end namespace Amesos2
155
156#endif // AMESOS2_STATUS_HPP
Enum and other types declarations for Amesos2.
Amesos2::SolverCore: A templated interface for interaction with third-party direct sparse solvers.
Definition Amesos2_SolverCore_decl.hpp:106
Holds internal status data about the owning Amesos2 solver.
Definition Amesos2_Status.hpp:73
bool numericFactorizationDone() const
If true , then numeric factorization has been performed.
Definition Amesos2_Status.hpp:118
int numPreOrder_
Number of pre-ordering phases.
Definition Amesos2_Status.hpp:134
bool preOrderingDone() const
If true , then pre-ordering has been performed.
Definition Amesos2_Status.hpp:110
int numNumericFact_
Number of numeric factorization phases.
Definition Amesos2_Status.hpp:140
int getNumNumericFact() const
Returns the number of numeric factorizations performed by the owning solver.
Definition Amesos2_Status.hpp:102
int numSolve_
Number of solves.
Definition Amesos2_Status.hpp:143
EPhase last_phase_
The last phase of computation that was performed by the owning solver object.
Definition Amesos2_Status.hpp:146
bool symbolicFactorizationDone() const
If true , then symbolic factorization has been performed.
Definition Amesos2_Status.hpp:114
int getNumPreOrder() const
Returns the number of pre-orderings performed by the owning solver.
Definition Amesos2_Status.hpp:94
size_t lu_nnz_
The number of non-zeros in the factors.
Definition Amesos2_Status.hpp:149
int getNumSolve() const
Returns the number of solves performed by the owning solver.
Definition Amesos2_Status.hpp:106
int numSymbolicFact_
Number of symbolic factorization phases.
Definition Amesos2_Status.hpp:137
int getNumSymbolicFact() const
Returns the number of symbolic factorizations performed by the owning solver.
Definition Amesos2_Status.hpp:98
size_t getNnzLU() const
Get the number of non-zero entries in the and factors.
Definition Amesos2_Status.hpp:127
~Status()
Default destructor.
Definition Amesos2_Status.hpp:91
EPhase
Used to indicate a phase in the direct solution.
Definition Amesos2_TypeDecl.hpp:65