1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#include <iostream>
#include <math.h>
#include <vector>
#include <fstream>
#include "Methods.h"
#include <Calculateur.h>
using namespace std;
int main()
{
int numberP;
double Delta_X;
int time;
double BC1;
double BC2;
int i;
Methods M;
Calculateur C;
cout << "Give the number of points you want ? "<< "\n";
cin >> numberP;
cout << "Choisissez le temps : " << "\n";
cin >> time;
cout << "Choisissez le Delta_X : " << " \n";
cin >> Delta_X;
cout << "Give boundary conditions : " << "\n";
cout << "left hand side : ";
cin >> BC1;
cout << "Right hand side : ";
cin >> BC2;
C.sign(-4.5);
for (i =0 ; i<numberP; i++)
{
cout << M.ExplicitUpwind(BC1,BC2,numberP,Delta_X,time)[i] <<"\n";
}
return 0;
} |