-
Notifications
You must be signed in to change notification settings - Fork 202
/
Copy pathRadiationHandler.H
86 lines (66 loc) · 2.18 KB
/
RadiationHandler.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/* Copyright 2023 Thomas Clark, Luca Fedeli
*
* This file is part of WarpX.
*
* License: BSD-3-Clause-LBNL
*/
#ifndef WARPX_PARTICLES_RADIATION_H_
#define WARPX_PARTICLES_RADIATION_H_
#include "Utils/Math/Complex.H"
#include "Particles/Pusher/GetAndSetPosition.H"
#include <AMReX_REAL.H>
#include <AMReX_Vector.H>
#include <AMReX_Box.H>
#include <AMReX_Vector.H>
#include <AMReX_FArrayBox.H>
#include <AMReX_Geometry.H>
#include "WarpX.H"
#include "Particles/Sorting/SortingUtils.H"
#include <memory>
#include <string>
/* \brief CollisionHandler is a light weight class that contains the
* calculation of radiation for particles at each frequencies and angles.
*/
class RadiationHandler
{
public:
RadiationHandler ();
/* Perform the calculation of the radiation */
//void doRadiation (amrex::Real dt, MultiParticleContainer* mypc);
void add_radiation_contribution(const amrex::Real dt, std::unique_ptr<WarpXParticleContainer>& pc, amrex::Real current_time);
void add_detector();
void gather_and_write_radiation(const std::string& filename);
void Integral_overtime();
private:
// Frequency range
amrex::Vector<amrex::Real> m_omega_range;
// Dimensions of the detector
amrex::Vector<amrex::Real> m_theta_range;
int m_omega_points;
//put a detector
int m_get_a_detector;
// Resolution of the detector
amrex::Vector<amrex::Real> m_d_theta;
double m_d_omega;
//The vector with the resolution of the detector
amrex::Vector<amrex::Real> m_d_det;
amrex::Real m_det_distance;
//Define the Fab with the datas
int ncomp;
amrex::Vector<int> m_det_pts;
amrex::Vector<int> m_det_direction;
amrex::Vector<amrex::Real> m_pos_det;
amrex::Vector<amrex::Real> n;
//resolution of the grid of the detectir
amrex::Vector<amrex::Real> m_d_d;
//
amrex::Gpu::DeviceVector<amrex::Real> m_radiation_data;
amrex::Gpu::DeviceVector<amrex::Real> m_radiation_calculation;
//
amrex::Real dephas;
//
amrex::Vector<amrex::Vector<amrex::Real>> det_bornes;
amrex::Vector<amrex::Vector<amrex::Real>> det_pos;
amrex::Vector<amrex::Real> omega_calc;
};
#endif // WARPX_PARTICLES_RADIATION_H_