# [petsc-users] KSPBuildSolution

Juha Jäykkä juhaj at iki.fi
Thu Feb 17 08:08:37 CST 2011

```> > [0]PETSC ERROR: Zero pivot row 1 value 1.90611e-13 tolerance 1e-12!
> You have a singular Jacobian, which leads me to believe that your boundary
> conditions are incorrect.

Thanks for the tip. I also found the following in the -info output:

[0] SNESLSCheckResidual_Private(): ||J^T(F-Ax)||/||F-AX|| 27.9594 near zero
implies inconsistent rhs

which is strange at first sight: my RHS is my equation, how can that be
inconsistent? It is what defines the problem. BUT your comment about the
boundary conditions led me to look into them in more detail.

It seems one of them may be trivially satisfied, leaving me with an infinite
number of solutions satisfying the other one too. Could this be the reason for
my problems? If so, I need to start thinking of another boundary condition...
not nice, since the problem I am solving does not really give them! =(

Take an example:

r f''/f - r (f'/f)^2 + f'/f = 0.

This has the general solution

f(r) = a r^b,

but if the boundary conditions are f(0)=0 and f(1)=1 (like I had in my real
problem), we have (if b>0):

a*0 = 0
a*1 = 1

and b is left undetermined or (if b<0):

lim(a*r^b) = 0 as r->0 => a=0
0*1^b = 1 => no solution.

I am unsure how to interpret b=0 since then we have 0^0 at the boundary. But
even disregarding the undefined value at the boundary, there cannot be a
continuous solution with b=0 since then f(r>0)=1, but f(0)=0. Looks like
Heaviside step to me.

In summary, I cannot even solve this simpler problem with SNES, but I think I
understand the reason now: I have not specified boundary conditions which
would give a unique solution - they probably do not even give a finite number
of solutions, but an inifinite (quite likely uncountable, like in my example)
number of solutions.

Any thoughts on this? Is there any sense in my analysis? If so, I will need to

Cheers,
Juha

--
-----------------------------------------------
| Juha Jäykkä, juhaj at iki.fi			|
| http://www.maths.leeds.ac.uk/~juhaj		|
-----------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110217/1554a5fd/attachment.pgp>
```