Lines Matching refs:U
15 Vec U, V; member
30 PetscErrorCode TSDAESimpleSetRHSFunction(TSDAESimple tsdae, Vec U, PetscErrorCode (*f)(PetscReal, V… in TSDAESimpleSetRHSFunction() argument
34 tsdae->U = U; in TSDAESimpleSetRHSFunction()
35 PetscCall(PetscObjectReference((PetscObject)U)); in TSDAESimpleSetRHSFunction()
54 PetscCall(VecDestroy(&(*tsdae)->U)); in TSDAESimpleDestroy()
84 Vec U; member
93 PetscErrorCode TSDAESimple_Reduced_TSFunction(TS ts, PetscReal t, Vec U, Vec F, void *actx) in TSDAESimple_Reduced_TSFunction() argument
100 red->U = U; in TSDAESimple_Reduced_TSFunction()
102 PetscCall((*tsdae->f)(t, U, tsdae->V, F, tsdae->fctx)); in TSDAESimple_Reduced_TSFunction()
116 PetscCall((*tsdae->F)(red->t, red->U, V, F, tsdae->Fctx)); in TSDAESimple_Reduced_SNESFunction()
120 PetscErrorCode TSDAESimpleSolve_Reduced(TSDAESimple tsdae, Vec U) in TSDAESimpleSolve_Reduced() argument
125 PetscCall(TSSolve(red->ts, U)); in TSDAESimpleSolve_Reduced()
167 PetscCall(VecDuplicate(tsdae->U, &tsrhs)); in TSDAESimpleSetUp_Reduced()
204 PetscCall(VecScatterBegin(full->scatterU, UV, tsdae->U, INSERT_VALUES, SCATTER_REVERSE)); in TSDAESimple_Full_TSRHSFunction()
205 PetscCall(VecScatterEnd(full->scatterU, UV, tsdae->U, INSERT_VALUES, SCATTER_REVERSE)); in TSDAESimple_Full_TSRHSFunction()
208 PetscCall((*tsdae->f)(t, tsdae->U, tsdae->V, full->UF, tsdae->fctx)); in TSDAESimple_Full_TSRHSFunction()
228 PetscCall(VecScatterBegin(full->scatterU, UV, tsdae->U, INSERT_VALUES, SCATTER_REVERSE)); in TSDAESimple_Full_TSIFunction()
229 PetscCall(VecScatterEnd(full->scatterU, UV, tsdae->U, INSERT_VALUES, SCATTER_REVERSE)); in TSDAESimple_Full_TSIFunction()
232 PetscCall((*tsdae->F)(t, tsdae->U, tsdae->V, full->VF, tsdae->Fctx)); in TSDAESimple_Full_TSIFunction()
238 PetscErrorCode TSDAESimpleSolve_Full(TSDAESimple tsdae, Vec U) in TSDAESimpleSolve_Full() argument
244 PetscCall(VecScatterBegin(full->scatterU, U, full->UV, INSERT_VALUES, SCATTER_FORWARD)); in TSDAESimpleSolve_Full()
245 PetscCall(VecScatterEnd(full->scatterU, U, full->UV, INSERT_VALUES, SCATTER_FORWARD)); in TSDAESimpleSolve_Full()
247 PetscCall(VecScatterBegin(full->scatterU, full->UV, U, INSERT_VALUES, SCATTER_REVERSE)); in TSDAESimpleSolve_Full()
248 PetscCall(VecScatterEnd(full->scatterU, full->UV, U, INSERT_VALUES, SCATTER_REVERSE)); in TSDAESimpleSolve_Full()
295 PetscCall(VecDuplicate(tsdae->U, &full->UF)); in TSDAESimpleSetUp_Full()
298 PetscCall(VecGetLocalSize(tsdae->U, &nU)); in TSDAESimpleSetUp_Full()
305 PetscCall(VecScatterCreate(tsdae->U, NULL, tsrhs, is, &full->scatterU)); in TSDAESimpleSetUp_Full()
323 PetscErrorCode f(PetscReal t, Vec U, Vec V, Vec F, PetscCtx ctx) in f() argument
326 PetscCall(VecWAXPY(F, 1.0, U, V)); in f()
334 PetscErrorCode F(PetscReal t, Vec U, Vec V, Vec F, PetscCtx ctx) in F() argument
337 PetscCall(VecWAXPY(F, -1.0, V, U)); in F()
344 Vec U, V, Usolution; in main() local
350 PetscCall(VecCreateFromOptions(PETSC_COMM_WORLD, NULL, 1, 1, PETSC_DETERMINE, &U)); in main()
352 PetscCall(TSDAESimpleSetRHSFunction(tsdae, U, f, NULL)); in main()
355 PetscCall(VecDuplicate(U, &Usolution)); in main()
365 PetscCall(VecDestroy(&U)); in main()