Re: [deal.II] Re: Why fe.shape_value( const unsigned int i, const Point< dim > & p ) return a negative number?

2018-05-07 Thread Zhao Yidong
Thanks a lot! I get the same answer by using quadrature.point(q), and I get the similar answer after I transfer the real space point into reference space( [0, 1]x[0, 1] ), and then use fe.shape_value(reference_point). Best Yidong 在 2018年5月7日星期一 UTC+8下午2:37:22,Wolfgang Bangerth写道: > > On

Re: [deal.II] Re: Why fe.shape_value( const unsigned int i, const Point< dim > & p ) return a negative number?

2018-05-07 Thread Wolfgang Bangerth
On 05/07/2018 02:20 PM, Zhao Yidong wrote: 2.Iterate on every quadrature point in every cell, store them. (These points are in real space right?) | for(unsignedq=0;q

Re: [deal.II] Re: Why fe.shape_value( const unsigned int i, const Point< dim > & p ) return a negative number?

2018-05-07 Thread Zhao Yidong
Thank you very much! My fe is FE_Q(1) type: FE_Q(1) I make comparison like this: 1.Create fe_values like this: FEValues fe_values(fe, quadrature, update_values | update_quadrature_points |

[deal.II] Re: Why fe.shape_value( const unsigned int i, const Point< dim > & p ) return a negative number?

2018-05-05 Thread Zhao Yidong
Thanks a lot, it's really clear to understand by the help of the website you share! Indeed, my problem is this: 1. I have fe which is a FiniteElement class, and I have fe_values which is a FEValues class. I also have QGauss quadrature to create fe_values. 2. I iterate on every quadrature point

[deal.II] Re: Why fe.shape_value( const unsigned int i, const Point< dim > & p ) return a negative number?

2018-05-05 Thread Denis Davydov
Hi, it's perfectly fine for a general FE shape functions to be negative at some points, that's clearly the case for quadratic http://hplgit.github.io/INF5620/doc/pub/sphinx-fem/._main_fem003.html#fem-approx-fe-fig-p2 Denis. On Saturday, May 5, 2018 at 3:11:24 AM UTC+2, Zhao Yidong wrote: > >