| /petsc/src/dm/tutorials/ |
| H A D | ex21.c | 22 PetscReal vel[] = {1.0, 0.16}; in pic_advect() local 159 dt = 0.5 * minradius / PetscSqrtReal(vel[0] * vel[0] + vel[1] * vel[1]); in pic_advect() 169 s_coor[2 * p + 0] += dt * vel[0]; in pic_advect() 170 s_coor[2 * p + 1] += dt * vel[1]; in pic_advect()
|
| /petsc/src/dm/impls/swarm/tests/ |
| H A D | ex5.c | 96 const PetscReal *coords, *vel; in RHSFunction() local 105 PetscCall(DMSwarmGetField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSFunction() 112 const PetscReal vy0 = vel[p * dim + 1]; in RHSFunction() 121 PetscCall(DMSwarmRestoreField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSFunction() 134 const PetscReal *coords, *vel; in RHSJacobian() local 143 PetscCall(DMSwarmGetField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSJacobian() 147 const PetscReal vy0 = vel[p * dim + 1]; in RHSJacobian() 157 PetscCall(DMSwarmRestoreField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSJacobian() 188 const PetscReal *coords, *vel; in RHSFunctionV() local 196 PetscCall(DMSwarmGetField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSFunctionV() [all …]
|
| H A D | ex6.c | 524 const PetscReal *coords, *vel; in RHSFunction() local 534 PetscCall(DMSwarmGetField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSFunction() 545 const PetscReal vy0 = vel[p * dim + 1]; in RHSFunction() 554 PetscCall(DMSwarmRestoreField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSFunction() 570 const PetscReal *coords, *vel; in RHSJacobian() local 579 PetscCall(DMSwarmGetField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSJacobian() 583 const PetscReal vy0 = vel[p * dim + 1]; in RHSJacobian() 593 PetscCall(DMSwarmRestoreField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSJacobian() 626 const PetscReal *coords, *vel; in RHSFunctionV() local 635 PetscCall(DMSwarmGetField(sw, "initVelocity", NULL, NULL, (void **)&vel)); in RHSFunctionV() [all …]
|
| /petsc/src/ts/tests/ |
| H A D | ex28.c | 419 PetscReal *v, *coords, T = 0., vel = 0., step_cast, w_sum; in KSConv() local 444 vel += u[p] * coords[p]; in KSConv() 446 vel /= w_sum; in KSConv() 447 T = T / w_sum - vel * vel; in KSConv()
|
| /petsc/src/ts/tutorials/hamiltonian/ |
| H A D | ex2.c | 596 PetscReal *weight, *pos, *vel; in MonitorInitialConditions() local 617 PetscCall(DMSwarmGetField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorInitialConditions() 621 PetscCall(PetscDrawHGAddWeightedValue(ctx->drawhgic_v, vel[p * dim], weight[p])); in MonitorInitialConditions() 624 PetscCall(DMSwarmRestoreField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorInitialConditions() 644 PetscReal *weight, *vel; in MonitorVelocity() local 678 PetscCall(DMSwarmGetField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorVelocity() 699 … if (c == cell) PetscCall(PetscDrawHGAddWeightedValue(ctx->drawhgcell_v, vel[p * dim], weight[p])); in MonitorVelocity() 700 for (PetscInt d = 0; d < dim; ++d) cella[q * dim + d] = vel[p * dim + d]; in MonitorVelocity() 713 PetscCall(DMSwarmRestoreField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorVelocity() 1911 const PetscReal *coords, *vel; in RHSJacobian() local [all …]
|
| H A D | ex4.c | 1112 PetscReal *weight, *pos, *vel; in MonitorInitialConditions() local 1133 PetscCall(DMSwarmGetField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorInitialConditions() 1137 PetscCall(PetscDrawHGAddWeightedValue(ctx->drawhgic_v, vel[p * dim], weight[p])); in MonitorInitialConditions() 1140 PetscCall(DMSwarmRestoreField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorInitialConditions() 1160 PetscReal *weight, *vel; in MonitorVelocity() local 1194 PetscCall(DMSwarmGetField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorVelocity() 1215 … if (c == cell) PetscCall(PetscDrawHGAddWeightedValue(ctx->drawhgcell_v, vel[p * dim], weight[p])); in MonitorVelocity() 1216 for (PetscInt d = 0; d < dim; ++d) cella[q * dim + d] = vel[p * dim + d]; in MonitorVelocity() 1229 PetscCall(DMSwarmRestoreField(sw, "velocity", NULL, NULL, (void **)&vel)); in MonitorVelocity() 2516 const PetscReal *coords, *vel; in RHSJacobian() local [all …]
|
| H A D | ex3.c | 1187 const PetscReal *coords, *vel; in RHSJacobian() local 1196 PetscCall(DMSwarmGetField(sw, "velocity", NULL, NULL, (void **)&vel)); in RHSJacobian() 1208 PetscCall(DMSwarmRestoreField(sw, "velocity", NULL, NULL, (void **)&vel)); in RHSJacobian() 1321 PetscReal *vel, *coords, m_p = 1.; in RHSObjectiveF() local 1334 PetscCall(DMSwarmGetField(sw, "velocity", NULL, NULL, (void **)&vel)); in RHSObjectiveF() 1355 PetscCall(DMSwarmRestoreField(sw, "velocity", NULL, NULL, (void **)&vel)); in RHSObjectiveF() 1364 const PetscReal *coords, *vel, *E; in RHSFunctionG() local 1383 PetscCall(DMSwarmGetField(sw, "velocity", NULL, NULL, (void **)&vel)); in RHSFunctionG() 1393 PetscCall(DMSwarmRestoreField(sw, "velocity", NULL, NULL, (void **)&vel)); in RHSFunctionG()
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarmpic.c | 1234 PetscScalar vel[3]; in DMSwarmInitializeVelocities() local 1236 PetscCall((*velFunc)(dim, 0., NULL, p, vel, ctx)); in DMSwarmInitializeVelocities() 1237 for (d = 0; d < dim; ++d) v[p * dim + d] = (v0[s] / v0[0]) * PetscRealPart(vel[d]); in DMSwarmInitializeVelocities() 1248 PetscReal a[3], vel[3]; in DMSwarmInitializeVelocities() local 1251 PetscCall(sampler(a, NULL, vel)); in DMSwarmInitializeVelocities() 1252 for (d = 0; d < dim; ++d) v[p * dim + d] = (v0[s] / v0[0]) * vel[d]; in DMSwarmInitializeVelocities()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex77.c | 433 Vec vel, locvel, pvel; in FreeStreaming() local 449 PetscCall(VecGetSubVector(u, vis, &vel)); in FreeStreaming() 452 PetscCall(DMGlobalToLocalBegin(vdm, vel, INSERT_VALUES, locvel)); in FreeStreaming() 453 PetscCall(DMGlobalToLocalEnd(vdm, vel, INSERT_VALUES, locvel)); in FreeStreaming() 454 PetscCall(VecRestoreSubVector(u, vis, &vel)); in FreeStreaming()
|
| H A D | ex14.c | 444 static void THIErosion(THI thi, const Node *vel, PetscScalar *erate, Node *derate) in THIErosion() argument 446 …const PetscScalar magref2 = 1.e-10 + (PetscSqr(vel->u) + PetscSqr(vel->v)) / PetscSqr(thi->erosion… in THIErosion() 453 …derate->u = 0.5 * thi->erosion.exponent * rate / magref2 * 2. * vel->u / PetscSqr(thi->erosion.ref… in THIErosion() 454 …derate->v = 0.5 * thi->erosion.exponent * rate / magref2 * 2. * vel->v / PetscSqr(thi->erosion.ref… in THIErosion()
|
| H A D | ex76.c | 480 PetscScalar vel[2]; in f0_taylor_green_w() local 482 PetscCallAbort(PETSC_COMM_SELF, taylor_green_u(dim, t, X, Nf, vel, NULL)); in f0_taylor_green_w() 483 f0[0] -= 1.0 + vel[0] + vel[1]; in f0_taylor_green_w()
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex43.c | 955 PetscReal pos[2], pressure, vel[2], total_stress[3], strain_rate[3]; in DMDACreateSolCx() local 960 evaluate_solCx(pos, eta0, eta1, xc, nz, vel, &pressure, total_stress, strain_rate); in DMDACreateSolCx() 962 _stokes[j][i].u_dof = vel[0]; in DMDACreateSolCx() 963 _stokes[j][i].v_dof = vel[1]; in DMDACreateSolCx() 1478 IS *fields, vel; in solve_stokes_2d_coupled() local 1482 PetscCall(ISConcatenate(PETSC_COMM_WORLD, 2, fields, &vel)); in solve_stokes_2d_coupled() 1485 PetscCall(MatZeroRowsIS(B, vel, 0.0, NULL, NULL)); in solve_stokes_2d_coupled() 1486 PetscCall(ISDestroy(&vel)); in solve_stokes_2d_coupled()
|
| H A D | ex42.c | 1238 PetscReal pos[NSD], pressure, vel[NSD]; in DMDACreateManufacturedSolution() local 1244 evaluate_MS_FrankKamentski(pos, vel, &pressure, NULL, NULL, NULL); in DMDACreateManufacturedSolution() 1246 _stokes[k][j][i].u_dof = vel[0]; in DMDACreateManufacturedSolution() 1247 _stokes[k][j][i].v_dof = vel[1]; in DMDACreateManufacturedSolution() 1248 _stokes[k][j][i].w_dof = vel[2]; in DMDACreateManufacturedSolution()
|
| H A D | ex43-solcx.h | 5 … PetscReal vel[], PetscReal *pressure, PetscReal total_stress[], PetscReal strain_rate[]) in evaluate_solCx() argument 2243 if (vel) { in evaluate_solCx() 2244 vel[0] = sum1; in evaluate_solCx() 2245 vel[1] = sum2; in evaluate_solCx()
|
| /petsc/share/petsc/datafiles/meshes/ |
| H A D | testcase3D.cas | 1557 (dual-ts/dtau-prec-vel (#t #t #t)) 1969 (dpm/dpm-vof/static-pileup/use-fixed-thread-vel? #t) 2415 (dpm/splash-vel-limit-a 1.) 2416 (dpm/splash-vel-limit-n 0.5) 2441 (dpm/scale-film-vel-by-res-time? #t) 2452 (dpm/film-internal-drag-vel-frac-limit 0.8) 2696 (transient-vel-predict? #t) 3212 (prepdf/nonadia-fla-burner-max-vel-ratio 0.9) 3215 (prepdf/ckcfd-prmx-fla-inlet-vel 40) 3218 (prepdf/ckcfd-prmx-burner-fla-vel-ratio 0.05) [all …]
|
| /petsc/src/snes/tutorials/ |
| H A D | ex69.c | 194 …n(const PetscReal pos[], PetscReal m, PetscInt n, PetscReal B, PetscScalar vel[], PetscScalar *p, … in SolKxSolution() argument 650 if (vel) { in SolKxSolution() 651 vel[0] = sum1; in SolKxSolution() 652 vel[1] = sum2; in SolKxSolution() 722 …l m, PetscInt n, PetscReal xc, PetscReal etaA, PetscReal etaB, PetscScalar vel[], PetscScalar *p, … in SolCxSolution() argument 2955 if (vel) { in SolCxSolution() 2956 vel[0] = sum1; in SolCxSolution() 2957 vel[1] = sum2; in SolCxSolution()
|