Home
last modified time | relevance | path

Searched refs:nr (Results 1 – 25 of 41) sorted by relevance

12

/petsc/src/mat/impls/nest/
H A Dmatnest.c20 for (i = 0; i < bA->nr; i++) { /* rows */ in MatNestGetSizes_Private()
42 PetscInt i, j, nr = bA->nr, nc = bA->nc; in MatMult_Nest() local
45 for (i = 0; i < nr; i++) PetscCall(VecGetSubVector(y, bA->isglobal.row[i], &by[i])); in MatMult_Nest()
47 for (i = 0; i < nr; i++) { in MatMult_Nest()
55 for (i = 0; i < nr; i++) PetscCall(VecRestoreSubVector(y, bA->isglobal.row[i], &by[i])); in MatMult_Nest()
64 PetscInt i, j, nr = bA->nr, nc = bA->nc; in MatMultAdd_Nest() local
67 for (i = 0; i < nr; i++) PetscCall(VecGetSubVector(z, bA->isglobal.row[i], &bz[i])); in MatMultAdd_Nest()
69 for (i = 0; i < nr; i++) { in MatMultAdd_Nest()
82 for (i = 0; i < nr; i++) PetscCall(VecRestoreSubVector(z, bA->isglobal.row[i], &bz[i])); in MatMultAdd_Nest()
100 PetscInt i, j, M, N, nr, nc, ldb, ldc; in MatProductNumeric_Nest_Dense() local
[all …]
H A Dmatnestimpl.h10 PetscInt nr, nc; /* nr x nc blocks */ member
/petsc/src/mat/impls/nest/ftn-custom/
H A Dzmatnestf.c14 PETSC_EXTERN void matcreatenest_(MPI_Fint *comm, PetscInt *nr, IS is_row[], PetscInt *nc, IS is_col… in matcreatenest_() argument
22 *ierr = PetscMalloc1((*nr) * (*nc), &m); in matcreatenest_()
24 for (i = 0; i < (*nr) * (*nc); i++) { in matcreatenest_()
34 *ierr = MatCreateNest(MPI_Comm_f2c(*comm), *nr, is_row, *nc, is_col, m, B); in matcreatenest_()
39 PETSC_EXTERN void matnestsetsubmats_(Mat *B, PetscInt *nr, IS is_row[], PetscInt *nc, IS is_col[], … in matnestsetsubmats_() argument
48 *ierr = PetscMalloc1((*nr) * (*nc), &m); in matnestsetsubmats_()
50 for (i = 0; i < (*nr) * (*nc); i++) { in matnestsetsubmats_()
62 *ierr = MatNestSetSubMats(*B, *nr, is_row, *nc, is_col, m); in matnestsetsubmats_()
/petsc/src/vec/vec/impls/nest/
H A Dvecnest.c82 PetscInt i, nr; in VecDot_Nest() local
87 nr = bx->nb; in VecDot_Nest()
89 for (i = 0; i < nr; i++) { in VecDot_Nest()
101 PetscInt i, nr; in VecTDot_Nest() local
106 nr = bx->nb; in VecTDot_Nest()
108 for (i = 0; i < nr; i++) { in VecTDot_Nest()
120 PetscInt i, nr; in VecDotNorm2_Nest() local
126 nr = bx->nb; in VecDotNorm2_Nest()
129 for (i = 0; i < nr; i++) { in VecDotNorm2_Nest()
143 PetscInt i, nr; in VecAXPY_Nest() local
[all …]
/petsc/src/mat/tests/
H A Dex202.c7 const PetscInt nr = 2, nc = 3, nk = 10; in TestInitialMatrix() local
25 …for (i = 0; i < (nr * nc); i++) PetscCall(MatCreateSeqDense(PETSC_COMM_WORLD, arow[i], acol[i], NU… in TestInitialMatrix()
26 PetscCall(MatCreateNest(PETSC_COMM_WORLD, nr, NULL, nc, NULL, subs, &A)); in TestInitialMatrix()
36 for (i = 0; i < nr; i++) { in TestInitialMatrix()
43 for (j = 0; j < nr; j++) PetscCall(MatView(block[i][j], PETSC_VIEWER_STDOUT_WORLD)); in TestInitialMatrix()
63 PetscCall(MatCreateSeqDense(PETSC_COMM_WORLD, acol[0] + acol[nr] + acol[2 * nr], nk, NULL, &B)); in TestInitialMatrix()
91 for (i = 0; i < (nr * nc); i++) PetscCall(MatDestroy(&subs[i])); in TestInitialMatrix()
H A Dex51.c39 PetscInt nr = 1, nc = 1; in main() local
46 if (PetscRealPart(rval) > .5) rows[nr++] = rows[0] + j - 1; in main()
53 for (j = 0; j < nr * nc; j++) { in main()
57 PetscCall(MatSetValues(A, nr, rows, nc, cols, vals, ADD_VALUES)); in main()
58 PetscCall(MatSetValues(B, nr, rows, nc, cols, vals, ADD_VALUES)); in main()
H A Dex26.c8 PetscInt i, j, nr, bs = 1; in DumpCSR() local
17 PetscCall(MatGetRowIJ(A, shift, symmetric, compressed, &nr, &ia, &ja, &done)); in DumpCSR()
20 for (i = 0; i < nr; i++) { in DumpCSR()
25 PetscCall(MatRestoreRowIJ(A, shift, symmetric, compressed, &nr, &ia, &ja, &done)); in DumpCSR()
H A Dex54.c61 PetscInt nr = 1, nc = 1; in main() local
68 if (PetscRealPart(rval) > .5) rows[nr++] = rows[0] + j - 1; in main()
75 for (j = 0; j < nr * nc; j++) { in main()
79 PetscCall(MatSetValues(A, nr, rows, nc, cols, vals, ADD_VALUES)); in main()
80 PetscCall(MatSetValues(B, nr, rows, nc, cols, vals, ADD_VALUES)); in main()
H A Dex221.c186 PetscInt *idxs = NULL, nr = 0; in main() local
189 nr = 1; in main()
190 PetscCall(PetscMalloc1(nr, &idxs)); in main()
198 PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, nr, idxs, PETSC_OWN_POINTER, &zr)); in main()
224 nr = 0; in main()
227 nr = 1; in main()
228 PetscCall(PetscMalloc1(nr, &idxs)); in main()
236 PetscCall(ISCreateGeneral(PETSC_COMM_WORLD, nr, idxs, PETSC_OWN_POINTER, &zr)); in main()
H A Dex23.c25 PetscInt rst, ren, cst, cen, nr, nc, rbs = 1, cbs = 1; in main() local
120 PetscInt nr, nc; in main() local
122 PetscCall(ISLocalToGlobalMappingGetSize(rmap, &nr)); in main()
124 if (nr != nc) squaretest = PETSC_FALSE; in main()
128 PetscCall(PetscArraycmp(idxs1, idxs2, nr, &squaretest)); in main()
459 nr = 2; in main()
461 PetscCall(PetscOptionsGetInt(NULL, NULL, "-nr", &nr, NULL)); in main()
470 PetscCall(PetscMalloc3(nr, &rows, nc, &cols, 2 * nr * nc, &mats)); in main()
471 for (i = 0; i < nr * nc; i++) { in main()
474 PetscCall(MatTranspose(B, MAT_INITIAL_MATRIX, &mats[i + nr * nc])); in main()
[all …]
/petsc/src/ksp/ksp/tests/
H A Dex9.c7 PetscInt i, j, nr, nc; in replace_submats() local
10 PetscCall(MatNestGetSubMats(A, &nr, &nc, NULL)); in replace_submats()
11 PetscCall(PetscMalloc1(nr, &r)); in replace_submats()
14 for (i = 0; i < nr; i++) { in replace_submats()
/petsc/src/mat/utils/
H A Dzerorows.c5 …tZeroRowsMapLocal_Private(Mat A, PetscInt N, const PetscInt *rows, PetscInt *nr, PetscInt **olrows) in MatZeroRowsMapLocal_Private() argument
46 if (nr) *nr = len; in MatZeroRowsMapLocal_Private()
/petsc/src/mat/impls/is/
H A Dmatis.c302 for (i = 0; i < lf->nr; i++) PetscCall(ISDestroy(&lf->rf[i])); in MatISContainerDestroyFields_Private()
668 PetscInt nr, nc; in MatConvert_XAIJ_IS() local
674 PetscCall(ISLocalToGlobalMappingGetSize(rl2g, &nr)); in MatConvert_XAIJ_IS()
678 PetscCall(ISCreateBlock(comm, rbs, nr / rbs, ridx, PETSC_USE_POINTER, &rows)); in MatConvert_XAIJ_IS()
832 PetscInt i, j, nr, nc, rbs, cbs; in MatConvert_Nest_IS() local
837 PetscCall(MatNestGetSubMats(A, &nr, &nc, &nest)); in MatConvert_Nest_IS()
849 lreuse = (PetscBool)(i == nr && j == nc); in MatConvert_Nest_IS()
854 PetscCall(PetscCalloc2(nr, &lr, nc, &lc)); in MatConvert_Nest_IS()
855 …PetscCall(PetscCalloc6(nr, &isrow, nc, &iscol, nr, &islrow, nc, &islcol, nr * nc, &snest, nr * nc,… in MatConvert_Nest_IS()
857 for (i = 0; i < nr; i++) { in MatConvert_Nest_IS()
[all …]
/petsc/src/vec/vec/tests/
H A Dex49.c79 PetscInt nr = nrstart + j; in main() local
81 PetscCall(VecSetValue(v, nr, val, ADD_VALUES)); in main()
/petsc/include/petsc/private/
H A Dmatisimpl.h37 PetscInt nr, nc; member
/petsc/src/dm/impls/da/
H A Ddadd.c38 PetscInt mr = 0, nr = 0, pr = 0; in DMDACreatePatchIS() local
101 nr = 0; in DMDACreatePatchIS()
154 if (nr == n - 1) { in DMDACreatePatchIS()
157 nr = 0; in DMDACreatePatchIS()
159 nr++; in DMDACreatePatchIS()
161 ne += ly[nr]; in DMDACreatePatchIS()
/petsc/src/vec/is/sf/utils/
H A Dsfutils.c88 PetscInt nr, nl; in PetscSFGetGraphLayout() local
98 PetscCall(PetscSFGetGraph(sf, &nr, &nl, ilocal, &ir)); in PetscSFGetGraphLayout()
99 PetscCall(PetscLayoutCreateFromSizes(PetscObjectComm((PetscObject)sf), nr, PETSC_DECIDE, 1, &lt)); in PetscSFGetGraphLayout()
934 PetscInt nranks, nr, nl, vnr, vnl, maxl; in PetscSFCreateStridedSF() local
951 PetscCall(PetscSFGetGraph(sf, &nr, &nl, &ilocal, &iremote)); in PetscSFCreateStridedSF()
955 if (ldr == PETSC_DECIDE) ldr = nr; in PetscSFCreateStridedSF()
958 …= nr, PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Invalid leading dimension %" PetscInt_FMT " must be s… in PetscSFCreateStridedSF()
960 vnr = nr * bs; in PetscSFCreateStridedSF()
/petsc/src/mat/impls/shell/
H A Dshell.c249 static PetscErrorCode MatZeroRowsColumns_Local_Shell(Mat mat, PetscInt nr, PetscInt rows[], PetscIn… in MatZeroRowsColumns_Local_Shell() argument
265 PetscCall(PetscMalloc1(nr, &idxs)); in MatZeroRowsColumns_Local_Shell()
266 for (i = 0; i < nr; i++) idxs[i] = rows[i] + rst; in MatZeroRowsColumns_Local_Shell()
267 PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)mat), nr, idxs, PETSC_OWN_POINTER, &is1)); in MatZeroRowsColumns_Local_Shell()
287 PetscCall(ISGetLocalSize(shell->zrows, &nr)); in MatZeroRowsColumns_Local_Shell()
288 PetscCall(PetscMalloc1(nr, &gidxs)); in MatZeroRowsColumns_Local_Shell()
289 for (i = 0, cum = 0; i < nr; i++) { in MatZeroRowsColumns_Local_Shell()
319 PetscInt nr, *lrows; in MatZeroRows_Shell() local
355 PetscCall(PetscLayoutMapLocal(mat->rmap, n, rows, &nr, &lrows, NULL)); in MatZeroRows_Shell()
356 PetscCall(MatZeroRowsColumns_Local_Shell(mat, nr, lrows, 0, NULL, diag, PETSC_FALSE)); in MatZeroRows_Shell()
[all …]
/petsc/src/ksp/ksp/impls/gmres/dgmres/
H A Ddgmres.c545 PetscBLASInt nr, bmax; in KSPDGMRESComputeDeflationData_DGMRES() local
620 PetscCall(PetscBLASIntCast(r, &nr)); in KSPDGMRESComputeDeflationData_DGMRES()
629 PetscCallBLAS("LAPACKgetrf", LAPACKgetrf_(&nr, &nr, TTF, &bmax, INVP, &info)); in KSPDGMRESComputeDeflationData_DGMRES()
848 PetscBLASInt NbrEig = 0, nr, bm; in KSPDGMRESImproveEig_DGMRES() local
959 PetscCall(PetscBLASIntCast(r, &nr)); in KSPDGMRESImproveEig_DGMRES()
963 PetscCallBLAS("LAPACKgetrf", LAPACKgetrf_(&nr, &nr, TTF, &bm, INVP, &info)); in KSPDGMRESImproveEig_DGMRES()
/petsc/src/vec/is/sf/interface/
H A Dsf.c2503 PetscInt nr; in PetscSFConcatenate() local
2505 PetscCall(PetscSFGetGraph(sfs[s], &nr, NULL, NULL, NULL)); in PetscSFConcatenate()
2506nr == nRoots, comm, PETSC_ERR_ARG_SIZ, "rootMode = %s but sfs[%" PetscInt_FMT "] has a different n… in PetscSFConcatenate()
2585 PetscInt i, nl, nr; in PetscSFConcatenate() local
2591 PetscCall(PetscSFGetGraph(sfs[s], &nr, &nl, NULL, &iremote)); in PetscSFConcatenate()
2594 …PetscCall(PetscSFSetGraph(tmp_sf, nr, nl, NULL, PETSC_USE_POINTER, (PetscSFNode *)iremote, PETSC_C… in PetscSFConcatenate()
2596 PetscCall(PetscMalloc1(nr, &tmp_rootdata)); in PetscSFConcatenate()
2598 for (i = 0; i < nr; i++) { in PetscSFConcatenate()
2602 rootOffset += nr; in PetscSFConcatenate()
2604 for (i = 0; i < nr; i++) { in PetscSFConcatenate()
/petsc/src/ksp/pc/impls/bddc/
H A Dbddcgraph.c439 PetscInt nr, nmr, nrs, ncc, cum_queue; in PCBDDCGraphComputeConnectedComponents() local
455 PetscCall(PetscSFGetGraph(graph->interface_ref_sf, &nr, NULL, NULL, NULL)); in PCBDDCGraphComputeConnectedComponents()
480 for (PetscInt i = 0, rcumlabels = 0, mcumlabels = 0; i < nr; i++) { in PCBDDCGraphComputeConnectedComponents()
1035 PetscInt nr, nmr, *rdata; in PCBDDCGraphSetUp() local
1056 PetscCall(PetscSFGetGraph(graph->interface_ref_sf, &nr, NULL, NULL, NULL)); in PCBDDCGraphSetUp()
1061 for (PetscInt i = 0, c = 0; i < nr && valid; i++) { in PCBDDCGraphSetUp()
1080 PetscCall(PetscCalloc1(nr, &graph->interface_ref_rsize)); in PCBDDCGraphSetUp()
1081 PetscCall(PetscMalloc1(nr + 1, &cum_rsize)); in PCBDDCGraphSetUp()
1087 for (PetscInt i = 0; i < nr; i++) { in PCBDDCGraphSetUp()
/petsc/src/ts/utils/dmplexlandau/
H A Dplexland.c482 …PetscInt fieldA, q, f, g, d, nr, nc, rows0[LANDAU_MAX_Q_FACE] = {0}, cols0[LANDAU_MAX_Q_FACE] =… in LandauFormJacobian_Internal() local
491 nr = 1; in LandauFormJacobian_Internal()
496 for (q = 0, nr = 0; q < maps[grid].num_face; q++, nr++) { in LandauFormJacobian_Internal()
522 …x] + fieldA * fullNb2 + fullNb * coo_elem_point_offsets[glb_elem_idx][f] + nr * coo_elem_point_off… in LandauFormJacobian_Internal()
523 for (PetscInt q = 0, idx2 = idx0; q < nr; q++) { in LandauFormJacobian_Internal()
527 for (q = 0; q < nr; q++) rows[q] = rows0[q] + moffset; in LandauFormJacobian_Internal()
529 for (q = 0; q < nr; q++) { in LandauFormJacobian_Internal()
532 PetscCall(MatSetValues(JacP, nr, rows, nc, cols, vals, ADD_VALUES)); in LandauFormJacobian_Internal()
937 PetscInt rCellIdx[8], nr = 0, nrmax = (dim == 3) ? 8 : 2; in adaptToleranceFEM() local
949 nr = 0; in adaptToleranceFEM()
[all …]
/petsc/src/mat/impls/elemental/
H A Dmatelem.cxx107 static PetscErrorCode MatSetValues_Elemental(Mat A, PetscInt nr, const PetscInt *rows, PetscInt nc,… in MatSetValues_Elemental() argument
117 for (i = 0; i < nr; i++) { in MatSetValues_Elemental()
149 for (i = 0; i < nr; i++) { in MatSetValues_Elemental()
169 for (i = 0; i < nr; i++) { in MatSetValues_Elemental()
183 a->emat->Set(erow, ecol, (PetscElemScalar)vals[i + j * nr]); in MatSetValues_Elemental()
186 a->emat->Update(erow, ecol, (PetscElemScalar)vals[i + j * nr]); in MatSetValues_Elemental()
201 for (i = 0; i < nr; i++) { in MatSetValues_Elemental()
207 a->emat->QueueUpdate(erow, ecol, vals[i + j * nr]); in MatSetValues_Elemental()
/petsc/src/mat/impls/aij/mpi/mumps/
H A Dmumps.c1515 PetscInt nr, nc; in MatConvertToTriples_nest_xaij() local
1519 PetscCall(MatNestGetSubMats(A, &nr, &nc, &mats)); in MatConvertToTriples_nest_xaij()
1530 …PetscCall(PetscMalloc2(nr * nc + 1, &mumps->nest_vals_start, nr * nc, &mumps->nest_convert_to_trip… in MatConvertToTriples_nest_xaij()
1531 for (PetscInt r = 0; r < nr; r++) { in MatConvertToTriples_nest_xaij()
1592 PetscCall(PetscMalloc4(nr, &rows, nc, &cols, nr, &rows_idx, nc, &cols_idx)); in MatConvertToTriples_nest_xaij()
1594 …for (PetscInt r = 0; r < nr; r++) PetscCall(ISGetIndices(rows[r], (const PetscInt **)&rows_idx[r])… in MatConvertToTriples_nest_xaij()
1600 for (PetscInt r = 0; r < nr; r++) { in MatConvertToTriples_nest_xaij()
1703 for (PetscInt r = 0; r < nr; r++) { in MatConvertToTriples_nest_xaij()
1719 …for (PetscInt r = 0; r < nr; r++) PetscCall(ISRestoreIndices(rows[r], (const PetscInt **)&rows_idx… in MatConvertToTriples_nest_xaij()
1723 mumps->nest_vals_start[nr * nc] = cumnnz; in MatConvertToTriples_nest_xaij()
[all …]
/petsc/src/dm/impls/plex/transform/interface/
H A Dplextransform.c1447 PetscInt dim, cr = 0, co = 0, nr, no; in DMPlexTransformGetCone_Internal() local
1455 PetscCall(DMPlexTransformGetSubcellOrientation(tr, ct, p, o, ctNew, cr, co, &nr, &no)); in DMPlexTransformGetCone_Internal()
1456 if (cr != nr || co != no) PetscCall(DMGetWorkArray(dm, csizeNew, MPIU_INT, &newft)); in DMPlexTransformGetCone_Internal()
1575 PetscInt maxConeSize = 0, Nct, p, r, n, nr, coff = 0, ooff = 0; in DMPlexTransformGetConeOriented() local
1593 for (nr = 0; nr < Nr; ++nr) { in DMPlexTransformGetConeOriented()
1616 PetscInt maxConeSize = 0, Nct, p, r, n, nr, coff = 0, ooff = 0; in DMPlexTransformGetCone() local
1634 for (nr = 0; nr < Nr; ++nr) { in DMPlexTransformGetCone()

12