Actual source code: spooles.h

     4:  #include src/mat/matimpl.h

      8: #include "misc.h"
      9: #include "FrontMtx.h"
     10: #include "SymbFac.h"
     11: #include "MPI/spoolesMPI.h"

     14: typedef struct {
     15:   PetscInt        msglvl,pivotingflag,symflag,seed,FrontMtxInfo,typeflag;
     16:   PetscInt        ordering,maxdomainsize,maxzeros,maxsize,
     17:                   patchAndGoFlag,storeids,storevalues;
     18:   PetscTruth      useQR;
     19:   double          tau,toosmall,fudge;
     20:   FILE            *msgFile ;
     21: } Spooles_options;

     23: typedef struct {
     24:   /* Followings are used for seq and MPI Spooles */
     25:   InpMtx          *mtxA ;        /* coefficient matrix */
     26:   ETree           *frontETree ;  /* defines numeric and symbolic factorizations */
     27:   FrontMtx        *frontmtx ;    /* numeric L, D, U factor matrices */
     28:   IV              *newToOldIV, *oldToNewIV ; /* permutation vectors */
     29:   IVL             *symbfacIVL ;              /* symbolic factorization */
     30:   SubMtxManager   *mtxmanager  ;  /* working array */
     31:   MatStructure    flg;
     32:   double          cpus[20] ;
     33:   PetscInt        *oldToNew,stats[20];
     34:   Spooles_options options;
     35:   Graph           *graph;

     37:   /* Followings are used for MPI Spooles */
     38:   MPI_Comm        comm_spooles;          /* communicator to be passed to spooles */
     39:   IV              *ownersIV,*ownedColumnsIV,*vtxmapIV;
     40:   SolveMap        *solvemap;
     41:   DenseMtx        *mtxY, *mtxX;
     42:   double          *entX;
     43:   PetscInt        *rowindX,rstart,firsttag,nmycol;
     44:   Vec             vec_spooles;
     45:   IS              iden,is_petsc;
     46:   VecScatter      scat;
     47:
     48:   /* A few function pointers for inheritance */
     49:   PetscErrorCode (*MatDuplicate)(Mat,MatDuplicateOption,Mat*);
     50:   PetscErrorCode (*MatCholeskyFactorSymbolic)(Mat,IS,MatFactorInfo*,Mat*);
     51:   PetscErrorCode (*MatLUFactorSymbolic)(Mat,IS,IS,MatFactorInfo*,Mat*);
     52:   PetscErrorCode (*MatView)(Mat,PetscViewer);
     53:   PetscErrorCode (*MatAssemblyEnd)(Mat,MatAssemblyType);
     54:   PetscErrorCode (*MatDestroy)(Mat);
     55:   PetscErrorCode (*MatPreallocate)(Mat,PetscInt,PetscInt,PetscInt*,PetscInt,PetscInt*);

     57:   MatType        basetype;
     58:   PetscTruth     CleanUpSpooles,useQR;
     59: } Mat_Spooles;

     61: EXTERN PetscErrorCode SetSpoolesOptions(Mat, Spooles_options *);
     62: EXTERN PetscErrorCode MatFactorInfo_Spooles(Mat,PetscViewer);

     64: EXTERN PetscErrorCode MatDestroy_SeqAIJSpooles(Mat);
     65: EXTERN PetscErrorCode MatSolve_SeqAIJSpooles(Mat,Vec,Vec);
     66: EXTERN PetscErrorCode MatFactorNumeric_SeqAIJSpooles(Mat,MatFactorInfo*,Mat*);
     67: EXTERN PetscErrorCode MatView_SeqAIJSpooles(Mat,PetscViewer);
     68: EXTERN PetscErrorCode MatAssemblyEnd_SeqAIJSpooles(Mat,MatAssemblyType);
     69: EXTERN PetscErrorCode MatQRFactorSymbolic_SeqAIJSpooles(Mat,IS,IS,MatFactorInfo*,Mat*);
     70: EXTERN PetscErrorCode MatLUFactorSymbolic_SeqAIJSpooles(Mat,IS,IS,MatFactorInfo*,Mat*);
     71: EXTERN PetscErrorCode MatCholeskyFactorSymbolic_SeqAIJSpooles(Mat,IS,MatFactorInfo*,Mat*);
     72: EXTERN PetscErrorCode MatDuplicate_Spooles(Mat,MatDuplicateOption,Mat*);

     74: EXTERN PetscErrorCode MatDestroy_MPIAIJSpooles(Mat);
     75: EXTERN PetscErrorCode MatSolve_MPIAIJSpooles(Mat,Vec,Vec);
     76: EXTERN PetscErrorCode MatFactorNumeric_MPIAIJSpooles(Mat,MatFactorInfo*,Mat*);
     77: EXTERN PetscErrorCode MatAssemblyEnd_MPIAIJSpooles(Mat,MatAssemblyType);
     78: EXTERN PetscErrorCode MatLUFactorSymbolic_MPIAIJSpooles(Mat,IS,IS,MatFactorInfo*,Mat*);

     80: EXTERN PetscErrorCode MatDestroy_SeqSBAIJSpooles(Mat);
     81: EXTERN PetscErrorCode MatGetInertia_SeqSBAIJSpooles(Mat,PetscInt*,PetscInt*,PetscInt*);
     82: EXTERN PetscErrorCode MatCholeskyFactorSymbolic_SeqSBAIJSpooles(Mat,IS,MatFactorInfo*,Mat*);

     84: EXTERN PetscErrorCode MatCholeskyFactorSymbolic_MPISBAIJSpooles(Mat,IS,MatFactorInfo*,Mat*);
     86: EXTERN PetscErrorCode MatConvert_Spooles_Base(Mat,MatType,MatReuse,Mat*);
     87: EXTERN PetscErrorCode MatConvert_SeqAIJ_SeqAIJSpooles(Mat,MatType,MatReuse,Mat*);
     88: EXTERN PetscErrorCode MatConvert_SeqSBAIJ_SeqSBAIJSpooles(Mat,MatType,MatReuse,Mat*);
     89: EXTERN PetscErrorCode MatConvert_MPIAIJ_MPIAIJSpooles(Mat,MatType,MatReuse,Mat*);
     90: EXTERN PetscErrorCode MatConvert_MPISBAIJ_MPISBAIJSpooles(Mat,MatType,MatReuse,Mat*);
     92: #endif