chainSIR function

Gradient-function for the chain-SIR model