/[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 1811 - (show annotations)
Thu Sep 25 23:11:13 2008 UTC (11 years ago) by ksteube
File MIME type: text/plain
File size: 1499 byte(s)
Copyright updated in all files

1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
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
17 /* Paso: SystemMatrix: calculates row sum */
18
19
20 /**************************************************************/
21
22 /* Author: l.gross@auq.edu.au */
23
24 /**************************************************************/
25
26 #include "Paso.h"
27 #include "SystemMatrix.h"
28
29 void Paso_SystemMatrix_rowSum(Paso_SystemMatrix* A, double* row_sum) {
30 dim_t irow, nrow;
31 if ((A->type & MATRIX_FORMAT_CSC) || (A->type & MATRIX_FORMAT_SYM) || (A->type & MATRIX_FORMAT_OFFSET1)) {
32 Paso_setError(TYPE_ERROR,"Paso_SystemMatrix_rowSum: No normalization available for compressed sparse column, symmetric storage scheme or index offset 1.");
33 } else {
34 nrow=A->mainBlock->numRows*A->row_block_size;
35 #pragma omp parallel for private(irow) schedule(static)
36 for (irow=0; irow<nrow ; ++irow) {
37 row_sum[irow]=0;
38 }
39 Paso_SparseMatrix_addRow_CSR_OFFSET0(A->mainBlock,row_sum);
40 Paso_SparseMatrix_addRow_CSR_OFFSET0(A->col_coupleBlock,row_sum);
41 }
42 return;
43 }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26