dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #00294
Reminder: class Event
Just a reminder: I think we should try to use the class Event more often.
In cases where one wants to print a warning or diagnostic message, but
only once or a limited number of times, just declare an event:
Event event;
Then initialize it in the constructor with an appropriate string and
then do event() to print the message. The message will be printed only
once (or a specified number of times).
For example, the ODE solver uses events to display warnings when it
needs to compute a Jacobian numerically. The function that computes
the Jacobian just calls the event and the first time it does, the user
will get a reminder that the solver will work more efficiently if the
Jacobian is supplied by the user.
/Anders