[go: up one dir, main page]

Menu

[6850b1]: / main.cpp  Maximize  Restore  History

Download this file

62 lines (44 with data), 1.4 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
//#include <OpenCL/cl.h>
#include <QTextStream>
#include <QSurfaceFormat>
#include <QtGui>
#include <QLabel>
#include "window.h"
/*
For the future (possibly near future):
- use OpenCL to accelerate computations
- analytically compute some eigenfunctions (or test it from scipy)
TDSE eigenstates solver feature:
- FE-DVR could be helpful ... seems that Lobatto functions may be very robust, worth testing after all else is done
NOTE ON COMMENTED OUT CODE:
- old stuff is marked with "OLD VERSION"
- test stuff is marked with "TESTING"
- let the command-F games begin...
*/
using namespace std;
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
#if defined(Q_OS_MAC)
QDir dir(QApplication::applicationDirPath());
dir.cdUp();
if (!(dir.cd("PlugIns") && dir.cd("platforms")))
{
cout << "Error encountered while looking for platform plugins" << endl;
return 1;
}
QCoreApplication::removeLibraryPath(QLibraryInfo::location(QLibraryInfo::PluginsPath));
QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
#else
// windows stuff, to be implemented
// actually, it might not be necessary
#endif
QSurfaceFormat fmt;
fmt.setVersion(3,3);
fmt.setProfile(QSurfaceFormat::CoreProfile);
QSurfaceFormat::setDefaultFormat(fmt);
Window window;
window.resize(window.sizeHint());
window.show();
return app.exec();
}