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

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

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

revision 155 by jgs, Wed Nov 9 02:02:19 2005 UTC revision 415 by gross, Wed Jan 4 05:37:33 2006 UTC
# Line 18  Line 18 
18  /**************************************************************/  /**************************************************************/
19    
20  void  Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {  void  Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {
21    
22      index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
23    dim_t i,j;    dim_t i,j;
24    index_t iptr;    index_t iptr;
25    #pragma omp parallel for private(i,iptr,j) schedule(static)    #pragma omp parallel for private(i,iptr,j) schedule(static)
26    for (i=0;i< in->pattern->n_ptr;++i) {    for (i=0;i< in->pattern->n_ptr;++i) {
27       for (iptr=(in->pattern->ptr[i])-PTR_OFFSET;iptr<(in->pattern->ptr[i+1])-PTR_OFFSET;++iptr) {       for (iptr=(in->pattern->ptr[i])-index_offset;iptr<(in->pattern->ptr[i+1])-index_offset;++iptr) {
28           for (j=0;j<(in->block_size);++j) in->val[iptr*(in->block_size)+j]=value;           for (j=0;j<(in->block_size);++j) in->val[iptr*(in->block_size)+j]=value;
29       }       }
30    }    }

Legend:
Removed from v.155  
changed lines
  Added in v.415

  ViewVC Help
Powered by ViewVC 1.1.26