Suppose we have this timoshenko beam
https://bitbucket.org/jackhale/timoshenko/src/30f59208921c339f0d94a1272e5b53f337df2c8f/cantilever.py?at=master
But instead of applying the bcs in the for loop in line 72-76 we do
A_matrix, b_vector = assemble_system(A, L, bcs)
I want the reaction forces on left_boundary
. For that I can do
reaction = Function(U)
reaction.vector()[:] = A_matrix * u_h.vector()
But that will give me 0
on the boundary point.
If I reassemble A_matrix
without the bcs it gives the correct result as can be seen doing
reaction = Function(U)
reaction.vector()[:] = A_matrix * u_h.vector()
reaction_forces = reaction.split(deepcopy=True)[1]
plot(reaction_forces); interactive()
AA_matrix = assemble(A)
reaction.vector()[:] = AA_matrix * u_h.vector()
reaction_forces = reaction.split(deepcopy=True)[1]
plot(reaction_forces); interactive()
But if the assembly takes a long time I don't want to do it again. Is there a way to operate A_matrix
without the bcs or to remove/detach/disapply them?
I've put a working example here http://pastebin.com/b0QenJWd