Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120277469
ForwardEuler.cpp
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
Thu, Jul 3, 05:06
Size
307 B
Mime Type
text/x-c
Expires
Sat, Jul 5, 05:06 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27165625
Attached To
R9686 PCSCproject
ForwardEuler.cpp
View Options
#include <iostream>
#include "ForwardEuler.h"
void ForwardEuler::solve(){
auto y = initialValue;
double t = initialTime;
while(t< finalTime){
y = y + stepSize * (A*y + g(t)); // the simple Euler update
t += stepSize;
std::cout << t << " " << y << std::endl;
}
};
Event Timeline
Log In to Comment