forked from NoseKnowsAll/Local-DG
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdriver.cpp
More file actions
52 lines (42 loc) · 1.03 KB
/
driver.cpp
File metadata and controls
52 lines (42 loc) · 1.03 KB
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
#include <iostream>
#include <cmath>
#include <mpi.h>
#include "dgMath.h"
#include "mesh.h"
#include "solver.h"
#include "io.h"
/** Main driver function */
int main(int argc, char *argv[]) {
MPI_Init(&argc, &argv);
MPIUtil mpi{};
if (mpi.rank == mpi.ROOT) {
std::cout << "MPI tasks = " << mpi.np << std::endl;
}
/*
if (mpi.rank == mpi.ROOT) {
std::cout << "Initializing mesh..." << std::endl;
}
//Mesh mesh{mpi};
double L = 1;
double size = M_PI*L;
Point botLeft{-size, -size, -size};
Point topRight{size, size, size};
int nx = 10;
Mesh mesh{nx, nx, nx, botLeft, topRight, mpi};
if (mpi.rank == mpi.ROOT) {
std::cout << "Initializing solver..." << std::endl;
}
int p = 2;
double tf = 10.0;
int dtSnaps = 30;
if (mpi.rank == mpi.ROOT) {
std::cout << "p = " << p << std::endl;
std::cout << "tf = " << tf << std::endl;
std::cout << "nx = " << nx << std::endl;
}
Solver dgSolver{p, dtSnaps, tf, L, mesh};
dgSolver.dgTimeStep();
*/
MPI_Finalize();
return 0;
}