39 #include "HeunIvpOdeSolver.hpp"
44 std::vector<double>& rCurrentYValues,
45 std::vector<double>& rNextYValues)
55 std::vector<double> k1(num_equations);
56 std::vector<double> k2(num_equations);
57 std::vector<double>& dy = rNextYValues;
63 for (
unsigned i=0; i<num_equations; i++)
65 dy[i] = timeStep*k1[i] + rCurrentYValues[i];
71 for (
unsigned i=0; i<num_equations; i++)
73 rNextYValues[i] = rCurrentYValues[i] + timeStep*0.5*(k1[i] + k2[i]);
virtual void EvaluateYDerivatives(double time, const std::vector< double > &rY, std::vector< double > &rDY)=0
unsigned GetNumberOfStateVariables() const
void CalculateNextYValue(AbstractOdeSystem *pAbstractOdeSystem, double timeStep, double time, std::vector< double > &rCurrentYValues, std::vector< double > &rNextYValues)
#define CHASTE_CLASS_EXPORT(T)