-
Notifications
You must be signed in to change notification settings - Fork 0
/
burgers.h
54 lines (46 loc) · 1.8 KB
/
burgers.h
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
44
45
46
47
48
49
50
51
52
53
54
//
// Created by chen on 2021/11/30.
//
#ifndef BURGERS_BURGERS_H
#define BURGERS_BURGERS_H
#include <iostream>
#include <string>
#include <Eigen/Dense>
using std::endl;
using std::cout;
using std::string;
using namespace Eigen;
const int N = 3;
const int Nv = N + 1;
const int K = 8;
const double xmin = -1;
const double xmax = 1;
const double CFL = 0.75;
const double epsilon = 0.1;
const double FinalTime = 1.5;
namespace RK4 {
const unsigned int N_t = 5;
double const rk4a[N_t] = {0.0,
-567301805773.0 / 1357537059087.0,
-2404267990393.0 / 2016746695238.0,
-3550918686646.0 / 2091501179385.0,
-1275806237668.0 / 842570457699.0};
double const rk4b[N_t] = {1432997174477.0 / 9575080441755.0,
5161836677717.0 / 13612068292357.0,
1720146321549.0 / 2090206949498.0,
3134564353537.0 / 4481467310338.0,
2277821191437.0 / 14882151754819.0};
double const rk4c[N_t] = {0.0,
1432997174477.0 / 9575080441755.0,
2526269341429.0 / 6820363962896.0,
2006345519317.0 / 3224310063776.0,
2802321613138.0 / 2924317926251.0};
}
void MeshGen1D(const double &xmin, const double &xmax, const int &K, VectorXd &VX);
void GeometricFactors1D(const MatrixXd &x, const MatrixXd &Dr,
MatrixXd &rx, MatrixXd &J);
MatrixXd BurgersRHS1D(const double &time,
const MatrixXd &Dr, const MatrixXd &rx,
const MatrixXd &nx, const MatrixXd &LIFT,
const MatrixXd &Fscale, const MatrixXd &u) ;
#endif //BURGERS_BURGERS_H