--- trunk/esys2/finley/src/finleyC/IndexList.c 2004/12/15 03:48:48 100 +++ trunk/esys2/finley/src/finleyC/IndexList.c 2004/12/15 07:08:39 102 @@ -22,13 +22,9 @@ 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; - + int reduce_row_order, maybelong* row_Label, + int reduce_col_order, maybelong* col_Label) { + maybelong e,kr,kc,NN_row,NN_col,i,icol,irow,color; if (elements!=NULL) { maybelong NN=elements->ReferenceElement->Type->numNodes; @@ -48,104 +44,20 @@ 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;irnumColors;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; @@ -206,20 +118,9 @@ /* * $Log$ - * Revision 1.3 2004/12/15 03:48:45 jgs + * Revision 1.4 2004/12/15 07:08:32 jgs * *** empty log message *** * - * Revision 1.1.1.1 2004/10/26 06:53:57 jgs - * initial import of project esys2 - * - * Revision 1.1.2.2 2004/10/26 06:36:39 jgs - * committing Lutz's changes to branch jgs - * - * Revision 1.2 2004/10/13 01:53:42 gross - * bug in CSC assembling fixed - * - * Revision 1.1 2004/07/02 04:21:13 gross - * Finley C code has been included * * */