// File: rhs_func.h

#ifndef RHS_FUNC_H
#define RHS_FUNC_H

#include <sundials_err_record.h>

// struct to use if R or Rcpp function is input as RHS function
struct rhs_func{
  Rcpp::Function rhs_eqn;
  Rcpp::NumericVector params;
  SEXP jac_eqn;        // user-supplied jacobian, if provided, else R_NilValue
  sundials_err_record *err;  // collects errors raised inside the callbacks
};

int rhs_function(sunrealtype t, N_Vector y, N_Vector ydot, void* user_data);

#endif /* rhs_func */
