Lines Matching refs:y_ptr

368   const PetscScalar *y_ptr;  in main()  local
449 PetscCall(VecGetArrayRead(user.U, &y_ptr)); in main()
450 user.ob[0] = y_ptr[0]; in main()
451 user.ob[1] = y_ptr[1]; in main()
452 PetscCall(VecRestoreArrayRead(user.U, &y_ptr)); in main()
530 const PetscScalar *y_ptr; in FormFunctionGradient() local
533 PetscCall(VecGetArrayRead(P, &y_ptr)); in FormFunctionGradient()
534 user_ptr->mu = y_ptr[0]; in FormFunctionGradient()
535 PetscCall(VecRestoreArrayRead(P, &y_ptr)); in FormFunctionGradient()
548 PetscCall(VecGetArrayRead(user_ptr->U, &y_ptr)); in FormFunctionGradient()
549 …*f = (y_ptr[0] - user_ptr->ob[0]) * (y_ptr[0] - user_ptr->ob[0]) + (y_ptr[1] - user_ptr->ob[1]) * … in FormFunctionGradient()
553 x_ptr[0] = 2. * (y_ptr[0] - user_ptr->ob[0]); in FormFunctionGradient()
554 x_ptr[1] = 2. * (y_ptr[1] - user_ptr->ob[1]); in FormFunctionGradient()
555 PetscCall(VecRestoreArrayRead(user_ptr->U, &y_ptr)); in FormFunctionGradient()
566 PetscCall(VecGetArrayRead(user_ptr->Lambda[0], &y_ptr)); in FormFunctionGradient()
568 …g[0] = y_ptr[1] * (-10.0 / (81.0 * user_ptr->mu * user_ptr->mu) + 2.0 * 292.0 / (2187.0 * user_ptr… in FormFunctionGradient()
570 PetscCall(VecRestoreArrayRead(user_ptr->Lambda[0], &y_ptr)); in FormFunctionGradient()
599 PetscScalar *x_ptr, *y_ptr, dzdp, dzdp2; in Adjoint2() local
630 PetscCall(VecGetArray(ctx->U, &y_ptr)); in Adjoint2()
631 y_ptr[0] = 2.0; in Adjoint2()
632 y_ptr[1] = -2.0 / 3.0 + 10.0 / (81.0 * ctx->mu) - 292.0 / (2187.0 * ctx->mu * ctx->mu); in Adjoint2()
633 PetscCall(VecRestoreArray(ctx->U, &y_ptr)); in Adjoint2()
638 PetscCall(VecGetArray(ctx->Lambda[0], &y_ptr)); in Adjoint2()
639 y_ptr[0] = 2. * (z_ptr[0] - ctx->ob[0]); in Adjoint2()
640 y_ptr[1] = 2. * (z_ptr[1] - ctx->ob[1]); in Adjoint2()
641 PetscCall(VecRestoreArray(ctx->Lambda[0], &y_ptr)); in Adjoint2()
643 PetscCall(VecGetArray(ctx->Mup[0], &y_ptr)); in Adjoint2()
644 y_ptr[0] = 0.0; in Adjoint2()
645 PetscCall(VecRestoreArray(ctx->Mup[0], &y_ptr)); in Adjoint2()
648 PetscCall(VecGetArray(ctx->Lambda2[0], &y_ptr)); in Adjoint2()
649 y_ptr[0] = 2. * x_ptr[0]; in Adjoint2()
650 y_ptr[1] = 2. * x_ptr[1]; in Adjoint2()
651 PetscCall(VecRestoreArray(ctx->Lambda2[0], &y_ptr)); in Adjoint2()
652 PetscCall(VecGetArray(ctx->Mup2[0], &y_ptr)); in Adjoint2()
653 y_ptr[0] = 0.0; in Adjoint2()
654 PetscCall(VecRestoreArray(ctx->Mup2[0], &y_ptr)); in Adjoint2()
665 PetscCall(VecGetArray(ctx->Lambda2[0], &y_ptr)); in Adjoint2()
668 arr[0] = x_ptr[1] * dzdp2 + y_ptr[1] * dzdp2 + z_ptr[0]; in Adjoint2()
671 PetscCall(VecRestoreArray(ctx->Lambda2[0], &y_ptr)); in Adjoint2()