src/eigsolv/ModalTools.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 #ifndef MODAL_TOOLS_H
00030 #define MODAL_TOOLS_H
00031 
00032 #include "Epetra_ConfigDefs.h"
00033 
00034 #include "Epetra_BLAS.h"
00035 #include "Epetra_Comm.h"
00036 #include "Epetra_LAPACK.h"
00037 #include "Epetra_LocalMap.h"
00038 #include "Epetra_Map.h"
00039 #include "Epetra_MultiVector.h"
00040 #include "Epetra_Operator.h"
00041 #include "Epetra_Time.h"
00042 #include "Epetra_Vector.h"
00043 
00044 #include "FortranRoutines.h"
00045 
00046 class ModalTools {
00047 
00048 private:
00049 
00050     const FortranRoutines callFortran;
00051     const Epetra_BLAS callBLAS;
00052     const Epetra_LAPACK callLAPACK;
00053 
00054     const Epetra_Comm &MyComm;
00055     const Epetra_Time MyWatch;
00056 
00057     double eps;
00058 
00059     double timeQtMult;
00060     double timeQMult;
00061     double timeProj_MassMult;
00062     double timeNorm_MassMult;
00063     double timeProj;
00064     double timeNorm;
00065 
00066     int numProj_MassMult;
00067     int numNorm_MassMult;
00068 
00069 public:
00070 
00071     ModalTools(const Epetra_Comm &_Comm);
00072 
00073     int makeSimpleLumpedMass(const Epetra_Operator *M, double *weight) const;
00074 
00075     int massOrthonormalize(Epetra_MultiVector &X, Epetra_MultiVector &MX,
00076                            const Epetra_Operator *M, const Epetra_MultiVector &Q, int howMany,
00077                            int type = 0, double *WS = 0, double kappa = 1.5625);
00078 
00079     void localProjection(int numRow, int numCol, int length,
00080                          double *U, int ldU, double *MatV, int ldV, 
00081                          double *UtMatV, int ldUtMatV, double *work) const;
00082 
00083     int directSolver(int, double*, int, double*, int, int&, double*, int, double*, int,
00084                      int = 0) const;
00085 
00086     double getTimeProj()  const { return timeProj; }
00087     double getTimeProj_QtMult()    const { return timeQtMult; }
00088     double getTimeProj_QMult()     const { return timeQMult; }
00089     double getTimeProj_MassMult()  const { return timeProj_MassMult; }
00090     int getNumProj_MassMult()      const { return numProj_MassMult; }
00091 
00092     double getTimeNorm()  const { return timeNorm; }
00093     double getTimeNorm_MassMult() const { return timeNorm_MassMult; }
00094     int getNumNorm_MassMult()     const { return numNorm_MassMult; }
00095 
00096 };
00097 
00098 
00099 #endif
00100 

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