use term loss-of-accuracy instead of accuracy-divergence
use SUBROUTINE macro to avoid backend's code duplication
add new backend feature flag for linear refinement