[petsc-users] Problems with TS

Matthew Knepley knepley at gmail.com
Tue Jan 28 12:52:48 CST 2014


On Tue, Jan 28, 2014 at 12:49 PM, Konstantinos Kontzialis <
ckontzialis at lycos.com> wrote:

> Dear all,
>
>   I'm trying to solve the magnetic induction equation on a 3D finite
> element mesh.
>   I'm coding the following:
>
>       call TSCreate (petsc_comm_world, ts_mhd, ierpetsc)
>
>       call TSSetIFunction ( ts_mhd, res_mhd, residual_mag,
>      @  PETSC_NULL_OBJECT, ierpetsc )
>
>       call TSSetSolution( ts_mhd, Bmagnetic_pet, ierpetsc )
>
>       call TSGetSNES (ts_mhd, snes_mhd, ierpetsc )
>
>       call MatCreateSNESMF ( snes_mhd, J_mf, ierpetsc )
>
>       call TSSetMaxSNESFailures ( ts_mhd,-1,ierpetsc )
>
>       call SNESSetJacobian ( snes_mhd, J_mf, M_mhd,
>      @ PETSC_NULL_FUNCTION, PETSC_NULL_OBJECT, ierpetsc )
>
>       call TSSetFromOptions ( ts_mhd, ierpetsc )
>
>       call TSSolve ( ts_mhd, PETSC_NULL_OBJECT, ierpetsc)
>
>    and I run with the following options:
>
>    -ts_dt 1.0e-2
>    -ts_type beuler
>    -ts_final_time 1.0
>    -ts_view
>
>     But, when my code reaches TSSolve it gives an error:
>
>     ERROR: [0 mhdsol] Segmentation fault - (Invalid memory reference)
>
>     Any ideas or suggestions on what to do?
>

Run with valgrind.

  Matt


>     Regards,
>
>     Kostas
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140128/665db435/attachment.html>


More information about the petsc-users mailing list