Amesos Package Browser (Single Doxygen Collection)  Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Amesos_MC64.h
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 
41 #ifndef AMESOS_MC64_H
42 #define AMESOS_MC64_H
43 
44 #if defined(Amesos_SHOW_DEPRECATED_WARNINGS)
45 #ifdef __GNUC__
46 #warning "The Amesos package is deprecated"
47 #endif
48 #endif
49 
50 #include "Amesos_ConfigDefs.h"
51 #if defined(HAVE_AMESOS_MC64)
52 #include "Amesos_Scaling.h"
53 #include "Amesos_Reordering.h"
54 
55 class Epetra_RowMatrix;
56 
58 
67 class Amesos_MC64 : public Amesos_Scaling, public Amesos_Reordering
68 {
69  public:
71  Amesos_MC64(const Epetra_RowMatrix& A, int JOB,
72  const bool StoreTranspose = false,
73  const bool analyze = false);
74 
76  ~Amesos_MC64() {}
77 
79  int GetINFO(const int pos) const
80  {
81  if (pos <= 0 || pos > 10)
82  throw(-1);
83 
84  return(INFO_[pos - 1]);
85  }
86 
88  int* GetRowPerm()
89  {
90  return(0);
91  }
92 
94  int* GetColPerm()
95  {
96  return((int*)&CPERM_[0]);
97  }
98 
100  double* GetRowScaling()
101  {
102  return((double*)&DW_[0]);
103  }
104 
106  double* GetColScaling();
107 
109  int* GetCPERM()
110  {
111  return((int*)&CPERM_[0]);
112  }
113 
115  double* GetDW()
116  {
117  return((double*)&DW_[0]);
118  }
119 
120  private:
121  //
123  int Compute(int JOB, const bool StoreTranspose, const bool analyze);
124 
125  const Epetra_RowMatrix& A_;
126  int ICNTL_[10];
127  int INFO_[10];
128  std::vector<int> CPERM_;
129  std::vector<double> DW_;
130 };
131 
132 #endif
133 #endif
Amesos_Reordering: base class for reordering procedures.
Amesos_Scaling: base class for scaling procedures.
Interface to MC64, reordering and scaling algorithm.