DMTSSetIFunctionPre#
set a pre-evaluation callback for each local implicit function evaluation. The callback function provided is called at the beginning of TSComputeIFunction() before the function provided with TSSetIFunctionLocal() and DMTSSetBoundaryLocal() is called.
Synopsis#
#include "petscts.h"
PetscErrorCode DMTSSetIFunctionPre(DM dm, PetscErrorCode (*func)(DM dm, PetscReal time, Vec u, Vec u_t, void *ctx), void *ctx)
Logically Collective
Input Parameters#
dm -
DMto associate callback withfunc - function evaluation
ctx - context for function evaluation
Calling sequence of func#
dm - the
DMtime - the current time
u - the global solution
u_t - the global time derivative
ctx - the user context
Notes#
func should perform any setup required before the local implicit function evaluation provided by TSSetIFunctionLocal() can be performed, such as computing auxiliary data via a subsolve. This function is necessary because some setups may require global communication, such as the Poisson solve in the Vlasov-Poisson system, and cannot be embedded in only a local evaluation, yet we want to specify the local callback for the main equations using TSSetIFunctionLocal().
See Also#
TS: Scalable ODE and DAE Solvers, DM, TS, DMTSSetIFunction(), DMTSSetIJacobianLocal()
Level#
intermediate
Location#
Index of all TS routines
Table of Contents for all manual pages
Index of all manual pages