Lines Matching refs:pp
407 for (PetscInt pp = 0; pp < NN; pp++) { in PostStep() local
408 …scReal v2 = 0, fact = (dim == 2) ? 2.0 * PETSC_PI * coords[pp * dim + 0] : 1, w = fact * wp[pp] * … in PostStep()
409 for (PetscInt i = 0; i < dim; ++i) v2 += PetscSqr(coords[pp * dim + i]); in PostStep()
411 moments[1] += w * ctx->v_0 * coords[pp * dim + 1]; // z-momentum in PostStep()
428 for (PetscInt pp = 0; pp < NN; pp++) { in PostStep() local
429 …PetscReal fact = (dim == 2) ? 2.0 * PETSC_PI * coords[pp * dim + 0] : 1, w = fact * wp[pp] * ctx->… in PostStep()
577 for (PetscInt pj = 0, pp = 0; pj < Npj; pj++) { in go() local
579 for (PetscInt pi = 0; pi < Npi; pi++, pp++) { in go()
581 wp_t[grid][tid][pp] = 0; in go()
583 xx_t[grid][tid][pp] = lo[0] + hp[0] / 2.0 + pi * hp[0]; in go()
584 yy_t[grid][tid][pp] = lo[1] + hp[1] / 2.0 + pj * hp[1]; in go()
585 if (dim == 3) zz_t[grid][tid][pp] = lo[2] + hp[2] / 2.0 + pk * hp[2]; in go()
586 … PetscReal x[] = {xx_t[grid][tid][pp], yy_t[grid][tid][pp], dim == 2 ? 0 : zz_t[grid][tid][pp]}; in go()
588 …if (ctx->sphere && PetscSqrtReal(PetscSqr(xx_t[grid][tid][pp]) + PetscSqr(yy_t[grid][tid][pp])) > … in go()
589 wp_t[grid][tid][pp] = 0; in go()
591 maxwellian(dim, x, kT_m, vole, p_shift, &wp_t[grid][tid][pp]); in go()
593 …maxwellian(dim, x, kT_m, vole, -p_shift, &wp_t[grid][tid][pp]); // symmetric shift of electron pla… in go()
605 xx_t[grid][tid][pp] = mag * PetscCosReal(2.0 * PETSC_PI * u2); in go()
606 yy_t[grid][tid][pp] = mag * PetscSinReal(2.0 * PETSC_PI * u2); in go()
607 … if (dim == 2 && xx_t[grid][tid][pp] < lo[0]) xx_t[grid][tid][pp] = -xx_t[grid][tid][pp]; in go()
608 if (dim == 3) zz_t[grid][tid][pp] = lo[2] + hp[2] / 2.0 + pk * hp[2]; in go()
610 … if (dim == 2 && xx_t[grid][tid][pp] < 0) xx_t[grid][tid][pp] = -xx_t[grid][tid][pp]; // ??? in go()
612 … while (zz_t[grid][tid][pp] >= hi[2] || zz_t[grid][tid][pp] <= lo[2]) zz_t[grid][tid][pp] *= .9; in go()
614 … while (xx_t[grid][tid][pp] >= hi[0] || xx_t[grid][tid][pp] <= lo[0]) xx_t[grid][tid][pp] *= .9; in go()
615 … while (yy_t[grid][tid][pp] >= hi[1] || yy_t[grid][tid][pp] <= lo[1]) yy_t[grid][tid][pp] *= .9; in go()
618 …while (PetscSqrtReal(PetscSqr(xx_t[grid][tid][pp]) + PetscSqr(yy_t[grid][tid][pp])) > 0.92 * hi[0]… in go()
619 xx_t[grid][tid][pp] *= .9; in go()
620 yy_t[grid][tid][pp] *= .9; in go()
623 … if (ctx->num_grids == 1 && pp % 2 == 0) p_shift = 0; // one species, split bi-max in go()
625 if (dim == 3) zz_t[grid][tid][pp] += p_shift; in go()
626 else yy_t[grid][tid][pp] += p_shift; in go()
627 …wp_t[grid][tid][pp] += ctx->n[grid] / NNreal * PetscSqrtReal(ctx->masses[ctx->species_offset[grid]… in go()
634 … PetscReal x[] = {xx_t[grid][tid][pp], yy_t[grid][tid][pp], dim == 2 ? 0 : zz_t[grid][tid][pp]}; in go()
635 …0, fact = dim == 2 ? 2.0 * PETSC_PI * x[0] : 1, w = fact * wp_t[grid][tid][pp] * ctx->n_0 * ctx->m… in go()
646 PetscInt pp = NNreal; in go() local
647 wp_t[grid][tid][pp] = 0; in go()
648 xx_t[grid][tid][pp] = 1.e-7; in go()
649 yy_t[grid][tid][pp++] = hi[1] - 5.e-7; in go()
650 wp_t[grid][tid][pp] = 0; in go()
651 xx_t[grid][tid][pp] = hi[0] - 5.e-7; in go()
652 yy_t[grid][tid][pp++] = 0; in go()
653 wp_t[grid][tid][pp] = 0; in go()
654 xx_t[grid][tid][pp] = 1.e-7; in go()
655 yy_t[grid][tid][pp++] = lo[1] + 5.e-7; in go()
674 for (PetscInt pp = 0; pp < NN; pp++) { in go() local
675 …0 * PETSC_PI * xx_t[grid][tid][pp] : 1, w = fact * ctx->n_0 * ctx->masses[ctx->species_offset[grid… in go()
790 for (PetscInt pp = 0; pp < NN; pp++) { in go() local
791 …scReal v2 = 0, fact = (dim == 2) ? 2.0 * PETSC_PI * coords[pp * dim + 0] : 1, w = fact * wp[pp] * … in go()
792 for (PetscInt i = 0; i < dim; ++i) v2 += PetscSqr(coords[pp * dim + i]); in go()
794 moments_1a[1] += w * ctx->v_0 * coords[pp * dim + 1]; // z-momentum in go()
811 for (PetscInt pp = 0; pp < NN; pp++) { in go() local
812 …PetscReal fact = (dim == 2) ? 2.0 * PETSC_PI * coords[pp * dim + 0] : 1, w = fact * wp[pp] * ctx->… in go()
882 for (PetscInt pj = 0, pp = 0; pj < Npj; pj++) { in go() local
884 for (PetscInt pi = 0; pi < Npi; pi++, pp++) { in go()
885 wp_t[grid][tid][pp] = 0; in go()
886 xx_t[grid][tid][pp] = lo[0] + hp[0] / 2.0 + pi * hp[0]; in go()
887 yy_t[grid][tid][pp] = lo[1] + hp[1] / 2.0 + pj * hp[1]; in go()
888 if (dim == 3) zz_t[grid][tid][pp] = lo[2] + hp[2] / 2.0 + pk * hp[2]; in go()
893 PetscInt pp = NN - 3; in go() local
894 wp_t[grid][tid][pp] = 0; in go()
895 xx_t[grid][tid][pp] = 1.e-7; in go()
896 yy_t[grid][tid][pp++] = hi[1] - 5.e-7; in go()
897 wp_t[grid][tid][pp] = 0; in go()
898 xx_t[grid][tid][pp] = hi[0] - 5.e-7; in go()
899 yy_t[grid][tid][pp++] = 0; in go()
900 wp_t[grid][tid][pp] = 0; in go()
901 xx_t[grid][tid][pp] = 1.e-7; in go()
902 yy_t[grid][tid][pp++] = lo[1] + 5.e-7; in go()