Access Component of Vector-Valued function

This is really basic question, but if uu is a grid function, or a Trial function, or Test function, then how can I just get one of the components? I seem to have to do this: (assume uu has 3 components)

uu_0 = InnerProduct(uu, (1, 0, 0))

Is there another way?


you can do uu_0 = uu[0].

Best wishes,

Yeah, I guess I have to do this as a separate line, and not combine with other operations. Duh.

you can combine component access with everything else, it is yet another node in the expression tree, try:

print (u[0])

You can’t apply differential operators to components (as you can’t apply for other expression), but you can do a


Ok, thanks! I got what I needed working.