Lines Matching refs:vs

403   Mat_Nest *vs = (Mat_Nest *)A->data;  in MatReset_Nest()  local
408 PetscCall(MatNestDestroyISList(vs->nr, &vs->isglobal.row)); in MatReset_Nest()
409 PetscCall(MatNestDestroyISList(vs->nc, &vs->isglobal.col)); in MatReset_Nest()
410 PetscCall(MatNestDestroyISList(vs->nr, &vs->islocal.row)); in MatReset_Nest()
411 PetscCall(MatNestDestroyISList(vs->nc, &vs->islocal.col)); in MatReset_Nest()
413 PetscCall(PetscFree(vs->row_len)); in MatReset_Nest()
414 PetscCall(PetscFree(vs->col_len)); in MatReset_Nest()
415 PetscCall(PetscFree(vs->nnzstate)); in MatReset_Nest()
417 PetscCall(PetscFree2(vs->left, vs->right)); in MatReset_Nest()
420 if (vs->m) { in MatReset_Nest()
421 for (i = 0; i < vs->nr; i++) { in MatReset_Nest()
422 for (j = 0; j < vs->nc; j++) PetscCall(MatDestroy(&vs->m[i][j])); in MatReset_Nest()
424 PetscCall(PetscFree(vs->m[0])); in MatReset_Nest()
425 PetscCall(PetscFree(vs->m)); in MatReset_Nest()
429 vs->nr = 0; in MatReset_Nest()
430 vs->nc = 0; in MatReset_Nest()
431 vs->splitassembly = PETSC_FALSE; in MatReset_Nest()
461 Mat_Nest *vs = (Mat_Nest *)A->data; in MatAssemblyBegin_Nest() local
466 for (i = 0; i < vs->nr; i++) { in MatAssemblyBegin_Nest()
467 for (j = 0; j < vs->nc; j++) { in MatAssemblyBegin_Nest()
469 if (vs->m[i][j]) { in MatAssemblyBegin_Nest()
470 PetscCall(MatAssemblyBegin(vs->m[i][j], type)); in MatAssemblyBegin_Nest()
471 if (!vs->splitassembly) { in MatAssemblyBegin_Nest()
478 PetscCall(MatAssemblyEnd(vs->m[i][j], type)); in MatAssemblyBegin_Nest()
479 PetscCall(MatGetNonzeroState(vs->m[i][j], &subnnzstate)); in MatAssemblyBegin_Nest()
482 …nnzstate = (PetscBool)(nnzstate || vs->nnzstate[i * vs->nc + j] != subnnzstate… in MatAssemblyBegin_Nest()
483 vs->nnzstate[i * vs->nc + j] = subnnzstate; in MatAssemblyBegin_Nest()
492 Mat_Nest *vs = (Mat_Nest *)A->data; in MatAssemblyEnd_Nest() local
496 for (i = 0; i < vs->nr; i++) { in MatAssemblyEnd_Nest()
497 for (j = 0; j < vs->nc; j++) { in MatAssemblyEnd_Nest()
498 if (vs->m[i][j]) { in MatAssemblyEnd_Nest()
499 if (vs->splitassembly) PetscCall(MatAssemblyEnd(vs->m[i][j], type)); in MatAssemblyEnd_Nest()
508 Mat_Nest *vs = (Mat_Nest *)A->data; in MatNestFindNonzeroSubMatRow() local
513 sub = (row < vs->nc) ? vs->m[row][row] : (Mat)NULL; /* Prefer to find on the diagonal */ in MatNestFindNonzeroSubMatRow()
514 for (j = 0; !sub && j < vs->nc; j++) sub = vs->m[row][j]; in MatNestFindNonzeroSubMatRow()
522 Mat_Nest *vs = (Mat_Nest *)A->data; in MatNestFindNonzeroSubMatCol() local
527 sub = (col < vs->nr) ? vs->m[col][col] : (Mat)NULL; /* Prefer to find on the diagonal */ in MatNestFindNonzeroSubMatCol()
528 for (i = 0; !sub && i < vs->nr; i++) sub = vs->m[i][col]; in MatNestFindNonzeroSubMatCol()
591 Mat_Nest *vs = (Mat_Nest *)A->data; in MatNestFillEmptyMat_Private() local
596 PetscCall(ISGetLocalSize(vs->isglobal.row[i], &lr)); in MatNestFillEmptyMat_Private()
597 PetscCall(ISGetLocalSize(vs->isglobal.col[j], &lc)); in MatNestFillEmptyMat_Private()
611 Mat_Nest *vs = (Mat_Nest *)A->data; in MatNestGetBlock_Private() local
627 a[i * nc + j] = vs->m[rbegin + i][cbegin + j]; in MatNestGetBlock_Private()
631 if (nc != vs->nc && nr != vs->nr) { in MatNestGetBlock_Private()
651 …t(PetscObjectComm((PetscObject)A), nr, nr != vs->nr ? NULL : vs->isglobal.row, nc, nc != vs->nc ? … in MatNestGetBlock_Private()
666 Mat_Nest *vs = (Mat_Nest *)A->data; in MatNestFindSubMat() local
670 PetscCall(MatNestFindISRange(A, vs->nr, is->row, isrow, &rbegin, &rend)); in MatNestFindSubMat()
671 PetscCall(MatNestFindISRange(A, vs->nc, is->col, iscol, &cbegin, &cend)); in MatNestFindSubMat()
673 …if (!vs->m[rbegin][cbegin]) PetscCall(MatNestFillEmptyMat_Private(A, rbegin, cbegin, vs->m[rbegin]… in MatNestFindSubMat()
674 *B = vs->m[rbegin][cbegin]; in MatNestFindSubMat()
686 Mat_Nest *vs = (Mat_Nest *)A->data; in MatCreateSubMatrix_Nest() local
690 PetscCall(MatNestFindSubMat(A, &vs->isglobal, isrow, iscol, &sub)); in MatCreateSubMatrix_Nest()
709 Mat_Nest *vs = (Mat_Nest *)A->data; in MatGetLocalSubMatrix_Nest() local
713 PetscCall(MatNestFindSubMat(A, &vs->islocal, isrow, iscol, &sub)); in MatGetLocalSubMatrix_Nest()
722 Mat_Nest *vs = (Mat_Nest *)A->data; in MatRestoreLocalSubMatrix_Nest() local
726 PetscCall(MatNestFindSubMat(A, &vs->islocal, isrow, iscol, &sub)); in MatRestoreLocalSubMatrix_Nest()
1249 Mat_Nest *vs = (Mat_Nest *)A->data; in MatNestGetISs_Nest() local
1254 for (i = 0; i < vs->nr; i++) rows[i] = vs->isglobal.row[i]; in MatNestGetISs_Nest()
1256 for (i = 0; i < vs->nc; i++) cols[i] = vs->isglobal.col[i]; in MatNestGetISs_Nest()
1290 Mat_Nest *vs = (Mat_Nest *)A->data; in MatNestGetLocalISs_Nest() local
1295 for (i = 0; i < vs->nr; i++) rows[i] = vs->islocal.row[i]; in MatNestGetLocalISs_Nest()
1297 for (i = 0; i < vs->nc; i++) cols[i] = vs->islocal.col[i]; in MatNestGetLocalISs_Nest()
1603 Mat_Nest *vs = (Mat_Nest *)A->data; in MatSetUp_NestIS_Private() local
1608 PetscCall(PetscMalloc1(nr, &vs->isglobal.row)); in MatSetUp_NestIS_Private()
1609 PetscCall(PetscMalloc1(nc, &vs->isglobal.col)); in MatSetUp_NestIS_Private()
1612 for (i = 0; i < vs->nr; i++) { in MatSetUp_NestIS_Private()
1614 vs->isglobal.row[i] = is_row[i]; in MatSetUp_NestIS_Private()
1618 for (i = 0; i < vs->nr; i++) { /* Add up the local sizes to compute the aggregate offset */ in MatSetUp_NestIS_Private()
1627 for (i = 0; i < vs->nr; i++) { in MatSetUp_NestIS_Private()
1631 … PetscCall(ISCreateStride(PetscObjectComm((PetscObject)sub), n, offset, 1, &vs->isglobal.row[i])); in MatSetUp_NestIS_Private()
1632 PetscCall(ISSetBlockSize(vs->isglobal.row[i], bs)); in MatSetUp_NestIS_Private()
1639 for (j = 0; j < vs->nc; j++) { in MatSetUp_NestIS_Private()
1641 vs->isglobal.col[j] = is_col[j]; in MatSetUp_NestIS_Private()
1646 for (j = 0; j < vs->nc; j++) { in MatSetUp_NestIS_Private()
1655 for (j = 0; j < vs->nc; j++) { in MatSetUp_NestIS_Private()
1659 … PetscCall(ISCreateStride(PetscObjectComm((PetscObject)sub), n, offset, 1, &vs->isglobal.col[j])); in MatSetUp_NestIS_Private()
1660 PetscCall(ISSetBlockSize(vs->isglobal.col[j], bs)); in MatSetUp_NestIS_Private()
1666 PetscCall(PetscMalloc1(vs->nr, &vs->islocal.row)); in MatSetUp_NestIS_Private()
1667 PetscCall(PetscMalloc1(vs->nc, &vs->islocal.col)); in MatSetUp_NestIS_Private()
1668 for (i = 0, offset = 0; i < vs->nr; i++) { in MatSetUp_NestIS_Private()
1683 vs->islocal.row[i] = isloc; in MatSetUp_NestIS_Private()
1686 for (i = 0, offset = 0; i < vs->nc; i++) { in MatSetUp_NestIS_Private()
1701 vs->islocal.col[i] = isloc; in MatSetUp_NestIS_Private()
1708 …PetscCall(MatNestCreateAggregateL2G_Private(A, vs->nr, vs->islocal.row, vs->isglobal.row, PETSC_FA… in MatSetUp_NestIS_Private()
1709 …PetscCall(MatNestCreateAggregateL2G_Private(A, vs->nc, vs->islocal.col, vs->isglobal.col, PETSC_TR… in MatSetUp_NestIS_Private()
1716 for (i = 0; i < vs->nr; i++) { in MatSetUp_NestIS_Private()
1717 for (j = 0; j < vs->nc; j++) { in MatSetUp_NestIS_Private()
1719 Mat B = vs->m[i][j]; in MatSetUp_NestIS_Private()
1723 PetscCall(ISGetSize(vs->isglobal.row[i], &Mi)); in MatSetUp_NestIS_Private()
1724 PetscCall(ISGetSize(vs->isglobal.col[j], &Ni)); in MatSetUp_NestIS_Private()
1725 PetscCall(ISGetLocalSize(vs->isglobal.row[i], &mi)); in MatSetUp_NestIS_Private()
1726 PetscCall(ISGetLocalSize(vs->isglobal.col[j], &ni)); in MatSetUp_NestIS_Private()
1734 for (i = 0; i < vs->nr; i++) { in MatSetUp_NestIS_Private()
1735 for (j = 0; j < vs->nc; j++) { in MatSetUp_NestIS_Private()
1736 if (vs->m[i][j] && !vs->m[i][j]->assembled) PetscFunctionReturn(PETSC_SUCCESS); in MatSetUp_NestIS_Private()