The inverted diagonal mass matrices (invM) for scalar and vector fields are different, so they must both be considered when updating the explicit solution. Previously, the type of the first occurring explicit field was used to calculate the invM. This led to issues if scalar & vector explicit fields were included (as only 1 field could be updated correctly).
Now, the scalar & vector invMs are calculated if there are scalar, vector, or scalar & vector fields whenever computeInvM() is called.
I've also added a unit test for the invM of vector fields.
The inverted diagonal mass matrices (invM) for scalar and vector fields are different, so they must both be considered when updating the explicit solution. Previously, the type of the first occurring explicit field was used to calculate the invM. This led to issues if scalar & vector explicit fields were included (as only 1 field could be updated correctly).
Now, the scalar & vector invMs are calculated if there are scalar, vector, or scalar & vector fields whenever
computeInvM()
is called.I've also added a unit test for the invM of vector fields.