[petsc-users] Suggestions for code with dof >> 1 ?
Christophe Ortiz
christophe.ortiz at ciemat.es
Wed Oct 23 09:05:06 CDT 2013
On Tue, Oct 22, 2013 at 5:36 PM, Christophe Ortiz <
christophe.ortiz at ciemat.es> wrote:
>
>
> On Tue, Oct 22, 2013 at 3:37 PM, Matthew Knepley <knepley at gmail.com>wrote:
>
>> On Tue, Oct 22, 2013 at 8:29 AM, Christophe Ortiz <
>> christophe.ortiz at ciemat.es> wrote:
>>
>>> Hi Barry,
>>>
>>> Thanks for suggestions. Here is the output.
>>> Before using the options you suggest I get:
>>>
>>> TSAdapt 'basic': step 182 accepted t=0.341561 + 3.416e-02
>>> wlte=1.1e-09 family='arkimex' scheme=0:'3' dt=3.757e-02
>>> TSAdapt 'basic': step 183 accepted t=0.375717 + 3.757e-02
>>> wlte=9.05e-14 family='arkimex' scheme=0:'3' dt=4.133e-02
>>> TSAdapt 'basic': step 184 stage rejected t=0.413289 + 4.133e-02
>>> retrying with dt=1.033e-02
>>> TSAdapt 'basic': step 184 stage rejected t=0.413289 + 1.033e-02
>>> retrying with dt=2.583e-03
>>> ...
>>> TSAdapt 'basic': step 184 stage rejected t=0.413289 +2.212e-198
>>> retrying with dt=5.529e-199
>>> TSAdapt 'basic': step 184 stage rejected t=0.413289 +5.529e-199
>>> retrying with dt=1.382e-199
>>> [0]PETSC ERROR: --------------------- Error Message
>>> ------------------------------------
>>> [0]PETSC ERROR: Floating point exception!
>>> [0]PETSC ERROR: Vec entry at local location 12 is not-a-number or
>>> infinite at end of function: Parameter number 3!
>>>
>>>
>>> I re-checked my Jacobian several times, and I found few errors. But now
>>> I think it is ok.
>>> Then, with the options you suggest, it stops immediatly. Not even one
>>> timestep:
>>>
>>
>> Something is very wrong here. The Jacobian should at least have something
>> on the diagonal from the time derivative,
>> but the Laplacian (u, v) and q (w) also have diagonals.
>>
>> Matt
>>
>>
Hi guys,
I finally found what was wrong. I used -mat_view to check each element of
the Jacobian. The structure was ok but there was some unexpected values.
Then I checked my code and found a mistake while assigning values to some
array (the diagonal block). It was cumulating values during the loop for
(row i) {}. Now, at the beginning of the loop I use PetscMemzero(array) to
reset the array.
Now it works much better with 1bee and linesearch bt. It converges quickly
to large times in few timesteps.
Thanks all for your help and sorry to bother you so much :-).
Nevertheless...I still observe some problem, some oscillations in the
solution, but in some extreme cases. It occurs with the following system,
when q is very large:
u_t - alpha u_xx + (k.u.v - q.w) = 0
v_t - alpha v_xx + (k.u.v - q.w) = 0
w_t - (k.u.v - q.w) = 0
I guess the problem becomes stiff.
I tried assuming that the reaction is in steady state (w_t=0) and modifying
the IJacobian accordingly, but it did not work.
Any suggestion to circumvent that ?
Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131023/cede88eb/attachment.html>
More information about the petsc-users
mailing list