Adaptive causal realization of rate-independent linear damping