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
00030 #ifndef FACTOR_DH
00031 #define FACTOR_DH
00032
00033 #include "euclid_common.h"
00034
00035 #ifdef __cplusplus
00036 extern "C"
00037 {
00038 #endif
00039
00040 struct _factor_dh
00041 {
00042
00043 int m, n;
00044
00045 int id;
00046 int beg_row;
00047 int first_bdry;
00048 int bdry_count;
00049
00050
00051
00052
00053 bool blockJacobi;
00054
00055
00056 int *rp;
00057 int *cval;
00058 REAL_DH *aval;
00059 int *fill;
00060 int *diag;
00061 int alloc;
00062
00063
00064 int num_recvLo, num_recvHi;
00065 int num_sendLo, num_sendHi;
00066 double *work_y_lo;
00067
00068
00069 double *work_x_hi;
00070
00071
00072 double *sendbufLo, *sendbufHi;
00073 int *sendindLo, *sendindHi;
00074 int sendlenLo, sendlenHi;
00075 bool solveIsSetup;
00076 Numbering_dh numbSolve;
00077
00078 MPI_Request recv_reqLo[MAX_MPI_TASKS], recv_reqHi[MAX_MPI_TASKS];
00079 MPI_Request send_reqLo[MAX_MPI_TASKS], send_reqHi[MAX_MPI_TASKS];
00080 MPI_Request requests[MAX_MPI_TASKS];
00081 MPI_Status status[MAX_MPI_TASKS];
00082
00083 bool debug;
00084 };
00085
00086 extern void Factor_dhCreate (Factor_dh * mat);
00087 extern void Factor_dhDestroy (Factor_dh mat);
00088
00089 extern void Factor_dhTranspose (Factor_dh matIN, Factor_dh * matOUT);
00090
00091 extern void Factor_dhInit (void *A, bool fillFlag, bool avalFlag,
00092 double rho, int id, int beg_rowP, Factor_dh * F);
00093
00094 extern void Factor_dhReallocate (Factor_dh F, int used, int additional);
00095
00096
00097
00098
00099
00100 extern void Factor_dhSolveSetup (Factor_dh mat, SubdomainGraph_dh sg);
00101
00102
00103 extern void Factor_dhSolve (double *rhs, double *lhs, Euclid_dh ctx);
00104 extern void Factor_dhSolveSeq (double *rhs, double *lhs, Euclid_dh ctx);
00105
00106
00107 extern double Factor_dhCondEst (Factor_dh mat, Euclid_dh ctx);
00108 extern double Factor_dhMaxValue (Factor_dh mat);
00109 extern double Factor_dhMaxPivotInverse (Factor_dh mat);
00110
00111 extern int Factor_dhReadNz (Factor_dh mat);
00112 extern void Factor_dhPrintTriples (Factor_dh mat, char *filename);
00113
00114 extern void Factor_dhPrintGraph (Factor_dh mat, char *filename);
00115
00116
00117
00118 extern void Factor_dhPrintDiags (Factor_dh mat, FILE * fp);
00119 extern void Factor_dhPrintRows (Factor_dh mat, FILE * fp);
00120
00121
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 #endif