Actual source code: multigridmat.h

      1: #ifndef TAOPETSCMULTIMAT_H
      2: #define TAOPETSCMULTIMAT_H

      4: #include "../../matrix/taomat_petsc.h"
     5:  #include ../interface/dagridctx.h

      7: #define PETSCDAAPPMAXGRIDS 20

      9: class TaoMultiGridMatPetsc: public TaoMatPetsc{

     11:  public:

     13:   int ndamax;        /* Max number of levels */
     14:   int nda;           /* Number of levels in current application */

     16:   //  TaoMultiGridMatPetsc( GridCtx*,int );
     17:   TaoMultiGridMatPetsc( Mat );

     19:   ~TaoMultiGridMatPetsc();

     21:   GridCtx grid[PETSCDAAPPMAXGRIDS];

     23:   int SetUpMultiGrid(GridCtx*,int );
     24:   int TakeDown();

     26:   virtual int SetDiagonal(TaoVec*);
     27:   virtual int AddDiagonal(TaoVec*);
     28:   virtual int ShiftDiagonal(double);

     30:   virtual int RowScale(TaoVec*);
     31:   virtual int ColScale(TaoVec*);

     33:   virtual int CreateReducedMatrix(TaoIndexSet*,TaoIndexSet*,TaoMat**);
     34:   virtual int SetReducedMatrix(TaoMat*,TaoIndexSet*,TaoIndexSet*);

     36: };

     38: #endif