Changeset 18254
- Timestamp:
- 07/17/14 08:17:58 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/c/toolkits/petsc/objects/PetscMat.cpp
r18063 r18254 42 42 MatSetSizes(this->matrix,m,n,M,N); 43 43 MatSetFromOptions(this->matrix); 44 MatMPIAIJSetPreallocation(this->matrix,0,d_nnz,0,o_nnz); 44 PetscErrorCode ierr = MatMPIAIJSetPreallocation(this->matrix,0,d_nnz,0,o_nnz); 45 if(ierr) _error_("PETSc could not allocate matrix (probably not enough memory)"); 45 46 // MatSetOption(this->matrix,MAT_NEW_NONZERO_ALLOCATION_ERR,PETSC_FALSE); 46 47 … … 160 161 void PetscMat::SetValues(int m,int* idxm,int n,int* idxn,IssmDouble* values,InsMode mode){/*{{{*/ 161 162 162 PetscErrorCode ierr; 163 ierr = MatSetValues(this->matrix,m,idxm,n,idxn,values,ISSMToPetscInsertMode(mode)); 164 if(ierr) _error_("PETSC's MatSetValues reported an error"); 163 PetscErrorCode ierr = MatSetValues(this->matrix,m,idxm,n,idxn,values,ISSMToPetscInsertMode(mode)); 164 if(ierr) _error_("PETSc's MatSetValues reported an error"); 165 165 166 166 }
Note:
See TracChangeset
for help on using the changeset viewer.