Skip to content

Fixed bugs conflicting with full non linear variational MHD - #335

Open
nicolominichelli wants to merge 2 commits into
develfrom
VarMHD
Open

Fixed bugs conflicting with full non linear variational MHD#335
nicolominichelli wants to merge 2 commits into
develfrom
VarMHD

Conversation

@nicolominichelli

Copy link
Copy Markdown

This PR fixes some issues in the variational MHD solver path:

  1. Fixed repeated weighted-mass assembly in WeightedMassOperator.assemble() by copying array weights and avoiding in-place multiplication. Previously, spline weights modified persistent geometric weights on every assembly, causing exponential growth of WMMnew and eventual solver breakdown.
  2. Assembled the density-weighted velocity mass matrix WMMnew before constructing its diagonal preconditioner in VariationalDensityEvolve.
  3. Updated density-dependent mass-matrix preconditioners whenever WMMnew changes, including in the momentum, entropy, and magnetic-field propagators.
  4. Added robust happy-breakdown and denominator checks to preconditioned BiCGStab, preventing 0/0 when the intermediate residual has already converged.
  5. Fixed the fit_degree index in power_spectrum_2d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant