AbstractLinAlgPack: C++ Interfaces For Vectors, Matrices And Related Linear Algebra Objects Version of the Day
AbstractLinAlgPack_SuperLUSolver.hpp
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 // Moocho: Multi-functional Object-Oriented arCHitecture for Optimization
00005 //                  Copyright (2003) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Roscoe A. Bartlett (rabartl@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifdef SPARSE_SOLVER_PACK_USE_SUPERLU
00030 
00031 #ifndef SSP_SUPERLU_SOLVER_H
00032 #define SSP_SUPERLU_SOLVER_H
00033 
00034 #include "Teuchos_RCP.hpp"
00035 
00036 namespace SuperLUPack {
00037 
00045 class SuperLUSolver {
00046 public:
00047 
00050 
00057   class FactorizationStructure {
00058   public:
00060     virtual ~FactorizationStructure() {}
00061   };
00062 
00066   class FactorizationNonzeros {
00067   public:
00069     virtual ~FactorizationNonzeros() {}
00070   };
00071 
00073 
00075   virtual ~SuperLUSolver() {}
00076 
00079 
00081   static Teuchos::RCP<SuperLUSolver>                         create_solver();
00083   static Teuchos::RCP<SuperLUSolver::FactorizationStructure> create_fact_struct();
00085   static Teuchos::RCP<SuperLUSolver::FactorizationNonzeros>  create_fact_nonzeros();
00086 
00088 
00091 
00123   virtual void analyze_and_factor(
00124     int                         m
00125     ,int                        n
00126     ,int                        nz
00127     ,const double               a_val[]
00128     ,const int                  a_row_i[]
00129     ,const int                  a_col_ptr[]
00130     ,FactorizationStructure     *fact_struct
00131     ,FactorizationNonzeros      *fact_nonzeros
00132     ,int                        perm_r[]
00133     ,int                        perm_c[]
00134     ,int                        *rank
00135     ) = 0;
00136   
00141   virtual void factor(
00142     int                             m
00143     ,int                            n
00144     ,int                            nz
00145     ,const double                   a_val[]
00146     ,const int                      a_row_i[]
00147     ,const int                      a_col_ptr[]
00148     ,const FactorizationStructure   &fact_struct
00149     ,FactorizationNonzeros          *fact_nonzeros
00150     ) = 0;
00151 
00153   
00156 
00161   virtual void solve(
00162     const FactorizationStructure    &fact_struct
00163     ,const FactorizationNonzeros    &fact_nonzeros
00164     ,bool                           transp
00165     ,int                            n
00166     ,int                            nrhs
00167     ,double                         rhs[]
00168     ,int                            ldrhs
00169     ) const = 0;
00170 
00172 
00173 }; // end class SuperLUSolver
00174 
00175 } // end namespace SuperLUPack
00176 
00177 #endif // SSP_SUPERLU_SOLVER_H
00178 
00179 #endif // SPARSE_SOLVER_PACK_USE_SUPERLU
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends