Hi,

So in 3d if U, V, W being the displacements in X, Y and Z directions and if
I want to use fe_values.shape_grad(i,q) to write Ux + Uy - Wz, how do I
differentiate between (U,V,W) and (X,Y,Z). I would like to clarify my
confusion here because I am trying to solve an equation which has 4
individual components (say U, V, W, H) with spatial derivatives in (X, Y, Z)
mixed up just like  Ux + Uy - Wz.

Thanks !

Arun.


On Sun, May 9, 2010 at 5:26 PM, arun jaganathan <[email protected]> wrote:

> Thanks Wolfgang.
>
> Arun.
>
>
> On Sun, May 9, 2010 at 2:07 PM, Wolfgang Bangerth 
> <[email protected]>wrote:
>
>>
>> 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