[petsc-users] KSPBuildSolution

Juha Jäykkä juhaj at iki.fi
Thu Feb 17 17:01:07 CST 2011


>   On boundary points where you want your mathematical solution x*| at that
> point  = a you need to use for your coded function f(x) = x -  a. Its
> derivative is f'(x) = 1 which is nonzero is fine. If the derivative at
> other points is order K you can use f(x) = K*(x - a)  so the derivate at
> that point is K.

I am not sure, I understood this. Just to make sure there is no confusion with 
the notation, my unknown function be called f and my independent variable x 
and f is defined for 0 <= x <= 1. I use f' for the derivative of f. The 
nonlinear equation I want to solve is F(f,f',f'',x)=0.

So, if I want f(1) = a and f'(1) = b, should I set the F(1) = b*(f-a) in the 
code? Will that not give 0 residual when f(1)=a regardless of it derivative?

Or, alternatively, is my approach totally wrong to begin with? I took a step 
back and started to work with 

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

only and cannot get it to converge any more than my actual problem. Now, for 
this I even know the general solution, so it should be easy to solve this for 
f(1)=1, f'(1)=2 (or 1/2, but that has singular derivative at 0, so perhaps it 
is not a good example).

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/2cd60311/attachment.pgp>


More information about the petsc-users mailing list