-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDispersion.cpp
More file actions
41 lines (31 loc) · 1000 Bytes
/
Dispersion.cpp
File metadata and controls
41 lines (31 loc) · 1000 Bytes
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
#include <string>
#include "SpinWaveGenie/SpinWaveGenie.h"
using namespace std;
using namespace SpinWaveGenie;
int main()
{
Cell cell;
cell.setBasisVectors(1.0,10.0,10.0,90.0,90.0,90.0);
Sublattice spin0;
string name0 = "Spin0";
spin0.setName(name0);
spin0.setType("NONE");
spin0.setMoment(1.0,0.0,0.0);
cell.addSublattice(spin0);
cell.addAtom(name0,0.0,0.0,0.0);
SpinWaveBuilder builder(cell);
InteractionFactory interactions;
builder.addInteraction(interactions.getExchange("J",1.0,name0,name0,0.9,1.1));
SpinWave test = builder.createElement();
PointsAlongLine Line;
Line.setFirstPoint(0.0,0.0,0.0);
Line.setFinalPoint(3.0,0.0,0.0);
Line.setNumberPoints(61);
ThreeVectors<double> kPoints = Line.getPoints();
SpinWaveDispersion dispersion;
dispersion.setFilename("FMChain.txt");
dispersion.setGenie(test);
dispersion.setPoints(kPoints);
dispersion.save();
return 0;
}