Question: Coding in C++; then calling R Write a base class which will implement a forward euler method for a system of two ordinary differential equations,

Coding in C++; then calling R Write a base class which willCoding in C++; then calling R

Write a base class which will implement a forward euler method for a system of two ordinary differential equations, dx/dt = f(x, y), dy/dt = g(x, y) the class should store function pointers to f and g, and include a runSim function which will run the euler time step for 20 time units (N = 20 * (1/dt)) Then write a class, inheritedClass, which will inherit from the base class you've written which will implement the 4th-order Runge Kutta (https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta methods, h|ttp://1psa. Swarthmore .edu/NumInt/NumIntFourth.html) method, modify the runSim function in the inherited class so the user can choose which method to run Both classes should save the trajectory of the system and save figures of the trajectory by either calling Python or R to save the plots as .png files

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!