TSSetFunctionDomainError#

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

Synopsis#

Input Parameters#

Calling sequence of func#

PetscErrorCode func(TS ts,PetscReal time,Vec state,PetscBool reject)
  • ts - the TS context

  • time - the current time (of the stage)

  • state - the state to check if it is valid

  • reject - (output parameter) PETSC_FALSE if the state is acceptable, PETSC_TRUE if not 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 Note#

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.html


Edit on GitLab

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