- Timestamp:
- 11/16/12 08:10:16 (12 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk
- Property svn:mergeinfo changed
/issm/trunk-jpl merged: 13397-13398,13401,13407-13582,13584-13974
- Property svn:mergeinfo changed
-
issm/trunk/src
- Property svn:mergeinfo changed
-
issm/trunk/src/c/toolkits/petsc/patches/PetscMatrixToDoubleMatrix.cpp
r12706 r13975 2 2 * \brief: convert a sparse or dense Petsc matrix into a matlab matrix 3 3 */ 4 5 4 6 5 #ifdef HAVE_CONFIG_H … … 13 12 14 13 /*Petsc includes: */ 15 #include "petscmat.h"16 #include "petscvec.h"17 #include "petscksp.h"14 #include <petscmat.h> 15 #include <petscvec.h> 16 #include <petscksp.h> 18 17 19 18 /*Petsc includes: */ 20 19 #include "../../../shared/shared.h" 21 20 22 23 21 void PetscMatrixToDoubleMatrix(double** pmatrix, int* prows, int* pcols,Mat petsc_matrix){ 24 22 25 int i,j,k;26 27 23 /*output: */ 24 int i; 28 25 double* matrix=NULL; 29 26 int rows,cols; 30 31 /*intermediary: */32 int* idxm=NULL;33 int* idxn=NULL;34 27 35 28 /*Some needed information: */ 36 29 MatGetSize(petsc_matrix,&rows,&cols); 37 30 38 i dxm=xNew<int>(rows);39 i dxn=xNew<int>(cols);31 int* idxm=xNew<int>(rows); 32 int* idxn=xNew<int>(cols); 40 33 41 34 for(i=0;i<rows;i++)idxm[i]=i;
Note:
See TracChangeset
for help on using the changeset viewer.