/[escript]/branches/domexper/dudley/src/IndexList.c
ViewVC logotype

Diff of /branches/domexper/dudley/src/IndexList.c

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

revision 1628 by phornby, Fri Jul 11 13:12:46 2008 UTC revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC
# Line 1  Line 1 
1    
 /* $Id$ */  
   
2  /*******************************************************  /*******************************************************
3   *  *
4   *           Copyright 2003-2007 by ACceSS MNRF  * Copyright (c) 2003-2008 by University of Queensland
5   *       Copyright 2007 by University of Queensland  * Earth Systems Science Computational Center (ESSCC)
6   *  * http://www.uq.edu.au/esscc
7   *                http://esscc.uq.edu.au  *
8   *        Primary Business: Queensland, Australia  * Primary Business: Queensland, Australia
9   *  Licensed under the Open Software License version 3.0  * Licensed under the Open Software License version 3.0
10   *     http://www.opensource.org/licenses/osl-3.0.php  * http://www.opensource.org/licenses/osl-3.0.php
11   *  *
12   *******************************************************/  *******************************************************/
13    
14    
15  /**************************************************************/  /**************************************************************/
16    
# Line 99  void Finley_IndexList_insertElementsWith Line 98  void Finley_IndexList_insertElementsWith
98      }      }
99    }    }
100  }  }
101    void Finley_IndexList_insertElementsWithRowRangeNoMainDiagonal(Finley_IndexList* index_list, index_t firstRow, index_t lastRow,
102                                                                  Finley_ElementFile* elements, index_t* row_map, index_t* col_map)
103    {
104      index_t color;
105      dim_t e,kr,kc,icol,irow, NN,irow_loc;
106      if (elements!=NULL) {
107        NN=elements->numNodes;
108        for (color=elements->minColor;color<=elements->maxColor;color++) {
109               #pragma omp for private(e,irow,kr,kc,icol,irow_loc) schedule(static)
110               for (e=0;e<elements->numElements;e++) {
111                   if (elements->Color[e]==color) {
112                       for (kr=0;kr<NN;kr++) {
113                         irow=row_map[elements->Nodes[INDEX2(kr,e,NN)]];
114                         if ((firstRow<=irow) && (irow < lastRow)) {
115                              irow_loc=irow-firstRow;
116                              for (kc=0;kc<NN;kc++) {
117                                  icol=col_map[elements->Nodes[INDEX2(kc,e,NN)]];
118                                  if (icol != irow) Finley_IndexList_insertIndex(&(index_list[irow_loc]),icol);
119                              }
120                          }
121                      }
122                   }
123               }
124        }
125      }
126    }
127    
128  /* inserts row index row into the Finley_IndexList in if it does not exist */  /* inserts row index row into the Finley_IndexList in if it does not exist */
129    
# Line 200  Paso_Pattern* Finley_IndexList_createPat Line 225  Paso_Pattern* Finley_IndexList_createPat
225                for(i=n0;i<n;++i) {                for(i=n0;i<n;++i) {
226                    Finley_IndexList_toArray(&index_list[i],&index[ptr[i-n0]],range_min,range_max,index_offset);                    Finley_IndexList_toArray(&index_list[i],&index[ptr[i-n0]],range_min,range_max,index_offset);
227                }                }
228                out=Paso_Pattern_alloc(PATTERN_FORMAT_DEFAULT,1,1,n-n0,ptr,index);                out=Paso_Pattern_alloc(PATTERN_FORMAT_DEFAULT,1,1,n-n0,range_max+index_offset,ptr,index);
229         }         }
230    }    }
231    if (! Finley_noError()) {    if (! Finley_noError()) {

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

  ViewVC Help
Powered by ViewVC 1.1.26