Skip to content

❗ Panic when including mass matrix in v0.6.0 #151

Answered by martinjrobins
MasoudAE21 asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for reporting this @MasoudAE21, its a bug due to having a mass matrix with no algebraic variables, I've put in a fix here: #153

  1. Is there a specific requirement for matrix shape or sparsity when defining the mass function?

The mass matrix needs to be a n x n matrix where n is the number of states. Note that you don't provide the mass matrix directly, your function should assign into y the result of M * v + beta * y, which will be a vector of dim n

  1. Could I be missing a call that informs the solver about structure or dimensions?

Nope, this was just a bug :)

  1. Should .mass() only be used with certain solvers or problem types?

If your mass matrix is an identity then it is better not…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by martinjrobins
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants