  We study the loss, recovery, and preservation of differentiability of
time-dependent large deviation rate functions. This study is motivated by
mean-field Gibbs-non-Gibbs transitions.
  The gradient of the rate-function evolves according to a Hamiltonian flow.
This Hamiltonian flow is used to analyze the regularity of the time-dependent
rate function, both for Glauber dynamics for the Curie-Weiss model and Brownian
dynamics in a potential. We extend the variational approach to this problem of
time-dependent regularity in order to include Hamiltonian trajectories with a
finite lifetime in closed domains with a boundary. This leads to new phenomena,
such a recovery of smoothness.
  We hereby create a new and unifying approach for the study of mean-field
Gibbs-non-Gibbs transitions, based on Hamiltonian dynamics and viscosity
solutions of Hamilton-Jacobi equations.
