Dear Benhour,

I'm afraid that your question falls out of the scope of those suitable for 
the forum (please see this post 
<https://groups.google.com/forum/#!topic/dealii/GRZMUTLIm2I>). It is too 
vague and abstract, and to be honest you could spend some time constructing 
a small case to work this out for yourself.

What I will say is that (to the best of my knowledge) this expression will 
differ if you're working in 3d or in 2d (i.e. axisymmetric). Your grid is 
constructed in a Cartesian basis, so the gradients returned by the deal.II 
functions will be those taken with respect to this basis. You therefore 
need to account for this. In 2-d, you could (I think) directly interpret 
the radial and e_{1} directions as being aligned with one another, and the 
same for the e_{2} and z-direction. In 3-d this no longer holds, and you 
need to compute the equivalent expression for the radial (and azimuthal) 
derivatives with respect to the Cartesian directions; i.e. you should apply 
the chain rule.

Regards,
J-P


On Saturday, September 3, 2016 at 1:56:32 AM UTC+2, 
benhour.amiria...@gmail.com wrote:
>
> Dear All,
> I have a question. I want to define a tensor with components like the 
> below expression, where eta is a scalar function in cylindrical coordinate 
> system. I defined this component in dealii like this:
> FE_Q<dim>        fe
>                           const QGauss<dim> quadrature_formula(3)
>                           FEValues<dim> fe_values (fe, quadrature_formula,
>                                             update_gradients| 
> update_quadrature_points);
>                           const unsigned int n_q_points = 
> quadrature_formula.size();
>                           std::vector< Tensor<1, dim> > 
> eta_gradients(n_q_points);
>                           std::vector< Tensor<2, dim> > 
> eta_hessians(n_q_points);
>                           fe_values.get_function_gradients(eta_gradients);
>                           fe_values.get_function_hessians(eta_hessians);
>                           for(unsigned int q_point = 0; q_point < 
> n_q_points; ++q_point)
>                          
>           const double comp11 = std::pow(eta, 2)*
>                    std::pow((1-eta), 2)+(eta_hessians[q_point][0] +
>    eta_hessians[q_point][1]) - eta_gradients[q_point][0] *
>    eta_gradients[q_point][0];
> I do really appreciate it if you let me know whether this part of code for 
> the following component is true or not.
>
> .  
> <https://lh3.googleusercontent.com/-ki-xrwAfxYc/V8oOoAsTsmI/AAAAAAAAACo/uWArz5VCC1UsAWC4s9EcvnKVzMzp2P_5ACLcB/s1600/2.PNG>
>

-- 
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.

Reply via email to