Re: [petsc-users] [EXT] Re: TSAdapt minimum step and exact final time

2022-04-21 Thread Emil Constantinescu via petsc-users
On 4/21/22 8:06 AM, Barry Smith wrote: On Apr 21, 2022, at 8:52 AM, Phlipot, Greg wrote: I wish I could give you an definitive reason why, but I can't. Before TS gets into this situtation where it needs to take a tiny time step, TS takes time steps of ~1.0, and the shift in TSSetIJacobian

Re: [petsc-users] Solution "jumps" after setting timestep

2018-12-13 Thread Emil Constantinescu via petsc-users
Okay, so you start your integration with "TSSetMaxTime and then call TSSolve (TSSetExactFinalTime is set to TS_EXACTFINALTIME_MATCHSTEP)" Then after it's done at t=2 you tell TS that TSSetTimeStep(ts,1e-3) and call TSSolve again? Emil On 12/13/18 11:36 AM, Zhang, Hong via petsc-users wrote:

Re: [petsc-users] Solution "jumps" after setting timestep

2018-12-13 Thread Emil Constantinescu via petsc-users
On 12/13/18 9:48 AM, Moritz.Huck--- via petsc-users wrote: > If I set the next target time (in tssolve) to be tlast+1e-3 it looks > like this: How do you set the "next target time"? Are you using TSSetTimestep at some discrete time points? If not then the adaptor will adjust it or even ignore

Re: [petsc-users] TAO: Finite Difference vs Continuous Adjoint gradient issues

2017-11-22 Thread Emil Constantinescu
On 11/22/17 3:48 AM, Julian Andrej wrote: Hello, we prepared a small example which computes the gradient via the continuous adjoint method of a heating problem with a cost functional. We implemented the text book example and tested the gradient via a Taylor Remainder (which works fine). Now

Re: [petsc-users] Call KSP routine before each timestep

2017-05-01 Thread Emil Constantinescu
On 5/1/17 4:42 PM, Matthew Knepley wrote: On Mon, May 1, 2017 at 4:27 PM, Scott Dossa > wrote: Hi All, Matt: Thank you! Using the application context is a good approach to pass the vector information. Can you also direct me to which

Re: [petsc-users] default TS RK

2017-02-28 Thread Emil Constantinescu
We changed it a couple of years ago. Emil On 2/28/17 9:57 AM, Gideon Simpson wrote: I just wanted to check, has the default RK solver (when called with -ts_type rk) always been 3rd order (RK3)? -gideon

Re: [petsc-users] TS question 1: how to stop explicit methods because they do not use SNES(VI)?

2017-02-14 Thread Emil Constantinescu
there is a lot going on in the implicit solve, besides just handling stiffness. On Tue, Feb 14, 2017 at 6:20 PM, Barry Smith <bsm...@mcs.anl.gov <mailto:bsm...@mcs.anl.gov>> wrote: > On Feb 14, 2017, at 8:56 PM, Emil Constantinescu <emcon...@mcs.anl.gov <mailto:emcon...@mcs.

Re: [petsc-users] TS question 1: how to stop explicit methods because they do not use SNES(VI)?

2017-02-14 Thread Emil Constantinescu
On 2/14/17 4:10 PM, Barry Smith wrote: Ok, you don't recompile but forcing that into user code is still disgusting. With my api the user code is TSSetRHSFunction(ts,NULL,RHSFunction,[0]); TSSetLHSFunction(ts,NULL,LHSFunction,[0]); TSSetRHSJacobian(ts,Jac,Jac,RHSJacobian,[0]);

Re: [petsc-users] TS question 1: how to stop explicit methods because they do not use SNES(VI)?

2017-02-14 Thread Emil Constantinescu
On 2/14/17 3:04 PM, Barry Smith wrote: On Feb 14, 2017, at 2:55 PM, Emil Constantinescu <emcon...@mcs.anl.gov> wrote: On 2/14/17 2:33 PM, Zhang, Hong wrote: I think many users (including me) would like to start with academic examples, e.g. u_t=f(u)+g(u), when they try to learn PE

Re: [petsc-users] TS question 1: how to stop explicit methods because they do not use SNES(VI)?

2017-02-14 Thread Emil Constantinescu
On 2/14/17 2:33 PM, Zhang, Hong wrote: I think many users (including me) would like to start with academic examples, e.g. u_t=f(u)+g(u), when they try to learn PETSc TS solvers. This simple form allows for easy switch between all kinds of different integration methods. Right, but then you

