Jed, Today I fought for several hours against a strange behaviour occuring when reusing a TS for multiple solves. You can reproduce it by applying the attached patch.
The issue is with DMCoarsenHookAdd called in SNESSetUpMatrices, and git blames you ;-). Every time you call TSGetRHSMats_Private, TSGetIJacobian gets called, which in turns calls SNESSetUpMatrices, that adds the entry in the linked list of hooks via DMCoarsenHookAdd. This causes a considerable slow down when using the RHS interface with an implicit solver, as you can see from running the patched code. can you please take a look? -- Stefano
patch
Description: Binary data
