1D ODE - first derivative term. #2688
-
Dear community, I want to specify the weak form of the 1D ODE Once multiplied by a test function v and integrated by parts, the first term gives me How can I specify this term in Firedrake e.g. I cannot do I guess one way around the problem is to put the ODE into self-adjoint-like form (Checked for matching discussions.) Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
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 So try with either |
Beta Was this translation helpful? Give feedback.
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 thex
derivative because you know that's the only one).So try with either
u*grad(v)[0]
oru*v.dx(0)
.