/[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

trunk/esys2/paso/src/SystemMatrix_setValues.c revision 150 by jgs, Thu Sep 15 03:44:45 2005 UTC trunk/paso/src/SystemMatrix_setValues.c revision 631 by dhawcroft, Thu Mar 23 04:27:32 2006 UTC
# Line 1  Line 1 
1  /* $Id$ */  /* $Id$ */
2    
3    /*
4    ********************************************************************************
5    *               Copyright 2006 by ACcESS MNRF                                *
6    *                                                                              *
7    *                 http://www.access.edu.au                                     *
8    *           Primary Business: Queensland, Australia                            *
9    *     Licensed under the Open Software License version 3.0             *
10    *        http://www.opensource.org/licenses/osl-3.0.php                        *
11    ********************************************************************************
12    */
13    
14  /**************************************************************/  /**************************************************************/
15    
16  /* Paso: SystemMatrix :                           */  /* Paso: SystemMatrix :                           */
# Line 18  Line 29 
29  /**************************************************************/  /**************************************************************/
30    
31  void  Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {  void  Paso_SystemMatrix_setValues(Paso_SystemMatrix* in,double value) {
32    
33      index_t index_offset=(in->type & MATRIX_FORMAT_OFFSET1 ? 1:0);
34    dim_t i,j;    dim_t i,j;
35    index_t iptr;    index_t iptr;
36    #pragma omp parallel for private(i,iptr,j) schedule(static)    #pragma omp parallel for private(i,iptr,j) schedule(static)
37    for (i=0;i< in->pattern->n_ptr;++i) {    for (i=0;i< in->pattern->n_ptr;++i) {
38       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) {
39           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;
40       }       }
41    }    }

Legend:
Removed from v.150  
changed lines
  Added in v.631

  ViewVC Help
Powered by ViewVC 1.1.26