PetscErrorCode MatAssemblyEnd_SeqCRL(Mat A, MatAssemblyType mode) { PetscErrorCode ierr; Mat_SeqAIJ *a = (Mat_SeqAIJ*)A->data; PetscFunctionBegin; a->inode.use = PETSC_FALSE; ierr = MatAssemblyEnd_SeqAIJ(A,mode);CHKERRQ(ierr); if (mode == MAT_FLUSH_ASSEMBLY) PetscFunctionReturn(0); /* Now calculate the permutation and grouping information. */ ierr = SeqCRL_create_crl(A);CHKERRQ(ierr); PetscFunctionReturn(0); }
PetscErrorCode MatAssemblyEnd_SeqCSRPERM(Mat A, MatAssemblyType mode) { PetscErrorCode ierr; Mat_SeqAIJ *a = (Mat_SeqAIJ*)A->data; PetscFunctionBegin; if (mode == MAT_FLUSH_ASSEMBLY) PetscFunctionReturn(0); /* Since a MATSEQCSRPERM matrix is really just a MATSEQAIJ with some * extra information, call the AssemblyEnd routine for a MATSEQAIJ. * I'm not sure if this is the best way to do this, but it avoids * a lot of code duplication. * I also note that currently MATSEQCSRPERM doesn't know anything about * the Mat_CompressedRow data structure that SeqAIJ now uses when there * are many zero rows. If the SeqAIJ assembly end routine decides to use * this, this may break things. (Don't know... haven't looked at it.) */ a->inode.use = PETSC_FALSE; ierr = MatAssemblyEnd_SeqAIJ(A, mode); /* Now calculate the permutation and grouping information. */ ierr = SeqCSRPERM_create_perm(A);CHKERRQ(ierr); PetscFunctionReturn(0); }