aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/MultiParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar Luca Fedeli <luca.fedeli@cea.fr> 2019-06-03 10:16:32 +0200
committerGravatar Luca Fedeli <luca.fedeli@cea.fr> 2019-06-03 10:16:32 +0200
commit623c962eff3c57f7b3e413f3dda02eeccc4bdf4e (patch)
tree06d62d8d77a077dcd7e84d35bc0d792a26a07854 /Source/Particles/MultiParticleContainer.cpp
parentfb9684efe88a98ade20072bc566dc4adaa817b18 (diff)
downloadWarpX-623c962eff3c57f7b3e413f3dda02eeccc4bdf4e.tar.gz
WarpX-623c962eff3c57f7b3e413f3dda02eeccc4bdf4e.tar.zst
WarpX-623c962eff3c57f7b3e413f3dda02eeccc4bdf4e.zip
bw engine is now initialized in the MultiParticleContainer object
Diffstat (limited to 'Source/Particles/MultiParticleContainer.cpp')
-rw-r--r--Source/Particles/MultiParticleContainer.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp
index d1e28fd1f..30b60a391 100644
--- a/Source/Particles/MultiParticleContainer.cpp
+++ b/Source/Particles/MultiParticleContainer.cpp
@@ -159,6 +159,27 @@ MultiParticleContainer::InitData ()
pc->InitData();
}
pc_tmp->InitData();
+
+#ifdef WARPX_QED
+ //Initialize the lookup tables
+ //Generates tables if they do not exist
+ if(!does_file_exist("bw_engine_dndt.bin")){
+ bw_engine.compute_dN_dt_lookup_table(&std::cout);
+ bw_engine.write_dN_dt_table("bw_engine_dndt.bin");
+ }
+ else{
+ bw_engine.read_dN_dt_table("bw_engine_dndt.bin");
+ }
+
+ if(!does_file_exist("bw_engine_pair.bin")){
+ bw_engine.compute_cumulative_pair_table(&std::cout);
+ bw_engine.write_cumulative_pair_table("bw_engine_pair.bin");
+ }
+ else{
+ bw_engine.read_cumulative_pair_table("bw_engine_pair.bin");
+ }
+#endif
+
}