You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PRT instantiates a tree of tracking methods, each of which may delegate to submethods or solve particle motion itself. Leaves in the tree do the work, nodes delegate depending on various conditions.
The work consists of
- trying to obtain an exit solution from the method domain in each dimension independently
- choosing which of the candidate exit solutions, if any, is the correct (e.g., first) one
- solving particle coordinates for user-specified times up to exit time
- solving (the remaining) particle coordinates at exit time
and generally maintaining the particle's state while this happens.
This happens in the track_subcell routine in the relevant subcell methods. The four steps happen roughly in the order described, but the procedure is not structured otherwise (e.g. by subroutines, etc). So the concept of an exit solution is implicit and is so far mainly relevant for setting boundary indices (e.g. face numbers).
Up to now there has been a single criterion for selecting among candidate exit solutions: take the one that occurs first. However, #2478 is an example of a situation in which this gives unwanted results. So we may have arbitrary criteria for selecting the "best" exit solution. But this is awkward to implement right now, as the logic is interwoven across the track_subcell routine.
Separate the evaluation of candidate exit solutions and the selection of one into procedures. This makes filtering of candidate solutions cleaner.
- find_exits: generates candidates
- pick_exit: picks the best solution
Also introduce a base DomainType and module, used in the signature of find_exits. Also, miscellaneous other tidying, and clarify argument intent in some routines in TernarySolveUtils.f90.
0 commit comments