00001 #ifndef COMPROW_H
00002 #define COMPROW_H
00003
00004 #include "matrix.h"
00005 #include "vector.h"
00006 #include "gtopology.h"
00007 #include "csv.h"
00008 #include "densemat.h"
00009
00010 class precond;
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class comprow
00035 {
00036 public:
00037 comprow ();
00038 ~comprow ();
00039 void allocadr (long m);
00040 double* status ();
00041 long decomp ();
00042 void changedecomp ();
00043 void nullmat ();
00044 void numcontr_elem (long *cn,long ndofe);
00045 void numcontr (gtopology *top);
00046 void fillarray_elem (long *cn,long ndofe);
00047 void fillarray (gtopology *top);
00048 void addresses (void);
00049 void sort_and_colindex (void);
00050 void localize (matrix &b,long *cn);
00051 void localized (double *b,long *cn,long nc);
00052 long minimize (double limit);
00053 void initiate (gtopology *top,long ndof,long mespr);
00054 void printmat (FILE *out);
00055 void printdiag (FILE *out);
00056 double give_entry (long ri,long rci);
00057 void add_entry (double e,long ri,long rci);
00058
00059 void mxv_cr (double *b,double *c);
00060 void mxv_cr_new (double *b,double *c);
00061 double mxv_cr_new2 (double *b,double *c);
00062 double mxv_cr_pom (double *b1,double *c1,double *b2,double *c2);
00063
00064 void mv_cr15 (double *b,double *c);
00065
00066 void mtxv_cr (double *b,double *c);
00067 void addmat_cr (double c,comprow &cr);
00068 void scalmat_cr (double c);
00069 void cg (double *x,double *y,long ni,double err,long &ani,double &ares,double zero,long iv);
00070 void cg_new (double *x,double *y,
00071 long ni,double err,long &ani,double &ares,double zero,long iv);
00072
00073 void cg_prec (precond &pr,double *x,double *y,
00074 long ni,double err,long &ani,double &ares,double zero,long iv);
00075
00076 void bicg (double *x,double *y,long ni,double err,long &ani,double &ares,double zero,long iv);
00077 void bicg_new (double *x,double *y,long ni,double err,long &ani,double &ares,double zero,long iv);
00078
00079 double mv_cr15_rev (double *b,double *c);
00080 void cg_cr_rev (double *x,double *y,
00081 long ni,double err,long &ani,double &ares,double limit,long iv);
00082
00083 void copy_cr (comprow &cr);
00084
00085
00086 void fill_data (long nsub,long *smadr,long *smci,double *sma);
00087 void select_submatrix (long *li,long nsub,comprow *smcr);
00088 void select_submatrix (long *li,long nsub,densemat *smdm);
00089 void crxcv_cv (compvect *cvi,compvect *cvo);
00090
00091 long give_negm ();
00092
00093 double estim_spect_radius ();
00094
00095
00096
00097 long n;
00098
00099 long negm;
00100
00101 long *adr;
00102
00103 long *adra;
00104
00105 long *aux;
00106
00107 long *ci;
00108
00109 double *a;
00110
00111 double limit;
00112
00113 long decompid;
00114 };
00115
00116 #endif