-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblatt3.cpp
55 lines (42 loc) · 1.33 KB
/
blatt3.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
48
49
50
51
52
53
54
55
#include <cstdlib>
#include <iostream>
#include <cstdio>
#include <cmath>
#include "world.hpp"
#include "worldlc.hpp"
#include "gravitypotential.hpp"
#include "ljpotential.hpp"
#include "velocityverlet.hpp"
#include "velocityverletlc.hpp"
#include "observerxyz.hpp"
int main(int argc, const char *argv[]) {
// check arguments
if (argc < 2) {
std::cerr << "error: missing arguments" << std::endl;
std::cerr << "usage: " << std::endl
<< "\t" << argv[0] << " parameterfile particledatafile" << std::endl;
return EXIT_FAILURE;
}
// instanciate Potentials
LJPotential LPot;
// create World
WorldLC W;
// debub propose, show 2nd argument
std::cout << argv[2] << std::endl;
// read Parameters
W.readParameter(argv[1]);
// read Particles
W.readParticles(argv[2]);
// print World configuration after Building it up
std::cout << W << std::endl;
// create the Observer
ObserverXYZ O(W);
// instanciate timediscretization
// remark: & is used to get the address of Pot // reremark: removed the &
VelocityVerletLC verletLC(W, LPot, O);
std::cout << "WHAT THE FUCK" << std::endl;
// run the simulation
verletLC.simulate();
return EXIT_SUCCESS;
}
// vim:set et sts=2 ts=2 sw=2 ai ci cin: