TSSetFunctionDomainError#

Set a function that tests if the current state vector is valid

Synopsis#

#include "petscts.h"  
PetscErrorCode TSSetFunctionDomainError(TS ts, PetscErrorCode (*func)(TS ts, PetscReal time, Vec state, PetscBool *accept))

Input Parameters#

Calling sequence of func#

  • ts - the TS context

  • time - the current time (of the stage)

  • state - the state to check if it is valid

  • accept - (output parameter) PETSC_FALSE if the state is not acceptable, PETSC_TRUE if acceptable

Notes#

If an implicit ODE solver is being used then, in addition to providing this routine, the user’s code should call SNESSetFunctionDomainError() when domain errors occur during function evaluations where the functions are provided by TSSetIFunction() or TSSetRHSFunction(). Use TSGetSNES() to obtain the SNES object

Developer Notes#

The naming of this function is inconsistent with the SNESSetFunctionDomainError() since one takes a function pointer and the other does not.

See Also#

TS: Scalable ODE and DAE Solvers, TSAdaptCheckStage(), TSFunctionDomainError(), SNESSetFunctionDomainError(), TSGetSNES()

Level#

intermediate

Location#

src/ts/interface/ts.c

Examples#

src/ts/tutorials/ex42.c


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