Anup,

I am solving for a  3 dimensional displacement vector (*dim+1* dimensional)
in a *dim=2* dimensional space (for
a planer problem in elasticity). Hence I consider an FEvaluesExtractor:

const FEValuesExtractors::Vector u_fe;

and initialize it as

u_fe(0)


Now I need to compute the gradient of the shape functions and the gradient of
the solution vectors. Hence I
use the command:


for (unsigned int q_point = 0; q_point < n_q_points; ++q_point)
for (unsigned int k = 0; k < dofs_per_cell; ++k)
fe_values_ref[u_fe].gradient(k, q_point)


Then I get 2x2 tensors. Could anyone suggest how to get gradient terms
corresponding to all three vectors
and finally get a 3x3 tensors, instead of 2x2. I am expecting to get a 3x3
tensor with non-zero entries in the
 first two columns and all zero entries in the third column.

Well, FEValuesExtractors::Vector is meant for cases where you have dim vector components on a dim-dimensional mesh. In your case, you have dim+1 vector components. What you could do then is to treat each component as a scalar, and obtain its gradient. This yields a dim=2 dimensional vector. You do this all 3 components to build the 3x2 matrix of columns you care about. Then you pad it by hand with zeros to get the 3x3 matrix.

I'm going to add something I just wrote in response to another email: your last paragraph in essence says "Here is my problem, please solve it for me." It shows no effort at doing it yourself. Your lack of effort even shows in the fact that your email does not even have a complete sentence as a Subject: line.

While we *want* to help others on this forum, you are asking for too much effort on everyone's behalf.

Best
 Wolfgang

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/

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