Hi Praveen That is a nice piece of information. Yes, it is doing integration on the real cell. I didn't knew that there was something like FE.shape_grad for integration on the reference cell. I thought it did by default isoparametric mapping with FEValues and JxW was for the mapping.
Just one more thing. I have very basic understanding of C++ . In the code(step-3) it does vector dot product of the gradient without writing any sort of function to do so. This might sound bit lame to you but, can you tell me if we can do dot product by simply doing a*b then how to do vector cross product or matrix multiplication and other such mathematical operations as I have worked mostly on MATLAB for my assignments where this things are very easy. Sincerely Het Patel On Thursday, October 17, 2019 at 12:52:39 AM UTC-4, Praveen C wrote: > > 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 > > 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] <javascript:>> > 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/ > 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] <javascript:>. > 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/a0f3a7b5-3300-42d7-85d7-f19710251fc7%40googlegroups.com.
