I am debugging a code where part of my weak form requires indexing into the 
Tensor<2,dim> that results from getting the gradient of a Tensor<1,dim> (in 
this case, a velocity vector).

I found the convention for the index notation 
here: http://dealii.org/8.4.1/doxygen/deal.II/classFEValuesViews_1_1Vector.html

The important part of that documentation for me is that "The gradient of a 
vector $d_k, 0 <= k < dim$ is defined as $S_{ij} = \frac{\partial 
d_i}{\partial x_j}, 0 <= i,j < dim$.

What is the exact syntax for getting component $S_{ij}$ in my code? For a 
Tensor<2,dim> S

I am currently assuming that I want 
S[i][j]

But I am not 100% sure that don't have this backwards. I have reviewed the 
documentation about how these tensors are rolled/unrolled; but I'm having 
trouble devising a test to ensure that I am understanding this correctly, 
and I'm guessing that this is something quite obvious to most users.

Also it would help if someone could point me toward an existing 
tutorial/example that accesses components of the gradient of a physical 
vector. I had no luck finding one.

Thanks,

Alex

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