~chaffra/+junk/trilinos

« back to all changes in this revision

Viewing changes to packages/ml/src/Utils/Epetra_Multi_CrsMatrix.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme, Christophe Prud'homme, Johannes Ring
  • Date: 2009-12-13 12:53:22 UTC
  • mfrom: (5.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091213125322-in0nrdjc55deqsw9
Tags: 10.0.3.dfsg-1
[Christophe Prud'homme]
* New upstream release

[Johannes Ring]
* debian/patches/libname.patch: Add prefix 'libtrilinos_' to all
  libraries. 
* debian/patches/soname.patch: Add soversion to libraries.
* debian/watch: Update download URL.
* debian/control:
  - Remove python-numeric from Build-Depends (virtual package).
  - Remove automake and autotools from Build-Depends and add cmake to
    reflect switch to CMake.
  - Add python-support to Build-Depends.
* debian/rules: 
  - Cleanup and updates for switch to CMake.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
#include "Epetra_MpiComm.h"
15
15
#endif
16
16
 
17
 
#define NO_OUTPUT
18
 
#ifdef NO_OUTPUT
19
 
#define Epetra_CrsMatrix_Print(x,y) ;
20
 
#define ML_Matrix_Print(w,x,y,z) ;
21
 
#else
22
 
extern void Epetra_CrsMatrix_Print(const Epetra_CrsMatrix& A, char* of);//haq
23
 
extern void ML_Matrix_Print(ML_Operator *ML,const Epetra_Comm &Comm,const Epetra_Map &Map, char *fname);
24
 
#endif
25
 
 
26
17
// ================================================ ====== ==== ==== == = 
27
18
// Constructor
28
19
ML_Epetra::Epetra_Multi_CrsMatrix::Epetra_Multi_CrsMatrix(int NumMatrices,Epetra_CrsMatrix ** CrsMatrices)
71
62
 
72
63
  int rv=0;
73
64
  ML_Comm* temp = global_comm;  
74
 
  /* DEBUG*/
75
 
  char str[80];
76
65
 
77
66
  /* Setup for 1st Matmat */
78
67
  ML_Operator * MV[2]={0,0},*CV;
89
78
    rv=ML_Operator_WrapEpetraCrsMatrix(CrsMatrices_[i],CV);
90
79
    ML_CHK_ERR(rv);
91
80
 
92
 
    /* DEBUG */
93
 
    sprintf(str,"cv11.%d.dat",NumMatrices_-1-i);
94
 
    ML_Matrix_Print(CV,A.Comm(),CrsMatrices_[i]->RowMap(),str);
95
 
 
96
81
    /* Do matmat */
97
82
    ML_2matmult(CV,MV[i%2],MV[(i+1)%2],ML_CSR_MATRIX);
98
83
 
99
 
    /* DEBUG */
100
 
    sprintf(str,"op11.%d.dat",NumMatrices_-1-i);
101
 
    ML_Matrix_Print(MV[(i+1)%2],A.Comm(),CrsMatrices_[i]->RangeMap(),str);
102
 
 
103
84
    ML_Operator_Destroy(&CV);
104
85
  }/*end for*/
105
86
  global_comm = temp;
109
90
 
110
91
  /* Cleanup */
111
92
  if(MV[0]) ML_Operator_Destroy(&MV[0]);
 
93
 
112
94
  return rv;
113
95
}/*end MatrixMatrix_Multiply*/
114
96