Home
last modified time | relevance | path

Searched refs:ncol (Results 1 – 20 of 20) sorted by relevance

/petsc/src/mat/graphops/order/
H A Dwbm.c37 PetscInt *perm, nrow, ncol, nnz, liw, *iw, ldw; in MatGetOrdering_WBM() local
45 ncol = nrow; in MatGetOrdering_WBM()
51 liw = 4 * nrow + ncol; in MatGetOrdering_WBM()
55 liw = 2 * nrow + 2 * ncol; in MatGetOrdering_WBM()
56 ldw = ncol; in MatGetOrdering_WBM()
59 liw = 8 * nrow + 2 * ncol + nnz; in MatGetOrdering_WBM()
63 liw = 3 * nrow + 2 * ncol; in MatGetOrdering_WBM()
64 ldw = 2 * ncol + nnz; in MatGetOrdering_WBM()
67 liw = 3 * nrow + 2 * ncol; in MatGetOrdering_WBM()
68 ldw = nrow + 2 * ncol + nnz; in MatGetOrdering_WBM()
/petsc/src/mat/impls/localref/
H A Dmlocalref.c12 #define IndexSpaceGet(buf, nrow, ncol, irowm, icolm) \ argument
14 if (nrow + ncol > (PetscInt)PETSC_STATIC_ARRAY_LENGTH(buf)) { \
15 PetscCall(PetscMalloc2(nrow, &irowm, ncol, &icolm)); \
22 #define IndexSpaceRestore(buf, nrow, ncol, irowm, icolm) \ argument
24 … if (nrow + ncol > (PetscInt)PETSC_STATIC_ARRAY_LENGTH(buf)) PetscCall(PetscFree2(irowm, icolm)); \
35 …ocal_LocalRef_Block(Mat A, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt ico… in MatSetValuesBlockedLocal_LocalRef_Block() argument
41 if (!nrow || !ncol) PetscFunctionReturn(PETSC_SUCCESS); in MatSetValuesBlockedLocal_LocalRef_Block()
42 IndexSpaceGet(buf, nrow, ncol, irowm, icolm); in MatSetValuesBlockedLocal_LocalRef_Block()
44 PetscCall(ISLocalToGlobalMappingApplyBlock(A->cmap->mapping, ncol, icol, icolm)); in MatSetValuesBlockedLocal_LocalRef_Block()
45 PetscCall((*lr->SetValuesBlocked)(lr->Top, nrow, irowm, ncol, icolm, y, addv)); in MatSetValuesBlockedLocal_LocalRef_Block()
[all …]
/petsc/src/mat/graphops/color/utils/
H A Dbipartite.c9 PetscInt ncol; in MatColoringCreateBipartiteGraph() local
21 PetscCall(MatGetRow(m, i, &ncol, NULL, &vcol)); in MatColoringCreateBipartiteGraph()
22 for (j = 0; j < ncol; j++) nentries++; in MatColoringCreateBipartiteGraph()
23 PetscCall(MatRestoreRow(m, i, &ncol, NULL, &vcol)); in MatColoringCreateBipartiteGraph()
29 PetscCall(MatGetRow(m, i, &ncol, &icol, &vcol)); in MatColoringCreateBipartiteGraph()
30 for (j = 0; j < ncol; j++) { in MatColoringCreateBipartiteGraph()
35 PetscCall(MatRestoreRow(m, i, &ncol, &icol, &vcol)); in MatColoringCreateBipartiteGraph()
/petsc/src/mat/tests/
H A Dex58f.F9012 PetscInt M, N, row, ncol
33 PetscCallA(MatGetRow(A, row, ncol, cols, vals, ierr))
35 PetscCallA(MatRestoreRow(A, row, ncol, cols, vals, ierr))
42 PetscCallA(MatGetRow(A, row, ncol, PETSC_NULL_INTEGER_POINTER, PETSC_NULL_SCALAR_POINTER, ierr))
43 …PetscCallA(MatRestoreRow(A, row, ncol, PETSC_NULL_INTEGER_POINTER, PETSC_NULL_SCALAR_POINTER, ierr…
/petsc/src/ksp/pc/impls/tfs/
H A Dtfs.c84 PetscInt *localtoglobal, ncol, i; in PCSetUp_TFS() local
93 ncol = a->A->cmap->n + a->B->cmap->n; in PCSetUp_TFS()
94 PetscCall(PetscMalloc1(ncol, &localtoglobal)); in PCSetUp_TFS()
107 …PetscCall(XXT_factor(tfs->xxt, localtoglobal, A->rmap->n, ncol, (PetscErrorCode (*)(void *, PetscS… in PCSetUp_TFS()
111 …PetscCall(XYT_factor(tfs->xyt, localtoglobal, A->rmap->n, ncol, (PetscErrorCode (*)(void *, PetscS… in PCSetUp_TFS()
/petsc/src/mat/impls/dense/mpi/
H A Dmmdense.c58 PetscInt *nrow, *ncol, *w1, *w3, *w4, start, inrqr; in MatCreateSubMatrices_MPIDense_Local() local
87 …5(ismax, (PetscInt ***)&irow, ismax, (PetscInt ***)&icol, ismax, &nrow, ismax, &ncol, m, &rtable)); in MatCreateSubMatrices_MPIDense_Local()
92 PetscCall(ISGetLocalSize(iscol[i], &ncol[i])); in MatCreateSubMatrices_MPIDense_Local()
277 …PetscCheck(!(submats[i]->rmap->n != nrow[i]) && !(submats[i]->cmap->n != ncol[i]), PETSC_COMM_SELF… in MatCreateSubMatrices_MPIDense_Local()
285 PetscCall(MatSetSizes(submats[i], nrow[i], ncol[i], nrow[i], ncol[i])); in MatCreateSubMatrices_MPIDense_Local()
309 for (PetscInt k = 0; k < ncol[i]; k++) { in MatCreateSubMatrices_MPIDense_Local()
355 for (PetscInt l = 0; l < ncol[is_no]; l++) { /* For each col */ in MatCreateSubMatrices_MPIDense_Local()
377 PetscCall(PetscFree5(*(PetscInt ***)&irow, *(PetscInt ***)&icol, nrow, ncol, rtable)); in MatCreateSubMatrices_MPIDense_Local()
/petsc/src/dm/impls/da/hypre/
H A Dmhyp.c25 …al_HYPREStruct_3d(Mat mat, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt ico… in MatSetValuesLocal_HYPREStruct_3d() argument
33 …PetscCheck(ncol <= 9, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "ncol %" PetscInt_FMT " > 9 too l… in MatSetValuesLocal_HYPREStruct_3d()
35 for (j = 0; j < ncol; j++) { in MatSetValuesLocal_HYPREStruct_3d()
57 …) PetscCallHYPRE(HYPRE_StructMatrixAddToValues(ex->hmat, index, (HYPRE_Int)ncol, entries, values)); in MatSetValuesLocal_HYPREStruct_3d()
58 …else PetscCallHYPRE(HYPRE_StructMatrixSetValues(ex->hmat, index, (HYPRE_Int)ncol, entries, values)… in MatSetValuesLocal_HYPREStruct_3d()
59 values += ncol; in MatSetValuesLocal_HYPREStruct_3d()
339 …l_HYPRESStruct_3d(Mat mat, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt ico… in MatSetValuesLocal_HYPRESStruct_3d() argument
364 for (j = 0; j < ncol; j++) { in MatSetValuesLocal_HYPRESStruct_3d()
394 …MatrixAddToValues(ex->ss_mat, part, index, (HYPRE_Int)var_type, (HYPRE_Int)ncol, entries, values)); in MatSetValuesLocal_HYPRESStruct_3d()
395 …ctMatrixSetValues(ex->ss_mat, part, index, (HYPRE_Int)var_type, (HYPRE_Int)ncol, entries, values)); in MatSetValuesLocal_HYPRESStruct_3d()
[all …]
/petsc/src/ksp/ksp/tutorials/
H A Dex61f.F9086 PetscInt ncol
98 ncol = nrow
119 …PetscCallA(MatCreateSeqAIJ(PETSC_COMM_SELF, nrow, ncol, nz_per_row, PETSC_NULL_INTEGER_ARRAY, col_…
/petsc/src/mat/impls/aij/mpi/
H A Dmpiov.c1221 PetscInt nrow, ncol, start; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local() local
1262 ncol = C->cmap->N; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1265 PetscCall(ISGetLocalSize(iscol[0], &ncol)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1472 PetscCall(PetscHMapICreateWithSize(ncol, &cmap)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1474 for (PetscInt j = 0; j < ncol; j++) { /* use array cmap_loc[] for local col indices */ in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1489 for (PetscInt j = 0; j < ncol; j++) cmap[icol[j]] = j + 1; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1600 PetscCall(MatSetSizes(submat, nrow, ncol, PETSC_DETERMINE, PETSC_DETERMINE)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1651 …PetscCheck(submat->rmap->n == nrow && submat->cmap->n == ncol, PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ,… in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1746 PetscInt ncol = 0; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local() local
1753 subcols[ncol] = cols[k] + cstart; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
[all …]
H A Dmpiaij.c1888 …rmap->N, N = A->cmap->N, ma, na, mb, nb, row, *cols, *cols_tmp, *B_diag_ilen, i, ncol, A_diag_ncol; in MatTranspose_MPIAIJ() local
1959 ncol = bi[i + 1] - bi[i]; in MatTranspose_MPIAIJ()
1960 PetscCall(MatSetValues(B, ncol, cols_tmp, 1, &row, pbv, INSERT_VALUES)); in MatTranspose_MPIAIJ()
1962 if (pbv) pbv += ncol; in MatTranspose_MPIAIJ()
1963 if (cols_tmp) cols_tmp += ncol; in MatTranspose_MPIAIJ()
5424 PetscInt plocalsize, nrows, *ilocal, *oilocal, i, lidx, *nrcols, *nlcols, ncol; in MatCreateSeqSubMatrixWithRows_Private() local
5489 ncol = 0; in MatCreateSeqSubMatrixWithRows_Private()
5492 ncol = PetscMax(pnnz[i], ncol); in MatCreateSeqSubMatrixWithRows_Private()
5501 PetscCall(MatCreateSeqAIJ(PETSC_COMM_SELF, nrows, ncol, 0, pnnz, P_oth)); in MatCreateSeqSubMatrixWithRows_Private()
/petsc/src/mat/impls/aij/seq/spqr/
H A Daijspqr.c85 C->ncol = (size_t)AT->rmap->n; in MatWrapCholmod_SPQR_seqaij()
167 PetscCall(PetscArraycpy(v, (PetscScalar *)Y_handle->x, lda * Y_handle->ncol)); in MatMatSolve_SPQR()
169 …for (size_t j = 0; j < Y_handle->ncol; j++) PetscCall(PetscArraycpy(&v[j * lda], &(((PetscScalar *… in MatMatSolve_SPQR()
225 PetscCall(PetscArraycpy(v, (PetscScalar *)Y_handle->x, lda * Y_handle->ncol)); in MatMatSolveTranspose_SPQR()
227 …for (size_t j = 0; j < Y_handle->ncol; j++) PetscCall(PetscArraycpy(&v[j * lda], &(((PetscScalar *… in MatMatSolveTranspose_SPQR()
/petsc/src/mat/impls/aij/seq/superlu/
H A Dsuperlu.c107 lu->B.ncol = 1; /* Set the number of right-hand side */ in MatSolve_SuperLU_Private()
169 if (!info || info == lu->A.ncol + 1) { in MatSolve_SuperLU_Private()
177 …tscPrintf(PETSC_COMM_SELF, " ** Estimated memory: %" PetscInt_FMT " bytes\n", info - lu->A.ncol)); in MatSolve_SuperLU_Private()
274 lu->B.ncol = 0; /* Indicate not to solve the system */ in MatLUFactorNumeric_SuperLU()
305 if (!sinfo || sinfo == lu->A.ncol + 1) { in MatLUFactorNumeric_SuperLU()
312 if (sinfo <= lu->A.ncol) { in MatLUFactorNumeric_SuperLU()
315 } else if (sinfo == lu->A.ncol + 1) { in MatLUFactorNumeric_SuperLU()
339 …MM_SELF, " No of nonzeros in L+U = %" PetscInt_FMT "\n", Lstore->nnz + Ustore->nnz - lu->A.ncol)); in MatLUFactorNumeric_SuperLU()
/petsc/src/mat/impls/baij/mpi/
H A Dbaijov.c619 PetscInt *nrow, *ncol, start; local
655 …x, (PetscInt ***)&irow, ismax, (PetscInt ***)&icol, ismax, &nrow, ismax, &ncol, ismax, &issorted));
664 PetscCall(ISGetLocalSize(iscol[i], &ncol[i]));
666 if (colflag && ncol[i] == c->Nbs) {
691 …PetscCheck(subc->mbs == nrow[i] && subc->nbs == ncol[i], PETSC_COMM_SELF, PETSC_ERR_ARG_SIZ, "Cann…
980 PetscCall(PetscHMapICreateWithSize(ncol[i], cmap + i));
982 jmax = ncol[i];
992 jmax = ncol[i];
1141 …PetscCall(MatSetSizes(submats[i], nrow[i] * bs_tmp, ncol[i] * bs_tmp, PETSC_DETERMINE, PETSC_DETER…
1528 PetscCall(PetscFree5(*(PetscInt ***)&irow, *(PetscInt ***)&icol, nrow, ncol, issorted));
/petsc/src/mat/impls/aij/seq/cholmod/
H A Daijcholmod.c37 C->ncol = (size_t)A->rmap->n; in MatWrapCholmod_seqaij()
/petsc/src/mat/impls/sbaij/seq/cholmod/
H A Dsbaijcholmod.c147 C->ncol = (size_t)A->rmap->n; in MatWrapCholmod_seqsbaij()
201 Y->ncol = 1; in VecWrapCholmod()
249 Y->ncol = n; in MatDenseWrapCholmod()
/petsc/include/petsc/private/kernels/
H A Dblockinvert.h364 …#define PetscKernel_w_gets_w_plus_Ar_times_v(bs, ncol, v, A, w) msgemvp_(&(bs), &(ncol), (A… argument
/petsc/src/mat/interface/
H A Dmatrix.c2214 PetscErrorCode MatGetValuesLocal(Mat mat, PetscInt nrow, const PetscInt irow[], PetscInt ncol, cons… in MatGetValuesLocal() argument
2220 if (!nrow || !ncol) PetscFunctionReturn(PETSC_SUCCESS); /* no values to retrieve */ in MatGetValuesLocal()
2229 if (mat->ops->getvalueslocal) PetscUseTypeMethod(mat, getvalueslocal, nrow, irow, ncol, icol, y); in MatGetValuesLocal()
2232 if ((nrow + ncol) <= (PetscInt)PETSC_STATIC_ARRAY_LENGTH(buf)) { in MatGetValuesLocal()
2236 PetscCall(PetscMalloc2(nrow, &bufr, ncol, &bufc)); in MatGetValuesLocal()
2243 PetscCall(ISLocalToGlobalMappingApply(mat->cmap->mapping, ncol, icol, icolm)); in MatGetValuesLocal()
2244 PetscCall(MatGetValues(mat, nrow, irowm, ncol, icolm, y)); in MatGetValuesLocal()
2455 PetscErrorCode MatSetValuesLocal(Mat mat, PetscInt nrow, const PetscInt irow[], PetscInt ncol, cons… in MatSetValuesLocal() argument
2461 if (!nrow || !ncol) PetscFunctionReturn(PETSC_SUCCESS); /* no values to insert */ in MatSetValuesLocal()
2476 …if (mat->ops->setvalueslocal) PetscUseTypeMethod(mat, setvalueslocal, nrow, irow, ncol, icol, y, a… in MatSetValuesLocal()
[all …]
/petsc/src/binding/petsc4py/src/petsc4py/PETSc/
H A Dpetscmat.pxi1050 cdef PetscInt irow=0, ncol=0, *icol=NULL
1054 ncol = i[k+1] - i[k]
1058 for c from 0 <= c < ncol:
1063 CHKERR(setvalues(A, 1, &irow, ncol, icol, sval, addv))
/petsc/src/mat/impls/aij/mpi/superlu_dist/
H A Dsuperlu_dist.c564 if (sinfo <= lu->A_sup.ncol) { in MatLUFactorNumeric_SuperLU_DIST()
567 } else if (sinfo > lu->A_sup.ncol) { in MatLUFactorNumeric_SuperLU_DIST()
/petsc/src/mat/impls/is/
H A Dmatis.c19 #define IndexSpaceGet(buf, nrow, ncol, irowm, icolm) \ argument
21 if (nrow + ncol > (PetscInt)PETSC_STATIC_ARRAY_LENGTH(buf)) { \
22 PetscCall(PetscMalloc2(nrow, &irowm, ncol, &icolm)); \
29 #define IndexSpaceRestore(buf, nrow, ncol, irowm, icolm) \ argument
31 … if (nrow + ncol > (PetscInt)PETSC_STATIC_ARRAY_LENGTH(buf)) PetscCall(PetscFree2(irowm, icolm)); \