src/eigsolv/LinSolvers.h

Go to the documentation of this file.
00001 //**************************************************************************
00002 //
00003 //                                 NOTICE
00004 //
00005 // This software is a result of the research described in the report
00006 //
00007 // " A comparison of algorithms for modal analysis in the absence 
00008 //   of a sparse direct method", P. Arbenz, R. Lehoucq, and U. Hetmaniuk,
00009 //  Sandia National Laboratories, Technical report SAND2003-1028J.
00010 //
00011 // It is based on the Epetra, AztecOO, and ML packages defined in the Trilinos
00012 // framework ( http://software.sandia.gov/trilinos/ ).
00013 //
00014 // The distribution of this software follows also the rules defined in Trilinos.
00015 // This notice shall be marked on any reproduction of this software, in whole or
00016 // in part.
00017 //
00018 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00019 // license for use of this work by or on behalf of the U.S. Government.
00020 //
00021 // This program is distributed in the hope that it will be useful, but
00022 // WITHOUT ANY WARRANTY; without even the implied warranty of
00023 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00024 //
00025 // Code Authors: U. Hetmaniuk (ulhetma@sandia.gov), R. Lehoucq (rblehou@sandia.gov)
00026 //
00027 //**************************************************************************
00028 /**************************************************************************
00029  *                                                                         *
00030  *               Swiss Federal Institute of Technology (ETH)               *
00031  *                       CH-8092 Zuerich, Switzerland                      *
00032  *                                                                         *
00033  *                       (C) 1999 All Rights Reserved                      *
00034  *                                                                         *
00035  *                                NOTICE                                   *
00036  *                                                                         *
00037  *  Permission to use, copy, modify, and distribute this software and      *
00038  *  its documentation for any purpose and without fee is hereby granted    *
00039  *  provided that the above copyright notice appear in all copies and      *
00040  *  that both the copyright notice and this permission notice appear in    *
00041  *  supporting documentation.                                              *
00042  *                                                                         *
00043  *  Neither the Swiss Federal Institute of Technology nor the author make  *
00044  *  any representations about the suitability of this software for any     *
00045  *  purpose.  This software is provided ``as is'' without express or       *
00046  *  implied warranty.                                                      *
00047  *                                                                         *
00048  ***************************************************************************/
00049 
00050 #ifndef LIN_SOLVERS_H
00051 #define LIN_SOLVERS_H
00052 
00053 #include "Epetra_ConfigDefs.h"
00054 
00055 #include "Epetra_Operator.h"
00056 #include "Epetra_Vector.h"
00057 
00058 class LinSolvers {
00059 
00060 private:
00061 
00062     const Epetra_Operator *A;
00063     const Epetra_Operator *Prec;
00064 
00065     double *work_s;
00066 
00067     int solverType;
00068 
00069     static const int LINSOLV_CGS;       // not implemented
00070     static const int LINSOLV_MINRES;    // not implemented
00071     static const int LINSOLV_SYMMLQ;    // not implemented
00072     static const int LINSOLV_QMR;
00073 
00074     // Don't define these functions
00075     LinSolvers(const LinSolvers &L);
00076     LinSolvers & operator=(const LinSolvers &L);
00077 
00078 protected:
00079 
00080     int QMRS(const Epetra_Vector &b, Epetra_Vector &x, double _tol, int _itMax);
00081 
00082 public:
00083 
00084     LinSolvers(const Epetra_Operator *AA, const Epetra_Operator *PP, double *wTmp,
00085                int _type = LINSOLV_QMR);
00086 
00087     ~LinSolvers() { }
00088 
00089     int solve(const Epetra_Vector &b, Epetra_Vector &x, double _tol, int _itMax);
00090 
00091 };
00092 
00093 #endif

Generated on Fri Oct 26 13:35:11 2007 for FEMAXX (Finite Element Maxwell Eigensolver) by  doxygen 1.4.7