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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1363 - (hide annotations)
Mon Dec 17 03:42:03 2007 UTC (11 years, 11 months ago) by gross
File MIME type: text/plain
File size: 1388 byte(s)
initialization for FCT solver added.
1 ksteube 1315
2 gross 1363 /* $Id:$ */
3 ksteube 1315
4     /*******************************************************
5     *
6     * Copyright 2007 by University of Queensland
7     *
8     * http://esscc.uq.edu.au
9     * Primary Business: Queensland, Australia
10     * Licensed under the Open Software License version 3.0
11     * http://www.opensource.org/licenses/osl-3.0.php
12     *
13     *******************************************************/
14    
15     /***************************************************************************/
16    
17 gross 1363 /* Paso: SparseMatrix: adds the row entries to an array */
18 ksteube 1315
19     /***************************************************************************/
20    
21 gross 1363 /* Author: l.gross@uq.edu.au */
22 ksteube 1315
23     /**************************************************************/
24    
25     #include "Paso.h"
26     #include "SparseMatrix.h"
27    
28 gross 1363 void Paso_SparseMatrix_addRow_CSR_OFFSET0(Paso_SparseMatrix* A, double* array) {
29 ksteube 1315 dim_t ir,irow,ic,icb,irb;
30     index_t iptr;
31     register double fac;
32     #pragma omp parallel for private(ir,irb,irow,fac,iptr,icb) schedule(static)
33     for (ir=0;ir< A->pattern->numOutput;ir++) {
34     for (irb=0;irb< A->row_block_size;irb++) {
35     irow=irb+A->row_block_size*ir;
36     fac=0.;
37     for (iptr=A->pattern->ptr[ir];iptr<A->pattern->ptr[ir+1]; iptr++) {
38     for (icb=0;icb< A->col_block_size;icb++)
39 gross 1363 fac+=A->val[iptr*A->block_size+irb+A->row_block_size*icb];
40 ksteube 1315 }
41     array[irow]+=fac;
42     }
43     }
44     }

  ViewVC Help
Powered by ViewVC 1.1.26