Skip to content

Commit

Permalink
Merge pull request ECP-WarpX#4 from lucafedeli88/improve_radiation_re…
Browse files Browse the repository at this point in the history
…action_III

[WIP] Improve radiation reaction III
  • Loading branch information
tmsclark2 committed Dec 20, 2023
2 parents f57bf3b + 5f11973 commit 364ab03
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 206 deletions.
50 changes: 14 additions & 36 deletions Source/Particles/Radiation/RadiationHandler.H
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@

#include "RadiationHandler_fwd.H"

#include "Particles/Pusher/GetAndSetPosition.H"
#include "Particles/Sorting/SortingUtils.H"
#include <ablastr/math/Complex.H>

#include <AMReX_GpuContainers.H>
#include <AMReX_REAL.H>
Expand All @@ -32,52 +31,31 @@ public:
/* 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 gather_and_write_radiation(const std::string& filename);
void Integral_overtime();

void Integral_overtime();

private:
void add_detector(const amrex::Array<amrex::Real,3>& center);

// Frequency range
amrex::Vector<amrex::Real> m_omega_range;
amrex::Array<amrex::Real,2> m_omega_range;
int m_omega_points;
amrex::Gpu::DeviceVector<amrex::Real> m_omegas;

// Dimensions of the detector
amrex::Vector<amrex::Real> m_theta_range;

int m_omega_points;
amrex::Array<amrex::Real,2> m_theta_range;

//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;
amrex::Array<int,2> m_det_pts;
amrex::Array<amrex::Real,3> m_det_direction;
amrex::Array<amrex::Real,3> m_det_orientation;

//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::Gpu::DeviceVector<amrex::Real> det_pos_x;
amrex::Gpu::DeviceVector<amrex::Real> det_pos_y;
amrex::Gpu::DeviceVector<amrex::Real> det_pos_z;

//
amrex::Vector<amrex::Vector<amrex::Real>> det_bornes;
amrex::Vector<amrex::Vector<amrex::Real>> det_pos;
amrex::Vector<amrex::Real> omega_calc;
amrex::Gpu::DeviceVector<ablastr::math::Complex> m_radiation_data;

};
#endif // WARPX_PARTICLES_RADIATION_H
Loading

0 comments on commit 364ab03

Please sign in to comment.