Lines Matching refs:sell
27 Mat_MPISELL *sell = (Mat_MPISELL *)Y->data; in MatDiagonalSet_MPISELL() local
31 PetscCall(MatDiagonalSet(sell->A, D, is)); in MatDiagonalSet_MPISELL()
47 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatCreateColmap_MPISELL_Private() local
48 PetscInt n = sell->B->cmap->n, i; in MatCreateColmap_MPISELL_Private()
51 …PetscCheck(sell->garray, PETSC_COMM_SELF, PETSC_ERR_PLIB, "MPISELL Matrix was assembled but is mis… in MatCreateColmap_MPISELL_Private()
53 PetscCall(PetscHMapICreateWithSize(n, &sell->colmap)); in MatCreateColmap_MPISELL_Private()
54 for (i = 0; i < n; i++) PetscCall(PetscHMapISet(sell->colmap, sell->garray[i] + 1, i + 1)); in MatCreateColmap_MPISELL_Private()
56 PetscCall(PetscCalloc1(mat->cmap->N + 1, &sell->colmap)); in MatCreateColmap_MPISELL_Private()
57 for (i = 0; i < n; i++) sell->colmap[sell->garray[i]] = i + 1; in MatCreateColmap_MPISELL_Private()
152 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatSetValues_MPISELL() local
156 PetscBool roworiented = sell->roworiented; in MatSetValues_MPISELL()
159 Mat A = sell->A; in MatSetValues_MPISELL()
162 Mat B = sell->B; in MatSetValues_MPISELL()
203 if (!sell->colmap) PetscCall(MatCreateColmap_MPISELL_Private(mat)); in MatSetValues_MPISELL()
205 PetscCall(PetscHMapIGetWithDefault(sell->colmap, in[j] + 1, 0, &col)); in MatSetValues_MPISELL()
208 col = sell->colmap[in[j]] - 1; in MatSetValues_MPISELL()
210 if (col < 0 && !((Mat_SeqSELL *)sell->B->data)->nonew) { in MatSetValues_MPISELL()
214 B = sell->B; in MatSetValues_MPISELL()
235 if (!sell->donotstash) { in MatSetValues_MPISELL()
250 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatGetValues_MPISELL() local
265 PetscCall(MatGetValues(sell->A, 1, &row, 1, &col, v + i * n + j)); in MatGetValues_MPISELL()
267 if (!sell->colmap) PetscCall(MatCreateColmap_MPISELL_Private(mat)); in MatGetValues_MPISELL()
269 PetscCall(PetscHMapIGetWithDefault(sell->colmap, idxn[j] + 1, 0, &col)); in MatGetValues_MPISELL()
272 col = sell->colmap[idxn[j]] - 1; in MatGetValues_MPISELL()
274 if (col < 0 || sell->garray[col] != idxn[j]) *(v + i * n + j) = 0.0; in MatGetValues_MPISELL()
275 else PetscCall(MatGetValues(sell->B, 1, &row, 1, &col, v + i * n + j)); in MatGetValues_MPISELL()
284 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatAssemblyBegin_MPISELL() local
288 if (sell->donotstash || mat->nooffprocentries) PetscFunctionReturn(PETSC_SUCCESS); in MatAssemblyBegin_MPISELL()
292 …PetscCall(PetscInfo(sell->A, "Stash has %" PetscInt_FMT " entries, uses %" PetscInt_FMT " mallocs.… in MatAssemblyBegin_MPISELL()
298 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatAssemblyEnd_MPISELL() local
306 if (!sell->donotstash && !mat->nooffprocentries) { in MatAssemblyEnd_MPISELL()
318 if (mat->offloadmask == PETSC_OFFLOAD_CPU) sell->A->offloadmask = PETSC_OFFLOAD_CPU; in MatAssemblyEnd_MPISELL()
320 PetscCall(MatAssemblyBegin(sell->A, mode)); in MatAssemblyEnd_MPISELL()
321 PetscCall(MatAssemblyEnd(sell->A, mode)); in MatAssemblyEnd_MPISELL()
331 if (!((Mat_SeqSELL *)sell->B->data)->nonew) { in MatAssemblyEnd_MPISELL()
337 …if (mat->offloadmask == PETSC_OFFLOAD_CPU && sell->B->offloadmask != PETSC_OFFLOAD_UNALLOCATED) se… in MatAssemblyEnd_MPISELL()
339 PetscCall(MatAssemblyBegin(sell->B, mode)); in MatAssemblyEnd_MPISELL()
340 PetscCall(MatAssemblyEnd(sell->B, mode)); in MatAssemblyEnd_MPISELL()
341 PetscCall(PetscFree2(sell->rowvalues, sell->rowindices)); in MatAssemblyEnd_MPISELL()
342 sell->rowvalues = NULL; in MatAssemblyEnd_MPISELL()
343 PetscCall(VecDestroy(&sell->diag)); in MatAssemblyEnd_MPISELL()
346 …if ((!mat->was_assembled && mode == MAT_FINAL_ASSEMBLY) || !((Mat_SeqSELL *)sell->A->data)->nonew)… in MatAssemblyEnd_MPISELL()
347 PetscObjectState state = sell->A->nonzerostate + sell->B->nonzerostate; in MatAssemblyEnd_MPISELL()
499 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatDestroy_MPISELL() local
504 PetscCall(VecDestroy(&sell->diag)); in MatDestroy_MPISELL()
505 PetscCall(MatDestroy(&sell->A)); in MatDestroy_MPISELL()
506 PetscCall(MatDestroy(&sell->B)); in MatDestroy_MPISELL()
508 PetscCall(PetscHMapIDestroy(&sell->colmap)); in MatDestroy_MPISELL()
510 PetscCall(PetscFree(sell->colmap)); in MatDestroy_MPISELL()
512 PetscCall(PetscFree(sell->garray)); in MatDestroy_MPISELL()
513 PetscCall(VecDestroy(&sell->lvec)); in MatDestroy_MPISELL()
514 PetscCall(VecScatterDestroy(&sell->Mvctx)); in MatDestroy_MPISELL()
515 PetscCall(PetscFree2(sell->rowvalues, sell->rowindices)); in MatDestroy_MPISELL()
516 PetscCall(PetscFree(sell->ld)); in MatDestroy_MPISELL()
535 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatView_MPISELL_ASCIIorDraworSocket() local
536 PetscMPIInt rank = sell->rank, size = sell->size; in MatView_MPISELL_ASCIIorDraworSocket()
553 PetscCall(MatInodeGetInodeSizes(sell->A, NULL, &inodes, NULL)); in MatView_MPISELL_ASCIIorDraworSocket()
562 PetscCall(MatGetInfo(sell->A, MAT_LOCAL, &info)); in MatView_MPISELL_ASCIIorDraworSocket()
564 PetscCall(MatGetInfo(sell->B, MAT_LOCAL, &info)); in MatView_MPISELL_ASCIIorDraworSocket()
569 PetscCall(VecScatterView(sell->Mvctx, viewer)); in MatView_MPISELL_ASCIIorDraworSocket()
573 PetscCall(MatInodeGetInodeSizes(sell->A, &inodecount, &inodes, &inodelimit)); in MatView_MPISELL_ASCIIorDraworSocket()
585 PetscCall(PetscObjectSetName((PetscObject)sell->A, ((PetscObject)mat)->name)); in MatView_MPISELL_ASCIIorDraworSocket()
586 PetscCall(MatView(sell->A, viewer)); in MatView_MPISELL_ASCIIorDraworSocket()
619 Aloc = (Mat_SeqSELL *)sell->A->data; in MatView_MPISELL_ASCIIorDraworSocket()
636 Aloc = (Mat_SeqSELL *)sell->B->data; in MatView_MPISELL_ASCIIorDraworSocket()
644 col = sell->garray[*acolidx]; in MatView_MPISELL_ASCIIorDraworSocket()
684 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatGetGhosts_MPISELL() local
687 PetscCall(MatGetSize(sell->B, NULL, nghosts)); in MatGetGhosts_MPISELL()
688 if (ghosts) *ghosts = sell->garray; in MatGetGhosts_MPISELL()
799 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatDiagonalScale_MPISELL() local
800 Mat a = sell->A, b = sell->B; in MatDiagonalScale_MPISELL()
809 PetscCall(VecScatterBegin(sell->Mvctx, rr, sell->lvec, INSERT_VALUES, SCATTER_FORWARD)); in MatDiagonalScale_MPISELL()
821 PetscCall(VecScatterEnd(sell->Mvctx, rr, sell->lvec, INSERT_VALUES, SCATTER_FORWARD)); in MatDiagonalScale_MPISELL()
822 PetscUseTypeMethod(b, diagonalscale, NULL, sell->lvec); in MatDiagonalScale_MPISELL()
884 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatConjugate_MPISELL() local
887 PetscCall(MatConjugate_SeqSELL(sell->A)); in MatConjugate_MPISELL()
888 PetscCall(MatConjugate_SeqSELL(sell->B)); in MatConjugate_MPISELL()
904 Mat_MPISELL *sell = (Mat_MPISELL *)x->data; in MatSetRandom_MPISELL() local
907 PetscCall(MatSetRandom(sell->A, rctx)); in MatSetRandom_MPISELL()
908 PetscCall(MatSetRandom(sell->B, rctx)); in MatSetRandom_MPISELL()
925 Mat_SeqSELL *sell = (Mat_SeqSELL *)msell->A->data; in MatShift_MPISELL() local
930 } else if (!sell->nz) { in MatShift_MPISELL()
931 PetscInt nonew = sell->nonew; in MatShift_MPISELL()
933 sell->nonew = nonew; in MatShift_MPISELL()
948 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatStoreValues_MPISELL() local
951 PetscCall(MatStoreValues(sell->A)); in MatStoreValues_MPISELL()
952 PetscCall(MatStoreValues(sell->B)); in MatStoreValues_MPISELL()
958 Mat_MPISELL *sell = (Mat_MPISELL *)mat->data; in MatRetrieveValues_MPISELL() local
961 PetscCall(MatRetrieveValues(sell->A)); in MatRetrieveValues_MPISELL()
962 PetscCall(MatRetrieveValues(sell->B)); in MatRetrieveValues_MPISELL()