Hi all,
I am currently trying to solve a PDE problem with the variational form:
$$ \int \nabla u \cdot \nabla v \, dx + \sum_{k=0}^{m-1} \left( \int_{e_k} (u-U_k)(v-V_k) \right) = \sum_{k=0}^{m-1} I_k V_k ,$$
where $I_k$ is some defined constant and $e_k$ is some part of the boundary. My problem is, that I am not able to write the right-hand-side of the above form for it to work. If I do the following:
L = sum([I[i]*V[i] for i in range(m)])
b = assemble(L)
I get an error in the assembling. V is here defined as
Rm = VectorFunctionSpace(mesh, "R", 0, m)
V = Testfunction(Rm)
Is it at all possible to create a right-hand side as a sum like above, or do I need to compute it as an integral, and then divide by the length of that integral?