--- trunk/esys2/finley/src/finleyC/IndexList.c 2004/12/15 03:48:48 100 +++ trunk/esys2/finley/src/finleyC/IndexList.c 2005/07/08 04:08:13 123 @@ -22,17 +22,14 @@ triangle of the matrix is stored. */ void Finley_IndexList_insertElements(Finley_IndexList* index_list, Finley_ElementFile* elements, - int reduce_row_order, int packed_row_block_size, maybelong* row_Label, - int reduce_col_order, int packed_col_block_size, maybelong* col_Label, - int symmetric, Finley_SystemMatrixType matType) { - maybelong e,kr,ir,kc,ic,NN_row,NN_col,i; - Finley_IndexList * tmp_list; - maybelong jr,jc,icol,irow,color; - + bool_t reduce_row_order, index_t* row_Label, + bool_t reduce_col_order, index_t* col_Label) { + index_t color; + dim_t e,kr,kc,NN_row,NN_col,i,icol,irow; if (elements!=NULL) { - maybelong NN=elements->ReferenceElement->Type->numNodes; - maybelong id[NN],*row_node,*col_node; + dim_t NN=elements->ReferenceElement->Type->numNodes; + index_t id[NN],*row_node,*col_node; for (i=0;iReferenceElement->Type->linearNodes; @@ -48,121 +45,37 @@ row_node=id; NN_row=elements->ReferenceElement->Type->numNodes; } - - #pragma omp parallel private(color) - { - switch(matType) { - case CSR: - if (symmetric) { - for (color=0;colornumColors;color++) { - #pragma omp for private(e,kr,jr,kc,jc,ir,irow,ic,icol,tmp_list) schedule(static) - for (e=0;enumElements;e++) { - if (elements->Color[e]==color) { - for (kr=0;krNodes[INDEX2(row_node[kr],e,NN)]]; - for (ir=0;irNodes[INDEX2(col_node[kc],e,NN)]]; - for (ic=0;icnumColors;color++) { - #pragma omp for private(e,kr,jr,kc,jc,ir,irow,ic,icol,tmp_list) schedule(static) - for (e=0;enumElements;e++) { - if (elements->Color[e]==color) { - for (kr=0;krNodes[INDEX2(row_node[kr],e,NN)]]; - for (ir=0;irNodes[INDEX2(col_node[kc],e,NN)]]; - for (ic=0;icnumColors;color++) { - #pragma omp for private (e,kr,jr,kc,jc,ir,irow,ic,icol,tmp_list) schedule(static) - for (e=0;enumElements;e++) { - if (elements->Color[e]==color) { - for (kc=0;kcNodes[INDEX2(col_node[kc],e,NN)]]; - for (ic=0;icNodes[INDEX2(row_node[kr],e,NN)]]; - for (ir=0;irminColor;color<=elements->maxColor;color++) { + #pragma omp for private(e,irow,kr,kc,icol) schedule(static) + for (e=0;enumElements;e++) { + if (elements->Color[e]==color) { + for (kr=0;krNodes[INDEX2(row_node[kr],e,NN)]]; + for (kc=0;kcNodes[INDEX2(col_node[kc],e,NN)]]; + Finley_IndexList_insertIndex(&(index_list[irow]),icol); } - } + } } - } else { - for (color=0;colornumColors;color++) { - #pragma omp for private (e,kr,jr,kc,jc,ir,irow,ic,icol,tmp_list) schedule(static) - for (e=0;enumElements;e++) { - if (elements->Color[e]==color) { - for (kc=0;kcNodes[INDEX2(col_node[kc],e,NN)]]; - for (ic=0;icNodes[INDEX2(row_node[kr],e,NN)]]; - for (ir=0;irn;i++) { - if (in->index[i]==index) return; + if (in->index[i]==index) return; } /* index could not be found */ if (in->n==INDEXLIST_LENGTH) { /* if in->index is full check the extension */ if (in->extension==NULL) { - in->extension=(Finley_IndexList*) TMPMEMALLOC(sizeof(Finley_IndexList)); + in->extension=TMPMEMALLOC(1,Finley_IndexList); if (Finley_checkPtr(in->extension)) return; in->extension->n=0; in->extension->extension=NULL; @@ -177,7 +90,7 @@ /* counts the number of row indices in the Finley_IndexList in */ -int Finley_IndexList_count(Finley_IndexList* in) { +dim_t Finley_IndexList_count(Finley_IndexList* in) { if (in==NULL) { return 0; } else { @@ -187,8 +100,8 @@ /* count the number of row indices in the Finley_IndexList in */ -void Finley_IndexList_toArray(Finley_IndexList* in, maybelong* array) { - int i; +void Finley_IndexList_toArray(Finley_IndexList* in, index_t* array) { + dim_t i; if (in!=NULL) { for (i=0;in;i++) array[i]=in->index[i]+INDEX_OFFSET; Finley_IndexList_toArray(in->extension,&(array[in->n])); @@ -206,20 +119,17 @@ /* * $Log$ - * Revision 1.3 2004/12/15 03:48:45 jgs - * *** empty log message *** - * - * Revision 1.1.1.1 2004/10/26 06:53:57 jgs - * initial import of project esys2 + * Revision 1.5 2005/07/08 04:07:51 jgs + * Merge of development branch back to main trunk on 2005-07-08 * - * Revision 1.1.2.2 2004/10/26 06:36:39 jgs - * committing Lutz's changes to branch jgs + * Revision 1.4 2004/12/15 07:08:32 jgs + * *** empty log message *** + * Revision 1.1.1.1.2.3 2005/06/29 02:34:50 gross + * some changes towards 64 integers in finley * - * Revision 1.2 2004/10/13 01:53:42 gross - * bug in CSC assembling fixed + * Revision 1.1.1.1.2.2 2004/11/24 01:37:13 gross + * some changes dealing with the integer overflow in memory allocation. Finley solves 4M unknowns now * - * Revision 1.1 2004/07/02 04:21:13 gross - * Finley C code has been included * * */