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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1981 - (hide annotations)
Thu Nov 6 05:27:33 2008 UTC (11 years ago) by jfenwick
File MIME type: text/plain
File size: 2894 byte(s)
More warning removal.

1 ksteube 1312
2     /*******************************************************
3 ksteube 1811 *
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 dhawcroft 631
14 ksteube 1811
15 jgs 150 /**************************************************************/
16    
17     /* Paso: SystemMatrix */
18    
19 gross 1417 /* nullify rows in the matrix */
20 jgs 150
21 gross 1417 /* the rows are marked by positive values in */
22     /* mask_row. Values on the main diagonal */
23     /* which are marked to set to zero by both mask_row */
24     /* are set to main_diagonal_value */
25 jgs 150
26    
27     /**************************************************************/
28    
29 gross 1417 /* Author: l.gross@uq.edu.au */
30 jgs 150
31     /**************************************************************/
32    
33     #include "Paso.h"
34     #include "SystemMatrix.h"
35    
36 gross 1417 void Paso_SystemMatrix_nullifyRows(Paso_SystemMatrix* A, double* mask_row, double main_diagonal_value) {
37 gross 1552
38     double* remote_values;
39 jfenwick 1981 /*Paso_MPIInfo *mpi_info=A->mpi_info;*/
40 gross 1417 if (A ->col_block_size==1 && A ->row_block_size ==1) {
41 ksteube 1312 if (A->type & MATRIX_FORMAT_CSC) {
42 gross 1417 Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRows: CSC is not supported by MPI.");
43 ksteube 1312 return;
44     } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
45 gross 1417 Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRows: TRILINOS is not supported with MPI.");
46 ksteube 1312 return;
47     } else {
48     if (Paso_noError()) {
49 gross 1552 Paso_SystemMatrix_startRowCollect(A,mask_row);
50 gross 1417 Paso_SparseMatrix_nullifyRows_CSR_BLK1(A->mainBlock,mask_row,main_diagonal_value);
51 gross 1552 Paso_SparseMatrix_nullifyRows_CSR_BLK1(A->col_coupleBlock,mask_row,0.);
52     remote_values=Paso_SystemMatrix_finishRowCollect(A);
53     Paso_SparseMatrix_nullifyRows_CSR_BLK1(A->row_coupleBlock,remote_values,0.);
54 ksteube 1312 }
55     }
56 gross 1417 } else {
57 ksteube 1312 if (A->type & MATRIX_FORMAT_CSC) {
58 gross 1417 Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRows: CSC is not supported by MPI.");
59 ksteube 1312 return;
60     } else if (A->type & MATRIX_FORMAT_TRILINOS_CRS) {
61 gross 1417 Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRows: TRILINOS is not supported with MPI.");
62 ksteube 1312 return;
63     } else {
64     if (Paso_noError()) {
65 gross 1552 Paso_SystemMatrix_startRowCollect(A,mask_row);
66 gross 1417 Paso_SparseMatrix_nullifyRows_CSR(A->mainBlock,mask_row,main_diagonal_value);
67 gross 1552 Paso_SparseMatrix_nullifyRows_CSR(A->col_coupleBlock,mask_row,0.);
68     remote_values=Paso_SystemMatrix_finishRowCollect(A);
69     Paso_SparseMatrix_nullifyRows_CSR(A->row_coupleBlock,remote_values,0.);
70 ksteube 1312 }
71     }
72 gross 1417 }
73 jgs 150 return;
74     }

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.26