forked from asmaxwell/NSDI-Pulse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspeGrid.h
71 lines (59 loc) · 1.67 KB
/
speGrid.h
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
/*
* speGrid.h
*
* Created on: 12 Dec 2023
* Author: andy
*
* class to store and compute saddle point equations on a 6D momentum grid
*/
#ifndef SPEGRID_H_
#define SPEGRID_H_
#include <vector>
#include "speEqns.h"
struct spePoint {
/*
* Saddle point equation point
* pf --final momentum
* ti -- time of ionization
* tf -- time of recollision
* k -- intermediate momentum
*/
spePoint(vec4 pf_);
vec4 pf;
std::vector<dcmplx> ti, tr, k;
bool pointSolvedQ = false;
};
struct speGridParameters{
int Nx1, Nz1, Nx2, Nz2;
std::array<double,2> pfStart, pfEnd;
double E01, E02; //Target parameters
};
class speGrid {
/*
* class to solve saddle point equations over grid of 2x2D momentum
*/
public:
speGrid(const speGridParameters& gridParam, const laserField LF);
virtual ~speGrid();
void populateGrid();
void solvePointRandom(size_t ix1, size_t iz1, size_t ix2, size_t iz2);
void solvePointRandom(spePoint& point);
void solveAllRandom();
void solveWithAdjacent(spePoint& pointSolved, spePoint& pointToSolve);
void propagateSolutionOverGrid(size_t ix1, size_t iz1, size_t ix2, size_t iz2);
void printToFile(std::string outputFilename);
spePoint& at(size_t ix1, size_t iz1, size_t ix2, size_t iz2);
//get and set methods
const speEqns& getSaddlePointEquations() const;
const std::vector<spePoint>& getGrid() const;
const auto& getPfStart() const;
const auto& getPfEnd() const;
const auto getNx1() const, getNz1() const, getNx2() const, getNz2() const;
private:
size_t Nx1, Nz1, Nx2, Nz2;
std::array<double,2> pfStart, pfEnd;
double ddpx1, ddpz1, ddpx2, ddpz2;
speEqns saddlePointEquations;
std::vector<spePoint> grid;
};
#endif /* SPEGRID_H_ */