| /petsc/src/snes/tutorials/ |
| H A D | ex9.c | 123 PetscReal **au, dx, dy, x, y; in FormExactSolution() local 127 dy = 4.0 / (PetscReal)(info->my - 1); in FormExactSolution() 130 y = -2.0 + j * dy; in FormExactSolution() 145 PetscReal **aXl, dx, dy, x, y; in FormBounds() local 151 dy = 4.0 / (PetscReal)(info.my - 1); in FormBounds() 154 y = -2.0 + j * dy; in FormBounds() 168 PetscReal dx, dy, x, y, ue, un, us, uw; in FormFunctionLocal() local 172 dy = 4.0 / (PetscReal)(info->my - 1); in FormFunctionLocal() 174 y = -2.0 + j * dy; in FormFunctionLocal() 182 us = (j - 1 == 0) ? u_exact(x, y - dy) : au[j - 1][i]; in FormFunctionLocal() [all …]
|
| /petsc/src/ts/tests/ |
| H A D | ex4.c | 24 PetscReal dy; /* the grid space in y-direction */ member 65 data.dy = 1.0 / (data.n + 1.0); in main() 199 PetscReal x, y, dx, dy; in Initial() local 207 dy = data->dy; in Initial() 220 y = dy * col; in Initial() 277 PetscReal dx, dy, a, epsilon, xc, xl, xr, yl, yr; in RHSJacobian() local 284 dy = data->dy; in RHSJacobian() 288 xc = -2.0 * epsilon * (1.0 / (dx * dx) + 1.0 / (dy * dy)); in RHSJacobian() 291 yl = 0.5 * a / dy + epsilon / (dy * dy); in RHSJacobian() 292 yr = -0.5 * a / dy + epsilon / (dy * dy); in RHSJacobian() [all …]
|
| /petsc/src/ts/tutorials/power_grid/ |
| H A D | ex6.c | 39 PetscScalar dy; /* y step size */ member 119 …WORLD, "sum(p)*dw*dtheta at t = %3.2f = %3.6f\n", (double)t, (double)(sum * user->dx * user->dy))); in PostStep() 141 user->dy = (user->ymax - user->ymin) / (N - 1); in ini_bou() 207 *p2 = f * (p[j + 1][i] - p[j - 1][i]) / (2 * user->dy); in adv2() 215 *p_diff = user->disper_coe * ((p[j - 1][i] - 2 * p[j][i] + p[j + 1][i]) / (user->dy * user->dy)); in diffuse() 231 … - p[j][i]) / user->dx + fthetac * p[j][i] - user->disper_coe * (p[j + 1][i] - p[j][i]) / user->dy; in BoundaryConditions() 233 … - p[j][i]) / user->dx + fthetac * p[j][i] - user->disper_coe * (p[j][i] - p[j - 1][i]) / user->dy; in BoundaryConditions() 235 …[j][i - 1]) / user->dx + fthetac * p[j][i] - user->disper_coe * (p[j + 1][i] - p[j][i]) / user->dy; in BoundaryConditions() 237 …[j][i - 1]) / user->dx + fthetac * p[j][i] - user->disper_coe * (p[j][i] - p[j - 1][i]) / user->dy; in BoundaryConditions() 239 …/ (user->dx) + fthetac * p[j][i] - user->disper_coe * (p[j + 1][i] - p[j - 1][i]) / (2 * user->dy); in BoundaryConditions() [all …]
|
| H A D | ex8.c | 44 PetscScalar dy; /* y step size */ member 151 user->dy = (user->ymax - user->ymin) / (N - 1); in ini_bou() 197 *p2 = fpos * (p[j][i] - p[j - 1][i]) / user->dy + fneg * (p[j + 1][i] - p[j][i]) / user->dy; in adv2() 199 …[j - 1][i] + p[j - 2][i]) / (2 * user->dy) + fneg * (-p[j + 2][i] + 4 * p[j + 1][i] - 3 * p[j][i])… in adv2() 201 …] + p[j - 2][i]) / (6 * user->dy) + fneg * (-p[j + 2][i] + 6 * p[j + 1][i] - 3 * p[j][i] - 2 * p[j… in adv2() 213 … *p_diff = user->disper_coe * ((p[j - 1][i] - 2 * p[j][i] + p[j + 1][i]) / (user->dy * user->dy)); in diffuse() 215 … 16 * p[j - 1][i] - 30 * p[j][i] + 16 * p[j + 1][i] - p[j + 2][i]) / (12.0 * user->dy * user->dy)); in diffuse() 217 …p[j][i] + 270 * p[j + 1][i] - 27 * p[j + 2][i] + 2 * p[j + 3][i]) / (180.0 * user->dy * user->dy)); in diffuse() 304 …ser->H)) * (user->PM_min - user->Pmax * PetscSinScalar(xi) - user->D * (yi - user->ws)) / user->dy; in IJacobian() 307 …/ (2 * user->H), 2) * user->q * (1.0 - PetscExpScalar(-t / user->lambda))) / (user->dy * user->dy); in IJacobian()
|
| H A D | ex7.c | 38 PetscScalar dy; /* y step size */ member 160 user->dy = (user->ymax - user->ymin) / (N - 1); in ini_bou() 227 *p2 = fpos * (p[j][i] - p[j - 1][i]) / user->dy + fneg * (p[j + 1][i] - p[j][i]) / user->dy; in adv2() 229 …[j - 1][i] + p[j - 2][i]) / (2 * user->dy) + fneg * (-p[j + 2][i] + 4 * p[j + 1][i] - 3 * p[j][i])… in adv2() 231 …] + p[j - 2][i]) / (6 * user->dy) + fneg * (-p[j + 2][i] + 6 * p[j + 1][i] - 3 * p[j][i] - 2 * p[j… in adv2() 241 … *p_diff = user->disper_coe * ((p[j - 1][i] - 2 * p[j][i] + p[j + 1][i]) / (user->dy * user->dy)); in diffuse() 243 … 16 * p[j - 1][i] - 30 * p[j][i] + 16 * p[j + 1][i] - p[j + 2][i]) / (12.0 * user->dy * user->dy)); in diffuse() 245 …p[j][i] + 270 * p[j + 1][i] - 27 * p[j + 2][i] + 2 * p[j + 3][i]) / (180.0 * user->dy * user->dy)); in diffuse() 328 … = (user->ws / (2.0 * user->H)) * (user->PM_min - user->Pmax * PetscSinScalar(xi)) / user->dy; in IJacobian() 331 …/ (2 * user->H), 2) * user->q * (1.0 - PetscExpScalar(-t / user->lambda))) / (user->dy * user->dy); in IJacobian()
|
| /petsc/src/dm/tutorials/ |
| H A D | ex10.c | 26 PetscScalar value = 1.0, dx, dy; in main() local 34 dy = (yp - ym) / (Ny - 1); in main() 59 …) gauss_ptr[j][i] = PetscExpScalar(-(xm + i * dx) * (xm + i * dx) - (ym + j * dy) * (ym + j * dy)); in main()
|
| H A D | ex20.c | 96 PetscReal *trivert, dx, dy; in pic_insert_DMPLEX_with_cell_list() local 112 dy = 1.0 / ((PetscReal)cells_per_dim[1]); in pic_insert_DMPLEX_with_cell_list() 116 trivert[2 * cnt + 1] = 0.0 + jj * dy; in pic_insert_DMPLEX_with_cell_list()
|
| H A D | swarm_ex3.c | 17 PetscReal dx, dy; in _DMLocatePoints_DMDARegular_IS() local 32 dy = 2.0 / ((PetscReal)my); in _DMLocatePoints_DMDARegular_IS() 43 mj = (PetscInt)((coory - (-1.0)) / dy); in _DMLocatePoints_DMDARegular_IS()
|
| /petsc/src/ksp/ksp/tests/ |
| H A D | ex10.c | 211 PetscReal K[60][60], x, y, z, dx, dy, dz; in Elastic20Stiff() local 220 dy = 2.0; in Elastic20Stiff() 232 xyz[3][1] = y + dy; in Elastic20Stiff() 235 xyz[4][1] = y + dy; in Elastic20Stiff() 238 xyz[5][1] = y + 2. * dy; in Elastic20Stiff() 241 xyz[6][1] = y + 2. * dy; in Elastic20Stiff() 244 xyz[7][1] = y + 2. * dy; in Elastic20Stiff() 253 xyz[10][1] = y + 2. * dy; in Elastic20Stiff() 256 xyz[11][1] = y + 2. * dy; in Elastic20Stiff() 268 xyz[15][1] = y + dy; in Elastic20Stiff() [all …]
|
| /petsc/src/dm/impls/stag/tutorials/ |
| H A D | ex6.c | 418 …const PetscScalar dy = arr_coord_y[ey][slot_coord_element] - arr_coord_y[ey - 1][slot_coord_elemen… in UpdateVelocity_2d() local 421 …slot_txy_downleft]) / dx + (arr_stress[ey][ex][slot_tyy] - arr_stress[ey - 1][ex][slot_tyy]) / dy); in UpdateVelocity_2d() 427 const PetscScalar dy = arr_coord_y[ey][slot_coord_next] - arr_coord_y[ey][slot_coord_prev]; in UpdateVelocity_2d() local 430 …t_txx]) / dx + (arr_stress[ey][ex][slot_txy_upleft] - arr_stress[ey][ex][slot_txy_downleft]) / dy); in UpdateVelocity_2d() 509 …const PetscScalar dy = arr_coord_y[ey][slot_coord_element] - arr_coord_y[ey - 1][slot_coord_elemen… in UpdateVelocity_3d() local 513 …arr_stress[ez][ey][ex][slot_tyy] - arr_stress[ez][ey - 1][ex][slot_tyy]) / dy + (arr_stress[ez][ey… in UpdateVelocity_3d() 519 … const PetscScalar dy = arr_coord_y[ey][slot_coord_next] - arr_coord_y[ey][slot_coord_prev]; in UpdateVelocity_3d() local 523 …z][ey][ex][slot_txy_upleft] - arr_stress[ez][ey][ex][slot_txy_downleft]) / dy + (arr_stress[ez][ey… in UpdateVelocity_3d() 529 … const PetscScalar dy = arr_coord_y[ey][slot_coord_next] - arr_coord_y[ey][slot_coord_prev]; in UpdateVelocity_3d() local 533 …z][ey][ex][slot_tyz_backup] - arr_stress[ez][ey][ex][slot_tyz_backdown]) / dy + (arr_stress[ez][ey… in UpdateVelocity_3d() [all …]
|
| /petsc/src/tao/linesearch/impls/morethuente/ |
| H A D | morethuente.c | 10 …x, PetscReal *fx, PetscReal *dx, PetscReal *sty, PetscReal *fy, PetscReal *dy, PetscReal *stp, Pet… 363 …x, PetscReal *fx, PetscReal *dx, PetscReal *sty, PetscReal *fy, PetscReal *dy, PetscReal *stp, Pet… in Tao_mcstep() argument 468 theta = 3 * (*fp - *fy) / (*sty - *stp) + *dy + *dp; in Tao_mcstep() 469 s = PetscMax(PetscAbsReal(theta), PetscAbsReal(*dy)); in Tao_mcstep() 471 gamma1 = s * PetscSqrtScalar(PetscPowScalar(theta / s, 2.0) - (*dy / s) * (*dp / s)); in Tao_mcstep() 474 q = ((gamma1 - *dp) + gamma1) + *dy; in Tao_mcstep() 491 *dy = *dp; in Tao_mcstep() 496 *dy = *dx; in Tao_mcstep()
|
| /petsc/src/mat/impls/aij/mpi/ |
| H A D | fdmpiaij.c | 35 PetscScalar dx = 0.0, *w3_array, *dy_i, *dy = coloring->dy; in MatFDColoringApply_BAIJ() local 104 dy_i = dy; in MatFDColoringApply_BAIJ() 148 dy_i = dy; in MatFDColoringApply_BAIJ() 162 dy_i = dy; in MatFDColoringApply_BAIJ() 249 PetscScalar *dy = coloring->dy, *dy_k; in MatFDColoringApply_AIJ() local 258 dy_k = dy; in MatFDColoringApply_AIJ() 308 *tmp = dy[row] * dx; in MatFDColoringApply_AIJ() 310 *Jentry2[nz].valaddr = dy[row] * dx; in MatFDColoringApply_AIJ() 319 *tmp = dy[row] * vscale_array[Jentry[nz].col]; in MatFDColoringApply_AIJ() 321 *Jentry[nz].valaddr = dy[row] * vscale_array[Jentry[nz].col]; in MatFDColoringApply_AIJ() [all …]
|
| /petsc/src/sys/classes/draw/impls/image/ |
| H A D | drawimage.h | 57 int dy = PetscAbs(y_2 - y_1), sy = (y_2 - y_1) >= 0 ? +1 : -1; in PetscImageDrawLine() local 58 int error = (dx > dy ? dx : -dy) / 2, err; in PetscImageDrawLine() 64 error -= dy; in PetscImageDrawLine() 67 if (err < +dy) { in PetscImageDrawLine()
|
| /petsc/share/petsc/datafiles/meshes/ |
| H A D | square_bin.msh | 10 ��dy�?����?�Htl���?�)�� �?�S����?z�@'��?��}
|
| /petsc/src/ksp/ksp/tutorials/ |
| H A D | ex61f.F90 | 79 integer :: i, j, ij, ij2, ii, jj, nz, ip, dx, dy, icase 133 do dy = -1, 1 135 jj = j + dy
|
| /petsc/src/vec/is/sf/impls/basic/ |
| H A D | sfpack.c | 70 for (j = 0; j < opt->dy[r]; j++) { \ 113 for (j = 0; j < opt->dy[r]; j++) { \ 156 for (j = 0; j < opt->dy[r]; j++) { \ 208 for (j = 0; j < srcOpt->dy[0]; j++) { \ 1180 PetscInt r, p, start, i, j, k, dx, dy, dz, dydz, m, X, Y; in PetscSFCreatePackOpt() local 1191 opt->dy = opt->array + 3 * n + 2; in PetscSFCreatePackOpt() 1214 for (dy = 1; dy < dydz; dy++) { /* Search in Y dimension */ in PetscSFCreatePackOpt() 1216 if (start + X * dy + i != idx[p]) { in PetscSFCreatePackOpt() 1228 dz = m / (dx * dy); in PetscSFCreatePackOpt() 1229 Y = dz > 1 ? (idx[p] - start) / X : dy; in PetscSFCreatePackOpt() [all …]
|
| /petsc/src/ts/tutorials/optimal_control/ |
| H A D | ex1.c | 185 PetscReal dx, dy; in CostIntegrand() local 192 dy = u[1] - actx->lv * t * PetscSinReal(actx->lw); in CostIntegrand() 193 r[0] = dx * dx + dy * dy; in CostIntegrand() 204 PetscReal dx, dy; in DRDUJacobianTranspose() local 210 dy = u[1] - actx->lv * t * PetscSinReal(actx->lw); in DRDUJacobianTranspose() 212 drdu[1][0] = 2. * dy; in DRDUJacobianTranspose()
|
| /petsc/src/snes/tutorials/output/ |
| H A D | ex9_8.out | 1 setup done: grid Mx,My = 21,21 with spacing dx,dy = 0.2000,0.2000
|
| H A D | ex9_7.out | 1 setup done: grid Mx,My = 21,21 with spacing dx,dy = 0.2000,0.2000
|
| H A D | ex9_9.out | 1 setup done: grid Mx,My = 21,21 with spacing dx,dy = 0.2000,0.2000
|
| /petsc/src/vec/is/sf/impls/basic/kokkos/ |
| H A D | sfkok.kokkos.cxx | 198 const PetscInt *offset, *start, *dx, *dy, *X, *Y; in MapTidToIndex() local 204 dy = opt + 3 * n + 2; in MapTidToIndex() 211 k = m / (dx[r] * dy[r]); in MapTidToIndex() 212 j = (m - k * dx[r] * dy[r]) / dx[r]; in MapTidToIndex() 213 i = m - k * dx[r] * dy[r] - j * dx[r]; in MapTidToIndex() 305 srcy = srcOpt->dy[0]; in ScatterAndOp() 317 dsty = dstOpt->dy[0]; in ScatterAndOp()
|
| /petsc/src/vec/is/sf/impls/basic/cupm/ |
| H A D | sfcupm_impl.hpp | 23 const PetscInt *offset, *start, *dx, *dy, *X, *Y; in MapTidToIndex() local 29 dy = opt + 3 * n + 2; in MapTidToIndex() 36 k = m / (dx[r] * dy[r]); in MapTidToIndex() 37 j = (m - k * dx[r] * dy[r]) / dx[r]; in MapTidToIndex() 38 i = m - k * dx[r] * dy[r] - j * dx[r]; in MapTidToIndex() 333 srcy = srcOpt->dy[0]; in ScatterAndOp() 345 dsty = dstOpt->dy[0]; in ScatterAndOp()
|
| /petsc/src/mat/impls/aij/seq/ |
| H A D | fdaij.c | 71 PetscCall(PetscMalloc1(bcols * mat->rmap->n, &c->dy)); in MatFDColoringSetUpBlocked_AIJ_Private() 287 PetscCall(PetscMalloc1(bs * mat->rmap->n, &c->dy)); in MatFDColoringSetUp_SeqXAIJ()
|
| /petsc/src/dm/impls/moab/ |
| H A D | dmmbutil.cxx | 19 PetscReal dx, dy, dz; member 233 arrays[1][ix] = (y + jj) * genCtx.dy + genCtx.xyzbounds[2]; in DMMoab_GenerateVertices_Private() 427 …genCtx.dy = (genCtx.xyzbounds[3] - genCtx.xyzbounds[2]) / (nelems * genCtx.q); /* distance be… in DMMBUtil_InitializeOptions() 445 …genCtx.dy = (genCtx.xyzbounds[3] - genCtx.xyzbounds[2]) / (nelems * genCtx.q); /* distance be… in DMMBUtil_InitializeOptions() 474 PetscCall(PetscInfo(NULL, "Local delxyz:= %g, %g, %g\n", genCtx.dx, genCtx.dy, genCtx.dz)); in DMMBUtil_InitializeOptions()
|
| /petsc/src/dm/impls/plex/ |
| H A D | plexegads.c | 99 PetscScalar dx, dy, dz, lambda, tolr, obj_old, obj_tmp, target; in DMPlex_EGADS_EDGE_XYZtoUV_Internal() local 113 dy = coords[v * dE + 1] - eval[1]; in DMPlex_EGADS_EDGE_XYZtoUV_Internal() 115 obj_old = dx * dx + dy * dy + dz * dz; in DMPlex_EGADS_EDGE_XYZtoUV_Internal() 127 b = eval[3] * dx + eval[4] * dy + eval[5] * dz; in DMPlex_EGADS_EDGE_XYZtoUV_Internal() 182 PetscScalar dx, dy, dz, lambda, tolr, obj_old, obj_tmp, target; in DMPlex_Geom_EDGE_XYZtoUV_Internal() local 201 dy = coords[v * dE + 1] - eval[1]; in DMPlex_Geom_EDGE_XYZtoUV_Internal() 203 obj_old = dx * dx + dy * dy + dz * dz; in DMPlex_Geom_EDGE_XYZtoUV_Internal() 215 b = eval[3] * dx + eval[4] * dy + eval[5] * dz; in DMPlex_Geom_EDGE_XYZtoUV_Internal() 280 PetscScalar dx, dy, dz, lambda, tolr, denom, obj_old, obj_tmp, target; in DMPlex_EGADS_FACE_XYZtoUV_Internal() local 294 dy = coords[v * dE + 1] - eval[1]; in DMPlex_EGADS_FACE_XYZtoUV_Internal() [all …]
|