petsc-3.7.7 2017-09-25
Report Typos and Errors


Set the function to compute F(t,U,U_t,U_tt) where F = 0 is the DAE to be solved.


#include "petscts.h"  
PetscErrorCode TSSetI2Function(TS ts,Vec F,TSI2Function fun,void *ctx)
Logically Collective on TS

Input Parameters

ts - the TS context obtained from TSCreate()
F - vector to hold the residual (or NULL to have it created internally)
fun - the function evaluation routine
ctx - user-defined context for private data for the function evaluation routine (may be NULL)

Calling sequence of fun

 fun(TS ts,PetscReal t,Vec U,Vec U_t,Vec U_tt,Vec F,ctx);

t - time at step/stage being solved
U - state vector
U_t - time derivative of state vector
U_tt - second time derivative of state vector
F - function vector
ctx - [optional] user-defined context for matrix evaluation routine (may be NULL)


TS, timestep, set, ODE, DAE, Function

See Also


Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages