Following up on my previous email: I want to clean up McLachlan along the lines described below. I have been holding back on this because of the other, unmerged changes, and didn't want to complicate things more.
I want to suggest a simplification of the McLachlan code base that should make it easier to modify/maintain it, and to handle the scheduling. I am thinking of the following approach:
1. There is one master calculation that calculates everything, starting from a full BSSN state vector, and calculating ADMBase variables, RHS, gauges, constraints, etc. This should support all BSSN variants and multiple gauge conditions, probably introducing shorthands to keep things simple (e.g. different shorthands for the RHS for different lapse conditions).
2. From this master calculation, we derive (via PartialCalculation) the individual scheduled routines to calculate the ADMBase variables, to calculate the RHS (combined, split, only lapse, only shift, etc.), constraints, advection terms, dissipation etc.
This will nicely separate physics (the master calculation) from parameter handling (choosing formulation, gauges etc) and optimisation (splitting for performance). It will ensure that there is a single definition of all quantities, avoid duplication, and reduce code size.
This will also simplify optimising the code, if we e.g. need to split the RHS evaluation into three routines, or want to combine it again into a single routine. This will also simplify life for those who want to create a custom version of McLachlan that is e.g. optimised for a particular setup or a particular machine.
-erik