petsc-3.7.1 2016-05-15
Report Typos and Errors

TSSetIFunction

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

Synopsis

#include "petscts.h"  
PetscErrorCode  TSSetIFunction(TS ts,Vec r,TSIFunction f,void *ctx)
Logically Collective on TS Many br

Input Parameters

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

Calling sequence of f

 f(TS ts,PetscReal t,Vec u,Vec u_t,Vec F,ctx);

t - time at step/stage being solved Many br
u - state vector Many br
u_t - time derivative of state vector Many br
F - function vector Many br
ctx - [optional] user-defined context for matrix evaluation routine Many br

Important

The user MUST call either this routine or TSSetRHSFunction() to define the ODE. When solving DAEs you must use this function. Many br

Many br

Keywords

TS, timestep, set, DAE, Jacobian

See Also

TSSetRHSJacobian(), TSSetRHSFunction(), TSSetIJacobian()

Level:beginner
Location:
src/ts/interface/ts.c
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages

Examples

src/ts/examples/tutorials/ex8.c.html
src/ts/examples/tutorials/ex10.c.html
src/ts/examples/tutorials/ex14.c.html
src/ts/examples/tutorials/ex15.c.html
src/ts/examples/tutorials/ex16.c.html
src/ts/examples/tutorials/ex17.c.html
src/ts/examples/tutorials/ex19.c.html
src/ts/examples/tutorials/ex20.c.html
src/ts/examples/tutorials/ex22.c.html
src/ts/examples/tutorials/ex24.c.html
src/ts/examples/tutorials/ex25.c.html