[Draft] Try to improve the consistency of the field solve in split_collisions
David Dickinson
Branch: feature/split_collisions_fields_from_nonadiabatic_dfn
Branch: next
Open
In split collisions operation, we attempt to recalculate the fields after collisions are applied. Here we change from calculating from gnew to calculating from h as motivated by the following.
! 1. On entry to vspace_derivatives we have gnew, phinew and bparnew ! from the collisions time advance. These are consistent. ! 2. We then obtain h from these and apply collisions to h. ! 3. On exit from vspace_derivatives we then adjust h->gnew ! again. However, this uses the collisionless fields. This is either ! not consistent (and as such we're effectively changing h when we resolve ! for the fields) _or_ our fields are totally unchanged. If the latter then ! we don't need the following field calculation as we expect it to return ! identical fields. If the former then we need to solve for the new fields ! directly from h. ! We could save two g_adjust calls (the one on exit from vspace_derivatives and ! the first one below). Probably easiest to achieve this with an optional argument ! to vspace_derivatives.
Â