Hi, Daniel:
Thanks for your help. But I have already looked at step 29 -33, the
question is I don't quite understand it. Just look at this small piece of
code:
Tensor<2,dim>
<https://www.dealii.org/8.4.0/doxygen/deal.II/classTensor.html> grad_u;
for (unsigned int d=0; d<dim; ++d)
grad_u[d] = duh[q][d];
here, grad_u is declared as a 2nd order tensor, namely a matrix. But after
the for loop, grad_u is only filled with a vector.
Since duh = (duh/dx, duh/dy) //suppose dim = 2
d=0, grad_u[0] = duh[q][0] = duh/dx (computed at quadrature point q)
d=1, grad_u[1] = duh[q][1] = duh/dy (computed at quadrature point q)
So now after this for loop, grad_u is only a vector containing 2 elements,
duh/dx and duh/dy. This would obviously contradict with its
declaration as a rank-2 tensor.
So what's the problem here, where did I get wrong? Could give some
explanation?
Best,
David.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.