prisms-center / phaseField

PRISMS-PF: An Open-Source Phase-Field Modeling Framework
https://prisms-center.github.io/phaseField/
Other
229 stars 120 forks source link

invM for scalar & vector fields #208

Closed landinjm closed 8 months ago

landinjm commented 8 months ago

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.