| /petsc/src/snes/tutorials/ |
| H A D | ex75.h | 3 …[], PetscReal z[], PetscReal *kn, PetscReal *km, PetscReal *B, PetscScalar vx[41][41], PetscScalar… in SolKxData5() 93 vx[0][0] = -3.14159265358979323846e-96; in SolKxData5() 94 vx[0][1] = 0.00000000000000000000e+00; in SolKxData5() 95 vx[0][2] = 3.14159265358979323846e-96; in SolKxData5() 96 vx[0][3] = 0.00000000000000000000e+00; in SolKxData5() 97 vx[0][4] = -3.14159265358979323846e-96; in SolKxData5() 98 vx[0][5] = 0.00000000000000000000e+00; in SolKxData5() 99 vx[0][6] = 3.14159265358979323846e-96; in SolKxData5() 100 vx[0][7] = 0.00000000000000000000e+00; in SolKxData5() 101 vx[0][8] = -3.14159265358979323846e-96; in SolKxData5() [all …]
|
| H A D | ex19.c | 239 PetscScalar u, uxx, uyy, vx, vy, avx, avy, vxp, vxm, vyp, vym; in FormFunctionLocal() local 323 vx = x[j][i].u; in FormFunctionLocal() 324 avx = PetscAbsScalar(vx); in FormFunctionLocal() 325 vxp = .5 * (vx + avx); in FormFunctionLocal() 326 vxm = .5 * (vx - avx); in FormFunctionLocal() 380 PetscScalar u, uxx, uyy, vx, vy, avx, avy, vxp, vxm, vyp, vym; in NonlinearGS() local 536 vx = x[j][i].u; in NonlinearGS() 537 avx = PetscAbsScalar(vx); in NonlinearGS() 538 vxp = .5 * (vx + avx); in NonlinearGS() 539 vxm = .5 * (vx - avx); in NonlinearGS() [all …]
|
| H A D | ex75.c | 54 …Real x, PetscReal z, PetscReal kn, PetscReal km, PetscReal B, PetscScalar *vx, PetscScalar *vz, Pe… in SolKxSolution() argument 360 *vx = -km * (_C1 * t2 + _C2 * t4 + _C3 * t2 + _C4 * t4 + t10 * AA * t13 + t10 * BB * t16); in SolKxSolution() 481 *vx *= cos(km * z); /* Vx */ in SolKxSolution() 509 PetscScalar vx, vz, sxx, sxz, szz; in SolKxWrapperP() local 512 SolKxSolution(x[0], x[1], kn, km, B, &vx, &vz, &v[0], &sxx, &sxz, &szz); in SolKxWrapperP() 531 PetscScalar vx, vz, p, sxx, sxz, szz; in MapleTest() local 534 PetscCall(SolKxSolution(x[i], z[j], kn, km, B, &vx, &vz, &p, &sxx, &sxz, &szz)); in MapleTest() 535 …norm = PetscSqrt(PetscSqr(PetscAbsScalar(vx - vxMaple[i][j])) + PetscSqr(PetscAbsScalar(vz - vzMap… in MapleTest() 536 … %0.17e %0.17e %0.17e", (double)x[i], (double)z[j], (double)PetscAbsScalar(vx - vxMaple[i][j]), (d… in MapleTest()
|
| /petsc/src/vec/is/tests/ |
| H A D | ex8.c | 44 PetscViewer vx; in main() local 71 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile", FILE_MODE_WRITE, &vx)); in main() 72 PetscCall(ISLocalToGlobalMappingView(lg1v, vx)); in main() 73 PetscCall(ISLocalToGlobalMappingView(lg2v, vx)); in main() 74 PetscCall(PetscViewerDestroy(&vx)); in main() 77 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_SELF, fname, FILE_MODE_WRITE, &vx)); in main() 78 PetscCall(ISLocalToGlobalMappingView(lg1v, vx)); in main() 79 PetscCall(ISLocalToGlobalMappingView(lg2v, vx)); in main() 80 PetscCall(PetscViewerDestroy(&vx)); in main() 82 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile_noheader", FILE_MODE_WRITE, &vx)); in main() [all …]
|
| H A D | ex2.c | 16 PetscViewer vx, vl; in main() local 29 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile", FILE_MODE_WRITE, &vx)); in main() 30 PetscCall(ISView(isx[0], vx)); in main() 31 PetscCall(PetscViewerDestroy(&vx)); in main() 41 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile", FILE_MODE_APPEND, &vx)); in main() 42 PetscCall(ISView(isx[1], vx)); in main() 43 PetscCall(ISView(isx[2], vx)); in main() 44 PetscCall(PetscViewerDestroy(&vx)); in main() 68 PetscCall(PetscViewerBinaryOpen(PETSC_COMM_WORLD, "testfile_noheader", FILE_MODE_WRITE, &vx)); in main() 69 PetscCall(PetscViewerBinarySetSkipHeader(vx, PETSC_TRUE)); in main() [all …]
|
| /petsc/src/dm/impls/stag/tests/ |
| H A D | ex19.c | 33 PetscInt p, vx, vy; in main() local 37 PetscCall(DMStagGetLocationSlot(dmCoarse, DMSTAG_LEFT, 0, &vx)); in main() 43 arr[j][i][vx] = (j < starty + ny) ? 20.0 : -1; in main() 54 PetscInt p, vx, vy; in main() local 58 PetscCall(DMStagGetLocationSlot(dm, DMSTAG_LEFT, 0, &vx)); in main() 67 …if (arr[j][i][vx] != expected_vx) PetscCall(PetscPrintf(PETSC_COMM_SELF, "wrong %" PetscInt_FMT " … in main()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex49.c | 163 const PetscScalar *vx = &x[off]; in CheckOffsets() local 171 …"] %" PetscInt_FMT " <-- %2" PetscInt_FMT " (% 4.2f)\n", c, v, off, (double)PetscRealPart(vx[0]))); in CheckOffsets() 174 …FMT " (% 4.2f, % 4.2f)\n", c, v, off, (double)PetscRealPart(vx[0]), (double)PetscRealPart(vx[1]))); in CheckOffsets() 177 …% 4.2f)\n", c, v, off, (double)PetscRealPart(vx[0]), (double)PetscRealPart(vx[1]), (double)PetscRe… in CheckOffsets()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex26.c | 263 PetscScalar u, udot, uxx, uyy, vx, vy, avx, avy, vxp, vxm, vyp, vym; in FormIFunctionLocal() local 347 vx = x[j][i].u; in FormIFunctionLocal() 348 avx = PetscAbsScalar(vx); in FormIFunctionLocal() 349 vxp = .5 * (vx + avx); in FormIFunctionLocal() 350 vxm = .5 * (vx - avx); in FormIFunctionLocal()
|
| H A D | ex27.c | 192 PetscScalar vx, vy, sxp, syp, sxm, sym, avx, vxp, vxm, avy, vyp, vym, f_advect; in FormIFunctionLocal() local 207 vx = ctx->gradq_inflow * ctx->porosity * ctx->saturation; in FormIFunctionLocal() 209 avx = PetscAbsScalar(vx); in FormIFunctionLocal() 210 vxp = .5 * (vx + avx); in FormIFunctionLocal() 211 vxm = .5 * (vx - avx); in FormIFunctionLocal()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexcreate.c | 600 PetscInt v, vx, vy; in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() local 617 for (vx = 0; vx <= edges[0]; vx++) { in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 619 PetscInt edge = vx * edges[1] + ey + edges[0] * (edges[1] + 1); in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 620 PetscInt vertex = ey * (edges[0] + 1) + vx + numEdges; in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 626 if (vx == edges[0]) { in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 633 } else if (vx == 0) { in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 691 for (vx = 0; vx <= edges[0]; ++vx) { in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 692 … coords[(vy * (edges[0] + 1) + vx) * 2 + 0] = lower[0] + ((upper[0] - lower[0]) / edges[0]) * vx; in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 693 … coords[(vy * (edges[0] + 1) + vx) * 2 + 1] = lower[1] + ((upper[1] - lower[1]) / edges[1]) * vy; in DMPlexCreateBoxSurfaceMesh_Tensor_2D_Internal() 718 PetscInt v, vx, vy, vz; in DMPlexCreateBoxSurfaceMesh_Tensor_3D_Internal() local [all …]
|
| /petsc/src/snes/tests/ |
| H A D | ex69.c | 214 PetscScalar u, uxx, uyy, vx, vy, avx, avy, vxp, vxm, vyp, vym; in FormFunctionLocal() local 304 vx = x[j][i].u; in FormFunctionLocal() 305 avx = PetscAbsScalar(vx); in FormFunctionLocal() 306 vxp = .5 * (vx + avx); in FormFunctionLocal() 307 vxm = .5 * (vx - avx); in FormFunctionLocal()
|
| /petsc/src/dm/tutorials/ |
| H A D | swarm_ex3.c | 221 PetscReal cx, cy, vx, vy; in ex3_1() local 225 vx = cy; in ex3_1() 228 array[2 * p] += dt * vx; in ex3_1()
|
| /petsc/src/vec/vec/tests/ |
| H A D | ex37.c | 245 PetscScalar vx; in gen_test_vector() local 255 vx = (PetscScalar)(start_value + i * stride); in gen_test_vector() 256 PetscCall(VecSetValue(v, i, vx, INSERT_VALUES)); in gen_test_vector()
|
| /petsc/src/ksp/ksp/impls/cg/pipecg2/ |
| H A D | pipecg2.c | 82 static PetscErrorCode VecMergedOpsShort_Private(Vec vx, Vec vr, Vec vz, Vec vw, Vec vp, Vec vq, Vec… in VecMergedOpsShort_Private() argument 90 PetscCall(VecGetArray(vx, (PetscScalar **)&px)); in VecMergedOpsShort_Private() 111 PetscCall(VecGetLocalSize(vx, &n)); in VecMergedOpsShort_Private() 280 PetscCall(VecRestoreArray(vx, (PetscScalar **)&px)); in VecMergedOpsShort_Private() 304 static PetscErrorCode VecMergedOps_Private(Vec vx, Vec vr, Vec vz, Vec vw, Vec vp, Vec vq, Vec vc, … in VecMergedOps_Private() argument 312 PetscCall(VecGetArray(vx, (PetscScalar **)&px)); in VecMergedOps_Private() 333 PetscCall(VecGetLocalSize(vx, &n)); in VecMergedOps_Private() 509 PetscCall(VecRestoreArray(vx, (PetscScalar **)&px)); in VecMergedOps_Private()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex70.c | 872 PetscReal vx[2], vy[2], max_v = 0.0, max_v_step, dh; in SolveTimeDepStokes() local 1194 PetscCall(VecStrideMax(X, 0, NULL, &vx[1])); in SolveTimeDepStokes() 1196 PetscCall(VecStrideMin(X, 0, NULL, &vx[0])); in SolveTimeDepStokes() 1199 max_v_step = PetscMax(vx[0], vx[1]); in SolveTimeDepStokes()
|
| /petsc/src/tao/pde_constrained/tutorials/ |
| H A D | parabolic.c | 665 PetscScalar v, vx, vy, vz; in ParabolicInitialize() local 724 vx = h * (i + 0.5); in ParabolicInitialize() 727 PetscCall(VecSetValues(XX, 1, &linear_index, &vx, INSERT_VALUES)); in ParabolicInitialize() 730 …if ((vx < 0.6) && (vx > 0.4) && (vy < 0.6) && (vy > 0.4) && (vy < 0.6) && (vz < 0.6) && (vz > 0.4)… in ParabolicInitialize()
|
| H A D | elliptic.c | 552 PetscScalar v, vx, vy, vz; in EllipticInitialize() local 697 vx = h * (i + 0.5); in EllipticInitialize() 700 PetscCall(VecSetValues(XX, 1, &linear_index, &vx, INSERT_VALUES)); in EllipticInitialize() 719 …v = 100 * PetscSinScalar(2 * PETSC_PI * (vx + 0.25 * is)) * PetscSinScalar(2 * PETSC_PI * (vy + 0.… in EllipticInitialize()
|
| H A D | hyperbolic.c | 679 PetscScalar vx, vy, zero = 0.0; in HyperbolicInitialize() local 807 vx = h * (i + 0.5); in HyperbolicInitialize() 809 PetscCall(VecSetValues(XX, 1, &linear_index, &vx, INSERT_VALUES)); in HyperbolicInitialize()
|
| /petsc/src/ts/tutorials/hamiltonian/ |
| H A D | ex3.c | 336 Vec vx, vv, vw, vE; in MonitorParticles() local 337 PetscCall(VecCreateMPIWithArray(comm, dim, Np * dim, PETSC_DECIDE, x, &vx)); in MonitorParticles() 342 PetscCall(VecView(vx, viewer)); in MonitorParticles() 347 PetscCall(VecDestroy(&vx)); in MonitorParticles()
|