Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102860515
AbstractOdeSolver.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Feb 24, 23:00
Size
1022 B
Mime Type
text/x-c++
Expires
Wed, Feb 26, 23:00 (2 d)
Engine
blob
Format
Raw Data
Handle
24443437
Attached To
R1106 Programming Concept Rouaze
AbstractOdeSolver.hpp
View Options
/*
* AbstractOdeSolver.hpp
*
* Created on: Oct 25, 2012
* Author: rpopescu
*/
#ifndef ABSTRACTODESOLVER_HPP_
#define ABSTRACTODESOLVER_HPP_
#include<ostream>
class AbstractOdeSolver {
public:
// Constructor and destructor
AbstractOdeSolver();
virtual ~AbstractOdeSolver();
// Other public methods
void SetStepSize(const double h);
void SetTimeInterval(const double t0, const double t1);
void SetInitialValue(const double y0);
void SetRightHandSide(double (*f)(double y, double t));
double RightHandSide(double y, double t) const;
virtual void SolveEquation(std::ostream& stream) = 0;
// Get methods
double GetFinalTime() const {
return finalTime;
}
double GetInitialTime() const {
return initialTime;
}
double GetInitialValue() const {
return initialValue;
}
double GetStepSize() const {
return stepSize;
}
private:
double stepSize;
double initialTime;
double finalTime;
double initialValue;
double (*f_rhs)(double y, double t);
};
#endif /* ABSTRACTODESOLVER_HPP_ */
Event Timeline
Log In to Comment