/* アンローリング向き行圧縮格納形式 */ typedef struct{ int TotalSize; /* 行列サイズ */ int MySize; /* 自PEサイズ */ int MySize0; /* < npe-1 のサイズ */ int MySize1; /* npe-1 のサイズ */ int MyStart; /* 自PEのスタート位置 */ int MyEnd; /* 自PEのエンド位置+1 */ int csize; /* 行列の行サイズ */ double *aval; /* 行列Aの要素 */ int *cval; /* 非零のインデックス */ int *nsize; /* 各行の非零要素の個数 */ int MSVCount; /* バッファカウント値 */ int *ix; int *iy; double *dxy; } Mat; typedef struct{ int TotalSize; /* ベクトルサイズ */ int MySize; /* 自PEサイズ */ int MySize0; /* < npe-1 のサイズ */ int MySize1; /* npe-1 のサイズ */ int MyStart; /* 自PEのスタート位置 */ int MyEnd; /* 自PEのエンド位置+1 */ double *aval; /* ベクトルの要素 */ int VSVCount; /* バッファカウント値 */ int *ix; double *dx; } Vec; #define PETSC_NULL 0 #define PETSC_DECIDE -1 #define PETSC_DETERMINE PETSC_DECIDE #define PETSC_DEFAULT -2 #define PETSC_COMM_WORLD MPI_COMM_WORLD typedef enum {NOT_SET_VALUES, INSERT_VALUES, ADD_VALUES, MAX_VALUES} InsertMode; typedef enum {MAT_FLUSH_ASSEMBLY=1,MAT_FINAL_ASSEMBLY=0} MatAssemblyType; typedef enum {VIEWER_STDOUT_WORLD} Viewer; int GMRES(Mat *,Vec *,Vec *,int,double); int SetParameter(int,int,int,int,int,int); extern int VecCreate(MPI_Comm,int,int,Vec*); extern int VecSetFromOptions(Vec*); extern int VecDuplicate(Vec*,Vec*); extern int VecDestroy(Vec*); extern int MatCreate(MPI_Comm,int,int,Mat*); extern int MatDestroy(Mat*); extern int MatGetOwnershipRange(Mat*,int*,int*); extern int MatSetValues(Mat*,int,int*,int,int*,double*,InsertMode); /* extern int SLESCreate(MPI_Comm,SLES*); extern int SLESDestroy(SLES); extern int SLESGetPC(SLES,PC*); extern int SLESGetKSP(SLES,KSP*); extern int SLESSetOperators(SLES,Mat,Mat,MatStructure); extern int SLESSolve(SLES,Vec,Vec,int*); extern int SLESSolveTrans(SLES,Vec,Vec,int*); extern int SLESSetFromOptions(SLES); extern int SLESSetTypesFromOptions(SLES); extern int SLESPrintHelp(SLES); extern int SLESView(SLES,Viewer); extern int SLESSetUp(SLES,Vec,Vec); extern int SLESSetUpOnBlocks(SLES); extern int SLESSetOptionsPrefix(SLES,char*); extern int SLESAppendOptionsPrefix(SLES,char*); extern int SLESGetOptionsPrefix(SLES,char**); extern int PCBJacobiGetSubSLES(PC,int*,int*,SLES**); extern int PCASMGetSubSLES(PC,int*,int*,SLES**); extern int KSPGMRESSetRestart(KSP, int); extern int KSPGMRESSetPreAllocateVectors(KSP); extern int KSPGMRESSetOrthogonalization(KSP,int (*)(KSP,int)); extern int KSPGMRESUnmodifiedGramSchmidtOrthogonalization(KSP,int); extern int KSPGMRESModifiedGramSchmidtOrthogonalization(KSP,int); extern int KSPGMRESIROrthogonalization(KSP,int); extern int KSPGMRESPrestartSet(KSP,int); */