00001 #ifndef AGGREGATOR_H 00002 #define AGGREGATOR_H 00003 00004 class aggregator 00005 { 00006 public: 00007 00008 // JK -> PM 00009 00010 // defines number of aggregates 00011 void define_na (long i); 00012 // defines matrix size 00013 // i - number of unknowns (n) 00014 // j - number of nonzero entries in matrix (nz) 00015 void define_matsize (long i,long j); 00016 // assembles matrix data 00017 // i - array of row indices 00018 // j - array of column indices 00019 // v - array of matrix entries 00020 void matrix_assemble (long *i,long *j,double *v); 00021 // definice stupne finalniho prolongatoru 00022 // i - pozadovany stupen zhlazeneho prolongatoru 00023 void define_degree (long i); 00024 00025 00026 // PM -> JK 00027 00028 // assembles list of numbers of nodes in aggregates 00029 // pocet uzlu v agregatech 00030 //void assemble_lnnagr (long *i); 00031 void assemble_lnnagr (); 00032 // assembles node numbers in aggregates 00033 // seznamy uzlu v jednotlivych agregatech 00034 // lnagr[i][j] = k - j-ty uzel v i-tem agregatu ma cislo k 00035 //void assemble_lnagr (long **lnagr); 00036 void assemble_lnagr (); 00037 00038 // sestavuje pocet nenulovych prvku ve sloupcich tentativniho prolongatoru 00039 // i[j]=k - v j-tem sloupci je k nenulovych prvku 00040 void assemble_lnuagr_tp (long *i); 00041 00042 // sestavuje tentative prolongator 00043 // agrid - cislo pozadovaneho agregatu 00044 // cid - cislo pozadovaneho sloupce v agregatu 00045 // i - pole indexu 00046 // a - pole hodnot (v pripade rigid body motions v mechanice) 00047 void assemble_tentative_prol (long agrid,long cid,long *i,double *a); 00048 00049 // vraci skutecny stupen prolongatoru 00050 long give_deg (); 00051 00052 // sestavuje pocet nenulovych prvku ve sloupcich smoothed prolongatoru 00053 // i[j]=k - v j-tem sloupci je k nenulovych prvku 00054 void assemble_lnuagr_sp (long *i); 00055 00056 // uprava, sobota 6.1.2007 00057 // agrid - cislo pozadovaneho agregatu 00058 // i obsahuje pole dotcenych uzly po zhlazeni na agregatu agrid 00059 void assemble_lnuagr_sp (long agrid,long *i); 00060 // konec upravy 00061 00062 00063 // sestavuje smoothed prolongator 00064 // agrid - cislo pozadovaneho agregatu 00065 // cid - cislo pozadovaneho sloupce v agregatu 00066 // i - pole indexu 00067 // a - pole hodnot (v pripade rigid body motions v mechanice) 00068 void assemble_smoothed_prol (long agrid,long cid,long *i,double *a); 00069 00070 00071 // number of aggregates 00072 long na; 00073 00074 // list of numbers of nodes in aggregates 00075 long *lnnagr; 00076 // list of node numbers in aggregates 00077 long **lnagr; 00078 00079 // number of nonzero entries in matrix 00080 long nz; 00081 // number of unknowns 00082 long n; 00083 // row indices 00084 long *ri; 00085 // column indices 00086 long *ci; 00087 // matrix entries 00088 double *val; 00089 00090 }; 00091 00092 #endif