-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTwoDimensionalCut.cpp
More file actions
48 lines (36 loc) · 1.16 KB
/
TwoDimensionalCut.cpp
File metadata and controls
48 lines (36 loc) · 1.16 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
#include <cmath>
#include <string>
#include "SpinWaveGenie/SpinWaveGenie.h"
using namespace std;
using namespace SpinWaveGenie;
int main()
{
Cell cell;
cell.setBasisVectors(1.0, 2.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 SW = builder.createElement();
PointsAlongLine Line;
Line.setFirstPoint(0.0,0.0,0.0);
Line.setFinalPoint(3.0,0.0,0.0);
Line.setNumberPoints(201);
ThreeVectors<double> kPoints = Line.getPoints();
Energies energies(0.0, 5.0, 201);
OneDimensionalFactory factory;
auto gauss = factory.getGaussian(0.25,1.0e-5);
unique_ptr<SpinWavePlot> res(memory::make_unique<EnergyResolutionFunction>(move(gauss), SW, energies));
TwoDimensionalCut twodimcut;
twodimcut.setFilename("FMcut");
twodimcut.setPlotObject(move(res));
twodimcut.setPoints(kPoints);
twodimcut.save();
return 0;
}