This repository was archived by the owner on Jan 29, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
75 lines (60 loc) · 2.04 KB
/
main.cpp
File metadata and controls
75 lines (60 loc) · 2.04 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
//# Threads : 1
#include <cstdlib>
#include <iostream>
#include <fstream>
#include "libTardis/libTardis.hpp"
using namespace std;
using namespace tardis;
int main(int argc, char* argv[]) {
stringstream ssOut;
int iShells = 6;
int iParticles = 4;
int iM = 2;
int iMs = 4;
bool bEnergyCut = false;
double dOmega = 0.0;
double dLambda = 6.0;
System *oSystem = new System();
if(argc > 1) oSystem->SetLogFile(argv[1]);
ofstream oOutput;
oOutput.open("tempQueue/output.txt");
ssOut << endl;
ssOut << "System Config:" << endl;
ssOut << endl;
ssOut << "Shells: " << iShells << endl;
ssOut << "Particles: " << iParticles << endl;
ssOut << "Total M: " << iM << endl;
ssOut << "Total Spin: " << iMs << endl;
ssOut << "Omega: " << dOmega << endl;
ssOut << "Lambda: " << dLambda << endl;
ssOut << endl;
oSystem->GetLog()->Output(&ssOut);
oSystem->SetPotential(iShells, QDOT2D, Q2D_EFFECTIVE);
oSystem->SetParticles(iParticles);
oSystem->SetQNumber(QN_M, iM);
oSystem->SetQNumber(QN_MS, iMs);
oSystem->SetVariable(VAR_LAMBDA, dLambda);
oSystem->SetVariable(VAR_OMEGA, dOmega);
oSystem->EnableEnergyCut(bEnergyCut);
oSystem->BuildPotential();
oSystem->BuildBasis(true);
//~ oSystem->GetBasis()->Save("Basis-P12-Sh6-M0-Ms0.out", SAVE_BASIS_ARMA);
//~ oSystem->LoadBasis("/scratch/RunFiles/Basis-P12-Sh6-M0-Ms0.out");
Lanczos oLanczos(oSystem);
double dEnergy = oLanczos.Run();
//~ double dEnergy = 0;
cout << "Energy: " << setprecision(10) << setw(11) << dEnergy << endl;
oOutput << "P 4, ";
oOutput << "Sh 6, ";
oOutput << "M 2, ";
oOutput << "Ms 4, ";
oOutput << "Om 0.0, ";
oOutput << "Lm 6.0, ";
oOutput << "NoECut, ";
oOutput << "Veff, ";
oOutput << "Lz";
oOutput << "\t | Energy: " << setprecision(10) << setw(11) << dEnergy << endl;
oOutput.close();
oSystem->GetBasis()->Save("Coeff.arma", SAVE_COEFF_ARMA);
return 0;
}