/[escript]/trunk/paso/src/SystemMatrix_MIS.cpp
ViewVC logotype

Diff of /trunk/paso/src/SystemMatrix_MIS.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4802 by jfenwick, Tue Apr 2 04:46:45 2013 UTC revision 4803 by caltinay, Wed Mar 26 06:52:28 2014 UTC
# Line 66  void Paso_SystemMatrix_CalcBorderMIS(Pas Line 66  void Paso_SystemMatrix_CalcBorderMIS(Pas
66          for (j=0;j<bordercount;++j) {          for (j=0;j<bordercount;++j) {
67          index_t bnode=border[j];          index_t bnode=border[j];
68          if (ISAVAILABLE(weights[bnode])) {          if (ISAVAILABLE(weights[bnode])) {
69              Paso_Pattern* p=A->mainBlock->pattern;              paso::Pattern* p=A->mainBlock->pattern;
70              weights[bnode]=MISIN;              weights[bnode]=MISIN;
71              /* Now walk the neighbours and mark them unavailable */              /* Now walk the neighbours and mark them unavailable */
72              for (k=p->ptr[bnode];k<p->ptr[bnode+1];++k) {   /* Walk along the row */              for (k=p->ptr[bnode];k<p->ptr[bnode+1];++k) {   /* Walk along the row */
# Line 103  void Paso_SystemMatrix_CalcBorderMIS(Pas Line 103  void Paso_SystemMatrix_CalcBorderMIS(Pas
103    
104  /* used to generate pseudo random numbers: */  /* used to generate pseudo random numbers: */
105    
106  static double Paso_Pattern_mis_seed=.4142135623730951;  static double local_Pattern_mis_seed=.4142135623730951;
107    
108  /* Return a list of nodes which belong to a maximal independent set.  /* Return a list of nodes which belong to a maximal independent set.
109     Note: Only nodes local to this rank will be returned.     Note: Only nodes local to this rank will be returned.
# Line 119  index_t Paso_SystemMatrix_getMIS(Paso_Sy Line 119  index_t Paso_SystemMatrix_getMIS(Paso_Sy
119      char* inborder=NULL;      char* inborder=NULL;
120      double* weights=NULL;      double* weights=NULL;
121      index_t* mis=NULL;      index_t* mis=NULL;
122      Paso_Pattern* pat=A->mainBlock->pattern;      paso::Pattern* pat=A->mainBlock->pattern;
123      int i,j,k, retry;      int i,j,k, retry;
124      char done=1;      char done=1;
125      double seed=Paso_Pattern_mis_seed;      double seed=local_Pattern_mis_seed;
126      Esys_resetError();      Esys_resetError();
127      border=Paso_SparseMatrix_getBorderNodes(A, &count);      border=Paso_SparseMatrix_getBorderNodes(A, &count);
128      if (!Esys_noError()) {      if (!Esys_noError()) {

Legend:
Removed from v.4802  
changed lines
  Added in v.4803

  ViewVC Help
Powered by ViewVC 1.1.26