aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xExamples/Modules/qed/breit_wheeler/check_2d_tau_init.py30
-rw-r--r--Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init68
-rwxr-xr-xExamples/Modules/qed/quantum_synchrotron/check_2d_tau_init.py35
-rw-r--r--Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init92
-rw-r--r--Examples/Physics_applications/QED/inputs.2d109
-rw-r--r--Regression/WarpX-tests.ini32
-rw-r--r--Source/Particles/PhysicalParticleContainer.cpp1
-rw-r--r--Source/QED/BreitWheelerEngineWrapper.cpp12
-rw-r--r--Source/QED/BreitWheelerEngineWrapper.h33
-rw-r--r--Source/QED/QuantumSyncEngineWrapper.cpp13
-rw-r--r--Source/QED/QuantumSyncEngineWrapper.h33
11 files changed, 304 insertions, 154 deletions
diff --git a/Examples/Modules/qed/breit_wheeler/check_2d_tau_init.py b/Examples/Modules/qed/breit_wheeler/check_2d_tau_init.py
new file mode 100755
index 000000000..5677990f8
--- /dev/null
+++ b/Examples/Modules/qed/breit_wheeler/check_2d_tau_init.py
@@ -0,0 +1,30 @@
+#! /usr/bin/env python3
+import yt
+import numpy as np
+import scipy.stats as st
+import sys
+
+# This script checks if photons initialized with Breit Wheeler process enabled
+# do actually have an exponentially distributed optical depth
+
+# Tolerance
+tol = 1e-2
+
+def check():
+ filename = sys.argv[1]
+ data_set = yt.load(filename)
+
+ all_data = data_set.all_data()
+ res_tau = all_data["photons", 'particle_tau']
+
+ loc, scale = st.expon.fit(res_tau)
+
+ # loc should be very close to 0, scale should be very close to 1
+ assert(np.abs(loc - 0) < tol)
+ assert(np.abs(scale - 1) < tol)
+
+def main():
+ check()
+
+if __name__ == "__main__":
+ main() \ No newline at end of file
diff --git a/Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init b/Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init
new file mode 100644
index 000000000..9eb29ad1b
--- /dev/null
+++ b/Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init
@@ -0,0 +1,68 @@
+#################################
+####### GENERAL PARAMETERS ######
+#################################
+max_step = 0
+amr.n_cell = 128 128
+amr.max_grid_size = 128 # maximum size of each AMReX box, used to decompose the domain
+amr.blocking_factor = 32 # minimum size of each AMReX box, used to decompose the domain
+amr.plot_int = 10
+geometry.coord_sys = 0 # 0: Cartesian
+geometry.is_periodic = 0 0 # Is periodic?
+geometry.prob_lo = -32.e-6 -32.e-6 # physical domain
+geometry.prob_hi = 32.e-6 32.e-6
+amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
+warpx.fine_tag_lo = -5.e-6 -35.e-6
+warpx.fine_tag_hi = 5.e-6 -25.e-6
+
+#################################
+############ NUMERICS ###########
+#################################
+algo.current_deposition = esirkepov
+algo.charge_deposition = standard
+algo.field_gathering = standard
+algo.particle_pusher = boris
+interpolation.nox = 3 # Particle interpolation order. Must be the same in x, y, and z
+interpolation.noy = 3
+interpolation.noz = 3
+warpx.verbose = 1
+warpx.do_dive_cleaning = 0
+warpx.plot_raw_fields = 0
+warpx.plot_raw_fields_guards = 0
+warpx.plot_finepatch = 0
+warpx.plot_crsepatch = 0
+warpx.use_filter = 1
+warpx.cfl = 1. # if 1., the time step is set to its CFL limit
+warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
+
+#################################
+############ PLASMA #############
+#################################
+particles.nspecies = 1 # number of species
+particles.species_names = photons
+particles.photon_species = photons
+#################################
+
+photons.charge = -q_e
+photons.mass = m_e
+photons.injection_style = "NUniformPerCell"
+photons.profile = "constant"
+photons.xmin = -30e-6
+photons.ymin = -30e-6
+photons.zmin = -30e-6
+photons.xmax = 30e-6
+photons.ymax = 30e-6
+photons.zmax = 30e-6
+photons.num_particles_per_cell_each_dim = 2 2
+photons.density = 1e19
+photons.profile = "constant"
+photons.momentum_distribution_type = "gaussian"
+photons.ux_m = 0.0
+photons.uy_m = 0.0
+photons.uz_m = 0.0
+photons.ux_th = 100.
+photons.uy_th = 100.
+photons.uz_th = 100.
+##########QED####################
+photons.do_qed = 1
+photons.do_qed_breit_wheeler = 1
+#################################
diff --git a/Examples/Modules/qed/quantum_synchrotron/check_2d_tau_init.py b/Examples/Modules/qed/quantum_synchrotron/check_2d_tau_init.py
new file mode 100755
index 000000000..90420ba22
--- /dev/null
+++ b/Examples/Modules/qed/quantum_synchrotron/check_2d_tau_init.py
@@ -0,0 +1,35 @@
+#! /usr/bin/env python3
+import yt
+import numpy as np
+import scipy.stats as st
+import sys
+
+# This script checks if electrons and positrons initialized with
+# Quantum Synchrotron process enabled
+# do actually have an exponentially distributed optical depth
+
+# Tolerance
+tol = 1e-2
+
+def check():
+ filename = sys.argv[1]
+ data_set = yt.load(filename)
+
+ all_data = data_set.all_data()
+ res_ele_tau = all_data["electrons", 'particle_tau']
+ res_pos_tau = all_data["positrons", 'particle_tau']
+
+ loc_ele, scale_ele = st.expon.fit(res_ele_tau)
+ loc_pos, scale_pos = st.expon.fit(res_pos_tau)
+
+ # loc should be very close to 0, scale should be very close to 1
+ assert(np.abs(loc_ele - 0) < tol)
+ assert(np.abs(loc_pos - 0) < tol)
+ assert(np.abs(scale_ele - 1) < tol)
+ assert(np.abs(scale_pos - 1) < tol)
+
+def main():
+ check()
+
+if __name__ == "__main__":
+ main() \ No newline at end of file
diff --git a/Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init b/Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init
new file mode 100644
index 000000000..7d26aee0c
--- /dev/null
+++ b/Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init
@@ -0,0 +1,92 @@
+#################################
+####### GENERAL PARAMETERS ######
+#################################
+max_step = 0
+amr.n_cell = 128 128
+amr.max_grid_size = 128 # maximum size of each AMReX box, used to decompose the domain
+amr.blocking_factor = 32 # minimum size of each AMReX box, used to decompose the domain
+amr.plot_int = 10
+geometry.coord_sys = 0 # 0: Cartesian
+geometry.is_periodic = 0 0 # Is periodic?
+geometry.prob_lo = -32.e-6 -32.e-6 # physical domain
+geometry.prob_hi = 32.e-6 32.e-6
+amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
+warpx.fine_tag_lo = -5.e-6 -35.e-6
+warpx.fine_tag_hi = 5.e-6 -25.e-6
+
+#################################
+############ NUMERICS ###########
+#################################
+algo.current_deposition = esirkepov
+algo.charge_deposition = standard
+algo.field_gathering = standard
+algo.particle_pusher = boris
+interpolation.nox = 3 # Particle interpolation order. Must be the same in x, y, and z
+interpolation.noy = 3
+interpolation.noz = 3
+warpx.verbose = 1
+warpx.do_dive_cleaning = 0
+warpx.plot_raw_fields = 0
+warpx.plot_raw_fields_guards = 0
+warpx.plot_finepatch = 0
+warpx.plot_crsepatch = 0
+warpx.use_filter = 1
+warpx.cfl = 1. # if 1., the time step is set to its CFL limit
+warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
+
+#################################
+############ PLASMA #############
+#################################
+particles.nspecies = 2 # number of species
+particles.species_names = electrons positrons
+#################################
+
+electrons.charge = -q_e
+electrons.mass = m_e
+electrons.injection_style = "NUniformPerCell"
+electrons.profile = "constant"
+electrons.xmin = -30e-6
+electrons.ymin = -30e-6
+electrons.zmin = -30e-6
+electrons.xmax = 30e-6
+electrons.ymax = 30e-6
+electrons.zmax = 30e-6
+electrons.num_particles_per_cell_each_dim = 2 2
+electrons.density = 1e19
+electrons.profile = "constant"
+electrons.momentum_distribution_type = "gaussian"
+electrons.ux_m = 0.0
+electrons.uy_m = 0.0
+electrons.uz_m = 0.0
+electrons.ux_th = 100.
+electrons.uy_th = 100.
+electrons.uz_th = 100.
+##########QED####################
+electrons.do_qed = 1
+electrons.do_qed_quantum_sync = 1
+#################################
+
+positrons.charge = q_e
+positrons.mass = m_e
+positrons.injection_style = "NUniformPerCell"
+positrons.profile = "constant"
+positrons.xmin = -30e-6
+positrons.ymin = -30e-6
+positrons.zmin = -30e-6
+positrons.xmax = 30e-6
+positrons.ymax = 30e-6
+positrons.zmax = 30e-6
+positrons.num_particles_per_cell_each_dim = 2 2
+positrons.density = 1e19
+positrons.profile = "constant"
+positrons.momentum_distribution_type = "gaussian"
+positrons.ux_m = 0.0
+positrons.uy_m = 0.0
+positrons.uz_m = 0.0
+positrons.ux_th = 100.
+positrons.uy_th = 100.
+positrons.uz_th = 100.
+##########QED####################
+positrons.do_qed = 1
+positrons.do_qed_quantum_sync = 1
+#################################
diff --git a/Examples/Physics_applications/QED/inputs.2d b/Examples/Physics_applications/QED/inputs.2d
deleted file mode 100644
index 2142f88ad..000000000
--- a/Examples/Physics_applications/QED/inputs.2d
+++ /dev/null
@@ -1,109 +0,0 @@
-#################################
-####### GENERAL PARAMETERS ######
-#################################
-max_step = 200
-amr.n_cell = 128 128
-amr.max_grid_size = 128 # maximum size of each AMReX box, used to decompose the domain
-amr.blocking_factor = 32 # minimum size of each AMReX box, used to decompose the domain
-amr.plot_int = 10
-geometry.coord_sys = 0 # 0: Cartesian
-geometry.is_periodic = 0 0 # Is periodic?
-geometry.prob_lo = -30.e-6 -56.e-6 # physical domain
-geometry.prob_hi = 30.e-6 12.e-6
-amr.max_level = 0 # Maximum level in hierarchy (1 might be unstable, >1 is not supported)
-warpx.fine_tag_lo = -5.e-6 -35.e-6
-warpx.fine_tag_hi = 5.e-6 -25.e-6
-
-#################################
-############ NUMERICS ###########
-#################################
-algo.current_deposition = esirkepov
-algo.charge_deposition = standard
-algo.field_gathering = standard
-algo.particle_pusher = boris
-interpolation.nox = 3 # Particle interpolation order. Must be the same in x, y, and z
-interpolation.noy = 3
-interpolation.noz = 3
-warpx.verbose = 1
-warpx.do_dive_cleaning = 0
-warpx.plot_raw_fields = 1
-warpx.plot_raw_fields_guards = 1
-warpx.plot_finepatch = 1
-warpx.plot_crsepatch = 1
-warpx.use_filter = 1
-warpx.cfl = 1. # if 1., the time step is set to its CFL limit
-warpx.do_pml = 1 # use Perfectly Matched Layer as boundary condition
-
-#################################
-############ PLASMA #############
-#################################
-particles.nspecies = 2 # number of species
-particles.species_names = photons electrons
-particles.photon_species = photons
-
-electrons.charge = -q_e
-electrons.mass = m_e
-electrons.injection_style = "gaussian_beam"
-electrons.x_rms = .5e-6
-electrons.y_rms = .5e-6
-electrons.z_rms = .5e-6
-electrons.x_m = 0.
-electrons.y_m = 0.
-electrons.z_m = -28.e-6
-electrons.npart = 100
-electrons.q_tot = -1.e-12
-electrons.profile = "constant"
-electrons.density = 8.e23 # not used in case of a gaussian beam
-electrons.momentum_distribution_type = "gaussian"
-electrons.ux_m = 0.0
-electrons.uy_m = 0.0
-electrons.uz_m = 500.
-electrons.ux_th = 2.
-electrons.uy_th = 2.
-electrons.uz_th = 50.
-##########QED####################
-electrons.do_qed = 1
-electrons.do_qed_quantum_sync = 1
-#################################
-
-photons.charge = -q_e
-photons.mass = m_e
-photons.injection_style = "gaussian_beam"
-photons.x_rms = .5e-6
-photons.y_rms = .5e-6
-photons.z_rms = .5e-6
-photons.x_m = 0.
-photons.y_m = 0.
-photons.z_m = -20.e-6
-photons.npart = 100
-photons.q_tot = -1.e-12
-photons.profile = "constant"
-photons.density = 8.e23 # not used in case of a gaussian beam
-photons.momentum_distribution_type = "gaussian"
-photons.ux_m = 0.0
-photons.uy_m = 0.0
-photons.uz_m = 500.
-photons.ux_th = 2.
-photons.uy_th = 2.
-photons.uz_th = 50.
-##########QED####################
-photons.do_qed = 1
-photons.do_qed_breit_wheeler = 1
-#################################
-
-
-#################################
-############ PLASMA #############
-#################################
-lasers.nlasers = 1
-lasers.names = laser1
-laser1.profile = Gaussian
-laser1.position = 0. 0. 9.e-6 # This point is on the laser plane
-laser1.direction = 0. 0. 1. # The plane normal direction
-laser1.polarization = 0. 1. 0. # The main polarization vector
-laser1.e_max = 16.e12 # Maximum amplitude of the laser field (in V/m)
-laser1.profile_waist = 5.e-6 # The waist of the laser (in m)
-laser1.profile_duration = 15.e-15 # The duration of the laser (in s)
-laser1.profile_t_peak = 30.e-15 # Time at which the laser reaches its peak (in s)
-laser1.profile_focal_distance = 100.e-6 # Focal distance from the antenna (in m)
-laser1.wavelength = 0.8e-6 # The wavelength of the laser (in m)
diff --git a/Regression/WarpX-tests.ini b/Regression/WarpX-tests.ini
index e40f7ee54..c31e04d69 100644
--- a/Regression/WarpX-tests.ini
+++ b/Regression/WarpX-tests.ini
@@ -632,3 +632,35 @@ compileTest = 0
doVis = 0
compareParticles = 0
analysisRoutine = Examples/Tests/photon_pusher/check.py
+
+# NEEDS PICSAR on the QED branch
+#[breit_wheeler_tau_init]
+#buildDir = .
+#inputFile = Examples/Modules/qed/breit_wheeler/inputs.2d_test_tau_init
+#dim = 2
+#addToCompileString = QED=TRUE
+#restartTest = 0
+#useMPI = 1
+#numprocs = 2
+#useOMP = 1
+#numthreads = 2
+#compileTest = 0
+#doVis = 0
+#compareParticles = 0
+#analysisRoutine = Examples/Modules/qed/breit_wheeler/check.py
+
+# NEEDS PICSAR on the QED branch
+#[quantum_sync_tau_init]
+#buildDir = .
+#inputFile = Examples/Modules/qed/quantum_synchrotron/inputs.2d_test_tau_init
+#dim = 2
+#addToCompileString = QED=TRUE
+#restartTest = 0
+#useMPI = 1
+#numprocs = 2
+#useOMP = 1
+#numthreads = 2
+#compileTest = 0
+#doVis = 0
+#compareParticles = 0
+#analysisRoutine = Examples/Modules/qed/quantum_synchrotron/check.py \ No newline at end of file
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp
index ac5b98dae..3d3d3ff74 100644
--- a/Source/Particles/PhysicalParticleContainer.cpp
+++ b/Source/Particles/PhysicalParticleContainer.cpp
@@ -2143,7 +2143,6 @@ void PhysicalParticleContainer::InitTauQuantumSync()
BL_PROFILE("PhysicalParticleContainer::InitTauQuantumSync");
//Get functor
auto get_opt = shr_ptr_qs_engine->build_optical_depth_functor();
-
//Looping over all the particles
int num_levels = finestLevel() + 1;
for (int lev=0; lev < num_levels; ++lev)
diff --git a/Source/QED/BreitWheelerEngineWrapper.cpp b/Source/QED/BreitWheelerEngineWrapper.cpp
index 72fe06d63..97934589a 100644
--- a/Source/QED/BreitWheelerEngineWrapper.cpp
+++ b/Source/QED/BreitWheelerEngineWrapper.cpp
@@ -47,16 +47,16 @@ bool BreitWheelerEvolveOpticalDepth::operator()(
// Factory class =============================
-BreitWheelerEngine::BreitWheelerEngine(){}
+BreitWheelerEngine::BreitWheelerEngine (){}
//Builds the functor to initialize the optical depth
-BreitWheelerGetOpticalDepth BreitWheelerEngine::build_optical_depth_functor()
+BreitWheelerGetOpticalDepth BreitWheelerEngine::build_optical_depth_functor ()
{
return BreitWheelerGetOpticalDepth();
}
//Builds the functor to evolve the optical depth
-BreitWheelerEvolveOpticalDepth BreitWheelerEngine::build_evolve_functor()
+BreitWheelerEvolveOpticalDepth BreitWheelerEngine::build_evolve_functor ()
{
AMREX_ALWAYS_ASSERT(lookup_tables_initialized);
@@ -66,7 +66,7 @@ BreitWheelerEvolveOpticalDepth BreitWheelerEngine::build_evolve_functor()
//Initializes the Lookup tables using the default settings
//provided by the library
-void BreitWheelerEngine::computes_lookup_tables_default()
+void BreitWheelerEngine::computes_lookup_tables_default ()
{
//A control parameters structure
//with the default values provided by the library
@@ -77,13 +77,13 @@ void BreitWheelerEngine::computes_lookup_tables_default()
lookup_tables_initialized = true;
}
-bool BreitWheelerEngine::are_lookup_tables_initialized() const
+bool BreitWheelerEngine::are_lookup_tables_initialized () const
{
return lookup_tables_initialized;
}
//Private function which actually computes the lookup tables
-void BreitWheelerEngine::computes_lookup_tables(
+void BreitWheelerEngine::computes_lookup_tables (
WarpXBreitWheelerWrapperCtrl ctrl)
{
//Lambda is not actually used if S.I. units are enabled
diff --git a/Source/QED/BreitWheelerEngineWrapper.h b/Source/QED/BreitWheelerEngineWrapper.h
index 9aa897e8d..aaa94c0ec 100644
--- a/Source/QED/BreitWheelerEngineWrapper.h
+++ b/Source/QED/BreitWheelerEngineWrapper.h
@@ -1,9 +1,6 @@
#ifndef WARPX_breit_wheeler_engine_wrapper_h_
#define WARPX_breit_wheeler_engine_wrapper_h_
-//This file provides a wrapper aroud the breit_wheeler engine
-//provided by the QED modules of the PICSAR library
-
#include "QedWrapperCommons.h"
//BW ENGINE from PICSAR
@@ -33,11 +30,12 @@ struct BreitWheelerEngineInnards
// These functors provide the core elementary functions of the library
// Can be included in GPU kernels
-// Initialization of the optical depth
+/* \brief Functor to initialize the optical depth of photons for the
+* Breit-Wheeler process */
class BreitWheelerGetOpticalDepth
{
public:
- BreitWheelerGetOpticalDepth()
+ BreitWheelerGetOpticalDepth ()
{};
AMREX_GPU_DEVICE
@@ -66,22 +64,25 @@ private:
};
// Factory class =============================
+
+/* \brief Wrapper for the Breit Wheeler engine of the PICSAR library */
class BreitWheelerEngine
{
public:
- BreitWheelerEngine();
+ BreitWheelerEngine ();
- //Builds the functor to initialize the optical depth
- BreitWheelerGetOpticalDepth build_optical_depth_functor();
+ /* \brief Builds the functor to initialize the optical depth */
+ BreitWheelerGetOpticalDepth build_optical_depth_functor ();
- //Builds the functor to evolve the optical depth
- BreitWheelerEvolveOpticalDepth build_evolve_functor();
+ /* \brief Builds the functor to evolve the optical depth */
+ BreitWheelerEvolveOpticalDepth build_evolve_functor ();
- //Computes the Lookup tables using the default settings
- //provided by the library
- void computes_lookup_tables_default();
+ /* \brief Computes the Lookup tables using the default settings
+ * provided by the PICSAR library */
+ void computes_lookup_tables_default ();
- bool are_lookup_tables_initialized() const;
+ /* \brief Checks if lookup tables are properly initialized */
+ bool are_lookup_tables_initialized () const;
private:
bool lookup_tables_initialized = false;
@@ -89,10 +90,10 @@ private:
BreitWheelerEngineInnards innards;
//Private function which actually computes the lookup tables
- void computes_lookup_tables(
+ void computes_lookup_tables (
WarpXBreitWheelerWrapperCtrl ctrl);
};
//============================================
-#endif //WARPX_breit_wheeler_engine_wrapper_H_
+#endif //WARPX_breit_wheeler_engine_wrapper_H_ \ No newline at end of file
diff --git a/Source/QED/QuantumSyncEngineWrapper.cpp b/Source/QED/QuantumSyncEngineWrapper.cpp
index 544be075e..90bd9cefc 100644
--- a/Source/QED/QuantumSyncEngineWrapper.cpp
+++ b/Source/QED/QuantumSyncEngineWrapper.cpp
@@ -47,16 +47,17 @@ bool QuantumSynchrotronEvolveOpticalDepth::operator()(
// Factory class =============================
-QuantumSynchrotronEngine::QuantumSynchrotronEngine(){}
+QuantumSynchrotronEngine::QuantumSynchrotronEngine (){}
//Builds the functor to evolve the optical depth
-QuantumSynchrotronGetOpticalDepth QuantumSynchrotronEngine::build_optical_depth_functor()
+QuantumSynchrotronGetOpticalDepth
+QuantumSynchrotronEngine::build_optical_depth_functor ()
{
return QuantumSynchrotronGetOpticalDepth();
}
//Builds the functor to evolve the optical depth
-QuantumSynchrotronEvolveOpticalDepth QuantumSynchrotronEngine::build_evolve_functor()
+QuantumSynchrotronEvolveOpticalDepth QuantumSynchrotronEngine::build_evolve_functor ()
{
AMREX_ALWAYS_ASSERT(lookup_tables_initialized);
@@ -65,7 +66,7 @@ QuantumSynchrotronEvolveOpticalDepth QuantumSynchrotronEngine::build_evolve_func
//Initializes the Lookup tables using the default settings
//provided by the library
-void QuantumSynchrotronEngine::computes_lookup_tables_default()
+void QuantumSynchrotronEngine::computes_lookup_tables_default ()
{
//A control parameters structure
//with the default values provided by the library
@@ -76,13 +77,13 @@ void QuantumSynchrotronEngine::computes_lookup_tables_default()
lookup_tables_initialized = true;
}
-bool QuantumSynchrotronEngine::are_lookup_tables_initialized() const
+bool QuantumSynchrotronEngine::are_lookup_tables_initialized () const
{
return lookup_tables_initialized;
}
//Private function which actually computes the lookup tables
-void QuantumSynchrotronEngine::computes_lookup_tables(
+void QuantumSynchrotronEngine::computes_lookup_tables (
WarpXQuantumSynchrotronWrapperCtrl ctrl)
{
//Lambda is not actually used if S.I. units are enabled
diff --git a/Source/QED/QuantumSyncEngineWrapper.h b/Source/QED/QuantumSyncEngineWrapper.h
index 54a4b5ce6..af3731f6c 100644
--- a/Source/QED/QuantumSyncEngineWrapper.h
+++ b/Source/QED/QuantumSyncEngineWrapper.h
@@ -1,9 +1,6 @@
#ifndef WARPX_quantum_sync_engine_wrapper_h_
#define WARPX_quantum_sync_engine_wrapper_h_
-//This file provides a wrapper aroud the breit_wheeler engine
-//provided by the QED modules of the PICSAR library
-
#include "QedWrapperCommons.h"
//QS ENGINE from PICSAR
@@ -33,11 +30,12 @@ struct QuantumSynchrotronEngineInnards
// These functors provide the core elementary functions of the library
// Can be included in GPU kernels
-// Initialization of the optical depth
+/* \brief Functor to initialize the optical depth of leptons for the
+* Quantum Synchrotron process */
class QuantumSynchrotronGetOpticalDepth
{
public:
- QuantumSynchrotronGetOpticalDepth()
+ QuantumSynchrotronGetOpticalDepth ()
{};
AMREX_GPU_DEVICE
@@ -66,22 +64,25 @@ private:
};
// Factory class =============================
+
+/* \brief Wrapper for the Quantum Synchrotron engine of the PICSAR library */
class QuantumSynchrotronEngine
{
public:
- QuantumSynchrotronEngine();
+ QuantumSynchrotronEngine ();
- //Builds the functor to initialize the optical depth
- QuantumSynchrotronGetOpticalDepth build_optical_depth_functor();
+ /* \brief Builds the functor to initialize the optical depth */
+ QuantumSynchrotronGetOpticalDepth build_optical_depth_functor ();
- //Builds the functor to evolve the optical depth
- QuantumSynchrotronEvolveOpticalDepth build_evolve_functor();
+ /* \brief Builds the functor to evolve the optical depth */
+ QuantumSynchrotronEvolveOpticalDepth build_evolve_functor ();
- //Computes the Lookup tables using the default settings
- //provided by the library
- void computes_lookup_tables_default();
+ /* \brief Computes the Lookup tables using the default settings
+ * provided by the PICSAR library */
+ void computes_lookup_tables_default ();
- bool are_lookup_tables_initialized() const;
+ /* \brief Checks if lookup tables are properly initialized */
+ bool are_lookup_tables_initialized () const;
private:
bool lookup_tables_initialized = false;
@@ -89,10 +90,10 @@ private:
QuantumSynchrotronEngineInnards innards;
//Private function which actually computes the lookup tables
- void computes_lookup_tables(
+ void computes_lookup_tables (
WarpXQuantumSynchrotronWrapperCtrl ctrl);
};
//============================================
-#endif //WARPX_quantum_sync_engine_wrapper_h_
+#endif //WARPX_quantum_sync_engine_wrapper_h_ \ No newline at end of file