Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Matthew Knepley
On Mon, Feb 1, 2016 at 6:22 PM, Barry Smith wrote: > > > On Feb 1, 2016, at 4:45 PM, Xiangdong wrote: > > > > > > > > On Mon, Feb 1, 2016 at 5:26 PM, Barry Smith wrote: > > > > > On Feb 1, 2016, at 2:16 PM, Barry Smith wrote: > > > > > > > > >> On Feb 1, 2016, at 1:46 PM, Xiangdong wrote: > >

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Barry Smith
> On Feb 1, 2016, at 4:45 PM, Xiangdong wrote: > > > > On Mon, Feb 1, 2016 at 5:26 PM, Barry Smith wrote: > > > On Feb 1, 2016, at 2:16 PM, Barry Smith wrote: > > > > > >> On Feb 1, 2016, at 1:46 PM, Xiangdong wrote: > >> > >> Hello everyone, > >> > >> I have a question on snes with line s

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Jed Brown
Xiangdong writes: > Actually my problem is not that ill-conditioned. Here is my situation. Let > us say at time step n the snes_linesearch_basic failed. I have at least two > options now: i) cut the dt immediately, ii) switch to snes_linesearch_bt > with the same dt. Sometimes, switching to a diff

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
On Mon, Feb 1, 2016 at 5:26 PM, Barry Smith wrote: > > > On Feb 1, 2016, at 2:16 PM, Barry Smith wrote: > > > > > >> On Feb 1, 2016, at 1:46 PM, Xiangdong wrote: > >> > >> Hello everyone, > >> > >> I have a question on snes with line search. Under what circumstance, > applying the (globalized)

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Jed Brown
Xiangdong writes: > It seems that TSAdaptChoose_Basic only uses the local truncation error to > predict the next time step. Do you also include the number of snes > iterations in computing the next time step in some adapt option? TSAdaptChoose_Basic doesn't use the number of iterations (you can

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
It seems that TSAdaptChoose_Basic only uses the local truncation error to predict the next time step. Do you also include the number of snes iterations in computing the next time step in some adapt option? Thanks. Xiangdong On Mon, Feb 1, 2016 at 4:52 PM, Jed Brown wrote: > Xiangdong writes: >

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Barry Smith
> On Feb 1, 2016, at 2:16 PM, Barry Smith wrote: > > >> On Feb 1, 2016, at 1:46 PM, Xiangdong wrote: >> >> Hello everyone, >> >> I have a question on snes with line search. Under what circumstance, >> applying the (globalized) line search can perform WORSE than without line >> search (i.e.

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Jed Brown
Xiangdong writes: > If I want to know how petsc computes the dt_next based on dt_current, > namely, dt_next = dt_current*func(snesits, etc), which function/file should > I look into? Check out TSAdapt, especially TSAdaptChoose_Basic and TSAdaptCheckStage. signature.asc Description: PGP signatur

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
I did not use the TS, but I did adjust my time step based on the number of snes iterations as well as the solution changes in the current time step. We want to minimize the time cuts (failed snes) as well as not using too small dt. If I want to know how petsc computes the dt_next based on dt_curre

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Barry Smith
> On Feb 1, 2016, at 1:46 PM, Xiangdong wrote: > > Hello everyone, > > I have a question on snes with line search. Under what circumstance, applying > the (globalized) line search can perform WORSE than without line search (i.e. > full newton step ls type basic)? > > When I apply snes with

Re: [petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Matthew Knepley
On Mon, Feb 1, 2016 at 1:46 PM, Xiangdong wrote: > Hello everyone, > > I have a question on snes with line search. Under what circumstance, > applying the (globalized) line search can perform WORSE than without line > search (i.e. full newton step ls type basic)? > > When I apply snes with my pro

[petsc-users] snes linesearch bt vs basic?

2016-02-01 Thread Xiangdong
Hello everyone, I have a question on snes with line search. Under what circumstance, applying the (globalized) line search can perform WORSE than without line search (i.e. full newton step ls type basic)? When I apply snes with my problem, I found that at some time steps, snes diverges with lines