| /petsc/src/mat/utils/ |
| H A D | matio.c | 8 PetscInt rbs, cbs; in MatView_Binary_BlockSizes() local 14 PetscCall(MatGetBlockSizes(mat, &rbs, &cbs)); in MatView_Binary_BlockSizes() 18 …if (rbs != cbs) PetscCall(PetscFPrintf(PETSC_COMM_SELF, info, "-matload_block_size %" PetscInt_FMT… in MatView_Binary_BlockSizes() 19 …lse PetscCall(PetscFPrintf(PETSC_COMM_SELF, info, "-matload_block_size %" PetscInt_FMT "\n", rbs)); in MatView_Binary_BlockSizes() 26 PetscInt rbs, cbs, bs[2], n = 2; in MatLoad_Binary_BlockSizes() local 31 PetscCall(MatGetBlockSizes(mat, &rbs, &cbs)); in MatLoad_Binary_BlockSizes() 32 bs[0] = rbs; in MatLoad_Binary_BlockSizes() 41 if (bs[0] > 0) rbs = bs[0]; in MatLoad_Binary_BlockSizes() 43 PetscCall(MatSetBlockSizes(mat, rbs, cbs)); in MatLoad_Binary_BlockSizes()
|
| H A D | gcreate.c | 6 PetscErrorCode MatSetBlockSizes_Default(Mat mat, PetscInt rbs, PetscInt cbs) in MatSetBlockSizes_Default() argument 10 …bs == rbs, PetscObjectComm((PetscObject)mat), PETSC_ERR_SUP, "Cannot change row block size %" Pets… in MatSetBlockSizes_Default()
|
| /petsc/src/mat/impls/localref/ |
| H A D | mlocalref.c | 53 PetscInt rbs, cbs, buf[4096], *irowm, *icolm; in MatSetValuesBlockedLocal_LocalRef_Scalar() local 56 PetscCall(MatGetBlockSizes(A, &rbs, &cbs)); in MatSetValuesBlockedLocal_LocalRef_Scalar() 57 IndexSpaceGet(buf, nrow * rbs, ncol * cbs, irowm, icolm); in MatSetValuesBlockedLocal_LocalRef_Scalar() 58 BlockIndicesExpand(nrow, irow, rbs, irowm); in MatSetValuesBlockedLocal_LocalRef_Scalar() 60 PetscCall(ISLocalToGlobalMappingApplyBlock(A->rmap->mapping, nrow * rbs, irowm, irowm)); in MatSetValuesBlockedLocal_LocalRef_Scalar() 62 PetscCall((*lr->SetValues)(lr->Top, nrow * rbs, irowm, ncol * cbs, icolm, y, addv)); in MatSetValuesBlockedLocal_LocalRef_Scalar() 63 IndexSpaceRestore(buf, nrow * rbs, ncol * cbs, irowm, icolm); in MatSetValuesBlockedLocal_LocalRef_Scalar() 252 PetscInt arbs, acbs, rbs, cbs; in MatCreateLocalRef() local 278 PetscCall(ISGetBlockSize(isrow, &rbs)); in MatCreateLocalRef() 281 PetscCall(PetscLayoutSetBlockSize(B->rmap, rbs)); in MatCreateLocalRef() [all …]
|
| /petsc/src/mat/tests/ |
| H A D | ex46.c | 11 PetscInt bs[4], l2gbs[4], rbs, cbs, l2grbs, l2gcbs, i; in main() local 41 PetscCall(MatGetBlockSizes(A, &rbs, &cbs)); in main() 46 …cInt_FMT " %" PetscInt_FMT " (l2g %" PetscInt_FMT " %" PetscInt_FMT ")\n", rbs, cbs, l2grbs, l2gcb… in main()
|
| H A D | ex23.c | 25 PetscInt rst, ren, cst, cen, nr, nc, rbs = 1, cbs = 1; in main() local 46 PetscCall(PetscOptionsGetInt(NULL, NULL, "-rbs", &rbs, NULL)); in main() 95 PetscCall(MatSetBlockSizes(A, rbs, cbs)); in main() 161 PetscCall(MatSetBlockSizes(B, rbs, cbs)); in main() 919 PetscCall(MatSetValuesBlocked(A, lm / rbs, idxs1, ln / cbs, idxs2, vals, ADD_VALUES)); in main() 920 PetscCall(MatSetValuesBlocked(B, lm / rbs, idxs1, ln / cbs, idxs2, vals, ADD_VALUES)); in main()
|
| /petsc/src/binding/petsc4py/src/petsc4py/PETSc/ |
| H A D | petscmat.pxi | 766 cdef PetscInt rbs = 0, cbs = 0, m = 0, n = 0, M = 0, N = 0 767 Mat_Sizes(size, bsize, &rbs, &cbs, &m, &n, &M, &N) 768 if rbs == PETSC_DECIDE: rbs = 1 769 if cbs == PETSC_DECIDE: cbs = rbs 770 Sys_Layout(ccomm, rbs, &m, &M) 776 CHKERR(MatSetBlockSizes(mat, rbs, cbs)) 924 cdef PetscInt rbs=1, cbs=1 925 if blocked: CHKERR(MatGetBlockSizes(A, &rbs, &cbs)) 926 if rbs < 1: rbs = 1 936 if ni*nj*rbs*cbs != nv: raise ValueError( [all …]
|
| H A D | Mat.pyx | 580 cdef PetscInt rbs = 0, cbs = 0, m = 0, n = 0, M = 0, N = 0 581 Mat_Sizes(size, bsize, &rbs, &cbs, &m, &n, &M, &N) 583 if rbs != PETSC_DECIDE: 585 CHKERR(MatSetBlockSizes(self.mat, rbs, cbs)) 587 CHKERR(MatSetBlockSize(self.mat, rbs)) 624 cdef PetscInt rbs = asInt(row_bsize) 626 CHKERR(MatSetBlockSizes(self.mat, rbs, cbs)) 1059 cdef PetscInt rbs = 0, cbs = 0, m = 0, n = 0, M = 0, N = 0 1060 Mat_Sizes(size, bsize, &rbs, &cbs, &m, &n, &M, &N) 1061 if rbs == PETSC_DECIDE: rbs = 1 [all …]
|
| H A D | libpetsc4py.pyx | 855 cdef PetscInt rbs = -1, cbs = -1 856 CHKERR(PetscLayoutGetBlockSize(mat.rmap, &rbs)) 858 if rbs == -1: rbs = 1 859 if cbs == -1: cbs = rbs 860 CHKERR(PetscLayoutSetBlockSize(mat.rmap, rbs))
|
| /petsc/src/binding/petsc4py/test/ |
| H A D | test_mat_aij.py | 54 rbs, cbs = BS 55 rbs = rbs or 1 58 rbs = cbs = BS or 1 61 self.vals = N.array(range(1, 1 + len(self.adjy) * rbs * cbs), dtype=sdt) 62 self.vals.shape = (-1, rbs, cbs) 65 rowsz = (m * n * rbs, None) 256 rbs, cbs = self.A.getBlockSizes() 257 if rbs != cbs: 420 rbs, cbs = bsizes 422 rbs = cbs = bsizes [all …]
|
| /petsc/src/mat/impls/is/ |
| H A D | matis.c | 640 PetscInt rbs, cbs, lc, dr, dc, oc, str, stc, nnz, i, jd, jo, cum; in MatConvert_XAIJ_IS() local 651 PetscCall(MatGetBlockSizes(A, &rbs, &cbs)); in MatConvert_XAIJ_IS() 653 if (reuse != MAT_REUSE_MATRIX && cong && rbs == cbs) { in MatConvert_XAIJ_IS() 659 PetscCall(MatSetBlockSizes(B, rbs, rbs)); in MatConvert_XAIJ_IS() 676 PetscCall(ISLocalToGlobalMappingGetBlockSize(rl2g, &rbs)); in MatConvert_XAIJ_IS() 678 PetscCall(ISCreateBlock(comm, rbs, nr / rbs, ridx, PETSC_USE_POINTER, &rows)); in MatConvert_XAIJ_IS() 739 PetscCall(ISCreateStride(comm, dr / rbs, str / rbs, 1, &is)); in MatConvert_XAIJ_IS() 740 if (rbs > 1) { in MatConvert_XAIJ_IS() 745 PetscCall(ISCreateBlock(comm, rbs, i, aux, PETSC_COPY_VALUES, &is2)); in MatConvert_XAIJ_IS() 769 PetscCall(MatSetBlockSizes(B, rbs, cbs)); in MatConvert_XAIJ_IS() [all …]
|
| /petsc/src/mat/tests/output/ |
| H A D | ex23_3.out | 248 rows=11, cols=10, rbs=1, cbs=2 254 rows=0, cols=0, rbs=1, cbs=2 260 rows=0, cols=0, rbs=1, cbs=2 266 rows=0, cols=0, rbs=1, cbs=2 272 rows=0, cols=0, rbs=1, cbs=2
|
| H A D | ex23_6.out | 49 rows=12, cols=12, rbs=6, cbs=3 89 rows=12, cols=12, rbs=6, cbs=3 129 rows=12, cols=12, rbs=6, cbs=3 169 rows=12, cols=12, rbs=6, cbs=3
|
| H A D | ex23_5.out | 314 rows=12, cols=12, rbs=2, cbs=1 320 rows=0, cols=0, rbs=2, cbs=1 326 rows=0, cols=0, rbs=2, cbs=1 332 rows=0, cols=0, rbs=2, cbs=1 338 rows=0, cols=0, rbs=2, cbs=1 344 rows=0, cols=0, rbs=2, cbs=1
|
| /petsc/src/ksp/ksp/tutorials/output/ |
| H A D | ex43_6.out | 58 rows=27, cols=27, rbs=3, cbs=1 65 rows=27, cols=27, rbs=3, cbs=1 72 rows=108, cols=108, rbs=3, cbs=1
|
| /petsc/src/mat/impls/shell/ |
| H A D | shellcnv.c | 10 PetscInt cst, cen, Nbs, mbs, nbs, rbs, cbs; in MatConvert_Shell() local 25 PetscCall(MatGetBlockSizes(mat, &rbs, &cbs)); in MatConvert_Shell() 26 mbs = m / rbs; in MatConvert_Shell()
|
| /petsc/src/ksp/pc/impls/mg/ |
| H A D | gdsw.c | 223 PetscInt NG, ns, n, i, c, rbs, cbs[2]; in PCMGGDSWCreateCoarseSpace_Private() local 296 PetscCall(MatGetBlockSizes(A, NULL, &rbs)); in PCMGGDSWCreateCoarseSpace_Private() 297 PetscCall(MatSetBlockSizes(*cspace, rbs, cbs[0] == cbs[1] ? cbs[0] : 1)); in PCMGGDSWCreateCoarseSpace_Private()
|
| /petsc/src/mat/interface/ |
| H A D | matrix.c | 1118 PetscInt rows, cols, rbs, cbs; in MatView() local 1165 PetscCall(MatGetBlockSizes(mat, &rbs, &cbs)); in MatView() 1166 if (rbs != 1 || cbs != 1) { in MatView() 1167 …rbs != cbs) PetscCall(PetscViewerASCIIPrintf(viewer, "rows=%" PetscInt_FMT ", cols=%" PetscInt_FMT… in MatView() 1168 …cInt_FMT ", cols=%" PetscInt_FMT ", bs=%" PetscInt_FMT "%s\n", rows, cols, rbs, mat->bsizes ? " va… in MatView() 2086 PetscInt rbs, cbs, M, N, i; in MatSetValuesBlocked() local 2087 PetscCall(MatGetBlockSizes(mat, &rbs, &cbs)); in MatSetValuesBlocked() 2089 …rbs < M, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Row block %" PetscInt_FMT " contains an index… in MatSetValuesBlocked() 2565 PetscInt irbs, rbs; in MatSetValuesBlockedLocal() local 2566 PetscCall(MatGetBlockSizes(mat, &rbs, NULL)); in MatSetValuesBlockedLocal() [all …]
|
| /petsc/src/mat/impls/aij/mpi/ |
| H A D | mpiaij.c | 191 static PetscErrorCode MatSetBlockSizes_MPIAIJ(Mat M, PetscInt rbs, PetscInt cbs) in MatSetBlockSizes_MPIAIJ() argument 197 PetscCall(MatSetBlockSizes(mat->A, rbs, cbs)); in MatSetBlockSizes_MPIAIJ() 198 PetscCall(MatSetBlockSizes(mat->B, rbs, 1)); in MatSetBlockSizes_MPIAIJ() 5769 …= 0, aBn = a->B->cmap->n, row, *b_othi, *b_othj, *rvalues = NULL, *svalues = NULL, *cols, sbs, rbs; in MatGetBrowsOfAoCols_MPIAIJ() local 5796 …Private(ctx, PETSC_FALSE /*recv*/, &nrecvs, &rstarts, NULL /*indices not needed*/, &rprocs, &rbs)); in MatGetBrowsOfAoCols_MPIAIJ() 5806 …if (nrecvs) PetscCall(PetscMalloc1(rbs * (rstarts[nrecvs] - rstarts[0]), &rvalues)); /* rstarts ca… in MatGetBrowsOfAoCols_MPIAIJ() 5808 rowlen = rvalues + rstarts[i] * rbs; in MatGetBrowsOfAoCols_MPIAIJ() 5809 nrows = (rstarts[i + 1] - rstarts[i]) * rbs; /* num of indices to be received */ in MatGetBrowsOfAoCols_MPIAIJ() 5857 rowlen = rvalues + (rstarts[i] - rstarts[0]) * rbs; in MatGetBrowsOfAoCols_MPIAIJ() 5858 nrows = (rstarts[i + 1] - rstarts[i]) * rbs; /* num of rows to be received */ in MatGetBrowsOfAoCols_MPIAIJ() [all …]
|
| H A D | mpiov.c | 2515 PetscInt rbs, cbs; in MatCreateSubMatrices_MPIAIJ_Local() local 2517 PetscCall(ISGetBlockSize(isrow[i], &rbs)); in MatCreateSubMatrices_MPIAIJ_Local() 2523 if (rbs > 1 || cbs > 1) PetscCall(MatSetBlockSizes(submats[i], rbs, cbs)); in MatCreateSubMatrices_MPIAIJ_Local()
|
| /petsc/src/mat/impls/aij/seq/ |
| H A D | aij.c | 2442 PetscInt rbs, cbs; in MatCreateSubMatrix_SeqAIJ() local 2445 PetscCall(ISGetBlockSize(isrow, &rbs)); in MatCreateSubMatrix_SeqAIJ() 2447 PetscCall(MatSetBlockSizes(C, rbs, cbs)); in MatCreateSubMatrix_SeqAIJ() 2501 PetscInt rbs, cbs; in MatCreateSubMatrix_SeqAIJ() local 2504 PetscCall(ISGetBlockSize(isrow, &rbs)); in MatCreateSubMatrix_SeqAIJ() 2506 if (rbs > 1 || cbs > 1) PetscCall(MatSetBlockSizes(C, rbs, cbs)); in MatCreateSubMatrix_SeqAIJ()
|
| /petsc/src/mat/impls/aij/mpi/mumps/ |
| H A D | mumps.c | 2604 PetscInt info[80], i, ninfo = 80, rbs, cbs; in MatSetFromOptions_MUMPS() local 2760 PetscCall(MatGetBlockSizes(A, &rbs, &cbs)); in MatSetFromOptions_MUMPS() 2761 if (rbs == cbs && rbs > 1) mumps->id.ICNTL(15) = (PetscMUMPSInt)-rbs; in MatSetFromOptions_MUMPS() 2764 …0) PetscCheck((-mumps->id.ICNTL(15) % cbs == 0) && (-mumps->id.ICNTL(15) % rbs == 0), PETSC_COMM_S… in MatSetFromOptions_MUMPS()
|