Based on the thermodynamic concept of a reservoir, we investigate a computational model for interaction with unresolved degrees of freedom (a thermal bath). We assume that a finite restricted system can be modelled by a generalized canonical ensemble, described by a density which is a smooth function of the energy of the restricted system. A thermostat is constructed to continuously perturb the resolved dynamics, while leaving the desired equilibrium distribution invariant. We build on a thermostatting framework developed and tested in the setting of molecular dynamics, using stochastic perturbations to control (and stabilize) the invariant measure. We also apply these techniques in the setting of a simplified point vortex flow on a disc, in which a modified Gibbs distribution (modelling a finite, rather than infinite, bath of weak vortices) provides a regularizing formulation for restricted system dynamics. Numerical experiments, effectively replacing many vortices by a few artificial...