DST
10-27-2009, 05:18 AM
Hello,
I'm trying to solve a two-point boundary problem. I use “shoot” as an argument of “newt” and “bsstep” to solve the ODEs. “Newt” claims to successfully solve the boundary problem (that is, it returns check=false), but when I look at the “solution” the BCs are NOT satisfied! Using a debugger, I found out that the vector returned by “score” is indeed not equal to 0 and that the routine “lnsrch” in “newt” sets check to true. Subsequently, the test for spurious convergence in “newt” sets check to false again. As far as I understand “newt” this means that there is no local minimum, but the routine has found the correct minimum. IF this is correct, why are the boundary conditions not satisfied? I would appreciate if someone could give me some piece of advice!
PS: I don't know if this is relevant, but my boundary conditions at the end point x2 are such that the functions y[0] and y[2] should be less than some precision prec. Hence, “score” looks like:
if(abs(y[0])<prec && abs(y[2])<prec) {
f[0]=0;
f[1]=0;
}
else {
f[0]=y[0];
f[1]=y[2];
}
I'm trying to solve a two-point boundary problem. I use “shoot” as an argument of “newt” and “bsstep” to solve the ODEs. “Newt” claims to successfully solve the boundary problem (that is, it returns check=false), but when I look at the “solution” the BCs are NOT satisfied! Using a debugger, I found out that the vector returned by “score” is indeed not equal to 0 and that the routine “lnsrch” in “newt” sets check to true. Subsequently, the test for spurious convergence in “newt” sets check to false again. As far as I understand “newt” this means that there is no local minimum, but the routine has found the correct minimum. IF this is correct, why are the boundary conditions not satisfied? I would appreciate if someone could give me some piece of advice!
PS: I don't know if this is relevant, but my boundary conditions at the end point x2 are such that the functions y[0] and y[2] should be less than some precision prec. Hence, “score” looks like:
if(abs(y[0])<prec && abs(y[2])<prec) {
f[0]=0;
f[1]=0;
}
else {
f[0]=y[0];
f[1]=y[2];
}