Home
last modified time | relevance | path

Searched refs:icol (Results 1 – 25 of 58) sorted by relevance

123

/petsc/src/mat/utils/
H A Dzerodiag.c72 PetscInt prow, k, nz, n, repl, *j, *col, *row, m, *icol, nnz, *jj, kk; in MatReorderForNonzeroDiagonal_SeqAIJ() local
82 icol = ((IS_General *)icis->data)->idx; in MatReorderForNonzeroDiagonal_SeqAIJ()
88 if (icol[j[k]] == prow) break; in MatReorderForNonzeroDiagonal_SeqAIJ()
97 if (icol[j[k]] > prow && PetscAbsScalar(v[k]) > repla) { in MatReorderForNonzeroDiagonal_SeqAIJ()
99 repl = icol[j[k]]; in MatReorderForNonzeroDiagonal_SeqAIJ()
100 SWAP(icol[col[prow]], icol[col[repl]]); in MatReorderForNonzeroDiagonal_SeqAIJ()
111 if (icol[j[k]] < prow && PetscAbsScalar(v[k]) > repla) { in MatReorderForNonzeroDiagonal_SeqAIJ()
113 repl = icol[j[k]]; in MatReorderForNonzeroDiagonal_SeqAIJ()
116 if (icol[jj[kk]] == prow && PetscAbsScalar(vv[kk]) > abstol) { in MatReorderForNonzeroDiagonal_SeqAIJ()
118 SWAP(icol[col[prow]], icol[col[repl]]); in MatReorderForNonzeroDiagonal_SeqAIJ()
[all …]
/petsc/src/mat/tests/
H A Dex4.c9 IS irow, icol; in main() local
38 PetscCall(ISCreateStride(PETSC_COMM_SELF, n, 0, 1, &icol)); in main()
39 PetscCall(MatCreateSubMatrices(mat, 1, &irow, &icol, MAT_INITIAL_MATRIX, &submatrices)); in main()
40 PetscCall(MatCreateSubMatrices(mat, 1, &irow, &icol, MAT_REUSE_MATRIX, &submatrices)); in main()
51 PetscCall(ISDestroy(&icol)); in main()
61 PetscCall(ISCreateStride(PETSC_COMM_SELF, 5, 4, 1, &icol)); in main()
62 PetscCall(MatCreateSubMatrices(mat, 1, &irow, &icol, MAT_INITIAL_MATRIX, &submatrices)); in main()
66 PetscCall(MatCreateSubMatrices(mat, 1, &irow, &icol, MAT_REUSE_MATRIX, &submatrices)); in main()
78 PetscCall(ISDestroy(&icol)); in main()
79 PetscCall(ISCreateStride(PETSC_COMM_SELF, 10, 0, 1, &icol)); in main()
[all …]
H A Dex87.c13 IS isrow, iscol, irow[n], icol[n]; in main() local
37 icol[0] = icol[1] = iscol; in main()
38 PetscCall(MatCreateSubMatrices(BAIJ, n, irow, icol, MAT_INITIAL_MATRIX, &subBAIJ)); in main()
39 PetscCall(MatCreateSubMatrices(BAIJ, n, irow, icol, MAT_REUSE_MATRIX, &subBAIJ)); in main()
42 icol[0] = icol[1] = isrow; in main()
43 PetscCall(MatCreateSubMatrices(SBAIJ, n, irow, icol, MAT_INITIAL_MATRIX, &subSBAIJ)); in main()
44 PetscCall(MatCreateSubMatrices(SBAIJ, n, irow, icol, MAT_REUSE_MATRIX, &subSBAIJ)); in main()
H A Dex249.c9 IS *irow, *icol; in main() local
40 PetscCall(PetscMalloc2(n, &irow, n, &icol)); in main()
43 PetscCall(ISCreate(PETSC_COMM_SELF, &icol[i])); in main()
45 PetscCall(ISLoad(icol[i], colfd)); in main()
53 PetscCall(MatCreateSubMatrices(A, n, irow, icol, MAT_INITIAL_MATRIX, &submats)); in main()
60 PetscCall(MatCreateSubMatrices(A, n, irow, icol, MAT_REUSE_MATRIX, &submats)); in main()
71 PetscCall(ISDestroy(&icol[i])); in main()
75 PetscCall(PetscFree2(irow, icol)); in main()
H A Dex79f.F9018 PetscInt, pointer :: ia(:), ja(:), icol(:)
29 PetscCallA(MatMPIAIJGetSeqAIJ(A, Ad, Ao, icol, ierr))
56 write (7 + rank, *) ' ', j, icol(ja(j)) + 1, aa(j)
59 PetscCallA(MatMPIAIJRestoreSeqAIJ(A, Ad, Ao, icol, ierr))
H A Dex139.c27 …m, n, top_bs, row_bs, col_bs, nlocblocks, *idx, nrowblocks, ncolblocks, *ridx, *cidx, *icol, *irow; in main() local
93 PetscCall(PetscMalloc3(row_bs, &irow, col_bs, &icol, row_bs * col_bs, &vals)); in main()
100 for (l = 0; l < col_bs; l++) icol[l] = j * col_bs + l; in main()
104 PetscCall(MatSetValuesLocal(B, row_bs, irow, col_bs, icol, vals, ADD_VALUES)); in main()
108 PetscCall(PetscFree3(irow, icol, vals)); in main()
H A Dex22.c102 PetscErrorCode MatGetOrdering_myordering(Mat mat, MatOrderingType type, IS *irow, IS *icol) in MatGetOrdering_myordering() argument
117 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, n, ii, PETSC_OWN_POINTER, icol)); in MatGetOrdering_myordering()
119 PetscCall(ISSetPermutation(*icol)); in MatGetOrdering_myordering()
H A Dex23.c19 IS irow[2], icol[2]; in main() local
550 …ll(ISCreateStride(PETSC_COMM_SELF, crange[rrank + 1] - crange[rrank], crange[rrank], 1, &icol[0])); in main()
552 …ll(ISCreateStride(PETSC_COMM_SELF, crange[lrank + 1] - crange[lrank], crange[lrank], 1, &icol[1])); in main()
553 PetscCall(MatCreateSubMatrices(A, 2, irow, icol, MAT_INITIAL_MATRIX, &Asub)); in main()
554 PetscCall(MatCreateSubMatrices(B, 2, irow, icol, MAT_INITIAL_MATRIX, &Bsub)); in main()
557 PetscCall(MatCreateSubMatrices(A, 2, irow, icol, MAT_REUSE_MATRIX, &Asub)); in main()
558 PetscCall(MatCreateSubMatrices(B, 2, irow, icol, MAT_REUSE_MATRIX, &Bsub)); in main()
565 PetscCall(ISDestroy(&icol[0])); in main()
566 PetscCall(ISDestroy(&icol[1])); in main()
/petsc/src/ksp/pc/impls/gamg/
H A Dclassical.c564 const PetscInt *lidx, *icol, *gidx; in PCGAMGProlongator_Classical_Standard() local
632 PetscCall(MatGetRow(lA, i, &ncols, &icol, NULL)); in PCGAMGProlongator_Classical_Standard()
642 if (lcid[icol[j]] >= 0) { in PCGAMGProlongator_Classical_Standard()
643 pcontrib[icol[j]] = 1.; in PCGAMGProlongator_Classical_Standard()
645 ci = icol[j]; in PCGAMGProlongator_Classical_Standard()
646 PetscCall(MatRestoreRow(lA, i, &ncols, &icol, NULL)); in PCGAMGProlongator_Classical_Standard()
647 PetscCall(MatGetRow(lA, ci, &ncols, &icol, NULL)); in PCGAMGProlongator_Classical_Standard()
649 if (lcid[icol[k]] >= 0) pcontrib[icol[k]] = 1.; in PCGAMGProlongator_Classical_Standard()
651 PetscCall(MatRestoreRow(lA, ci, &ncols, &icol, NULL)); in PCGAMGProlongator_Classical_Standard()
652 PetscCall(MatGetRow(lA, i, &ncols, &icol, NULL)); in PCGAMGProlongator_Classical_Standard()
[all …]
/petsc/src/mat/graphops/color/utils/
H A Dbipartite.c11 const PetscInt *icol; in MatColoringCreateBipartiteGraph() local
29 PetscCall(MatGetRow(m, i, &ncol, &icol, &vcol)); in MatColoringCreateBipartiteGraph()
31 rowleaf[idx] = icol[j]; in MatColoringCreateBipartiteGraph()
35 PetscCall(MatRestoreRow(m, i, &ncol, &icol, &vcol)); in MatColoringCreateBipartiteGraph()
/petsc/src/mat/graphops/order/
H A Dsorder.c11 …TSC_INTERN PetscErrorCode MatGetOrdering_Natural(Mat mat, MatOrderingType type, IS *irow, IS *icol) in MatGetOrdering_Natural() argument
31 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, n, ii, PETSC_OWN_POINTER, icol)); in MatGetOrdering_Natural()
37 PetscCall(ISCreateStride(comm, end - start, start, 1, icol)); in MatGetOrdering_Natural()
40 PetscCall(ISSetIdentity(*icol)); in MatGetOrdering_Natural()
49 …C_INTERN PetscErrorCode MatGetOrdering_RowLength(Mat mat, MatOrderingType type, IS *irow, IS *icol) in MatGetOrdering_RowLength() argument
69 PetscCall(ISCreateGeneral(PETSC_COMM_SELF, n, permr, PETSC_COPY_VALUES, icol)); in MatGetOrdering_RowLength()
/petsc/src/mat/impls/localref/
H A Dmlocalref.c35 …at A, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt icol[], const PetscScala… in MatSetValuesBlockedLocal_LocalRef_Block() argument
44 PetscCall(ISLocalToGlobalMappingApplyBlock(A->cmap->mapping, ncol, icol, icolm)); in MatSetValuesBlockedLocal_LocalRef_Block()
50 …at A, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt icol[], const PetscScala… in MatSetValuesBlockedLocal_LocalRef_Scalar() argument
59 BlockIndicesExpand(ncol, icol, cbs, icolm); in MatSetValuesBlockedLocal_LocalRef_Scalar()
67 …at A, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt icol[], const PetscScala… in MatSetValuesLocal_LocalRef_Scalar() argument
83 PetscCall(ISLocalToGlobalMappingApply(A->cmap->mapping, ncol, icol, icolm)); in MatSetValuesLocal_LocalRef_Scalar()
85 PetscCall(ISLocalToGlobalMappingApplyBlock(A->cmap->mapping, ncol, icol, icolm)); in MatSetValuesLocal_LocalRef_Scalar()
/petsc/src/mat/impls/sbaij/seq/
H A Dsro.c133 PetscCall(ISDestroy(&a->icol)); in MatReorderingSeqSBAIJ()
138 PetscCall(ISDestroy(&a->icol)); in MatReorderingSeqSBAIJ()
139 a->icol = perm; in MatReorderingSeqSBAIJ()
/petsc/src/mat/impls/aij/seq/bas/
H A Dspbas.c383 PetscInt *icol; in spbas_matrix_to_crs() local
392 PetscCall(PetscMalloc1(nnz, &icol)); in spbas_matrix_to_crs()
393 *icol_out = icol; in spbas_matrix_to_crs()
398 *icol_out = icol; in spbas_matrix_to_crs()
412 icol[i0 + j] = icol_A[j]; in spbas_matrix_to_crs()
416 for (j = 0; j < r_nnz; j++) icol[i0 + j] = icol_A[j]; in spbas_matrix_to_crs()
420 for (j = 0; j < r_nnz; j++) icol[i0 + j] += i; in spbas_matrix_to_crs()
423 for (j = 0; j < r_nnz; j++) icol[i0 + j] += i0; in spbas_matrix_to_crs()
526 static PetscErrorCode spbas_mergesort(PetscInt nnz, PetscInt *icol, PetscScalar *val) in spbas_mergesort() argument
543 ihlp2 = icol; in spbas_mergesort()
[all …]
H A Dbasfactor.c76 b->icol = iperm; in MatICCFactorSymbolic_SeqAIJ_Bas()
98 IS ip = b->row, iip = b->icol; in MatCholeskyFactorNumeric_SeqAIJ_Bas()
/petsc/src/mat/impls/dense/mpi/
H A Dmmdense.c57 const PetscInt **irow, **icol, *irow_i; in MatCreateSubMatrices_MPIDense_Local() local
87 …PetscCall(PetscMalloc5(ismax, (PetscInt ***)&irow, ismax, (PetscInt ***)&icol, ismax, &nrow, ismax… in MatCreateSubMatrices_MPIDense_Local()
90 PetscCall(ISGetIndices(iscol[i], &icol[i])); in MatCreateSubMatrices_MPIDense_Local()
310 col = icol[i][k]; in MatCreateSubMatrices_MPIDense_Local()
356 col = icol[is_no][l]; in MatCreateSubMatrices_MPIDense_Local()
374 PetscCall(ISRestoreIndices(iscol[i], icol + i)); 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 … mat, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt icol[], const PetscScala… in MatSetValuesLocal_HYPREStruct_3d() argument
36 stencil = icol[j] - irow[i]; in MatSetValuesLocal_HYPREStruct_3d()
51 …_FMT " local column %" PetscInt_FMT " have bad stencil %" PetscInt_FMT, irow[i], icol[j], stencil); in MatSetValuesLocal_HYPREStruct_3d()
339 … mat, PetscInt nrow, const PetscInt irow[], PetscInt ncol, const PetscInt icol[], const PetscScala… in MatSetValuesLocal_HYPRESStruct_3d() argument
365 to_grid_rank = icol[j] / nvars; in MatSetValuesLocal_HYPRESStruct_3d()
366 to_var_type = (icol[j] % nvars); in MatSetValuesLocal_HYPRESStruct_3d()
386 …_FMT " local column %" PetscInt_FMT " have bad stencil %" PetscInt_FMT, irow[i], icol[j], stencil); in MatSetValuesLocal_HYPRESStruct_3d()
404 to_var_type = icol[j] / (ex->gnxgnygnz); in MatSetValuesLocal_HYPRESStruct_3d()
405 to_grid_rank = icol[j] - to_var_type * (ex->gnxgnygnz); in MatSetValuesLocal_HYPRESStruct_3d()
425 …_FMT " local column %" PetscInt_FMT " have bad stencil %" PetscInt_FMT, irow[i], icol[j], stencil); in MatSetValuesLocal_HYPRESStruct_3d()
/petsc/src/mat/impls/adj/mpi/
H A Dmpiadj.c133 …SubMatrices_MPIAdj_Private(Mat mat, PetscInt n, const IS irow[], const IS icol[], PetscBool subcom… in MatCreateSubMatrices_MPIAdj_Private() argument
148 PetscCall(ISGetLocalSize(icol[i], &icol_n)); in MatCreateSubMatrices_MPIAdj_Private()
158 PetscCall(PetscObjectGetComm((PetscObject)icol[i], &scomm_col)); in MatCreateSubMatrices_MPIAdj_Private()
170 PetscCall(MatCreateSubMatrix_MPIAdj_data(mat, irow[i], icol[i], &sxadj, &sadjncy, &svalues)); in MatCreateSubMatrices_MPIAdj_Private()
172 PetscCall(ISGetLocalSize(icol[i], &icol_n)); in MatCreateSubMatrices_MPIAdj_Private()
176 PetscCall(ISGetIndices(icol[i], &icol_indices)); in MatCreateSubMatrices_MPIAdj_Private()
178 PetscCall(ISRestoreIndices(icol[i], &icol_indices)); in MatCreateSubMatrices_MPIAdj_Private()
209 …reateSubMatricesMPI_MPIAdj(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, … in MatCreateSubMatricesMPI_MPIAdj() argument
213 PetscCall(MatCreateSubMatrices_MPIAdj_Private(mat, n, irow, icol, PETSC_TRUE, scall, submat)); in MatCreateSubMatricesMPI_MPIAdj()
217 …atCreateSubMatrices_MPIAdj(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, … in MatCreateSubMatrices_MPIAdj() argument
[all …]
/petsc/src/mat/impls/normal/
H A Dnormmh.c9 …ubMatrices_NormalHermitian(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, … in MatCreateSubMatrices_NormalHermitian() argument
18 PetscCheck(irow == icol, PetscObjectComm((PetscObject)mat), PETSC_ERR_SUP, "Not implemented"); in MatCreateSubMatrices_NormalHermitian()
28 PetscCall(MatCreateSubMatrices(B, n, row, icol, MAT_INITIAL_MATRIX, &suba)); in MatCreateSubMatrices_NormalHermitian()
H A Dnormm.c26 …atCreateSubMatrices_Normal(Mat mat, PetscInt n, const IS irow[], const IS icol[], MatReuse scall, … in MatCreateSubMatrices_Normal() argument
35 PetscCheck(irow == icol, PetscObjectComm((PetscObject)mat), PETSC_ERR_SUP, "Not implemented"); in MatCreateSubMatrices_Normal()
45 PetscCall(MatCreateSubMatrices(B, n, row, icol, MAT_INITIAL_MATRIX, &suba)); in MatCreateSubMatrices_Normal()
/petsc/src/tao/matrix/
H A Dsubmatfree.c222 PetscErrorCode MatCreateSubMatrices_SMF(Mat A, PetscInt n, IS *irow, IS *icol, MatReuse scall, Mat … in MatCreateSubMatrices_SMF() argument
229 for (i = 0; i < n; i++) PetscCall(MatCreateSubMatrix_SMF(A, irow[i], icol[i], scall, &(*B)[i])); in MatCreateSubMatrices_SMF()
/petsc/src/mat/impls/baij/seq/
H A Dbaijfact4.c10 IS isrow = b->row, isicol = b->icol; in MatILUFactorNumeric_SeqBAIJ_N_inplace()
H A Dbaijfact2.c118 IS isrow = b->row, isicol = b->icol; in MatLUFactorNumeric_SeqBAIJ_N()
362 b->icol = isicol; in MatILUFactorSymbolic_SeqBAIJ()
496 b->icol = isicol; in MatILUFactorSymbolic_SeqBAIJ()
/petsc/src/mat/impls/baij/mpi/
H A Dbaijov.c618 const PetscInt **icol, **irow; local
655 …PetscCall(PetscMalloc5(ismax, (PetscInt ***)&irow, ismax, (PetscInt ***)&icol, ismax, &nrow, ismax…
668 icol[i] = NULL;
671 PetscCall(ISGetIndices(iscol[i], &icol[i]));
983 icol_i = icol[i];
993 icol_i = icol[i];
1520 if (!allcolumns[i]) PetscCall(ISRestoreIndices(iscol[i], icol + i));
1528 PetscCall(PetscFree5(*(PetscInt ***)&irow, *(PetscInt ***)&icol, nrow, ncol, issorted));
/petsc/src/mat/impls/aij/mpi/
H A Dmpiov.c1220 const PetscInt *icol, *irow; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local() local
1261 icol = NULL; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1264 PetscCall(ISGetIndices(iscol[0], &icol)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1475 if (icol[j] >= cstart && icol[j] < cend) { in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1476 cmap_loc[icol[j] - cstart] = j + 1; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1478 PetscCall(PetscHMapISet(cmap, icol[j] + 1, j + 1)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1489 for (PetscInt j = 0; j < ncol; j++) cmap[icol[j]] = j + 1; in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
1897 if (!allcolumns) PetscCall(ISRestoreIndices(iscol[0], &icol)); in MatCreateSubMatrices_MPIAIJ_SingleIS_Local()
2039 const PetscInt **icol, **irow; in MatCreateSubMatrices_MPIAIJ_Local() local
2070 …PetscCall(PetscMalloc5(ismax, (PetscInt ***)&irow, ismax, (PetscInt ***)&icol, ismax, &nrow, ismax… in MatCreateSubMatrices_MPIAIJ_Local()
[all …]

123