/[escript]/trunk/paso/src/Pattern_reduceBandwidth.c
ViewVC logotype

Diff of /trunk/paso/src/Pattern_reduceBandwidth.c

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

revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 1841 by gross, Fri Oct 3 03:57:52 2008 UTC
# Line 141  void Paso_Pattern_reduceBandwidth(Paso_P Line 141  void Paso_Pattern_reduceBandwidth(Paso_P
141     if (N != pattern->numInput) {     if (N != pattern->numInput) {
142        Paso_setError(VALUE_ERROR,"Paso_Pattern_reduceBandwidth: pattern needs to be for a square matrix.");        Paso_setError(VALUE_ERROR,"Paso_Pattern_reduceBandwidth: pattern needs to be for a square matrix.");
143     } else {     } else {
144  printf("relabeling of %d DOFs started.\n",N);  /* printf("relabeling of %d DOFs started.\n",N); */
145        degAndIdx=TMPMEMALLOC(N,Paso_DegreeAndIdx);        degAndIdx=TMPMEMALLOC(N,Paso_DegreeAndIdx);
146        oldLabel=TMPMEMALLOC(N,bool_t);        oldLabel=TMPMEMALLOC(N,bool_t);
147        AssignedLevel=TMPMEMALLOC(N,index_t);        AssignedLevel=TMPMEMALLOC(N,index_t);
# Line 152  printf("relabeling of %d DOFs started.\n Line 152  printf("relabeling of %d DOFs started.\n
152           #pragma omp parallel for private(i)           #pragma omp parallel for private(i)
153           for (i=0;i<N;++i) oldToNew[i]=i;           for (i=0;i<N;++i) oldToNew[i]=i;
154           initial_bandwidth=Paso_Pattern_getBandwidth(pattern,oldToNew);           initial_bandwidth=Paso_Pattern_getBandwidth(pattern,oldToNew);
155  printf("initial bandwidth = %d\n",initial_bandwidth);  /* printf("initial bandwidth = %d\n",initial_bandwidth); */
156           /* get the initial bandwidth */           /* get the initial bandwidth */
157           #pragma omp parallel for private(i)           #pragma omp parallel for private(i)
158           for (i=0;i<N;++i) {           for (i=0;i<N;++i) {
# Line 222  printf("initial bandwidth = %d\n",initia Line 222  printf("initial bandwidth = %d\n",initia
222               }               }
223          } /* end of while root loop */          } /* end of while root loop */
224          bandwidth=Paso_Pattern_getBandwidth(pattern,oldToNew);          bandwidth=Paso_Pattern_getBandwidth(pattern,oldToNew);
225  printf("bandwidth after DOF relabeling= %d\n",bandwidth);  /* printf("bandwidth after DOF relabeling= %d\n",bandwidth); */
226          if (bandwidth>=initial_bandwidth) {          if (bandwidth>=initial_bandwidth) {
227  printf("initial labeling used.\n");  /* printf("initial labeling used.\n"); */
228             #pragma omp parallel for private(i)             #pragma omp parallel for private(i)
229             for (i=0;i<N;++i) oldToNew[i]=i;             for (i=0;i<N;++i) oldToNew[i]=i;
230          }          }

Legend:
Removed from v.1811  
changed lines
  Added in v.1841

  ViewVC Help
Powered by ViewVC 1.1.26