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

Contents of /trunk/paso/src/SystemMatrix_rowSum.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1388 - (show annotations)
Fri Jan 11 07:45:58 2008 UTC (11 years, 8 months ago) by trankine
File MIME type: text/plain
File size: 1482 byte(s)
And get the *(&(*&(* name right
1 /* $Id:$ */
2
3 /*******************************************************
4 *
5 * Copyright 2007 by University of Queensland
6 *
7 * http://esscc.uq.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: calculates row sum */
17
18
19 /**************************************************************/
20
21 /* Author: l.gross@auq.edu.au */
22
23 /**************************************************************/
24
25 #include "Paso.h"
26 #include "SystemMatrix.h"
27
28 void Paso_SystemMatrix_rowSum(Paso_SystemMatrix* A, double* row_sum) {
29 dim_t irow, nrow;
30 if ((A->type & MATRIX_FORMAT_CSC) || (A->type & MATRIX_FORMAT_SYM) || (A->type & MATRIX_FORMAT_OFFSET1)) {
31 Paso_setError(TYPE_ERROR,"Paso_SystemMatrix_rowSum: No normalization available for compressed sparse column, symmetric storage scheme or index offset 1.");
32 } else {
33 nrow=A->mainBlock->numRows*A->row_block_size;
34 #pragma omp parallel for private(irow) schedule(static)
35 for (irow=0; irow<nrow ; ++irow) {
36 row_sum[irow]=0;
37 }
38 Paso_SparseMatrix_addRow_CSR_OFFSET0(A->mainBlock,row_sum);
39 Paso_SparseMatrix_addRow_CSR_OFFSET0(A->coupleBlock,row_sum);
40 }
41 return;
42 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26