Skip to content
Discussion options

You must be logged in to vote

UFL doesn't exploit (kind of deliberately, I think) the isomorphism between scalars, and 1D vectors. So the way round this is that you need to index the grad(v) term (or equally just take the x derivative because you know that's the only one).

So try with either u*grad(v)[0] or u*v.dx(0).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@ethrelfall
Comment options

Answer selected by ethrelfall
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants