Voltage clamping things in Chaste

It's quite useful to be able to clamp the membrane voltage of a cell you're simulating to a particular value. I have found myself wanting to clamp the voltage to a series of values, or even a whole voltage trace from another simulation. There isn't an easy way to do this in Chaste (yet - if I have time I'd like to make it into an easy function), so I'm sharing the bit of code I wrote to make it happen.

If you've not run single-cell cardiac models in Chaste before, look at this tutorial, and if you need to install Chaste on a Debian machine, try this.

First, include ALL THE THINGS:
Continue reading Voltage clamping things in Chaste

...