| /petsc/src/ts/tests/ |
| H A D | ex81.c | 6 PetscReal v0; /* constant velocity */ member 11 static void Exact(PetscReal t, PetscReal v0, PetscReal u0, PetscScalar *ut) in Exact() argument 13 if (ut) *ut = u0 + v0 * t; in Exact() 26 r[0] = v[0] - user->v0; in Residual() 70 PetscCall(PetscOptionsReal("-velocity", "Constant velocity", __FILE__, user.v0, &user.v0, NULL)); in main() 101 Exact(t_final, user.v0, user.u0, &u_exact); in main()
|
| H A D | ex80.c | 7 PetscReal u0, v0; /* initial conditions */ member 11 static void Exact(PetscReal t, PetscReal a0, PetscReal u0, PetscReal v0, PetscScalar *ut, PetscScal… in Exact() argument 13 if (ut) *ut = u0 + v0 * t + 0.5 * a0 * t * t; in Exact() 14 if (vt) *vt = v0 + a0 * t; in Exact() 73 PetscCall(PetscOptionsReal("-initial_v", "Initial velocity", __FILE__, user.v0, &user.v0, NULL)); in main() 98 v[0] = user.v0; in main() 108 Exact(t_final, user.a0, user.u0, user.v0, &u_exact, &v_exact); in main()
|
| /petsc/src/vec/vec/tests/ |
| H A D | benchmark_veccreate.c | 12 PetscLogDouble v0, v1; in main() local 22 PetscCall(PetscTime(&v0)); in main() 32 …ll(PetscPrintf(PETSC_COMM_WORLD, "Iteration %" PetscInt_FMT ": Time= %g\n", i, (double)(v1 - v0))); in main()
|
| /petsc/src/ts/tutorials/ |
| H A D | ex43.c | 8 PetscReal u0, v0; /* initial conditions */ member 12 static void Exact(PetscReal t, PetscReal omega, PetscReal xi, PetscReal u0, PetscReal v0, PetscReal… in Exact() argument 18 PetscReal C1 = (v0 + a * u0) / w; in Exact() 24 PetscReal C1 = (w * u0 + xi * u0 + v0) / (2 * w); in Exact() 25 PetscReal C2 = (w * u0 - xi * u0 - v0) / (2 * w); in Exact() 30 PetscReal C1 = v0 + a * u0; in Exact() 46 Exact(t, user->Omega, user->Xi, user->u0, user->v0, &u, &v); in Solution() 170 PetscCall(PetscOptionsReal("-initial_v", "Initial velocity", __FILE__, user.v0, &user.v0, NULL)); in main() 200 v[0] = user.v0; in main()
|
| /petsc/src/dm/impls/plex/transform/impls/refine/regular/ |
| H A D | plexrefregular.c | 45 …Transforms(DMPlexTransform tr, DMPolytopeType ct, PetscInt *Nf, PetscReal *v0[], PetscReal *J[], P… in DMPlexRefineRegularGetAffineFaceTransforms() argument 95 if (v0) *v0 = tri_v0; in DMPlexRefineRegularGetAffineFaceTransforms() 102 if (v0) *v0 = quad_v0; in DMPlexRefineRegularGetAffineFaceTransforms() 133 …Transforms(DMPlexTransform tr, DMPolytopeType ct, PetscInt *Nc, PetscReal *v0[], PetscReal *J[], P… in DMPlexRefineRegularGetAffineTransforms() argument 274 if (v0) *v0 = seg_v0; in DMPlexRefineRegularGetAffineTransforms() 280 if (v0) *v0 = tri_v0; in DMPlexRefineRegularGetAffineTransforms() 286 if (v0) *v0 = quad_v0; in DMPlexRefineRegularGetAffineTransforms() 292 if (v0) *v0 = tet_v0; in DMPlexRefineRegularGetAffineTransforms() 298 if (v0) *v0 = hex_v0; in DMPlexRefineRegularGetAffineTransforms()
|
| /petsc/src/dm/impls/swarm/tests/ |
| H A D | ex8.c | 22 PetscReal v0[2]; /* Species mean velocity in 1D */ member 32 …options->v0[0] = PetscSqrtReal(BOLTZMANN_K * options->T[0] / options->mass[0]); /* electron mean… in ProcessOptions() 33 …options->v0[1] = PetscSqrtReal(BOLTZMANN_K * options->T[1] / options->mass[1]); /* ion mean velo… in ProcessOptions() 67 PetscCall(DMSwarmInitializeVelocitiesFromOptions(*sw, user->v0)); in CreateSwarm()
|
| H A D | ex5.c | 53 PetscReal v0[1] = {1.}; in CreateSwarm() local 71 PetscCall(DMSwarmInitializeVelocitiesFromOptions(*sw, v0)); in CreateSwarm() 389 PetscReal v0[1] = {1.}; in InitializeSolveAndSwarm() local 392 PetscCall(DMSwarmInitializeVelocitiesFromOptions(sw, v0)); in InitializeSolveAndSwarm() 449 const PetscReal v0 = DMPlex_NormD_Internal(dim, &vel[p * dim]); in ComputeError() local 450 const PetscReal omega = v0 / r0; in ComputeError() 456 const PetscReal ve[3] = {-v0 * st, v0 * ct, 0.0}; in ComputeError() 465 const PetscReal exen = 0.5 * PetscSqr(v0); in ComputeError()
|
| /petsc/src/dm/dt/fe/impls/composite/ |
| H A D | fecomposite.c | 36 …PetscCall(DMPlexRefineRegularGetAffineTransforms(tr, ct, &cmp->numSubelements, &cmp->v0, &cmp->jac… in PetscFESetUp_Composite() 133 …subpoint[d] += cmp->invjac[(s * dim + d) * dim + e] * (points[p * dim + e] - cmp->v0[s * dim + e]); in PetscFEComputeTabulation_Composite() 228 cmp->v0 = NULL; in PetscFECreate_Composite() 256 …tMapping(PetscFE fem, PeOp PetscInt *numSubelements, PeOp const PetscReal *v0[], PeOp const PetscR… in PetscFECompositeGetMapping() argument 266 if (v0) { in PetscFECompositeGetMapping() 267 PetscAssertPointer(v0, 3); in PetscFECompositeGetMapping() 268 *v0 = cmp->v0; in PetscFECompositeGetMapping()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex8.c | 17 PetscReal *v0, *J, *invJ, *detJ; /* FEM data */ member 56 …PetscCall(PetscMalloc4(numCells * dim, &options->v0, numCells * dim * dim, &options->J, numCells *… in ProcessOptions() 61 …PetscCall(PetscOptionsRealArray("-v0", "Input v0 for each cell", "ex8.c", options->v0, &n, &feFlg)… in ProcessOptions() 74 PetscCall(PetscFree4(options->v0, options->J, options->invJ, options->detJ)); in ProcessOptions() 75 options->v0 = options->J = options->invJ = options->detJ = NULL; in ProcessOptions() 148 PetscReal v0[3], J[9], invJ[9], detJ; in CheckFEMGeometry() local 152 PetscCall(DMPlexComputeCellGeometryFEM(dm, cell, NULL, v0, J, invJ, &detJ)); in CheckFEMGeometry() 154 if (v0[d] != v0Ex[d]) { in CheckFEMGeometry() 157 …MM_SELF, PETSC_ERR_PLIB, "Invalid v0 (%g, %g) != (%g, %g)", (double)v0[0], (double)v0[1], (double)… in CheckFEMGeometry() 159 …RR_PLIB, "Invalid v0 (%g, %g, %g) != (%g, %g, %g)", (double)v0[0], (double)v0[1], (double)v0[2], (… in CheckFEMGeometry() [all …]
|
| /petsc/src/dm/impls/swarm/ |
| H A D | swarmpic.c | 1011 PetscReal v0[3], J[9], invJ[9], detJ, detJp = 2. / (gmax[0] - gmin[0]), xr[3], den; in DMSwarmComputeLocalSize() local 1014 PetscCall(DMPlexComputeCellGeometryFEM(dm, cell, NULL, v0, J, invJ, &detJ)); in DMSwarmComputeLocalSize() 1017 CoordinatesRefToReal(dim, dim, xi0, v0, J, &xq[q * dim], xr); in DMSwarmComputeLocalSize() 1167 PetscReal v0[3], J[9], invJ[9], detJ; in DMSwarmInitializeCoordinates() local 1171 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMSwarmInitializeCoordinates() 1177 CoordinatesRefToReal(dim, dim, xi0, v0, J, xref, &x[p * dim]); in DMSwarmInitializeCoordinates() 1213 PetscErrorCode DMSwarmInitializeVelocities(DM sw, PetscProbFn *sampler, const PetscReal v0[]) in DMSwarmInitializeVelocities() argument 1228 if (v0[0] == 0.) { in DMSwarmInitializeVelocities() 1237 for (d = 0; d < dim; ++d) v[p * dim + d] = (v0[s] / v0[0]) * PetscRealPart(vel[d]); in DMSwarmInitializeVelocities() 1252 for (d = 0; d < dim; ++d) v[p * dim + d] = (v0[s] / v0[0]) * vel[d]; in DMSwarmInitializeVelocities() [all …]
|
| /petsc/src/dm/impls/plex/tutorials/ |
| H A D | ex3f90.F90 | 25 PetscReal, target, dimension(dim) :: v0 46 pv0 => v0
|
| /petsc/src/ksp/ksp/impls/tcqmr/ |
| H A D | tcqmr.c | 35 PetscCall(VecCopy(u, v0)); in KSPSolve_TCQMR() 62 PetscCall(VecDot(y, v0, &dp11)); in KSPSolve_TCQMR() 64 PetscCall(VecDot(u, v0, &dp2)); in KSPSolve_TCQMR() 69 PetscCall(VecDot(u, v0, &rho)); in KSPSolve_TCQMR()
|
| H A D | tcqmrimpl.h | 19 #define v0 ksp->work[VEC_OFFSET + 6] macro
|
| /petsc/src/mat/tests/ |
| H A D | ex18.c | 13 PetscScalar v, v0, v1, v2, a0 = 0.1, a, rhsval, *boundary_values, diag = 1.0; in main() local 71 v0 = 1.5 * a; in main() 76 v0 = 1.0 * a; in main() 82 PetscCall(MatSetValues(A, 1, &Ii, 1, &Ii, &v0, ADD_VALUES)); in main()
|
| /petsc/src/ts/tutorials/hamiltonian/output/ |
| H A D | ex3_landau_damping_3d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000…
|
| H A D | ex3_landau_damping_2d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000…
|
| H A D | ex2_none_1d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 0.000…
|
| H A D | ex3_landau_damping_1d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000…
|
| H A D | ex2_coulomb_1d.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 0.000…
|
| H A D | ex4_landau_damping_1d_bs.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 0.000…
|
| H A D | ex4_landau_damping_1d_dg.out | 3 (x0,v0,t0,m0,q0,phi0): (1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 1.000000e+00, 0.000…
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexgeometry.c | 425 PetscReal v0, J, invJ, detJ; in DMPlexLocatePoint_Simplex_1D_Internal() local 429 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, &v0, &J, &invJ, &detJ)); in DMPlexLocatePoint_Simplex_1D_Internal() 430 xi = invJ * (x - v0); in DMPlexLocatePoint_Simplex_1D_Internal() 441 PetscReal x[3], v0[3], J[9], invJ[9], detJ; in DMPlexLocatePoint_Simplex_2D_Internal() local 446 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMPlexLocatePoint_Simplex_2D_Internal() 449 for (PetscInt j = 0; j < embedDim; ++j) xi[i] += invJ[i * embedDim + j] * (x[j] - v0[j]); in DMPlexLocatePoint_Simplex_2D_Internal() 461 PetscReal v0[2], J[4], invJ[4], detJ; in DMPlexClosestPoint_Simplex_2D_Internal() local 465 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMPlexClosestPoint_Simplex_2D_Internal() 466 xi = invJ[0 * embedDim + 0] * (x - v0[0]) + invJ[0 * embedDim + 1] * (y - v0[1]); in DMPlexClosestPoint_Simplex_2D_Internal() 467 eta = invJ[1 * embedDim + 0] * (x - v0[0]) + invJ[1 * embedDim + 1] * (y - v0[1]); in DMPlexClosestPoint_Simplex_2D_Internal() [all …]
|
| /petsc/src/ts/tutorials/power_grid/stability_9bus/ |
| H A D | ex9busadj.c | 215 PetscScalar PD, QD, Vm0, *v0; in ResidualFunction() local 292 PetscCall(VecGetArray(user->V0, &v0)); in ResidualFunction() 298 …Vm0 = PetscSqrtScalar(v0[2 * lbus[i]] * v0[2 * lbus[i]] + v0[2 * lbus[i] + 1] * v0[2 * lbus[i] + 1… in ResidualFunction() 310 PetscCall(VecRestoreArray(user->V0, &v0)); in ResidualFunction() 451 PetscScalar PD, QD, Vm0, *v0, Vm4; in ResidualJacobian() local 657 PetscCall(VecGetArray(user->V0, &v0)); in ResidualJacobian() 664 …Vm0 = PetscSqrtScalar(v0[2 * lbus[i]] * v0[2 * lbus[i]] + v0[2 * lbus[i] + 1] * v0[2 * lbus[i] + 1… in ResidualJacobian() 702 PetscCall(VecRestoreArray(user->V0, &v0)); in ResidualJacobian()
|
| H A D | ex9busoptfd.c | 217 PetscScalar PD, QD, Vm0, *v0; in ResidualFunction() local 293 PetscCall(VecGetArray(user->V0, &v0)); in ResidualFunction() 299 …Vm0 = PetscSqrtScalar(v0[2 * lbus[i]] * v0[2 * lbus[i]] + v0[2 * lbus[i] + 1] * v0[2 * lbus[i] + 1… in ResidualFunction() 311 PetscCall(VecRestoreArray(user->V0, &v0)); in ResidualFunction() 452 PetscScalar PD, QD, Vm0, *v0, Vm4; in ResidualJacobian() local 659 PetscCall(VecGetArray(user->V0, &v0)); in ResidualJacobian() 666 …Vm0 = PetscSqrtScalar(v0[2 * lbus[i]] * v0[2 * lbus[i]] + v0[2 * lbus[i] + 1] * v0[2 * lbus[i] + 1… in ResidualJacobian() 704 PetscCall(VecRestoreArray(user->V0, &v0)); in ResidualJacobian()
|
| /petsc/src/snes/utils/dm/ |
| H A D | dminterpolatesnes.c | 373 PetscReal v0, J, invJ, detJ, xir[1]; in DMInterpolate_Segment_Private() local 379 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, &v0, &J, &invJ, &detJ)); in DMInterpolate_Segment_Private() 381 xir[0] = invJ * PetscRealPart(coords[p] - v0); in DMInterpolate_Segment_Private() 400 PetscReal *v0, *J, *invJ, detJ; in DMInterpolate_Triangle_Private() local 404 PetscCall(PetscMalloc3(ctx->dim, &v0, ctx->dim * ctx->dim, &J, ctx->dim * ctx->dim, &invJ)); in DMInterpolate_Triangle_Private() 407 PetscCall(DMPlexComputeCellGeometryFEM(dm, c, NULL, v0, J, invJ, &detJ)); in DMInterpolate_Triangle_Private() 413 …>dim; ++f) xi[d] += invJ[d * ctx->dim + f] * 0.5 * PetscRealPart(coords[p * ctx->dim + f] - v0[f]); in DMInterpolate_Triangle_Private() 419 PetscCall(PetscFree3(v0, J, invJ)); in DMInterpolate_Triangle_Private() 428 PetscReal *v0, *J, *invJ, detJ; in DMInterpolate_Tetrahedron_Private() local 434 PetscCall(PetscMalloc3(ctx->dim, &v0, ctx->dim * ctx->dim, &J, ctx->dim * ctx->dim, &invJ)); in DMInterpolate_Tetrahedron_Private() [all …]
|