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

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

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

revision 1417 by gross, Mon Feb 25 04:45:48 2008 UTC revision 1552 by gross, Thu May 8 08:52:41 2008 UTC
# Line 1  Line 1 
1    
2  /* $Id:$ */  /* $Id$ */
3    
4  /*******************************************************  /*******************************************************
5   *   *
# Line 34  Line 34 
34  #include "SystemMatrix.h"  #include "SystemMatrix.h"
35    
36  void Paso_SystemMatrix_nullifyRows(Paso_SystemMatrix* A, double* mask_row, double main_diagonal_value) {  void Paso_SystemMatrix_nullifyRows(Paso_SystemMatrix* A, double* mask_row, double main_diagonal_value) {
37    
38      double* remote_values;
39    Paso_MPIInfo *mpi_info=A->mpi_info;    Paso_MPIInfo *mpi_info=A->mpi_info;
40    if (A ->col_block_size==1 && A ->row_block_size ==1) {    if (A ->col_block_size==1 && A ->row_block_size ==1) {
41         if (A->type & MATRIX_FORMAT_CSC) {         if (A->type & MATRIX_FORMAT_CSC) {
# Line 45  void Paso_SystemMatrix_nullifyRows(Paso_ Line 46  void Paso_SystemMatrix_nullifyRows(Paso_
46             return;             return;
47         } else {         } else {
48           if (Paso_noError()) {           if (Paso_noError()) {
49                Paso_SystemMatrix_startRowCollect(A,mask_row);
50              Paso_SparseMatrix_nullifyRows_CSR_BLK1(A->mainBlock,mask_row,main_diagonal_value);              Paso_SparseMatrix_nullifyRows_CSR_BLK1(A->mainBlock,mask_row,main_diagonal_value);
51              Paso_SparseMatrix_nullifyRows_CSR_BLK1(A->coupleBlock,mask_row,0.);              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           }           }
55         }         }
56    } else {    } else {
# Line 57  void Paso_SystemMatrix_nullifyRows(Paso_ Line 61  void Paso_SystemMatrix_nullifyRows(Paso_
61             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRows: TRILINOS is not supported with MPI.");             Paso_setError(SYSTEM_ERROR,"Paso_SystemMatrix_nullifyRows: TRILINOS is not supported with MPI.");
62             return;             return;
63         } else {         } else {
          Paso_SystemMatrix_allocBuffer(A);  
64           if (Paso_noError()) {           if (Paso_noError()) {
65                Paso_SystemMatrix_startRowCollect(A,mask_row);
66              Paso_SparseMatrix_nullifyRows_CSR(A->mainBlock,mask_row,main_diagonal_value);              Paso_SparseMatrix_nullifyRows_CSR(A->mainBlock,mask_row,main_diagonal_value);
67              Paso_SparseMatrix_nullifyRows_CSR(A->coupleBlock,mask_row,0.);              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           }           }
          Paso_SystemMatrix_freeBuffer(A);  
71         }         }
72    }    }
73    return;    return;

Legend:
Removed from v.1417  
changed lines
  Added in v.1552

  ViewVC Help
Powered by ViewVC 1.1.26