[petsc-users] 2nd order time-stepping in PETSc

Lisandro Dalcin dalcinl at gmail.com
Wed May 26 19:48:56 CDT 2010


On 26 May 2010 18:58, Matthew Knepley <knepley at gmail.com> wrote:
> On Wed, May 26, 2010 at 11:33 PM, Hong Zhang <hzhang at mcs.anl.gov> wrote:
>>
>> Mark:
>>
>> You need convert your equation into 1st order ODEs and use petsc
>> TS method (see examples under ~petsc/src/ts/examples/ ),
>> or use petsc KSP/SNES method with your own time step control.
>>
>> Hong
>>
>> > I am a new user of PETSC and I have a hopefully not too embarassing
>> > question.  I am trying to integrate and timestep the 3D acoustic wave
>> > equation:
>> >
>> > u_tt = ( c2 ) * LAPLACIAN( u )
>> >
>> > Does any of the timestepping operators in PETSc work with a second-order
>> > derivative with the one above?  Normally, I would just expand u_tt as a
>> > finite difference approximation using Leapfrog (or CN or RK ...) and
>> > explicitly solve for the u field at timestep n+1.  However I would like
>> > to
>> > use the vector-matrix formulation in PETSc -my goal is to be able to
>> > solve
>> > the acoustic wave equation explicitly or implicitly (the user would
>> > decide
>> > with a command-line option).
>>
>
> It sounds like you could formulate it to solve for timestep n+1, and then
> the RHS
> would depend on timestep n (which PETSc would give you), and timestep n-1.
> You
> could save t^{n-1} yourself with a custom Monitor and get it in your RHS
> function
> through the user context.
>    Matt
>

What about using TSSet{Pre|Post}Step() ?


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


More information about the petsc-users mailing list