[petsc-users] TS solution

Jed Brown jedbrown at mcs.anl.gov
Mon Nov 7 08:11:56 CST 2011


On Mon, Nov 7, 2011 at 03:00, Konstantinos Kontzialis <ckontzialis at lycos.com
> wrote:

>
>
>    ierr = SNESSetFromOptions(sys.snes);
>    CHKERRQ(ierr);
>
>    ierr = SNESGetKSP(sys.snes, &sys.ksp2);
>    CHKERRQ(ierr);
>
>    ierr = KSPGetPC(sys.ksp2, &sys.pc);
>    CHKERRQ(ierr);
>
>    ierr = KSPSetFromOptions(sys.ksp2);
>    CHKERRQ(ierr);
>
>    ierr = TSSetFromOptions(sys.ts);
>    CHKERRQ(ierr);
>

You can just call TSSetFromOptions, it automatically calls *SetFromOptions
on all the inner solvers.


>
>    ierr = TSSolve(sys.ts, sys.gsv, &sys.con->etime);
>    CHKERRQ(ierr);
>
> and I run with:
>
> mpiexec -n 8 ./hoac cylinder -llf_flux -n_out 5 -end_time 1 -implicit
> -implicit_type 3 -pc_type asm -sub_pc_type ilu -sub_pc_factor_mat_ordering_
> **type rcm 1.0e-8 -gl -sub_ksp_type fgmres -ksp_rtol 1.0e-8
> -sub_pc_factor_levels 2 -dt 1.0e-1 -snes_monitor -ksp_pc_side right
> -snes_converged_reason -ts_type beuler -ksp_converged_reason -ts_view
>
>
>
[...]


> I observe that the solution is not updated. What am I doing wrong?
>

>From the convergence history, your "matrix" might be diagonal. What is the
physical time scale for this problem? Perhaps your base_residual_implicit
is incorrect.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111107/36ba0ccd/attachment.htm>


More information about the petsc-users mailing list