[petsc-users] Nullspace issue

Thomas Witkowski thomas.witkowski at tu-dresden.de
Tue Jun 12 07:56:29 CDT 2012


There should be no null space from the Cahn-Hilliard equation. Is there 
some black-box preconditioner that does not relay on LU factorization at 
some point? I know that black-box approaches are mostly not efficient, 
but I would have something I can work with.

Thomas


Am 12.06.2012 14:31, schrieb Jed Brown:
> A known null space doesn't really "fix" LU for a singular problem [1]. 
> You need a preconditioner that is *stable*. Also, it sounds like you 
> may have additional vectors in the null space coming from the 
> Cahn-Hilliard variables.
>
> [1] One could create a new matrix with space for Lagrange multipliers 
> enforcing the null space and perform the factorization there. But 
> doing this automatically isn't implemented in the library so you'd 
> have to write it.
>
> On Tue, Jun 12, 2012 at 1:32 AM, Thomas Witkowski 
> <thomas.witkowski at tu-dresden.de 
> <mailto:thomas.witkowski at tu-dresden.de>> wrote:
>
>     I've some trouble to setup the nullspace for my equation
>     correctly. It is an implicit coupled Navier-Stokes / Cahn-Hilliard
>     equation (for two phase flow simulation) in 2D. To simulate an
>     "infinite" domain, the upper and lower boundaries are periodic for
>     all 5 components. The pressure and the two variables from the
>     Cahn-Hilliard equation are null-flux (Neumann) on the other two
>     boundaries, the velocity is set to 0 (Dirichlet) on them. I would
>     expect to have a non-empty nullspace. When using richardson/lu, I
>     see the following behavior:
>
>      1 KSP preconditioned resid norm 3.130958085604e+04 true resid
>     norm 1.339173230263e-11 ||r(i)||/||b|| 2.249831332702e-16
>      2 KSP preconditioned resid norm 5.987054624984e+04 true resid
>     norm 8.900173028027e-12 ||r(i)||/||b|| 1.495242564025e-16
>      3 KSP preconditioned resid norm 8.159870664335e+04 true resid
>     norm 7.429941832854e-12 ||r(i)||/||b|| 1.248241493927e-16
>      4 KSP preconditioned resid norm 7.087492912608e+04 true resid
>     norm 7.066574102540e-12 ||r(i)||/||b|| 1.187195164260e-16
>      5 KSP preconditioned resid norm 1.075156685382e+05 true resid
>     norm 6.963290776604e-12 ||r(i)||/||b|| 1.169843408895e-16
>      6 KSP preconditioned resid norm 9.260088828115e+04 true resid
>     norm 6.996993371924e-12 ||r(i)||/||b|| 1.175505496012e-16
>
>     So, in principle the system is solvable, but the preconditioned
>     norm is wrong. I created a nullspace basis that is 1 on all
>     pressure unknowns and 0 on all of the other four components. I can
>     easily verify that this vector is at least an element of the
>     nullspace, as the norm of the vector resulting from MatMult with
>     the assembled matrix and the nullspace basis vector is in the
>     order of 1e-16. I set the nullspace to the system matrix, and
>     rerun with richardson/lu:
>
>      0 KSP preconditioned resid norm 6.025198436485e+09 true resid
>     norm 5.952327229149e+04 ||r(i)||/||b|| 1.000000000000e+00
>      1 KSP preconditioned resid norm 3.436455497312e+09 true resid
>     norm 9.795164213312e-09 ||r(i)||/||b|| 1.645602440226e-13
>      2 KSP preconditioned resid norm 3.365625775916e+09 true resid
>     norm 7.488946142386e-09 ||r(i)||/||b|| 1.258154307396e-13
>      3 KSP preconditioned resid norm 2.543011385543e+09 true resid
>     norm 5.719959416026e-09 ||r(i)||/||b|| 9.609618550566e-14
>      4 KSP preconditioned resid norm 4.406639844892e+08 true resid
>     norm 6.417414971975e-09 ||r(i)||/||b|| 1.078135446007e-13
>      5 KSP preconditioned resid norm 2.741735667402e+09 true resid
>     norm 5.646995693759e-09 ||r(i)||/||b|| 9.487038390809e-14
>      6 KSP preconditioned resid norm 2.427193596206e+09 true resid
>     norm 1.327430895972e-08 ||r(i)||/||b|| 2.230104033043e-13
>      7 KSP preconditioned resid norm 1.603502416252e+09 true resid
>     norm 1.338139212677e-08 ||r(i)||/||b|| 2.248094167478e-13
>      8 KSP preconditioned resid norm 1.646847388237e+09 true resid
>     norm 1.287770565938e-08 ||r(i)||/||b|| 2.163474077218e-13
>      9 KSP preconditioned resid norm 2.136833312630e+09 true resid
>     norm 1.261183165000e-08 ||r(i)||/||b|| 2.118806840498e-13
>      10 KSP preconditioned resid norm 1.405267823532e+09 true resid
>     norm 2.499790590170e-08 ||r(i)||/||b|| 4.199686095765e-13
>
>     The system at all is not solvable anymore. What could be the
>     problem? Some technical issue I forgot about? Or my be the
>     nullspace be wrong? Thanks for any hint!
>
>     Thomas
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120612/ef5b4bde/attachment-0001.html>


More information about the petsc-users mailing list