Too many arguments in ODE/DAE call interface
The DAE function interface has from 7 to 9 arguments:
template <
typename VT1,
typename MT1, bool SO1,
typename VT2,
typename MT2, bool SO2,
typename VT3,
typename VT4,
typename MT3, bool SO3
>
void residual(double t,
blaze::Vector<VT1, blaze::columnVector> const& x,
blaze::Matrix<MT1, SO1> const& Sx,
blaze::Vector<VT2, blaze::columnVector> const& z,
blaze::Matrix<MT2, SO2> const& Sz,
blaze::Vector<VT3, blaze::columnVector> const& u,
blaze::Vector<VT4, blaze::columnVector>& r,
blaze::Matrix<MT3, SO3>& Sr) const;
template <
typename VT1,
typename VT2,
typename MT1, bool SO1,
typename VT3,
typename VT4,
typename MT2, bool SO2>
void implicitDaeSensitivity(double t,
blaze::Vector<VT1, blaze::columnVector> const& xdot,
blaze::Vector<VT2, blaze::columnVector> const& x,
blaze::Matrix<MT1, SO1> const& Sx,
blaze::Vector<VT3, blaze::columnVector> const& z,
blaze::Vector<VT4, blaze::columnVector> const& u,
blaze::Matrix<MT2, SO2>& Sf) const;
template <
typename VT1,
typename VT2,
typename VT3,
typename VT4,
typename VT5,
typename MT1, bool SO1,
typename MT2, bool SO2,
typename MT3, bool SO3
>
void implicitDae(
Real t,
blaze::Vector<VT1, blaze::columnVector> const& xdot,
blaze::Vector<VT2, blaze::columnVector> const& x,
blaze::Vector<VT3, blaze::columnVector> const& z,
blaze::Vector<VT4, blaze::columnVector> const& u,
blaze::Vector<VT5, blaze::columnVector>& f,
blaze::Matrix<MT1, SO1>& Jxdot,
blaze::Matrix<MT2, SO2>& Jx,
blaze::Matrix<MT3, SO3>& Jz) const;
This can be confusing and difficult to manage. Think about passing two structures (something like DaeIn
and DaeOut
) to the function instead. The structures would contain references to matrix or vector input and output arguments.