NGSolve  4.9
linalg/eigen.hpp
00001 #ifndef FILE_EIGEN
00002 #define FILE_EIGEN
00003 
00004 /**************************************************************************/
00005 /* File:   eigen.hpp                                                      */
00006 /* Author: Joachim Schoeberl                                              */
00007 /* Date:   5. Jul. 96                                                     */
00008 /**************************************************************************/
00009 
00010 namespace ngla
00011 {
00012 
00017   class EigenSystem
00018   {
00020     const BaseMatrix *a, *c;
00022     Array<double> ai, bi;
00024     double prec;
00026     int maxsteps;
00027   
00028   public:
00030     EigenSystem (const BaseMatrix & aa);
00032     EigenSystem (const BaseMatrix & aa, const BaseMatrix & ac);
00034     void SetMatrix (const BaseMatrix & aa);
00036     void SetPrecond (const BaseMatrix & ac);
00038     void SetMaxSteps (int amaxsteps);
00040     void SetPrecision (double aprec);
00041 
00043     int Calc();
00044 
00046     double EigenValue (int nr) const;
00048     double MaxEigenValue () const;
00050     int NumEigenValues () const;
00052     void PrintEigenValues (ostream & ost) const;
00053   };
00054 
00055 }
00056 
00057 #endif