Skip to content
Discussion options

You must be logged in to vote

Hi @Matyas-D

if you use Python, you can have read-access to various matrices and vectors in the simulation scenes:

  • Global system matrix
  • Global system right-hand side
  • Global system solution
  • Mass matrix
  • Stiffness matrix
  • Constraint matrix

Dense objects will be available as a numpy array, while sparse matrices will be represented by scipy.sparse.csr_matrix.

This is available in SOFA v22.06.

Checkout the examples in the SofaPython3 plugin. For example:

https://github.com/sofa-framework/SofaPython3/blob/fffebadfbe4e68a1adf1910efa622e27af59209c/examples/access_matrix.py#L44

Alex

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@Matyas-D
Comment options

@alxbilger
Comment options

@Matyas-D
Comment options

@alxbilger
Comment options

@Matyas-D
Comment options

Answer selected by Matyas-D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants