On Wed, Oct 23, 2013 at 5:39 PM, Jed Brown <[email protected]> wrote:
> Christophe Ortiz <[email protected]> writes: > > >> Does a shorter time step fix the oscillations? > > > > > > Hi Jed, > > > > Thanks for the prompt reply. > > > > No, it did not in this case. However, I noticed for "smoother" cases that > > max timestep matters. I try to fix it to finaltime/100 to avoid too large > > timesteps. I also use -ts_adapt_basic_clip 0.1,1.1 to avoid large > timesteps. > > This just slows the rate of increasing time step. > > >> Is this with > >> -ts_arkimex_type 1bee or something else? > >> > > > > It occurs with 1bee, a2 or arkimex 3. > > Stick with 1bee until we understand better. > Ok. > > >> Can you try -ts_arkimex_fully_implicit and add -snes_mf_operator if > >> necessary to get SNES to converge? > > > > > > > > I tried -ts_arkimex_fully_implicit and it gave a wrong result. As if > there > > was no diffusion. Seems there is an artefact with fullyimplicit option. > > That does not sound right. Can you send a reproducible test case (best > as a patch to PETSc)? > What do you mean by patch to PETSc ? How do I do that ? > > > With -snes_mf_operator I got an error message: > > [0]PETSC ERROR: No support for this operation for this object type! > > [0]PETSC ERROR: Mat type mffd! > > ALWAYS, ALWAYS, ALWAYS send the ENTIRE error message! > > (Sorry about shouting, but I have to type this many times per day. > Truncating error messages kills kittens!) > Sorry about that. Here is the entire error message: [0]PETSC ERROR: No support for this operation for this object type! [0]PETSC ERROR: Mat type mffd! [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: Petsc Release Version 3.4.1, Jun, 10, 2013 [0]PETSC ERROR: See docs/changes/index.html for recent updates. [0]PETSC ERROR: See docs/faq.html for hints about trouble shooting. [0]PETSC ERROR: See docs/index.html for manual pages. [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: ./diffusion_c on a ifort-icc-nompi-double-debug named mazinger.ciemat.es by u5751 Wed Oct 23 12:46:04 2013 [0]PETSC ERROR: Libraries linked from /home/u5751/petsc-3.4.1/ifort-icc-nompi-double-debug/lib [0]PETSC ERROR: Configure run at Mon Oct 14 05:43:50 2013 [0]PETSC ERROR: Configure options --with-mpi=0 --with-fc=ifort --with-cc=icc --with-debugging=1 --with-scalar-type=real --with-precision=double --with-blas-lapack-dir=/opt/intel/mkl [0]PETSC ERROR: ------------------------------------------------------------------------ [0]PETSC ERROR: MatZeroEntries() line 5189 in src/mat/interface/matrix.c [0]PETSC ERROR: FormIJacobian() line 689 in src/ts/examples/tutorials/diffusion.c [0]PETSC ERROR: TSComputeIJacobian() line 718 in src/ts/interface/ts.c [0]PETSC ERROR: SNESTSFormJacobian_ARKIMEX() line 995 in src/ts/impls/arkimex/arkimex.c [0]PETSC ERROR: SNESTSFormJacobian() line 3397 in src/ts/interface/ts.c [0]PETSC ERROR: SNESComputeJacobian() line 2152 in src/snes/interface/snes.c [0]PETSC ERROR: SNESSolve_NEWTONLS() line 218 in src/snes/impls/ls/ls.c [0]PETSC ERROR: SNESSolve() line 3636 in src/snes/interface/snes.c [0]PETSC ERROR: TSStep_ARKIMEX() line 765 in src/ts/impls/arkimex/arkimex.c [0]PETSC ERROR: TSStep() line 2458 in src/ts/interface/ts.c [0]PETSC ERROR: TSSolve() line 2583 in src/ts/interface/ts.c [0]PETSC ERROR: main() line 457 in src/ts/examples/tutorials/diffusion.c ./compile_diffusion: line 17: 20506 Aborted ./diffusion_c -ts_adapt_monitor -ts_adapt_basic_clip 0.1,1.1 -draw_pause -2 -ts_arkimex_type 1bee -ts_max_snes_failures -1 -snes_type newtonls -snes_linesearch_type bt -snes_mf_operator > > >> (I'm assuming you have used an IMEX > >> formulation here, but perhaps you already use fully implicit?) > >> > > > > I put everything under IFunction and IJacobian. This part is not clear to > > me actually. I understand that in IMEX methods, the LHS is solved > > implicitely and the RHS explicitely. What happens when I use an IMEX > method > > with no RHS, everything in the LHS ? Is there any explicit stage ? > > No, if the RHS is empty, it should reduce to an implicit method. > > > Actually, I could solve the problem by adding mesh points. Since I start > > from steep gaussian distributions with large peak values, maybe there > was a > > problem with large gradients. > > > > BTW, is it possible to have adaptive mesh in 1D with PETSc ? I am > thinking > > of steep profiles that evolve and that require a fine mesh at the > beginning. > > You can do moving meshes (r-adaptivity) by writing coordinates as a > coupled system. Or you can create a new grid and interpolate. You can > use DMRefine and DMCoarsen. > Great. I will check this out. Christophe
