TSDiscGradSetImplicitFormulation#
Set the construction method for IG and its Jacobian from the formulation \(IG(t) = u_t - S(u) \nabla F(u)\) for TSDISCGRAD
Synopsis#
#include "petscts.h"
PetscErrorCode TSDiscGradSetImplicitFormulation(TS ts, PetscErrorCode (*IGfunc)(TS ts, PetscReal time, Vec u, Vec u_t, Vec G, void *ctx), PetscErrorCode (*IGjac)(TS ts, PetscReal time, Vec u, Vec u_t, PetscReal shift, Mat J, Mat Jp, void *ctx))
Not Collective
Input Parameters#
ts - timestepping context
IGfunc - implicit formulation
IGjac - implicit Jacobian
Calling sequence of IGfunc#
ts - the integrator
time - the current time
u - the solution
u_t - the time derivative
G - the LHS of the formulation
ctx - the user context
Calling sequence of IGjac#
ts - the integrator
time - the current time
u - the solution
u_t - the time derivative
shift - the multiplier for the time derivative part
J - the Jacobian of the LHS
Jp - the Jacobian preconditioner of the LHS
ctx - the user context
Note#
This allows the DG formulation to be given in the PETSc style for fully implicit solvers.
See Also#
TS: Scalable ODE and DAE Solvers, TSDISCGRAD, TSDiscGradGetFormulation(), TSDiscGradSetFormulation()
Level#
intermediate
Location#
Implementations#
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages