-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMain.cpp
47 lines (37 loc) · 1.45 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "Transport.h"
#include "Logo.h"
#include "Input.h"
#include <memory>
#include "HammerTime.h"
typedef std::shared_ptr<Transport> T_ptr;
typedef std::shared_ptr<Mesh> Mesh_ptr;
typedef std::shared_ptr<HammerTime> Time_ptr;
int main(int argc , char *argv[])
//INPUT: xmlFilename
//xmlFilename: the xml-formatted input file containing the problem parameters
//TODO:
{
std::string xmlFilename = "inputfiles/";
if ( argc > 1 )
{
xmlFilename += argv[1];
}
printLogo();
// Initialize and read xml input
std::shared_ptr< Input > input = std::make_shared< Input > ();
input->readInput( xmlFilename );
// Create pointers to geometry, constants, and mesh
std::shared_ptr< Geometry > geometry = input->getGeometry();
std::shared_ptr< Constants > constants = input->getConstants();
std::shared_ptr< Mesh > mesh = input->getMesh();
std::shared_ptr< HammerTime > timer = input->getTimer();
T_ptr t = std::make_shared<Transport>( geometry, constants, mesh, timer );
cout << "running transport..." << endl;
t->runTransport();
cout << std::endl << "Transport finished!" << std::endl;
cout << std::endl << "************************************************************************" << std::endl;
cout << "************************************************************************" << std::endl;
cout << "Printing outputs..." << endl;
t->output();
return 0;
}