Canonical molecular dynamics simulations of crystal growth from solution suffer from severe finite-size effects. As the crystal grows, the solute molecules are drawn from the solution to the crystal, leading to a continuous drop in the solution concentration. This is in contrast to experiments in which the crystal grows at an approximately constant supersaturation of a bulk solution. Recently, Perego et al. [J. Chem. Phys.2015, 142, 144113] showed that in a periodic setup in which the crystal is represented as a slab, the concentration in the vicinity of the two surfaces can be kept constant while the molecules are drawn from a part of the solution that acts as a molecular reservoir. This method is quite effective in studying crystallization under controlled supersaturation conditions. However, once the reservoir is depleted, the constant supersaturation conditions cannot be maintained. We propose a variant of this method to tackle this depletion problem by simultaneously dissolving one side of the crystal while letting the other side grow. A continuous supply of particles to the solution due to the crystal dissolution maintains a steady solution concentration and avoids reservoir depletion. In this way, a constant supersaturation condition can be maintained for as long as necessary. We have applied this method to study the growth and dissolution of urea crystal from water solution under constant supersaturation and undersaturation conditions, respectively. The computed growth and dissolution rates are in good agreement with those obtained in previous studies.