[deal.II] Re: singularity error due to 1/0

2016-09-08 Thread hanks0227
I have tried to solve this problem including what you suggested. But,I'm sorry to tell you, Everything didn't work out well... It seems that csc(theta) or sec(theta) can't be used in cylindrical coord system But, I solve GradShaf Eq that I was originally trying to solve using step-6 Anyway, T

[deal.II] Re: singularity error due to 1/0

2016-09-05 Thread Jean-Paul Pelteret
Hmm... I vaguely recall having issues with the use of std::atan in evaluating the azimuthal coordinate. Try using std::atan2 . I think that this returns more robust results when you evaluat

Re: [deal.II] Re: singularity error due to 1/0

2016-09-05 Thread Wolfgang Bangerth
On 09/05/2016 06:29 AM, hanks0...@gmail.com wrote: Not theta=x/y in my code but theta=atan(x/y) You will at least want to use the atan2 function to prevent the division by zero here. Best W. -- Wolfgang Bangerth

[deal.II] Re: singularity error due to 1/0

2016-09-05 Thread hanks0227
Oh, sorry my mistake Not theta=x/y in my code but theta=atan(x/y) 2016년 9월 5일 월요일 오후 9시 22분 49초 UTC+9, Jean-Paul Pelteret 님의 말: > > Hi Kyusik, > > r is calculated by "r=sqrt(x^2+y^2) ", and theta is calculated by >> "theta=x/y" > > > At the very least, your definition of theta in the (radial)

[deal.II] Re: singularity error due to 1/0

2016-09-05 Thread Jean-Paul Pelteret
Hi Kyusik, r is calculated by "r=sqrt(x^2+y^2) ", and theta is calculated by > "theta=x/y" At the very least, your definition of theta in the (radial) coordinate system is incorrect. See the wikipedia page f