Dear Dr. Bangerth, Thank you very much! I was confused about the shape function in the vector case.
In step.8 we use the FEValue::shape_grad(index of shape function,index of quadrature point) and get a vector as the gradient of shape function. However, in step.20 and step.22, when we take the gradient of FESystem[vector_indices]::gradient(index of shape function, index of quadrature point) we get a rank-2 tensor. If the shape function is a vector, FEValue::shape_grad(index of shape function,index of quadrature point) should give a tensor as well. Does it mean that the shape_grad gives the gradient of the non-zero component in the vector shape function such that it is a vector?
Thank you again!
Best regards,