Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Amesos_Status.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Amesos: Direct Sparse Solver Package
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact Michael A. Heroux (maherou@sandia.gov)
25 //
26 // ***********************************************************************
27 // @HEADER
28 
29 #include "Amesos_Status.h"
31 
32  // some verbose output:
33  // 0 - no output at all
34  // 1 - output as specified by other parameters
35  // 2 - all possible output
36  if( ParameterList.isParameter("OutputLevel") )
37  verbose_ = ParameterList.get<int>("OutputLevel");
38 
39  // level of debug output:
40  // 0 - no output at all
41  // 1 - some debug output - set by some tests upon a test failure
42  // >1 - more debug output (unused at this point)
43  if( ParameterList.isParameter("DebugLevel") )
44  debug_ = ParameterList.get<int>("DebugLevel");
45 
46  // print some timing information (on process 0)
47  if( ParameterList.isParameter("PrintTiming") )
48  PrintTiming_ = ParameterList.get<bool>("PrintTiming");
49 
50  // print some statistics (on process 0). Do not include timing
51  if( ParameterList.isParameter("PrintStatus") )
52  PrintStatus_ = ParameterList.get<bool>("PrintStatus");
53 
54  // compute norms of some vectors
55  if( ParameterList.isParameter("ComputeVectorNorms") )
56  ComputeVectorNorms_ = ParameterList.get<bool>("ComputeVectorNorms");
57 
58  // compute the true residual Ax-b after solution
59  if( ParameterList.isParameter("ComputeTrueResidual") )
60  ComputeTrueResidual_ = ParameterList.get<bool>("ComputeTrueResidual");
61 
62 }
T & get(ParameterList &l, const std::string &name)
bool isParameter(const std::string &name) const
void SetStatusParameters(const Teuchos::ParameterList &ParameterList)
bool ComputeVectorNorms_
If true, prints the norms of X and B in Solve().
Definition: Amesos_Status.h:62
bool PrintTiming_
If true, prints timing information in the destructor.
Definition: Amesos_Status.h:58
bool PrintStatus_
If true, print additional information in the destructor.
Definition: Amesos_Status.h:60
int verbose_
Toggles the output level.
Definition: Amesos_Status.h:67
int debug_
Sets the level of debug_ output.
Definition: Amesos_Status.h:70
bool ComputeTrueResidual_
If true, computes the true residual in Solve().
Definition: Amesos_Status.h:64