-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
88 lines (58 loc) · 3.07 KB
/
main.cpp
File metadata and controls
88 lines (58 loc) · 3.07 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
//
// main.cpp
// lipid-test2
//
// Created by saman on 10/7/11.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#include <iostream>
#include "Molecule.h"
#include "Grid.h"
#include "Distributer.h"
#include "InputParser.h"
using namespace std;
int main (int argc, char * argv[])
{
int in;
InputParser myInputParser( argv[1] );
//myInputParser.printResult();
//cout << "Input parser." << endl;
//InputParser myInputParser( argv, argc );
/*
if( argc != 23 ){
cout << "wrong number of inputs." << endl;
exit( 0 );
}
if( atoi( argv[1] ) + atoi( argv[2] ) + atoi( argv[3] ) + atoi( argv[4] ) + atoi( argv[5] ) + atoi( argv[6] ) + atoi( argv[7] ) + atoi( argv[8] ) != 100 ){
cout << "wrong inputs1: sum of all must be 100%." << endl;
return 0;
}
if( atoi( argv[9] ) + atoi( argv[10] ) + atoi( argv[11] ) + atoi( argv[12] ) + atoi( argv[13] ) + atoi( argv[14] ) + atoi( argv[15] ) + atoi( argv[16] ) != 100 ){
cout << "wrong inputs2: sum of all must be 100%." << endl;
return 0;
}
*/
//Distributer myDistributer( atoi( argv[1] ), atoi( argv[2] ), atoi( argv[3] ), atoi( argv[4] ), atoi( argv[5] ), atoi( argv[6] ), atoi( argv[7] ), atoi( argv[8] ), atoi( argv[9] ), atoi( argv[10] ), atoi( argv[11] ), atoi( argv[12] ), atoi( argv[13] ), atoi( argv[14] ), atoi( argv[15] ), atoi( argv[16] ), atoi( argv[17] ) * atoi( argv[19] ), atoi( argv[18] ) * atoi( argv[20] ), atoi( argv[19] ), atoi( argv[20] ) );
Distributer myDistributer( myInputParser, myInputParser.gridWidth * myInputParser.moleculeWidth, myInputParser.gridHeight * myInputParser.moleculeHeight, myInputParser.moleculeWidth, myInputParser.moleculeHeight );
//cout << "Distributer." << endl;
//Distributer myDistributer( 10, 20, 30, 40, 25, 25, 25, 25, 150, 150, 15, 15 );
/*
cout << "MESSAGE: Distributer distibiutes: " << endl;
cout << "MESSAGE: POPGU=>" << myDistributer.numberOfPOPGU << " ";
cout << "MESSAGE: POPCU=>" << myDistributer.numberOfPOPCU << " ";
cout << "MESSAGE: POPEU=>" << myDistributer.numberOfPOPEU << " ";
cout << "MESSAGE: DPPCU=>" << myDistributer.numberOfDPPCU << endl;
cout << "MESSAGE: POPGD=>" << myDistributer.numberOfPOPGD << " ";
cout << "MESSAGE: POPCD=>" << myDistributer.numberOfPOPCD << " ";
cout << "MESSAGE: POPED=>" << myDistributer.numberOfPOPED << " ";
cout << "MESSAGE: POPCD=>" << myDistributer.numberOfDPPCD << endl;
cin >> in;
*/
Grid myGrid( myInputParser.gridWidth * myInputParser.moleculeWidth , myInputParser.gridHeight * myInputParser.moleculeHeight, myInputParser.moleculeWidth , myInputParser.moleculeHeight, myInputParser, &myDistributer, myInputParser.layersDistance );
//cout << "Grid" << endl;
myGrid.printGridInFile( argv[2], myInputParser );
myGrid.printGridInFileSequential(argv[3], myInputParser );
//cout << "print in file." << endl;
//myGrid.printGridInScreen();
return 0;
}