← Back to team overview

dolfin team mailing list archive

Reaction forces: assembling for a SubSystem?

 

Hi,

I am trying to compute some reaction forces, currently I am trying to assemble the stiffness matrix and compute the matrix vector product with the converged solution vector to get a vector of forces. Here is what I am trying.

<u is the converged solution>
Matrix A;
assemble(A, *a, mesh);
Vector f;
A.mat().mult(u.vector().vec(), f.vec());

First an issue. I am getting a seg fault coming in DiscreteFunction::interpolate as part of the assemble step. I haven't figured out why yet, but I'm looking.

Next, a few questions.
Is there an easier (or cleaner) way to accomplish this?
I have a mixed formulation. Is is possible to only assemble the stiffness matrix for a SubSystem?
Thanks,
Jake



Follow ups