[petsc-users] Suggestions for code with dof >> 1 ?

Christophe Ortiz christophe.ortiz at ciemat.es
Wed Oct 16 09:10:43 CDT 2013


On Wed, Oct 16, 2013 at 3:36 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:

> Christophe Ortiz <christophe.ortiz at ciemat.es> writes:
> > I found where is the problem. I had
> > set TSARKIMEXSetFullyImplicit(ts,PETSC_TRUE);
> > I found it produces wrong solutions, either with ARKIMEX3, 1BEE or A2.
> > Solution becomes negative. Without this option, all ARKIMEX types work
> very
> > well and very fast.
>
> I'm glad they work as IMEX methods (please check that the solutions are
> correct), but I would like to find out why they are not working in fully
> implicit mode.  Is your problem similar to ex25?


Yes. The only difference is that I put everything (diffusion and reaction
terms) under IFunction and IJacobian.

My system is

u_t - alpha.u_xx + k.u.v = 0
v_t - beta.v_xx + k.u.v = 0

with Dirichlet boundary conditions
u(x=0,t) = u(x=L,t) = cste
v(x=0,t) = v(x=L,t) = cste

 (If I remember
> correctly, that example uses a DAE formulation for boundary conditions
> and thus has trouble with some methods with explicit stages.  There may
> be more going on.)
>

Now you say it, I'm having some troubles. After checking that it worked
very well with only diffusion terms with ARKIMEX, I introduced the reaction
term. With ARKIMEX 1BEE/A2, it goes very fast up to t=0.27 s, then, steps
start being rejected and then it goes very slowly, with small timesteps.
See output below.
Do you think it is due to the fact that I use IFunction to define boundary
conditions, which produces troubles with ARKIMEX methods ?
What would be the solution ?

Christophe

TSAdapt 'basic': step 156 accepted t=0.112524   + 2.250e-02 wlte=3.07e-05
family='arkimex' scheme=0:'1bee' dt=2.701e-02
      TSAdapt 'basic': step 157 accepted t=0.135029   + 2.701e-02
wlte=5.03e-05 family='arkimex' scheme=0:'1bee' dt=3.241e-02
      TSAdapt 'basic': step 158 accepted t=0.162034   + 3.241e-02
wlte=8.36e-05 family='arkimex' scheme=0:'1bee' dt=3.889e-02
      TSAdapt 'basic': step 159 accepted t=0.194441   + 3.889e-02
wlte=0.000141 family='arkimex' scheme=0:'1bee' dt=4.667e-02
      TSAdapt 'basic': step 160 accepted t=0.233329   + 4.667e-02
wlte=0.000244 family='arkimex' scheme=0:'1bee' dt=5.000e-02
      TSAdapt 'basic': step 161 stage rejected t=0.279995   + 5.000e-02
retrying with dt=1.250e-02
      TSAdapt 'basic': step 161 stage rejected t=0.279995   + 1.250e-02
retrying with dt=3.125e-03
      TSAdapt 'basic': step 161 stage rejected t=0.279995   + 3.125e-03
retrying with dt=7.813e-04
      TSAdapt 'basic': step 161 stage rejected t=0.279995   + 7.813e-04
retrying with dt=1.953e-04
      TSAdapt 'basic': step 161 stage rejected t=0.279995   + 1.953e-04
retrying with dt=4.883e-05
      TSAdapt 'basic': step 161 stage rejected t=0.279995   + 4.883e-05
retrying with dt=1.221e-05
      TSAdapt 'basic': step 161 stage rejected t=0.279995   + 1.221e-05
retrying with dt=3.052e-06
      TSAdapt 'basic': step 161 accepted t=0.279995   + 3.052e-06
wlte=2.58e-06 family='arkimex' scheme=0:'1bee' dt=3.662e-06
      TSAdapt 'basic': step 162 accepted t=0.279998   + 3.662e-06
wlte=3.72e-06 family='arkimex' scheme=0:'1bee' dt=4.395e-06
      TSAdapt 'basic': step 163 stage rejected t=0.280002   + 4.395e-06
retrying with dt=1.099e-06
      TSAdapt 'basic': step 163 accepted t=0.280002   + 1.099e-06
wlte=3.35e-07 family='arkimex' scheme=0:'1bee' dt=1.318e-06
      TSAdapt 'basic': step 164 accepted t=0.280003   + 1.318e-06
wlte=4.82e-07 family='arkimex' scheme=0:'1bee' dt=1.582e-06
      TSAdapt 'basic': step 165 accepted t=0.280004   + 1.582e-06
wlte=6.94e-07 family='arkimex' scheme=0:'1bee' dt=1.898e-06
      TSAdapt 'basic': step 166 accepted t=0.280006   + 1.898e-06
wlte=1e-06 family='arkimex' scheme=0:'1bee' dt=2.278e-06
      TSAdapt 'basic': step 167 accepted t=0.280008   + 2.278e-06
wlte=1.44e-06 family='arkimex' scheme=0:'1bee' dt=2.734e-06
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131016/6eb0b824/attachment-0001.html>


More information about the petsc-users mailing list