Commits

Jed Brown  committed 3b5ea25

Revert "MatMPIBAIJSetPreallocationCSR() handled the input matrix entries incorrectly, it treated them as if each row of values"

This reverts commit 7ec8086be61cb5e804513b1f606792b24a91d2ca which
changed the behavior of MatMPIBAIJSetPreallocationCSR() to use
consistent column alignment and left MAT_ROW_ORIENTED=PETSC_FALSE in
place in case of subsequent assemblies.

  • Participants
  • Parent commits 7ec8086

Comments (0)

Files changed (1)

File src/mat/impls/baij/mpi/mpibaij.c

     ierr = PetscMalloc(bs*bs*nz_max*sizeof(PetscScalar),&values);CHKERRQ(ierr);
     ierr = PetscMemzero(values,bs*bs*nz_max*sizeof(PetscScalar));CHKERRQ(ierr);
   }
-  ierr = MatSetOption(B,MAT_ROW_ORIENTED,PETSC_FALSE);CHKERRQ(ierr);
   for (i=0; i<m; i++) {
     PetscInt          row    = i + rstart;
     PetscInt          ncols  = ii[i+1] - ii[i];
 
    Level: developer
 
-   Notes: the order of the entries in values is the same as the block compressed sparse row storage format; that is, it is the same as a three dimensional array
-     in Fortran values(bs,bs,nnz) that contains the first column of the first block, followed by the second column of the first block etc etc.
-
 .keywords: matrix, aij, compressed row, sparse, parallel
 
-.seealso: MatCreate(), MatCreateSeqAIJ(), MatSetValues(), MatMPIBAIJSetPreallocation(), MatCreateAIJ(), MPIAIJ, MatCreateMPIBAIJWithArrays(), MPIBAIJ
+.seealso: MatCreate(), MatCreateSeqAIJ(), MatSetValues(), MatMPIBAIJSetPreallocation(), MatCreateAIJ(), MPIAIJ
 @*/
 PetscErrorCode  MatMPIBAIJSetPreallocationCSR(Mat B,PetscInt bs,const PetscInt i[],const PetscInt j[], const PetscScalar v[])
 {
      thus you CANNOT change the matrix entries by changing the values of a[] after you have
      called this routine. Use MatCreateMPIAIJWithSplitArrays() to avoid needing to copy the arrays.
 
-     The order of the entries in values is the same as the block compressed sparse row storage format; that is, it is the same as a three dimensional array
-     in Fortran values(bs,bs,nnz) that contains the first column of the first block, followed by the second column of the first block etc etc.
-
        The i and j indices are 0 based, and i indices are indices corresponding to the local j array.
 
 .keywords: matrix, aij, compressed row, sparse, parallel