36 #include "AbstractOneStepIvpOdeSolver.hpp" 37 #include "TimeStepper.hpp" 42 std::vector<double>& rYValues,
49 assert(endTime > startTime);
50 assert(timeStep > 0.0);
51 assert(timeSampling >= timeStep);
56 EXCEPTION(
"(Solve with sampling) Stopping event is true for initial condition");
58 TimeStepper stepper(startTime, endTime, timeSampling);
64 solutions.
rGetTimes().push_back(startTime);
94 std::vector<double>& rYValues,
100 assert(endTime > startTime);
101 assert(timeStep > 0.0);
106 EXCEPTION(
"(Solve without sampling) Stopping event is true for initial condition");
116 std::vector<double>& rYValues,
117 std::vector<double>& rWorkingMemory,
127 bool curr_is_curr =
false;
133 curr_is_curr = !curr_is_curr;
138 curr_is_curr ? rYValues : rWorkingMemory,
139 curr_is_curr ? rWorkingMemory : rYValues);
142 curr_is_curr ? rWorkingMemory : rYValues) ==
true)
151 rYValues.assign(rWorkingMemory.begin(), rWorkingMemory.end());
bool mStoppingEventOccurred
std::vector< std::vector< double > > & rGetSolutions()
#define EXCEPTION(message)
virtual OdeSolution Solve(AbstractOdeSystem *pAbstractOdeSystem, std::vector< double > &rYValues, double startTime, double endTime, double timeStep, double timeSampling)
void AdvanceOneTimeStep()
unsigned GetNumberOfStateVariables() const
void SetOdeSystemInformation(boost::shared_ptr< const AbstractOdeSystemInformation > pOdeSystemInfo)
std::vector< double > mWorkingMemory
unsigned GetTotalTimeStepsTaken() const
boost::shared_ptr< const AbstractOdeSystemInformation > GetSystemInformation() const
std::vector< double > & rGetTimes()
unsigned EstimateTimeSteps() const
virtual void InternalSolve(AbstractOdeSystem *pAbstractOdeSystem, std::vector< double > &rCurrentYValues, std::vector< double > &rWorkingMemory, double startTime, double endTime, double timeStep)
std::string GetIdentifier() const
virtual void CalculateNextYValue(AbstractOdeSystem *pAbstractOdeSystem, double timeStep, double time, std::vector< double > &rCurrentYValues, std::vector< double > &rNextYValues)=0
double GetNextTime() const
void SetSolverName(std::string solverName)
void SetNumberOfTimeSteps(unsigned numTimeSteps)
virtual bool CalculateStoppingEvent(double time, const std::vector< double > &rY)