00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
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