/[escript]/trunk/esys2/finley/src/finleyC/System_setValues.c
ViewVC logotype

Diff of /trunk/esys2/finley/src/finleyC/System_setValues.c

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

revision 96 by jgs, Tue Oct 26 06:53:54 2004 UTC revision 97 by jgs, Tue Dec 14 05:39:33 2004 UTC
# Line 19  Line 19 
19  /**************************************************************/  /**************************************************************/
20    
21  void  Finley_SystemMatrix_setValues(Finley_SystemMatrix* in,double value) {  void  Finley_SystemMatrix_setValues(Finley_SystemMatrix* in,double value) {
22    maybelong i,j,iptr,len_index_list=0;    maybelong i,j,iptr;
   maybelong block_size=in->row_block_size*in->col_block_size;  
   switch(in->type) {  
     case CSR:  
         len_index_list=in->num_rows;  
         break;  
     case CSC:  
         len_index_list=in->num_cols;  
         break;  
     default:  
         Finley_ErrorCode = TYPE_ERROR;  
         sprintf(Finley_ErrorMsg, "Unknown matrix type.");  
         return;  
   }  
23    #pragma omp parallel for private(i,iptr,j) schedule(static)    #pragma omp parallel for private(i,iptr,j) schedule(static)
24    for (i=0;i< len_index_list;i++) {    for (i=0;i< in->pattern->n_ptr;++i) {
25       for (iptr=in->ptr[i]-PTR_OFFSET;iptr<in->ptr[i+1]-PTR_OFFSET; iptr++) {       for (iptr=(in->pattern->ptr[i])-PTR_OFFSET;iptr<(in->pattern->ptr[i+1])-PTR_OFFSET;++iptr) {
26           for (j=0;j<block_size;j++) in->val[iptr*block_size+j]=value;           for (j=0;j<(in->block_size);++j) in->val[iptr*(in->block_size)+j]=value;
27       }       }
28    }    }
29  }  }
30  /*  /*
31   * $Log$   * $Log$
32   * Revision 1.1  2004/10/26 06:53:57  jgs   * Revision 1.2  2004/12/14 05:39:31  jgs
33   * Initial revision   * *** empty log message ***
34     *
35     * Revision 1.1.1.1.2.1  2004/11/12 06:58:19  gross
36     * a lot of changes to get the linearPDE class running: most important change is that there is no matrix format exposed to the user anymore. the format is chosen by the Domain according to the solver and symmetry
37     *
38     * Revision 1.1.1.1  2004/10/26 06:53:57  jgs
39     * initial import of project esys2
40   *   *
41   * Revision 1.1  2004/07/02 04:21:13  gross   * Revision 1.1  2004/07/02 04:21:13  gross
42   * Finley C code has been included   * Finley C code has been included

Legend:
Removed from v.96  
changed lines
  Added in v.97

  ViewVC Help
Powered by ViewVC 1.1.26