Lines Matching refs:U

18 static PetscErrorCode RHSFunction(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx)  in RHSFunction()  argument
24 PetscCall(VecGetArrayRead(U, &u)); in RHSFunction()
28 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunction()
33 static PetscErrorCode RHSFunctionslow(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionslow() argument
39 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionslow()
42 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionslow()
47 static PetscErrorCode RHSFunctionfast(TS ts, PetscReal t, Vec U, Vec F, AppCtx *ctx) in RHSFunctionfast() argument
53 PetscCall(VecGetArrayRead(U, &u)); in RHSFunctionfast()
56 PetscCall(VecRestoreArrayRead(U, &u)); in RHSFunctionfast()
61 static PetscErrorCode sol_true(PetscReal t, Vec U) in sol_true() argument
66 PetscCall(VecGetArray(U, &u)); in sol_true()
69 PetscCall(VecRestoreArray(U, &u)); in sol_true()
76 Vec U; /* solution will be stored here */ in main() local
109 PetscCall(VecCreate(PETSC_COMM_WORLD, &U)); in main()
110 PetscCall(VecSetSizes(U, n, PETSC_DETERMINE)); in main()
111 PetscCall(VecSetFromOptions(U)); in main()
112 PetscCall(VecDuplicate(U, &Utrue)); in main()
113 PetscCall(VecCopy(U, Utrue)); in main()
118 PetscCall(VecGetArray(U, &u)); in main()
121 PetscCall(VecRestoreArray(U, &u)); in main()
138 PetscCall(TSSetSolution(ts, U)); in main()
159 PetscCall(TSSolve(ts, U)); in main()
160 PetscCall(VecView(U, PETSC_VIEWER_STDOUT_WORLD)); in main()
167 PetscCall(VecAXPY(Utrue, -1.0, U)); in main()
178 PetscCall(VecDestroy(&U)); in main()