I have to implement $$ u_x(1,t) = -A(u(1,t) - B) $$ The corresponding term in the weak formulation looks like: $$ -A(u(1,t) - B)v_x(1)$$ So I did
-inner( -A*( u - B), nabla_grad(v)) * ds(1) # ds(1) represents the measure associated at x =1
A, B are predefined constants. $$u = u(y,t) $$ is my un-known and $$v = v(y)$$ is my test function. Currently I am having an error of Shape mismatch.
I also tried in vain.
u_1 = interpolate(Constant(0.0), V)
fun4 = Experssion("-A*(u - B)", A = A, B = B, u = u_1)
fun4*nabla_grad(v)*ds(1)
Please help me to correctly implement this by giving me some general guidelines.