[petsc-users] vector-valued Laplace solver (Navier-Stokes): DIVERGED_INDEFINITE_MAT?

Matthew Knepley knepley at gmail.com
Thu May 2 15:39:17 CDT 2013


On Thu, May 2, 2013 at 12:36 PM, Nico Schlömer <nico.schloemer at gmail.com>wrote:

> The boundary conditions weren't applied correctly, such that the operator
> was indeed (slightly) nonsymmetric. Seems to work now. Thanks for the hint!
>

I have recently used GAMG on a problem like this with very good results.
You can test it against
Hypre using

  -pc_type gamg -pc_gamg_agg_nsmooths 1

I would be interested to hear about the effectiveness.

  Thanks,

     Matt


> --Nico
>
>
> On Thu, May 2, 2013 at 4:33 PM, Matthew Knepley <knepley at gmail.com> wrote:
>
>> On Thu, May 2, 2013 at 9:01 AM, Nico Schlömer <nico.schloemer at gmail.com>wrote:
>>
>>> Hi all,
>>>
>>> I'm trying to solve a discretization of the PDE in weak form
>>>
>>>     rho/tau u - mu \Delta u = f
>>>
>>> where u is vector-valued (let's say in 2D -- this comes from a
>>> Navier--Stokes problem). Some Dirichlet-boundary conditions come with it,
>>> too.
>>>
>>> After translation in weak form,
>>>
>>>     rho/tau * inner(u, v) + mu * inner(grad(u), grad(v)) = inner(f, v)
>>>
>>> I'm solving this with PETSc's CG and hypre_amg. What I get is
>>>
>>>   0 KSP preconditioned resid norm 4.962223194957e+30 true resid norm
>>> 2.364095175749e-02 ||r(i)||/||b|| 1.000000000000e+00
>>>   1 KSP preconditioned resid norm 7.089043065444e+19 true resid norm
>>> 2.289113027906e-02 ||r(i)||/||b|| 9.682829402926e-01
>>>
>>> Without preconditioning, I'm getting
>>>
>>>   0 KSP preconditioned resid norm 2.364095175749e-02 true resid norm
>>> 2.364095175749e-02 ||r(i)||/||b|| 1.000000000000e+00
>>>   1 KSP preconditioned resid norm 4.415430823612e-02 true resid norm
>>> 4.415430823612e-02 ||r(i)||/||b|| 1.867704341562e+00
>>>   2 KSP preconditioned resid norm 1.077641425707e-01 true resid norm
>>> 1.077641425707e-01 ||r(i)||/||b|| 4.558367348159e+00
>>>
>>> and DIVERGED_INDEFINITE_MAT.
>>>
>>> Does anyone else have experience with this sort of problems? Any obvious
>>> mistakes?
>>>
>>
>> Do you have any non-symmetries in your discretization? With the standard
>> P_1 basis, that operator is symmetric.
>>
>>    Matt
>>
>>
>>> --Nico
>>>
>>>
>>>
>>>
>>
>>
>> --
>> 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
>>
>
>


-- 
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/20130502/5513225e/attachment.html>


More information about the petsc-users mailing list