added dim checks for dfdx in ODE