| /petsc/src/dm/impls/swarm/ |
| H A D | swarmpic_da.c | 91 PetscInt nel, npe, e, q, k, d; in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() local 129 PetscCall(DMDAGetElements(dmc, &nel, &npe, &element_list)); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 130 PetscCall(PetscMalloc1(dim * npe, &elcoor)); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 133 PetscCall(PetscMalloc1(npe, &basis[q])); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 173 const PetscInt *element = &element_list[npe * e]; in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 175 for (k = 0; k < npe; k++) { in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 181 for (k = 0; k < npe; k++) { in private_DMSwarmInsertPointsUsingCellDM_DA_Q1() 191 PetscCall(DMDARestoreElements(dmc, &nel, &npe, &element_list)); in private_DMSwarmInsertPointsUsingCellDM_DA_Q1()
|
| H A D | swarmpic_sort.c | 271 PetscInt nel, npe; in DMSwarmSortGetAccess() local 273 PetscCall(DMDAGetElements(dm, &nel, &npe, &element)); in DMSwarmSortGetAccess() 275 PetscCall(DMDARestoreElements(dm, &nel, &npe, &element)); in DMSwarmSortGetAccess()
|
| H A D | swarmpic_plex.c | 160 PetscInt ii, jj, q, npoints_q, e, nel, npe, pcnt, ps, pe, d, k, nfaces, Nfc; in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() local 200 npe = 3; /* nodes per element (triangle) */ in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() 203 PetscCall(PetscMalloc1(npe, &basis[q])); in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular() 233 …for (k = 0; k < npe; k++) swarm_coor[dim * pcnt + d] += basis[q][k] * PetscRealPart(elcoor[dim * k… in private_DMSwarmInsertPointsUsingCellDM_PLEX2D_Regular()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex56.c | 33 PetscMPIInt npe, mype; in main() local 42 PetscCallMPI(MPI_Comm_size(comm, &npe)); in main() 47 …iple of %" PetscInt_FMT " (sizes^{1/3})", (PetscInt)(PetscPowReal((PetscReal)npe, 1. / 3.) + .5))); in main() 74 if (npe == 2) { in main() 77 npe = 1; in main() 79 m = nn * nn * nn / npe; in main() 80 if (mype == npe - 1) m = nn * nn * nn - (npe - 1) * m; in main() 89 const PetscInt NP = (PetscInt)(PetscPowReal((PetscReal)npe, 1. / 3.) + .5); in main() 96 …PetscCheck(npe == NP * NP * NP, comm, PETSC_ERR_ARG_WRONG, "npe=%d: npe^{1/3} must be integer", np… in main()
|
| H A D | ex55.c | 20 PetscMPIInt npe, mype; in main() local 38 PetscCallMPI(MPI_Comm_size(comm, &npe)); in main() 45 m = (ne + 1) * (ne + 1) / npe; in main() 46 if (mype == npe - 1) m = (ne + 1) * (ne + 1) - (npe - 1) * m; in main()
|
| H A D | ex70.c | 342 PetscInt nel, npe, eidx; in AssembleStokes_A() local 361 PetscCall(DMDAGetElements(stokes_da, &nel, &npe, &element_list)); in AssembleStokes_A() 363 const PetscInt *element = &element_list[npe * eidx]; in AssembleStokes_A() 405 PetscInt nel, npe, eidx; in AssembleStokes_PC() local 424 PetscCall(DMDAGetElements(stokes_da, &nel, &npe, &element_list)); in AssembleStokes_PC() 426 const PetscInt *element = &element_list[npe * eidx]; in AssembleStokes_PC() 467 PetscInt nel, npe, eidx, i; in AssembleStokes_RHS() local 491 PetscCall(DMDAGetElements(stokes_da, &nel, &npe, &element_list)); in AssembleStokes_RHS() 493 const PetscInt *element = &element_list[npe * eidx]; in AssembleStokes_RHS() 526 PetscInt dim, nel, npe, q, k, d, ncurr, Nfc; in DMSwarmPICInsertPointsCellwise() local [all …]
|
| H A D | ex54.c | 16 PetscMPIInt npe, mype; in main() local 31 PetscCallMPI(MPI_Comm_size(comm, &npe)); in main()
|
| /petsc/src/ksp/ksp/utils/dm/ |
| H A D | dmproject.c | 526 PetscInt k, p, e, npoints, nel, npe, Nfc; in DMSwarmProjectField_ApproxQ1_DA_2D() local 556 PetscCall(DMDAGetElements(dm, &nel, &npe, &element_list)); in DMSwarmProjectField_ApproxQ1_DA_2D() 569 element = &element_list[npe * e]; in DMSwarmProjectField_ApproxQ1_DA_2D() 587 for (k = 0; k < npe; k++) { in DMSwarmProjectField_ApproxQ1_DA_2D() 595 PetscCall(DMDARestoreElements(dm, &nel, &npe, &element_list)); in DMSwarmProjectField_ApproxQ1_DA_2D()
|
| /petsc/src/dm/impls/plex/cgns/ |
| H A D | plexcgns2.c | 865 int npe; // nodes per element in DMPlexCGNS_CreateCornersConnectivitySection() local 874 PetscCallCGNSRead(cg_npe(sectionCellTypes[s], &npe), dm, 0); in DMPlexCGNS_CreateCornersConnectivitySection() 875 PetscCall(PetscMalloc1(myowned * npe, &conn_cg)); in DMPlexCGNS_CreateCornersConnectivitySection() 882 …(PetscInt v = 0; v < numCorners; ++v) conn_sb_seg[i * numCorners + perm[v]] = conn_cg[i * npe + v]; in DMPlexCGNS_CreateCornersConnectivitySection()
|