Re: [petsc-users] TS question 1: how to stop explicit methods because they do not use SNES(VI)?

2017-02-14 Thread Emil Constantinescu
On 2/14/17 6:53 AM, Matthew Knepley wrote: Explicit methods use only RHSFunction and ignore IFunction, so in your case, if you change TS type to rk and ssp at run time, you are actually solving u_t = G(t,u). If RHSFunction is not provided, PETSc will assume the RHS is zero

Re: [petsc-users] projection methods in TS

2017-02-04 Thread Emil Constantinescu
On 2/4/17 11:00 AM, Matthew Knepley wrote: On Sat, Feb 4, 2017 at 9:47 AM, Gideon Simpson > wrote: Would setting it up as a DAE in petsc be algorithmically euivalent to a projected method (i.e., step of standard RK followed by

Re: [petsc-users] Using TS

2016-03-15 Thread Emil Constantinescu
On 3/15/16 11:15 AM, Hong Zhang wrote: By the way, is the number of oil barrels represented in integer or real values? I assume they refer to the unit of measure (1 barrel = about 160 liters) not the actual container, so we should be good there. Emil

Re: [petsc-users] Using TS

2016-03-15 Thread Emil Constantinescu
initial conditions and optimization for parameters. Hong is the main driver behind the adjoint implementation and can help on much shorter notice than I can. Hope this helps, Emil Many thanks, Max On Mar 13, 2016, at 4:02 AM, Emil Constantinescu <emcon...@mcs.anl.gov <mailto:emco

Re: [petsc-users] Using TS

2016-03-12 Thread Emil Constantinescu
On 3/12/16 8:37 PM, Matthew Knepley wrote: On Sat, Mar 12, 2016 at 8:34 PM, Emil Constantinescu <emcon...@mcs.anl.gov <mailto:emcon...@mcs.anl.gov>> wrote: I also find it useful to go through one of the simple examples available for TS: http://www.mcs.anl.gov/petsc/p

Re: [petsc-users] Using TS

2016-03-12 Thread Emil Constantinescu
I also find it useful to go through one of the simple examples available for TS: http://www.mcs.anl.gov/petsc/petsc-current/src/ts/examples/tutorials/index.html (ex8 may be a good start). As Barry suggested, you need to implement IFunction and IJacobian. The argument "u" is S_o, S_w, and p

Re: [petsc-users] TS and snes_grid_sequence

2016-02-10 Thread Emil Constantinescu
Francesco, It could be a problem of ODE stability, error control, nonlinear solver (cold start), etc. In addition to what's been recommended, I would suggest trying a different integrator with better properties: try -ts_type arkimex -ts_arkimex_type 2e -ts_arkimex_fully_implicit In case

Re: [petsc-users] Is it still worth switching to PETSc if I can't write a Jacobian for my problem?

2015-12-10 Thread Emil Constantinescu
Brian, Can you take a look at what odeint returns? Specifically, at: ‘mused’ a vector of method indicators for each successful time step: 1: adams (nonstiff), 2: bdf (stiff) I suspect it's using Adams all the way, which means it's doesn't need a Jacobian. Emil On 12/10/15 1:51 PM,

Re: [petsc-users] Is it still worth switching to PETSc if I can't write a Jacobian for my problem?

2015-12-10 Thread Emil Constantinescu
don't know right now. Kind regards, Brian On Thu, Dec 10, 2015 at 12:55 PM, Emil Constantinescu <emcon...@mcs.anl.gov <mailto:emcon...@mcs.anl.gov>> wrote: Brian, Can you take a look at what odeint returns? Specifically, at: ‘mused’ a vector of method indicato

Re: [petsc-users] arkimex rejecting all dt in petsc 3.6.0

2015-06-18 Thread Emil Constantinescu
No, I'm not sure if it should. It belongs to the same category as problem_type == TS_LINEAR / == TS_NONLINEAR. Emil On 6/18/15 11:15 AM, Abhyankar, Shrirang G. wrote: Can the DAE equation type be supplied via a run-time option? Shri -Original Message- From: barry smith

Re: [petsc-users] arkimex rejecting all dt in petsc 3.6.0

2015-06-18 Thread Emil Constantinescu
-Stokes equations, full implicit and non-linear. I also noticed two things: In the 3.6.0 output, ts_monitor skips timestep #1. If I use the equation type in 3.5.4, I get segmentation fault. I attached the outputs. On Thu, Jun 18, 2015 at 1:24 PM, Emil Constantinescu emcon...@mcs.anl.gov

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-04-16 Thread Emil Constantinescu
On 4/16/15 2:13 AM, Lisandro Dalcin wrote: On 16 April 2015 at 04:51, Emil Constantinescu emcon...@mcs.anl.gov wrote: On 3/24/15 5:31 AM, Lisandro Dalcin wrote: Emil, is there any chance you can try my code with your problem? I really need some feedback to push this to PETSc, otherwise Hi

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-04-16 Thread Emil Constantinescu
On 4/16/15 9:25 AM, Lisandro Dalcin wrote: On 16 April 2015 at 16:44, Emil Constantinescu emcon...@mcs.anl.gov wrote: On 4/16/15 2:13 AM, Lisandro Dalcin wrote: On 16 April 2015 at 04:51, Emil Constantinescu emcon...@mcs.anl.gov wrote: On 3/24/15 5:31 AM, Lisandro Dalcin wrote: Emil

Re: [petsc-users] Time integrated adjoints

2015-04-15 Thread Emil Constantinescu
On 4/15/15 12:37 PM, Barry Smith wrote: Hong and Emil, You will need to answer this. On Apr 15, 2015, at 6:24 AM, Dave Makhija makhi...@colorado.edu wrote: Barry, Is the method exact if I have a time dependent mass matrix (dF/dU_t changes each time step)? I'm not sure it's

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-04-15 Thread Emil Constantinescu
On 3/24/15 5:31 AM, Lisandro Dalcin wrote: Emil, is there any chance you can try my code with your problem? I really need some feedback to push this to PETSc, otherwise Hi Lisandro - we checked ts_alpha_adapt and we tested it on a small system (mildly stiff van der Pol ODE). I enclosed a

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-31 Thread Emil Constantinescu
, especially if it was a simpler fix. I don’t have enough of an understanding of the internals of PETSc though, if it depends on the compiler flags. Good luck! -Andrew — Andrew On Mon, Mar 30, 2015 at 7:23 PM, Emil Constantinescu emcon...@mcs.anl.gov mailto:emcon...@mcs.anl.gov wrote: Hi Andrew

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-30 Thread Emil Constantinescu
Hi Andrew, Sorry for the delay; things are going slower with me over the spring break but we are working on it. The problem that you see may not be related to the integrator, which runs well (we get expected convergence rates and good results) for other problems, in particular, for problems

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-30 Thread Emil Constantinescu
flags. Good luck! -Andrew — Andrew On Mon, Mar 30, 2015 at 7:23 PM, Emil Constantinescu emcon...@mcs.anl.gov mailto:emcon...@mcs.anl.gov wrote: Hi Andrew, Sorry for the delay; things are going slower with me over the spring break but we are working on it. The problem that you

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-24 Thread Emil Constantinescu
On 3/24/15 5:31 AM, Lisandro Dalcin wrote: On 24 March 2015 at 06:15, Emil Constantinescu emcon...@mcs.anl.gov wrote: On 3/23/15 4:44 AM, Lisandro Dalcin wrote: Lisandro, that's a neat idea. If you are basically moving in the multistep realm for error estimation with one-step methods, I'm

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-23 Thread Emil Constantinescu
On 3/23/15 5:34 PM, Jed Brown wrote: Lisandro Dalcin dalc...@gmail.com writes: On 21 March 2015 at 17:32, Emil Constantinescu emcon...@mcs.anl.gov wrote: When -ts_theta_adapt is used, then it detects the instability as an error and reduces the step by a lot! wlte=1.24e+03 which means

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-23 Thread Emil Constantinescu
On 3/23/15 4:44 AM, Lisandro Dalcin wrote: I have an alternative implementation of adaptivity in PetIGA in custom Generalized-Alpha implementation. The adaptivity is not based on embed-RK like for TSCN, but in storing a solution vector from the previous step then estimate the LTE with backward

Re: [petsc-users] TimeStepper norm problems. EMIL Please read this

2015-03-22 Thread Emil Constantinescu
Hi Andrew, I can reproduce this issue and I agree that there is something wrong. I'll look into it. Emil On 3/22/15 3:29 PM, Andrew Spott wrote: So, I’m now even more confused. I’m attempting to solve an equation that looks like this: u’ = -i(H0 + e(t) D) u Where H0 is a purely real