-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
33 lines (27 loc) · 939 Bytes
/
main.cpp
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
#include<cmath>
#include<string>
#include<iostream>
#include "Master.hpp"
using namespace std;
// double model_prob_1_rhs(double x){return -1.0;}
double model_prob_2_rhs(double x){return 34*sin(x);}
int main (int argc, char** argv)
{
// SecondOrderOde ode_mp1 (1.0,0.0,0.0,model_prob_1_rhs,0.0,1.0);
// BoundaryConditions bc_mp1;
// bc_mp1.SetLhsDirichletBc(0.0);
// bc_mp1.SetRhsDirichletBc(0.0);
// BvpOde bvpode_mp1(&ode_mp1,&bc_mp1, 1001);
// bvpode_mp1.SetFilename("model_prob_sol_1.dat");
// bvpode_mp1.Solve();
// Solver(argc, argv);
SecondOrderOde ode_mp2(1.0,3.0,-4.0,model_prob_2_rhs,0.0,M_PI);
BoundaryConditions bc_mp2;
bc_mp2.SetLhsNeumannBc(-5.0);
bc_mp2.SetRhsDirichletBc(4.0);
BvpOde bvpode_mp2(&ode_mp2,&bc_mp2,1001);
bvpode_mp2.SetFilename("model_prob_sol2.txt");
bvpode_mp2.Solve();
Solver(argc, argv);
return 0;
}