On Mon, Jul 17, 2023 at 10:55 AM Ilya Fursov <ilya.foursov....@gmail.com> wrote:
> Dear to whom is may concern, > > A while ago I tried to use TS events in my time stepping code, and I found > erroneous behaviour of the event resolution algorithm. For that particular > example it resulted in long series of extremely small time steps. After > examining the TSEvent handler code, I found some places with obvious > errors, but in general it was difficult to figure out exactly what was > going on, and whether there were other errors. > > I decided to try and fix that stuff myself, and my choice was to refactor > the code from scratch. I abandoned the current (in my opinion, obscure) > code design of TSEventHandler, and wrote my own version, however using some > ideas from the original code. The refactoring mostly affected the > algorithmic part in tsevent.c source file. The original > constructors/destructors, setters/getters have almost not changed. Also, > some tiny changes occurred in ts.c and tsadapt.c, where interaction with > events took place. > > I've made a number of tests, ensuring the new code runs smoothly. These > tests also revealed the current/old petsc code results in lots of errors. I > didn't take notes on the exact numbers, but from my impression, the old > code failed in 70%-90% of my tests. > > So, I would like to contribute to the project what I've done. Well, I've > never done such thing before, I hope the process goes smoothly. > I've read the instructions on submitting the code, and one thing I wanted > to ask - > Do I need to start a feature branch from "release" integration branch? > No, you can start from main. This is what we do for contributions like this that are not straight bugfixes. > On one hand, I only did bug fixing. On the other hand, I've replaced one > public API function (plus a runtime option), albeit a very small one, which > didn't work well with the logic of the new code. > > Please advise if there might be any other things to consider while > submitting the code. > Once you open the MR, we can review. Thanks, Matt > Best Regards, > Ilya > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>