[petsc-dev] Fwd: [petsc-maint #70675] update of the timestep in theta method

Lisandro Dalcin dalcinl at gmail.com
Mon Apr 18 18:12:21 CDT 2011


On 18 April 2011 19:35, Jed Brown <jed at 59a2.org> wrote:
> On Tue, Apr 19, 2011 at 00:33, Jeremy Riousset <riousset at gatech.edu> wrote:
>>
>> n order, I call
>> ierr =
>> PetscOptionsGetReal(PETSC_NULL,"-ts_dt",&user.dt,PETSC_NULL);CHKERRQ(ierr);
>
> TS gets this option itself, inside TSSetFromOptions().

You can use TSALPHA. You can set a callback with TSAlphaSetAdapt(),
then you can control the time step and even accept/reject steps. With
default parameters, ALPHA is equivalent to THETA. However, it costs a
bit more because of some extra Vec operations. We should really extend
this API to many TS implementations in order to support simple time
step adaptativity.


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169



More information about the petsc-dev mailing list