You may be comparing the gradient on reference and real cells. They will differ 
by some factor due to the mapping.

FE.shape_grad gives gradient on reference cell

https://dealii.org/current/doxygen/deal.II/classFiniteElement.html#aaaafefdf45fc2a5e7db18acb64063f5d
 
<https://dealii.org/current/doxygen/deal.II/classFiniteElement.html#aaaafefdf45fc2a5e7db18acb64063f5d>

FEValues.shape_grad gives gradient on real cell

https://dealii.org/current/doxygen/deal.II/classFEValuesBase.html#a46aefdb527125dafb59dcba92a0f256e

Best
praveen

> On 17-Oct-2019, at 9:51 AM, het patel <[email protected]> wrote:
> 
> Hello Deal.II users
> 
> I recently started learning to use deal.II and was going through step-3 
> tutorial. I was checking  shape_value() and shape_grad() function values to 
> see which lagrange shape function it is calculating and I found that values 
> of the gradient to be different.
> For e.g.  at gauss point ( -0.577, -0.577) it gave gradient as [ -0.788675 , 
> -0.788675] whereas it should be [-0.394 , -0.394 ] according to my 
> calculation. Am I making mistake somewhere ?
> 
> Sincerely
> Het Patel
> 
> -- 
> The deal.II project is located at http://www.dealii.org/ 
> <http://www.dealii.org/>
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en 
> <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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/CAFYG0Dajn4umL%3DoRx57-PSVpvRswNqHVCinpG-8xZ%3Da5t3RwAA%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/dealii/CAFYG0Dajn4umL%3DoRx57-PSVpvRswNqHVCinpG-8xZ%3Da5t3RwAA%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/269BE7CA-BAEA-4BFE-AC94-6C1F6D65048C%40gmail.com.

Reply via email to