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()
64 static PetscErrorCode sol_true(PetscReal t, Vec U, AppCtx *ctx) in sol_true() argument
69 PetscCall(VecGetArray(U, &u)); in sol_true()
72 PetscCall(VecRestoreArray(U, &u)); in sol_true()
79 Vec U; /* solution will be stored here */ in main() local
112 PetscCall(VecCreate(PETSC_COMM_WORLD, &U)); in main()
113 PetscCall(VecSetSizes(U, n, PETSC_DETERMINE)); in main()
114 PetscCall(VecSetFromOptions(U)); in main()
115 PetscCall(VecDuplicate(U, &Utrue)); in main()
116 PetscCall(VecCopy(U, Utrue)); in main()
137 PetscCall(VecGetArray(U, &u)); in main()
140 PetscCall(VecRestoreArray(U, &u)); in main()
157 PetscCall(TSSetSolution(ts, U)); in main()
170 PetscCall(TSSolve(ts, U)); in main()
171 PetscCall(VecView(U, PETSC_VIEWER_STDOUT_WORLD)); in main()
178 PetscCall(VecAXPY(Utrue, -1.0, U)); in main()
189 PetscCall(VecDestroy(&U)); in main()