~vcs-imports/escript-finley/trunk

« back to all changes in this revision

Viewing changes to paso/src/Pattern_mis.c

  • Committer: jfenwick
  • Date: 2010-10-11 01:48:14 UTC
  • Revision ID: svn-v4:77569008-7704-0410-b7a0-a92fef0b09fd:trunk:3259
Merging dudley and scons updates from branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
/**************************************************************/
30
30
 
31
 
#include "mpi_C.h"
 
31
 
32
32
#include "Paso.h"
33
33
#include "PasoUtil.h"
34
34
#include "Pattern.h"
35
 
 
 
35
#include "esysUtils/mpi_C.h"
36
36
 
37
37
/* used to generate pseudo random numbers: */
38
38
 
55
55
  bool_t flag;
56
56
  dim_t n=pattern_p->numOutput;
57
57
  if (pattern_p->type & PATTERN_FORMAT_SYM) {
58
 
    Paso_setError(TYPE_ERROR,"Paso_Pattern_mis: symmetric matrix pattern is not supported yet");
 
58
    Esys_setError(TYPE_ERROR,"Paso_Pattern_mis: symmetric matrix pattern is not supported yet");
59
59
    return;
60
60
  }
61
61
  if (pattern_p->numOutput != pattern_p->numInput) {
62
 
     Paso_setError(VALUE_ERROR,"Paso_Pattern_mis: pattern must be square.");
 
62
     Esys_setError(VALUE_ERROR,"Paso_Pattern_mis: pattern must be square.");
63
63
     return;
64
64
  }
65
65
  value=TMPMEMALLOC(n,double);
66
 
  if (!Paso_checkPtr(value)) {
 
66
  if (!Esys_checkPtr(value)) {
67
67
 
68
68
   
69
69
     /* is there any vertex available ?*/
128
128
  index_t out=0, *mis_marker=NULL,i;
129
129
  dim_t n=pattern->numOutput;
130
130
  mis_marker=TMPMEMALLOC(n,index_t);
131
 
  if ( !Paso_checkPtr(mis_marker) ) {
 
131
  if ( !Esys_checkPtr(mis_marker) ) {
132
132
    /* get coloring */
133
133
    #pragma omp parallel for private(i) schedule(static)
134
134
    for (i = 0; i < n; ++i) {
136
136
        mis_marker[i]=-1;
137
137
    }
138
138
 
139
 
    while (Paso_Util_isAny(n,colorOf,-1) && Paso_noError()) {
 
139
    while (Paso_Util_isAny(n,colorOf,-1) && Esys_noError()) {
140
140
       /*#pragma omp parallel for private(i) schedule(static)
141
141
       for (i = 0; i < n; ++i) mis_marker[i]=colorOf[i];*/
142
142
       Paso_Pattern_mis(pattern,mis_marker);