cpf_register_event

cpf_register_event(cpf_events, name, fcn, tol, locate)

cpf_register_event() - Register event functions.

CPF_EVENTS = CPF_REGISTER_EVENT(CPF_EVENTS, NAME, FCN, TOL, LOCATE)

Registers a CPF event function to be called by RUNCPF.

Inputs:
    CPF_EVENTS : struct containing info about registered CPF event fcns
    NAME : string containing event name
    FCN : string containing name of event function, returning numerical
          scalar or vector value that changes sign at location of the event
    TOL : scalar or vector of same dimension as event function return value
          of tolerance for detecting the event, i.e. abs(val) <= tol
    LOCATE : flag indicating whether the event requests a rollback step
             to locate the event function zero

Outputs:
    CPF_EVENTS : updated struct containing info about registered CPF event fcns