#include "AnT.hpp"

#define a11 parameters[0]
#define a12 parameters[1]
#define a13 parameters[2]
#define a21 parameters[3]
#define a22 parameters[4]
#define a23 parameters[5]
#define a31 parameters[6]
#define a32 parameters[7]
#define a33 parameters[8]

#define q1    currentState[0]
#define q2    currentState[1]
#define q3    currentState[2]

bool ornstein_uhlenbeck_3D (const Array<real_t>& currentState,
			    const Array<real_t>& parameters,
			    Array<real_t>& rhs)
{
  rhs[0] = a11*q1+a12*q2+a13*q3;
  rhs[1] = a21*q1+a22*q2+a23*q3;
  rhs[2] = a31*q1+a32*q2+a33*q3;

  return true;
}

#undef a11
#undef a12
#undef a13
#undef a21
#undef a22
#undef a23
#undef a31
#undef a32
#undef a33

#undef q1
#undef q2
#undef q3

extern "C" { void connectSystem () { ODE_Proxy::systemFunction = ornstein_uhlenbeck_3D; } }

