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

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

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

trunk/paso/src/SparseMatrix_addAbsRow.c revision 1315 by ksteube, Tue Sep 25 02:41:13 2007 UTC trunk/paso/src/SparseMatrix_addRow.c revision 1363 by gross, Mon Dec 17 03:42:03 2007 UTC
# Line 1  Line 1 
1    
2  /* $Id: SparseMatrix_addAbsRow.c 1306 2007-09-18 05:51:09Z ksteube $ */  /* $Id:$ */
3    
4  /*******************************************************  /*******************************************************
5   *   *
  *           Copyright 2003-2007 by ACceSS MNRF  
6   *       Copyright 2007 by University of Queensland   *       Copyright 2007 by University of Queensland
7   *   *
8   *                http://esscc.uq.edu.au   *                http://esscc.uq.edu.au
# Line 15  Line 14 
14    
15  /***************************************************************************/  /***************************************************************************/
16    
17  /* Paso: SparseMatrix:  adds the absolut values of row entries to an array */  /* Paso: SparseMatrix:  adds the row entries to an array */
18    
19  /***************************************************************************/  /***************************************************************************/
20    
21  /* Copyrights by ACcESS Australia 2005, 2007 */  /* Author: l.gross@uq.edu.au */
 /* Author: gross@access.edu.au */  
22    
23  /**************************************************************/  /**************************************************************/
24    
25  #include "Paso.h"  #include "Paso.h"
26  #include "SparseMatrix.h"  #include "SparseMatrix.h"
27    
28  void Paso_SparseMatrix_addAbsRow_CSR_OFFSET0(Paso_SparseMatrix* A, double* array) {  void Paso_SparseMatrix_addRow_CSR_OFFSET0(Paso_SparseMatrix* A, double* array) {
29     dim_t ir,irow,ic,icb,irb;     dim_t ir,irow,ic,icb,irb;
30     index_t iptr;     index_t iptr;
31     register double fac;     register double fac;
# Line 38  void Paso_SparseMatrix_addAbsRow_CSR_OFF Line 36  void Paso_SparseMatrix_addAbsRow_CSR_OFF
36            fac=0.;            fac=0.;
37        for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {        for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {
38            for (icb=0;icb< A->col_block_size;icb++)            for (icb=0;icb< A->col_block_size;icb++)
39                   fac+=ABS(A->val[iptr*A->block_size+irb+A->row_block_size*icb]);                   fac+=A->val[iptr*A->block_size+irb+A->row_block_size*icb];
40            }            }
41            array[irow]+=fac;            array[irow]+=fac;
42          }          }

Legend:
Removed from v.1315  
changed lines
  Added in v.1363

  ViewVC Help
Powered by ViewVC 1.1.26