Arun,

> Can someone tell me how to use shape_grad() to the get the gradient in
> only a particular direction ? Using tutorial programs I figured out how
> to get the derivative of the shape function for individual components
> but unsure how to use shape_grad() to get the derivative in a particular
> direction (say Ux + Uy - Vz with U and V being the two components).

fe_values.shape_grad (i,q) returns the gradient of shape function i and 
quadrature point q, i.e. all components of the vector. If you are in 3d, 
then
  fe_values.shape_grad(i,q)[0]
is the X-derivative (in real coordinates, not the reference coordinates of 
the cell) and
  fe_values.shape_grad(i,q)[1]
  fe_values.shape_grad(i,q)[2]
similarly for the y and z derivatives.

Best
 W.

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to