Hi Ankang, You are right about the second bug. Thanks for spotting it. I have pushed a fix for this bug to the repository, which I think will be in version 4.4.1. Cheers, Douglas ________________________________ From: nektar-users-bounces@imperial.ac.uk <nektar-users-bounces@imperial.ac.uk> on behalf of Sherwin, Spencer J <s.sherwin@imperial.ac.uk> Sent: 16 April 2017 22:21:08 To: Ankang Gao Cc: nektar-users Subject: Re: [Nektar-users] 2 bugs and 1 question HI Ankang, Thanks for your comments which are very insightful. I need to get together and discuss this with Dave to see what we might do about this. Cheers, Spencer. PS I have not had a close look at m_pressureCalls yet! On 15 Apr 2017, at 01:53, Ankang Gao <gaoak@pku.edu.cn<mailto:gaoak@pku.edu.cn>> wrote: Hi Dave Thanks for your fast reply. I encountered the interpolation error problem when I used function PhysEvaluate(const Array< OneD, const NekDouble > & coords, const Array< OneD, const NekDouble > & physvals). I found if I set coords as the integral points(these were obtained by using function GetCoords) in phyEvaluate, sometimes I got a very poor accuracy. Further debug led me to find this inaccuracy in Lagrange interpolation functions. -----原始邮件----- 发件人: "David Moxey" <d.moxey@imperial.ac.uk<mailto:d.moxey@imperial.ac.uk>> 发送时间: 2017-04-15 05:47:20 (星期六) 收件人: "Ankang Gao" <gaoak@pku.edu.cn<mailto:gaoak@pku.edu.cn>> 抄送: nektar-users <nektar-users@imperial.ac.uk<mailto:nektar-users@imperial.ac.uk>> 主题: Re: [Nektar-users] 2 bugs and 1 question Hi Ankang, Thanks for sending the bug reports! I've only looked at bug (1) so far. The interpolation error is quite interesting and I agree not necessarily accurate in the vicinity of the interpolation points in its present form. In your example, the interpolation is quite close indeed and perhaps closer than we would usually do this, which may explain why this has not come up before. I was therefore wondering what lead you to find this inaccuracy, just so I can better understand the context a bit? However the 'traditional implementation' of the Lagrange interpolant as you've written it is also numerically unstable (I believe) for larger numbers of interpolation points. We might consider using a barycentric form, as explained in the following two articles: https://people.maths.ox.ac.uk/trefethen/mythspaper.pdf http://www.maths.manchester.ac.uk/~higham/narep/narep440.pdf Don't know if someone with more knowledge of this might be able to weigh in on this aspect! On the m_pressureCalls issue -- I agree one can get a first-order approximation from the first timestep onwards. Not sure why the original implementation doesn't have this. Dave On 14 Apr 2017, at 13:06, Ankang Gao <gaoak@pku.edu.cn> wrote: Hellow, I have found two bugs in the codes, and I listed them in the attachment. I have a question about why the backward differentiation formula starts after m_pressureCalls>2, in function void Nektar::Extrapolate::AccelerationBDF(Array< OneD, Array< OneD, NekDouble > > & array). Since when m_pressureCalls=2, we can already get a first order accuracy result. thanks Ankang <reportbug_question.pdf>_______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk https://mailman.ic.ac.uk/mailman/listinfo/nektar-users _______________________________________________ Nektar-users mailing list Nektar-users@imperial.ac.uk<mailto:Nektar-users@imperial.ac.uk> https://mailman.ic.ac.uk/mailman/listinfo/nektar-users Spencer Sherwin McLaren Racing/Royal Academy of Engineering Research Chair, Professor of Computational Fluid Mechanics, Department of Aeronautics, Imperial College London South Kensington Campus London SW7 2AZ s.sherwin@imperial.ac.uk<mailto:s.sherwin@imperial.ac.uk> +44 (0) 20 759 45052