[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 in a iteration on every cell, store 
the quadrature points.
3. Use fe_values.value(i, q) to calculate shape functions, and 
fe.shape_value(i, point) to calculate another shape function, but find they 
are different.

So I want to know what's the difference between this two methods? Because I 
want to separate the fe and quadrature points, so can I use fe.shape_value 
to calculate the shape functions?

Thanks again!

在 2018年5月6日星期日 UTC+8上午6:08:55,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:
>>
>> Hi everyone!
>> I use fe, which is FESystem class, but I find fe.shape_value( const 
>> unsigned int i, const Point< dim > & p ) (the document is here: 
>> https://www.dealii.org/8.5.0/doxygen/deal.II/classFE__Poly.html#a8c769a449d25d54e756fc67cca5dd30b)
>>  
>> sometimes returns a negative number which seems not right.
>>
>> The Point I send into the function locates in the reference space ( [-1, 
>> 1]x[-1, 1] ), I also try the Point in the real space, but also get negative 
>> numbers sometimes.
>>
>> Thanks any response!
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[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:
>
> Hi everyone!
> I use fe, which is FESystem class, but I find fe.shape_value( const 
> unsigned int i, const Point< dim > & p ) (the document is here: 
> https://www.dealii.org/8.5.0/doxygen/deal.II/classFE__Poly.html#a8c769a449d25d54e756fc67cca5dd30b)
>  
> sometimes returns a negative number which seems not right.
>
> The Point I send into the function locates in the reference space ( [-1, 
> 1]x[-1, 1] ), I also try the Point in the real space, but also get negative 
> numbers sometimes.
>
> Thanks any response!
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.