Re: [petsc-users] Setting a custom predictor in the generalized-alpha time stepper

2023-08-04 Thread Matthew Knepley
If you want to make a PR with your hack, we can help build out the infrastructure for what Jed is recommending. Thanks, Matt On Fri, Aug 4, 2023 at 2:56 PM Jed Brown wrote: > Yeah, we'd like the implementation to stay in alpha2.c. There could be a > new interface

Re: [petsc-users] Setting a custom predictor in the generalized-alpha time stepper

2023-08-04 Thread Jed Brown
Yeah, we'd like the implementation to stay in alpha2.c. There could be a new interface TSAlpha2SetPredictorType (with -ts_alpha2_predictor_type [none,same_velocity,...]) or TSAlpha2SetPredictorFunction. David Kamensky writes: > Hi Jed, > > The current workaround I'm using is very minimal and

Re: [petsc-users] Setting a custom predictor in the generalized-alpha time stepper

2023-08-04 Thread David Kamensky
Hi Jed, The current workaround I'm using is very minimal and basically just moves the definition of `TS_Alpha` from `alpha2.c` up to `petsc/private/tsimpl.h` (and renames it to avoid a conflict with `TS_Alpha` in `alpha1.c`), but I gather that we're really still not "supposed to" include that

Re: [petsc-users] Setting a custom predictor in the generalized-alpha time stepper

2023-08-04 Thread Jed Brown
Some other TS implementations have a concept of extrapolation as an initial guess. Such method-specific initial guesses sound like they fit that pattern and would be welcome to be included in alpha2.c. Would you be willing to make a merge request to bring your work upstream? David Kamensky

Re: [petsc-users] Setting a custom predictor in the generalized-alpha time stepper

2023-08-04 Thread David Kamensky
Hi Jed, What I'm trying to compute is basically a standard same-velocity or same-acceleration predictor (although slightly more complicated, since I'm restricting it to a sub-system). I hadn't looked into `SNESSetComputeInitialGuess` yet, although one difficulty is that it would need access to

Re: [petsc-users] Setting a custom predictor in the generalized-alpha time stepper

2023-08-04 Thread Jed Brown
I think you can use TSGetSNES() and SNESSetComputeInitialGuess() to modify the initial guess for SNES. Would that serve your needs? Is there anything else you can say about how you'd like to compute this initial guess? Is there a paper or something? David Kamensky writes: > Hi, > > My