fei_Solver_Amesos.hpp

00001 #ifndef _fei_Solver_Amesos_h_
00002 #define _fei_Solver_Amesos_h_
00003 
00004 /*--------------------------------------------------------------------*/
00005 /*    Copyright 2005 Sandia Corporation.                              */
00006 /*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
00007 /*    non-exclusive license for use of this work by or on behalf      */
00008 /*    of the U.S. Government.  Export of this program may require     */
00009 /*    a license from the United States Government.                    */
00010 /*--------------------------------------------------------------------*/
00011 
00012 #include <fei_trilinos_macros.hpp>
00013 
00014 #ifdef HAVE_FEI_AMESOS
00015 
00016 #include <fei_Solver.hpp>
00017 
00018 namespace Teuchos {
00019   class ParameterList;
00020 }
00021 class Amesos;
00022 class Amesos_BaseSolver;
00023 class Epetra_LinearProblem;
00024 class Epetra_CrsMatrix;
00025 class Epetra_MultiVector;
00026 class Epetra_VbrMatrix;
00027 
00028 class Solver_Amesos : public fei::Solver {
00029  public:
00030   Solver_Amesos();
00031   virtual ~Solver_Amesos();
00032 
00033   int solve(fei::LinearSystem* linearSystem,
00034       fei::Matrix* preconditioningMatrix,
00035       const fei::ParameterSet& parameterSet,
00036       int& iterationsTaken,
00037       int& status);
00038 
00039   Teuchos::ParameterList& get_ParameterList();
00040 
00041  private:
00042   int solve(fei::LinearSystem* linearSystem,
00043       fei::Matrix* preconditioningMatrix,
00044       int numParams,
00045       const char* const* solverParams,
00046       int& iterationsTaken,
00047       int& status);
00048 
00049   int parseParameters(int numParams,
00050           const char*const* params);
00051 
00052   int solve_private(Epetra_CrsMatrix* A,
00053         Epetra_MultiVector* x,
00054         Epetra_MultiVector* b,
00055         fei::Matrix* preconditioningMatrix,
00056         int numParams,
00057         const char* const* solverParams,
00058         int& iterationsTaken,
00059         int& status);
00060 
00061   int solve_private(Epetra_VbrMatrix* A,
00062         Epetra_MultiVector* x,
00063         Epetra_MultiVector* b,
00064         fei::Matrix* preconditioningMatrix,
00065         int numParams,
00066         const char* const* solverParams,
00067         int& iterationsTaken,
00068         int& status);
00069 
00070  private:
00071   double tolerance_;
00072   int maxIters_;
00073   Amesos* amesos_factory_;
00074   Amesos_BaseSolver* amesos_solver_;
00075   Epetra_LinearProblem* epetra_linearproblem_;
00076   Teuchos::ParameterList* paramlist_;
00077 }; //class Solver_Amesos
00078 
00079 #endif
00080 
00081 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends
Generated on Wed Apr 13 10:08:24 2011 for FEI by  doxygen 1.6.3