-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
54 lines (36 loc) · 1.2 KB
/
main.cpp
File metadata and controls
54 lines (36 loc) · 1.2 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
//
// main.cpp
// Fast evaluation of Helmholtz potential
//
// Created by Eduard on 4/30/23.
//
#include <iostream>
#include <vector>
#include <random>
#include <ctime>
#include <cstdlib>
#include <chrono>
#include "Tree.hpp"
#include "Box.hpp"
#include "Source.hpp"
#include "Coordinate.hpp"
int main() {
std::cout<<"Start program \n";
auto start = std::chrono::high_resolution_clock::now();
Tree theTree(4194304,4);
auto stop = std::chrono::high_resolution_clock::now();
long duration = std::chrono::duration_cast<std::chrono::microseconds>(stop-start).count();
std::cout<<"duration of generating a tree: "<<duration<<std::endl;
//theTree.print_tree();
Box* testing1 = theTree.find_box_by_index(4, 160, 1);
std::cout<<"Testing the box: "<<*testing1;
Coordinate aCoordinate1(1000,650,3.3);
Box* testing2 = theTree.find_box_by_coordinate(4, aCoordinate1, 1);
std::cout<<"Testing the box: "<<*testing2;
Distribution theDistribution;
theDistribution.get_sources_mockup();
theDistribution.print_sources();
return 0;
}
//https://github.com/nlohmann/json
//g++ main.cpp Box.cpp Coordinate.cpp Source.cpp Tree.cpp -o run