| /petsc/src/snes/tutorials/ |
| H A D | ex75.h | 3 …, PetscReal *B, PetscScalar vx[41][41], PetscScalar vz[41][41], PetscScalar p[41][41], PetscScalar… in SolKxData5() 6817 p[0][0] = 1.33171955351597850544e-03; in SolKxData5() 6818 p[0][1] = 0.00000000000000000000e+00; in SolKxData5() 6819 p[0][2] = -1.33171955351597850544e-03; in SolKxData5() 6820 p[0][3] = 0.00000000000000000000e+00; in SolKxData5() 6821 p[0][4] = 1.33171955351597850544e-03; in SolKxData5() 6822 p[0][5] = 0.00000000000000000000e+00; in SolKxData5() 6823 p[0][6] = -1.33171955351597850544e-03; in SolKxData5() 6824 p[0][7] = 0.00000000000000000000e+00; in SolKxData5() 6825 p[0][8] = 1.33171955351597850544e-03; in SolKxData5() [all …]
|
| /petsc/src/dm/impls/plex/ |
| H A D | gmshlex.h | 10 #define SN1(p) ((p) + 1) argument 11 #define SN2(p) (SN1(p) * SN1((p) + 1) / 2) argument 12 #define SN3(p) (SN2(p) * SN1((p) + 2) / 3) argument 13 #define SI1(p, i) (i) argument 14 #define SI2(p, i, j) ((i) + (SN2(p) - SN2((p) - (j)))) argument 15 #define SI3(p, i, j, k) (SI2((p) - (k), i, j) + (SN3(p) - SN3((p) - (k)))) argument 16 #define SL1(p, i) for ((i) = 1; (i) < (p); ++(i)) argument 17 #define SL2(p, i, j) SL1((p) - 1, i) SL1((p) - (i), j) argument 18 #define SL3(p, i, j, k) SL1((p) - 2, i) SL1((p) - (i), j) SL1((p) - (i) - (j), k) argument 20 #define BN1(p) ((p) + 1) argument [all …]
|
| H A D | plextree.c | 150 PetscInt p, posA = -1, numChildren, i; in DMPlexReferenceTreeGetChildSymmetry_Default() local 156 p = children[i]; in DMPlexReferenceTreeGetChildSymmetry_Default() 157 if (p == childA) { in DMPlexReferenceTreeGetChildSymmetry_Default() 221 PetscInt dim, p, pStart, pEnd, pRefStart, pRefEnd, d, offset, parentSize, *parents, *childIDs; in DMPlexCreateReferenceTree_Union() local 238 for (p = pStart; p < pEnd; p++) PetscCall(PetscSectionSetDof(unionSection, p - pStart, 1)); in DMPlexCreateReferenceTree_Union() 239 for (p = pRefStart; p < pRefEnd; p++) { in DMPlexCreateReferenceTree_Union() 241 PetscCall(DMLabelGetValue(identityRef, p, &q)); in DMPlexCreateReferenceTree_Union() 243 if (qSize > 1) PetscCall(PetscSectionSetDof(unionSection, p - pRefStart + (pEnd - pStart), 1)); in DMPlexCreateReferenceTree_Union() 278 for (p = pStart; p < pEnd; p++) { in DMPlexCreateReferenceTree_Union() 281 PetscCall(DMPlexGetConeSize(K, p, &dof)); in DMPlexCreateReferenceTree_Union() [all …]
|
| H A D | plexindices.c | 35 PetscInt *points = NULL, numPoints, p, dof, cldof = 0; in DMPlexCreateClosureIndex() local 38 for (p = 0; p < numPoints * 2; p += 2) { in DMPlexCreateClosureIndex() 39 if ((points[p] >= sStart) && (points[p] < sEnd)) { in DMPlexCreateClosureIndex() 40 PetscCall(PetscSectionGetDof(section, points[p], &dof)); in DMPlexCreateClosureIndex() 51 PetscInt *points = NULL, numPoints, p, q, dof, cldof, cloff; in DMPlexCreateClosureIndex() local 56 for (p = 0, q = 0; p < numPoints * 2; p += 2) { in DMPlexCreateClosureIndex() 57 if ((points[p] >= sStart) && (points[p] < sEnd)) { in DMPlexCreateClosureIndex() 58 PetscCall(PetscSectionGetDof(section, points[p], &dof)); in DMPlexCreateClosureIndex() 60 clPoints[cloff + q * 2] = points[p]; in DMPlexCreateClosureIndex() 61 clPoints[cloff + q * 2 + 1] = points[p + 1]; in DMPlexCreateClosureIndex()
|
| /petsc/src/dm/dt/space/impls/wxy/ |
| H A D | spacewxy.c | 77 for (PetscInt p = 0; p < npoints; p++) { in PetscSpaceEvaluate_WXY() local 78 const PetscReal x = points[p * dim + 0]; in PetscSpaceEvaluate_WXY() 79 const PetscReal y = points[p * dim + 1]; in PetscSpaceEvaluate_WXY() 80 const PetscReal z = points[p * dim + 2]; in PetscSpaceEvaluate_WXY() 83 B[p * p_inc + 0 * b_inc + 0 * c_inc] = 2. * y * z; in PetscSpaceEvaluate_WXY() 84 B[p * p_inc + 0 * b_inc + 1 * c_inc] = 0.; in PetscSpaceEvaluate_WXY() 85 B[p * p_inc + 0 * b_inc + 2 * c_inc] = 0.; in PetscSpaceEvaluate_WXY() 87 B[p * p_inc + 1 * b_inc + 0 * c_inc] = 0.; in PetscSpaceEvaluate_WXY() 88 B[p * p_inc + 1 * b_inc + 1 * c_inc] = 2. * x * z; in PetscSpaceEvaluate_WXY() 89 B[p * p_inc + 1 * b_inc + 2 * c_inc] = 0.; in PetscSpaceEvaluate_WXY() [all …]
|
| /petsc/share/petsc/datafiles/meshes/ |
| H A D | hybrid_hexwedge.msh | 7 …Y�@�@Y���@Y�p�@Y�… 9 ��@@�@Y�p�@@�@Y�@�@Y�@�@… 10 …p=>�@Y�@�@@�@Y���@@�@Y�p�@@�@Y�… 11 …Y��ǥ@��(\�o�@Y�@�@p�@Y���@p�@Y�p�…
|
| /petsc/src/dm/partitioner/impls/parmetis/ |
| H A D | partparmetis.c | 30 PetscPartitioner_ParMetis *p = (PetscPartitioner_ParMetis *)part->data; in PetscPartitionerDestroy_ParMetis() local 33 PetscCallMPI(MPI_Comm_free(&p->pcomm)); in PetscPartitionerDestroy_ParMetis() 40 PetscPartitioner_ParMetis *p = (PetscPartitioner_ParMetis *)part->data; in PetscPartitionerView_ParMetis_ASCII() local 44 PetscCall(PetscViewerASCIIPrintf(viewer, "ParMetis type: %s\n", ptypes[p->ptype])); in PetscPartitionerView_ParMetis_ASCII() 45 PetscCall(PetscViewerASCIIPrintf(viewer, "load imbalance ratio %g\n", (double)p->imbalanceRatio)); in PetscPartitionerView_ParMetis_ASCII() 46 PetscCall(PetscViewerASCIIPrintf(viewer, "debug flag %" PetscInt_FMT "\n", p->debugFlag)); in PetscPartitionerView_ParMetis_ASCII() 47 PetscCall(PetscViewerASCIIPrintf(viewer, "random seed %" PetscInt_FMT "\n", p->randomSeed)); in PetscPartitionerView_ParMetis_ASCII() 66 PetscPartitioner_ParMetis *p = (PetscPartitioner_ParMetis *)part->data; in PetscPartitionerSetFromOptions_ParMetis() local 70 …titioner_parmetis_type", "Partitioning method", "", ptypes, 2, ptypes[p->ptype], &p->ptype, NULL)); in PetscPartitionerSetFromOptions_ParMetis() 71 …oner_parmetis_imbalance_ratio", "Load imbalance ratio limit", "", p->imbalanceRatio, &p->imbalance… in PetscPartitionerSetFromOptions_ParMetis() [all …]
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarm_migrate.c | 17 PetscInt p, npoints, *rankval, n_points_recv; in DMSwarmMigrate_Push_Basic() local 30 for (p = 0; p < npoints; ++p) { in DMSwarmMigrate_Push_Basic() 31 PetscCall(PetscMPIIntCast(rankval[p], &nrank)); in DMSwarmMigrate_Push_Basic() 36 for (p = 0; p < npoints; p++) { in DMSwarmMigrate_Push_Basic() 37 PetscCall(PetscMPIIntCast(rankval[p], &nrank)); in DMSwarmMigrate_Push_Basic() 43 for (p = 0; p < npoints; p++) { in DMSwarmMigrate_Push_Basic() 44 PetscCall(PetscMPIIntCast(rankval[p], &nrank)); in DMSwarmMigrate_Push_Basic() 47 PetscCall(DMSwarmDataBucketFillPackedArray(swarm->db, p, point_buffer)); in DMSwarmMigrate_Push_Basic() 64 for (p = 0; p < npoints; p++) { in DMSwarmMigrate_Push_Basic() 65 PetscCall(PetscMPIIntCast(rankval[p], &nrank)); in DMSwarmMigrate_Push_Basic() [all …]
|
| /petsc/src/dm/partitioner/impls/matpart/ |
| H A D | partmatpart.c | 10 PetscPartitioner_MatPartitioning *p = (PetscPartitioner_MatPartitioning *)part->data; in PetscPartitionerMatPartitioningGetMatPartitioning_MatPartitioning() local 13 *mp = p->mp; in PetscPartitionerMatPartitioningGetMatPartitioning_MatPartitioning() 43 PetscPartitioner_MatPartitioning *p = (PetscPartitioner_MatPartitioning *)part->data; in PetscPartitionerDestroy_MatPartitioning() local 46 PetscCall(MatPartitioningDestroy(&p->mp)); in PetscPartitionerDestroy_MatPartitioning() 54 PetscPartitioner_MatPartitioning *p = (PetscPartitioner_MatPartitioning *)part->data; in PetscPartitionerView_MatPartitioning_ASCII() local 61 if (p->mp) PetscCall(MatPartitioningView(p->mp, viewer)); in PetscPartitionerView_MatPartitioning_ASCII() 80 PetscPartitioner_MatPartitioning *p = (PetscPartitioner_MatPartitioning *)part->data; in PetscPartitionerSetFromOptions_MatPartitioning() local 83 PetscCall(PetscObjectSetOptionsPrefix((PetscObject)p->mp, ((PetscObject)part)->prefix)); in PetscPartitionerSetFromOptions_MatPartitioning() 84 PetscCall(MatPartitioningSetFromOptions(p->mp)); in PetscPartitionerSetFromOptions_MatPartitioning() 90 PetscPartitioner_MatPartitioning *p = (PetscPartitioner_MatPartitioning *)part->data; in PetscPartitionerPartition_MatPartitioning() local [all …]
|
| /petsc/src/dm/impls/da/tests/output/ |
| H A D | ex1_0.out | 1 [0] p 0 (+0.4619,+0.1913) r=0.50 th=0.125*pi cellid=0 2 [0] p 0 (+0.1913,+0.4619) r=0.50 th=0.375*pi cellid=0 3 [0] p 0 (-0.1913,+0.4619) r=0.50 th=0.625*pi cellid=0 4 [0] p 0 (-0.4619,+0.1913) r=0.50 th=0.875*pi cellid=0 5 [0] p 0 (-0.4619,-0.1913) r=0.50 th=-0.875*pi cellid=0 6 [0] p 0 (-0.1913,-0.4619) r=0.50 th=-0.625*pi cellid=0 7 [0] p 0 (+0.1913,-0.4619) r=0.50 th=-0.375*pi cellid=0 8 [0] p 0 (+0.4619,-0.1913) r=0.50 th=-0.125*pi cellid=0 12 [0] p 0 (+0.4619,+0.1913) r=0.50 th=0.125*pi cellid=5 13 [0] p 0 (+0.1913,+0.4619) r=0.50 th=0.375*pi cellid=7 [all …]
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex48.c | 11 PetscInt pStart, pEnd, p; in main() local 24 for (p = pStart; p < pEnd; p++) PetscCall(PetscSectionSetDof(section, p, 1)); in main() 26 for (p = pStart; p < pEnd; p++) PetscCall(PetscSectionSetDof(section, p, 2)); in main() 36 for (p = pStart; p < pEnd; ++p) { in main() 39 PetscCall(PetscSectionGetDof(section, p, &dof)); in main() 40 for (PetscInt d = 0; d < dof; ++d) val[d] = 100 * p + d; in main() 41 PetscCall(VecSetValuesSection(v, section, p, val, INSERT_VALUES)); in main() 45 for (p = pStart; p < pEnd; ++p) { in main() 49 PetscCall(PetscSectionGetDof(section, p, &dof)); in main() 50 PetscCall(VecGetValuesSection(v, section, p, &x)); in main() [all …]
|
| H A D | ex7.c | 166 PetscInt depth = 1, testNum = 0, p; in CreateSimplex_2D() local 182 …for (p = 0; p < 4; ++p) PetscCall(DMSetLabelValue(dm, "marker", markerPoints[p * 2], markerPoints[… in CreateSimplex_2D() 198 PetscInt depth = 1, testNum = 0, p; in CreateSimplex_3D() local 214 …for (p = 0; p < 4; ++p) PetscCall(DMSetLabelValue(dm, "marker", markerPoints[p * 2], markerPoints[… in CreateSimplex_3D() 230 PetscInt depth = 1, p; in CreateQuad_2D() local 246 …for (p = 0; p < 6; ++p) PetscCall(DMSetLabelValue(dm, "marker", markerPoints[p * 2], markerPoints[… in CreateQuad_2D() 257 …for (p = 0; p < 5; ++p) PetscCall(DMSetLabelValue(dm, "marker", markerPoints[p * 2], markerPoints[… in CreateQuad_2D() 273 PetscInt depth = 1, testNum = 0, p; in CreateHex_3D() local 289 …for (p = 0; p < 8; ++p) PetscCall(DMSetLabelValue(dm, "marker", markerPoints[p * 2], markerPoints[… in CreateHex_3D()
|
| H A D | ex6.c | 44 PetscReal p; in TestSetup() local 47 PetscCall(PetscRandomGetValueReal(r, &p)); in TestSetup() 48 PetscCall(DMLabelGetValue(label, (PetscInt)p, &val)); in TestSetup() 51 PetscCall(DMLabelSetValue(label, (PetscInt)p, i % user->numStrata)); in TestSetup() 64 PetscInt p, n = 0; in TestLookup() local 67 for (p = pStart; p < pEnd; ++p) { in TestLookup() 71 PetscCall(DMLabelGetValue(label, p, &val)); in TestLookup() 72 PetscCall(DMLabelHasPoint(label, p, &has)); in TestLookup() 73 … does not match contains check %" PetscInt_FMT " for point %" PetscInt_FMT, val, (PetscInt)has, p); in TestLookup() 83 PetscInt pStart = user->pStart, pEnd = user->pEnd, p; in TestClear() local [all …]
|
| /petsc/src/mat/impls/preallocator/ |
| H A D | matpreallocator.c | 14 Mat_Preallocator *p = (Mat_Preallocator *)A->data; in MatDestroy_Preallocator() local 18 PetscCall(PetscHSetIJDestroy(&p->ht)); in MatDestroy_Preallocator() 19 PetscCall(PetscFree4(p->dnz, p->onz, p->dnzu, p->onzu)); in MatDestroy_Preallocator() 28 Mat_Preallocator *p = (Mat_Preallocator *)A->data; in MatSetUp_Preallocator() local 35 PetscCall(PetscHSetIJCreate(&p->ht)); in MatSetUp_Preallocator() 41 PetscCall(PetscCalloc4(mbs, &p->dnz, mbs, &p->onz, mbs, &p->dnzu, mbs, &p->onzu)); in MatSetUp_Preallocator() 47 Mat_Preallocator *p = (Mat_Preallocator *)A->data; in MatSetValues_Preallocator() local 67 PetscCall(PetscHSetIJQueryAdd(p->ht, key, &missing)); in MatSetValues_Preallocator() 70 ++p->dnz[key.i - rStart / bs]; in MatSetValues_Preallocator() 71 if (key.j >= key.i) ++p->dnzu[key.i - rStart / bs]; in MatSetValues_Preallocator() [all …]
|
| /petsc/src/dm/tutorials/ |
| H A D | swarm_ex3.c | 13 PetscInt p, n, bs, npoints, si, sj, milocal, mjlocal, mx, my; in _DMLocatePoints_DMDARegular_IS() local 35 for (p = 0; p < npoints; p++) { in _DMLocatePoints_DMDARegular_IS() 39 coorx = PetscRealPart(coor[2 * p]); in _DMLocatePoints_DMDARegular_IS() 40 coory = PetscRealPart(coor[2 * p + 1]); in _DMLocatePoints_DMDARegular_IS() 45 cellidx[p] = DMLOCATEPOINT_POINT_NOT_FOUND; in _DMLocatePoints_DMDARegular_IS() 48 if ((mi >= si) && (mi < si + milocal)) cellidx[p] = (mi - si) + (mj - sj) * milocal; in _DMLocatePoints_DMDARegular_IS() 50 if (coorx < -1.0) cellidx[p] = DMLOCATEPOINT_POINT_NOT_FOUND; in _DMLocatePoints_DMDARegular_IS() 51 if (coorx > 1.0) cellidx[p] = DMLOCATEPOINT_POINT_NOT_FOUND; in _DMLocatePoints_DMDARegular_IS() 52 if (coory < -1.0) cellidx[p] = DMLOCATEPOINT_POINT_NOT_FOUND; in _DMLocatePoints_DMDARegular_IS() 53 if (coory > 1.0) cellidx[p] = DMLOCATEPOINT_POINT_NOT_FOUND; in _DMLocatePoints_DMDARegular_IS() [all …]
|
| H A D | swarm_ex2.c | 15 PetscInt p, bs, nlocal; in ex2_1() local 34 for (p = 0; p < nlocal; p++) array[p] = 11.1 + p * 0.1 + rank * 100.0; in ex2_1() 41 for (p = 0; p < nlocal; p++) { in ex2_1() 42 array[bs * p + 0] = 2.0e-2 + p * 0.001 + rank * 1.0; in ex2_1() 43 array[bs * p + 1] = 2.0e-2 + p * 0.002 + rank * 1.0; in ex2_1() 44 array[bs * p + 2] = 2.0e-2 + p * 0.003 + rank * 1.0; in ex2_1()
|
| /petsc/src/dm/partitioner/impls/shell/ |
| H A D | partshell.c | 11 PetscPartitioner_Shell *p = (PetscPartitioner_Shell *)part->data; in PetscPartitionerReset_Shell() local 14 PetscCall(PetscSectionDestroy(&p->section)); in PetscPartitionerReset_Shell() 15 PetscCall(ISDestroy(&p->partition)); in PetscPartitionerReset_Shell() 29 PetscPartitioner_Shell *p = (PetscPartitioner_Shell *)part->data; in PetscPartitionerView_Shell_ASCII() local 32 if (p->random) { in PetscPartitionerView_Shell_ASCII() 85 PetscPartitioner_Shell *p = (PetscPartitioner_Shell *)part->data; in PetscPartitionerPartition_Shell() local 89 if (p->random) { in PetscPartitionerPartition_Shell() 91 PetscInt *sizes, *points, v, p; in PetscPartitionerPartition_Shell() local 100 …for (p = 0; p < nparts; ++p) sizes[p] = numVertices / nparts + (PetscInt)(p < numVertices % nparts… in PetscPartitionerPartition_Shell() 116 …PetscCheck(p->section, PetscObjectComm((PetscObject)part), PETSC_ERR_ARG_WRONG, "Shell partitioner… in PetscPartitionerPartition_Shell() [all …]
|
| /petsc/src/dm/partitioner/impls/multistage/ |
| H A D | mspart.c | 54 PetscPartitioner_MS *p = (PetscPartitioner_MS *)part->data; in PetscPartitionerView_Multistage() local 66 …if (!p->stagedm || p->stage == 0) PetscCall(PetscViewerASCIIPrintf(viewer, "Multistage graph parti… in PetscPartitionerView_Multistage() 69 for (PetscInt l = 0; l < p->levels; l++) { in PetscPartitionerView_Multistage() 70 PetscPartitioner ppart = p->ppart[l]; in PetscPartitionerView_Multistage() 78 pgroup = p->lgroup[0]; in PetscPartitionerView_Multistage() 96 …if (!p->stagedm || l == p->stage) PetscCall(PetscViewerASCIIPrintf(viewer, "Stage %" PetscInt_FMT … in PetscPartitionerView_Multistage() 100 …if (!p->stagedm || l == p->stage) PetscCall(PetscViewerASCIIPrintf(viewer, "Stage %" PetscInt_FMT … in PetscPartitionerView_Multistage() 103 if (format == PETSC_VIEWER_ASCII_INFO_DETAIL && (!p->stagedm || l == p->stage)) { in PetscPartitionerView_Multistage() 131 if (p->view_tpwgs) PetscCall(PetscSectionView(p->tpwgs[l], pviewer)); in PetscPartitionerView_Multistage() 139 for (PetscInt l = 0; l < p->levels; l++) PetscCall(PetscViewerASCIIPopTab(viewer)); in PetscPartitionerView_Multistage() [all …]
|
| /petsc/src/dm/dt/interface/ |
| H A D | dtprob.c | 25 …cErrorCode PetscPDFMaxwellBoltzmann1D(const PetscReal x[], const PetscReal unused[], PetscReal p[]) in PetscPDFMaxwellBoltzmann1D() argument 27 p[0] = PetscSqrtReal(2. / PETSC_PI) * PetscExpReal(-0.5 * PetscSqr(x[0])); in PetscPDFMaxwellBoltzmann1D() 47 …cErrorCode PetscCDFMaxwellBoltzmann1D(const PetscReal x[], const PetscReal unused[], PetscReal p[]) in PetscCDFMaxwellBoltzmann1D() argument 49 p[0] = PetscErfReal(x[0] / PETSC_SQRT2); in PetscCDFMaxwellBoltzmann1D() 69 …cErrorCode PetscPDFMaxwellBoltzmann2D(const PetscReal x[], const PetscReal unused[], PetscReal p[]) in PetscPDFMaxwellBoltzmann2D() argument 71 p[0] = x[0] * PetscExpReal(-0.5 * PetscSqr(x[0])); in PetscPDFMaxwellBoltzmann2D() 91 …cErrorCode PetscCDFMaxwellBoltzmann2D(const PetscReal x[], const PetscReal unused[], PetscReal p[]) in PetscCDFMaxwellBoltzmann2D() argument 93 p[0] = 1. - PetscExpReal(-0.5 * PetscSqr(x[0])); in PetscCDFMaxwellBoltzmann2D() 113 …cErrorCode PetscPDFMaxwellBoltzmann3D(const PetscReal x[], const PetscReal unused[], PetscReal p[]) in PetscPDFMaxwellBoltzmann3D() argument 115 p[0] = PetscSqrtReal(2. / PETSC_PI) * PetscSqr(x[0]) * PetscExpReal(-0.5 * PetscSqr(x[0])); in PetscPDFMaxwellBoltzmann3D() [all …]
|
| /petsc/src/ts/tutorials/autodiff/adolc-utils/ |
| H A D | drivers.cxx | 34 PetscInt i, j, m = adctx->m, n = adctx->n, p = adctx->p; in PetscAdolcComputeRHSJacobian() local 38 PetscCall(AdolcMalloc2(m, p, &J)); in PetscAdolcComputeRHSJacobian() 39 if (adctx->Seed) fov_forward(tag, m, n, p, u_vec, adctx->Seed, NULL, J); in PetscAdolcComputeRHSJacobian() 42 PetscCall(RecoverJacobian(A, INSERT_VALUES, m, p, adctx->Rec, J, NULL)); in PetscAdolcComputeRHSJacobian() 72 PetscInt i, j, m = adctx->m, n = adctx->n, p = adctx->p; in PetscAdolcComputeRHSJacobianLocal() local 76 PetscCall(AdolcMalloc2(m, p, &J)); in PetscAdolcComputeRHSJacobianLocal() 77 if (adctx->Seed) fov_forward(tag, m, n, p, u_vec, adctx->Seed, NULL, J); in PetscAdolcComputeRHSJacobianLocal() 80 PetscCall(RecoverJacobianLocal(A, INSERT_VALUES, m, p, adctx->Rec, J, NULL)); in PetscAdolcComputeRHSJacobianLocal() 111 PetscInt i, j, m = adctx->m, n = adctx->n, p = adctx->p; in PetscAdolcComputeIJacobian() local 115 PetscCall(AdolcMalloc2(m, p, &J)); in PetscAdolcComputeIJacobian() [all …]
|
| /petsc/src/dm/partitioner/impls/ptscotch/ |
| H A D | partptscotch.c | 155 PetscPartitioner_PTScotch *p = (PetscPartitioner_PTScotch *)part->data; in PetscPartitionerDestroy_PTScotch() local 158 PetscCallMPI(MPI_Comm_free(&p->pcomm)); in PetscPartitionerDestroy_PTScotch() 165 PetscPartitioner_PTScotch *p = (PetscPartitioner_PTScotch *)part->data; in PetscPartitionerView_PTScotch_ASCII() local 169 …cViewerASCIIPrintf(viewer, "using partitioning strategy %s\n", PTScotchStrategyList[p->strategy])); in PetscPartitionerView_PTScotch_ASCII() 170 …PetscCall(PetscViewerASCIIPrintf(viewer, "using load imbalance ratio %g\n", (double)p->imbalance)); in PetscPartitionerView_PTScotch_ASCII() 189 PetscPartitioner_PTScotch *p = (PetscPartitioner_PTScotch *)part->data; in PetscPartitionerSetFromOptions_PTScotch() local 196 …tscotch_strategy", "Partitioning strategy", "", slist, nlist, slist[p->strategy], &p->strategy, &f… in PetscPartitionerSetFromOptions_PTScotch() 197 …"-petscpartitioner_ptscotch_imbalance", "Load imbalance ratio", "", p->imbalance, &p->imbalance, &… in PetscPartitionerSetFromOptions_PTScotch() 213 PetscMPIInt size, rank, p; in PetscPartitionerPartition_PTScotch() local 225 for (p = 2; p <= size; ++p) { in PetscPartitionerPartition_PTScotch() [all …]
|
| /petsc/src/vec/is/section/interface/ |
| H A D | section.c | 98 PetscInt numFields, f, c, pStart, pEnd, p; in PetscSectionCopy_Internal() local 127 for (p = pStart; p < pEnd; ++p) { in PetscSectionCopy_Internal() 129 …PetscBool force_constrained = (PetscBool)(constrained_dofs && PetscBTLookup(constrained_dofs, p - … in PetscSectionCopy_Internal() 131 PetscCall(PetscSectionGetDof(section, p, &dof)); in PetscSectionCopy_Internal() 132 PetscCall(PetscSectionSetDof(newSection, p, dof)); in PetscSectionCopy_Internal() 134 else PetscCall(PetscSectionGetConstraintDof(section, p, &cdof)); in PetscSectionCopy_Internal() 135 if (cdof) PetscCall(PetscSectionSetConstraintDof(newSection, p, cdof)); in PetscSectionCopy_Internal() 137 PetscCall(PetscSectionGetFieldDof(section, p, f, &dof)); in PetscSectionCopy_Internal() 138 PetscCall(PetscSectionSetFieldDof(newSection, p, f, dof)); in PetscSectionCopy_Internal() 141 else PetscCall(PetscSectionGetFieldConstraintDof(section, p, f, &fcdof)); in PetscSectionCopy_Internal() [all …]
|
| /petsc/src/dm/impls/swarm/tests/ |
| H A D | ex4.c | 135 PetscInt dim, d, Np, p; in RHSFunction() local 144 for (p = 0; p < Np; ++p) { in RHSFunction() 146 g[(p * 2 + 0) * dim + d] = u[(p * 2 + 1) * dim + d]; in RHSFunction() 147 g[(p * 2 + 1) * dim + d] = -PetscSqr(omega) * u[(p * 2 + 0) * dim + d]; in RHSFunction() 163 PetscInt dim, d, Np, p, rStart; in RHSJacobian() local 171 for (p = 0; p < Np; ++p) { in RHSJacobian() 173 const PetscInt rows[2] = {(p * 2 + 0) * dim + d + rStart, (p * 2 + 1) * dim + d + rStart}; in RHSJacobian() 186 PetscInt Np, p; in RHSFunctionX() local 192 for (p = 0; p < Np; ++p) xres[p] = v[p]; in RHSFunctionX() 203 PetscInt Np, p; in RHSFunctionV() local [all …]
|
| /petsc/src/dm/field/impls/shell/ |
| H A D | dmfieldshell.c | 37 PetscInt dimC, dim, numPoints, Nq, p, Nc; in DMFieldShellEvaluateFEDefault() local 48 for (p = 0; p < numPoints * dimC * Nq; p++) pfArray[p] = geom->v[p]; in DMFieldShellEvaluateFEDefault() 57 for (p = 0; p < numPoints * Nq; p++) { in DMFieldShellEvaluateFEDefault() 63 for (i = 0; i < dimC; i++) d[i] = sD[(p * Nc + q) * dimC + i]; in DMFieldShellEvaluateFEDefault() 64 for (i = 0; i < dimC; i++) sD[(p * Nc + q) * dimC + i] = 0.; in DMFieldShellEvaluateFEDefault() 66 …for (j = 0; j < dimC; j++) sD[(p * Nc + q) * dimC + i] += geom->J[(p * dimC + j) * dimC + i] * d[j… in DMFieldShellEvaluateFEDefault() 74 for (p = 0; p < numPoints * Nq; p++) { in DMFieldShellEvaluateFEDefault() 80 for (i = 0; i < dimC; i++) d[i] = rD[(p * Nc + q) * dimC + i]; in DMFieldShellEvaluateFEDefault() 81 for (i = 0; i < dimC; i++) rD[(p * Nc + q) * dimC + i] = 0.; in DMFieldShellEvaluateFEDefault() 83 …for (j = 0; j < dimC; j++) rD[(p * Nc + q) * dimC + i] += geom->J[(p * dimC + j) * dimC + i] * d[j… in DMFieldShellEvaluateFEDefault() [all …]
|
| /petsc/src/mat/tests/ |
| H A D | ex177.c | 12 PetscInt m, n, M, N, p = 1, q = 1, i, j; in main() local 30 PetscCall(PetscOptionsGetInt(NULL, NULL, "-p", &p, NULL)); in main() 32 PetscCall(PetscMalloc2(p * q, &S, p * q, &T)); in main() 33 for (i = 0; i < p * q; i++) S[i] = 0; in main() 35 for (i = 0; i < p; i++) { in main() 38 S[i + p * j] = ((PetscReal)((i + 1) * (j + 1))) / ((PetscReal)(p + q)); in main() 39 T[i + p * j] = ((PetscReal)((p - i) + j)) / ((PetscReal)(p * q)); in main() 46 PetscCall(MatCreateKAIJ(A, p, q, S, T, &TA)); in main() 68 PetscCall(MatCreateKAIJ(A, p, q, NULL, T, &TA)); in main() 90 PetscCall(MatCreateKAIJ(A, p, q, S, NULL, &TA)); in main() [all …]
|