Cleanup of MHD: Remove CenteredB. This cleans up a bunch of redundant code.
NB: Since its inception two additional changes have been made to this PR.
a.) I have added MaxVelocityIndex to clean up cumbersome logic for Vy and Vz for certain solvers. This will be rolled out in full in a forthcoming PR.
b.) I've added a changelog in the run directory to keep track of when test problems change.
In this PR, we remove CenteredB and regularize the usage of UseMHD, UseMHDCT, HydroMethod==4, HydroMethod==6. While this changes several files, there are only
a few types of changes.
1.) CenteredB is removed. This is a redundant field, and better handled by BaryonField. In all cases currently existing in the code,
it can be wholly replaced by the appropriate BaryonField. This makes the code easier to modify, read, maintain, and compare the two MHD modules.
2.) The behavior of UseMHD is slightly different. Now, UseMHD refers to either MHD module. Behavior specific to the Dedner solver
is switched by HydroMethod==MHD_RK; things specific to the Face and Edge Centered magnetic fields are switched by UseMHDCT; Things specific to
the MHD_Li method are switched by MHD_Li.
3.) The old SolveMHDEquations is removed
4.) Flags for MHD_UseSpecificEnergy is removed from Read/Write ParameterFile. A future PR will remove the code functionality itself, but I wanted to keep this PR compact.
Documentation that reflects the current changes will follow in a subsequent PR, but I wanted to keep this one as compact as possible.
While this is handled smoothly by the new FieldObjects in enzo3.0, I expect enzo2.x will be with us for some time.
Running tests and finding mistakes. More later today.
All tests should pass now.
The result of MHDCTOrszagTang and MHDCTOrszagTangAMR have changed due to the removal of the MHDUseSpecificEnergy flag. This doesn't change the behavior, only the nature of the TotalEnergy field on disk which is different by 1/Density.
I added two minor bits that I mention in the description: A changelog of tests for when people are digging through older versions; and MaxVelocityIndex which shortens the logic that typically goes something like
All of these failures are expected.
It's SphericalInfall and DrivenTurbulence, which fail due to previous bug fixes,
and the OrszagTang tests, which are now going to fail because I've slightly changed the initializer.
We should probably look at the differences to make sure it looks reasonable.
I'll look at this one.
OK, looked through. This looks good modulo some small tweaks I've suggested. I'm going to hold off on approving until you deal with those.
I've addressed all the concerns raised. Should be good to go.
The expected tests fail, including some new ones due to updates to the Orszag-Tang problem. I'll hit 'approve' as soon as you confirm that the Orszag-Tang stuff looks OK to you when you inspect it visually.
Visual inspections are outstanding.
Well, OK then. Accepting; merging.
Wonderful to see the convergence of the two methods sharing common infrastructure and test problem setups!