-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
40 lines (30 loc) · 758 Bytes
/
Copy pathmain.cpp
File metadata and controls
40 lines (30 loc) · 758 Bytes
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
#include <iostream>
#include <cstdio>
#include <fstream>
#include <cmath>
#include <cassert>
#include "probleminput.h"
#include "grid.h"
#include "pdesolve.h"
#include "Visualize.h"
int main()
{
// Read the input file
char *InputFile;
InputFile = "../case_1.json";
// Construct the Inputs
ProblemInput Inputs(InputFile);
// Construct the Grid
Grid grid(Inputs);
// Solve the PDE
PdeSolve pdesolve(Inputs, grid);
pdesolve.InitialCond(Inputs, grid);
pdesolve.BoundCond(Inputs);
std::vector<double> TComp;
TComp = pdesolve.Solve(Inputs, grid);
// Write the result in VTK file
char *vtk;
vtk = "./vtk/visualize";
createVTK(TComp, TComp, Inputs.Nx, Inputs.Ny, 0, vtk);
return 0;
}