-
Notifications
You must be signed in to change notification settings - Fork 1
/
location.cc
60 lines (52 loc) · 1015 Bytes
/
location.cc
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
//a list of parameters and functions used in bubble programs
#include <Eigen/Sparse>
#include <Eigen/Dense>
#include <vector>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <string>
#include <cmath>
#include "parameters1.h"
using namespace std;
int main()
{
unsigned int loc;
char answer = 'y';
cout << "choose N: " << endl;
cin >> N;
N_t = (int)(points_ratio*N);
cout << "N_t = " << N_t << endl;
do{
cout << "location: " << endl;
cin >> loc;
cout << "coordinates are: " << endl;
for (unsigned int k=0;k<dim;k++)
{
cout << intCoords(loc)[k] << " ";
}
cout << endl;
cout << "again? (y/n)" << endl;
cin >> answer;
} while (answer == 'y');
cout << "print whole lattice?" << endl;
cin >> answer;
if (answer == 'y')
{
cout << left;
for (unsigned int j=0; j<N; j++)
{
for (unsigned int k=0; k<N_t; k++)
{
cout << "(";
for (unsigned int l=0;l<dim;l++)
{
cout << intCoords(k+j*N_t)[l] << ",";
}
cout << ") ";
}
cout << endl;
}
}
return 0;
}