From d4406ac0dfd0e650bc85cbd8b3255f906d5452dd Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Thu, 9 Jan 2020 21:27:29 -0800 Subject: parser for particles in PhysicalParticleContainer --- Source/Particles/PhysicalParticleContainer.cpp | 213 ++++++++++++++++++++++--- 1 file changed, 192 insertions(+), 21 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 94d9bc363..b11a8e82b 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1010,18 +1010,74 @@ PhysicalParticleContainer::FieldGather (int lev, const FArrayBox& byfab = By[pti]; const FArrayBox& bzfab = Bz[pti]; - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); - + if (WarpX::E_ext_particle_s=="constant" || + WarpX::E_ext_particle_s=="default") { + amrex::Print() << " const " << WarpX::E_external_particle[0]; + amrex::Print() << " " << WarpX::E_external_particle[1]; + amrex::Print() << " " << WarpX::E_external_particle[2] << "\n"; + Exp.assign(np,WarpX::E_external_particle[0]); + Eyp.assign(np,WarpX::E_external_particle[1]); + Ezp.assign(np,WarpX::E_external_particle[2]); + } + if (WarpX::B_ext_particle_s=="constant" || + WarpX::B_ext_particle_s=="default") { + amrex::Print() << " const " << WarpX::B_external_particle[0]; + amrex::Print() << " " << WarpX::B_external_particle[1]; + amrex::Print() << " " << WarpX::B_external_particle[2] << "\n"; + Bxp.assign(np,WarpX::B_external_particle[0]); + Byp.assign(np,WarpX::B_external_particle[1]); + Bzp.assign(np,WarpX::B_external_particle[2]); + } // // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); + // to delete comment + if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { + // Points to particle position + Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); + Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); + Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); + ParserWrapper *xfield_partparser = Ex_particle_parser.get(); + ParserWrapper *yfield_partparser = Ey_particle_parser.get(); + ParserWrapper *zfield_partparser = Ez_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Real x = xp_data[i]; + Real y = yp_data[i]; + Real z = zp_data[i]; + Exp_data[i] = xfield_partparser->getField(x,y,z); + Eyp_data[i] = yfield_partparser->getField(x,y,z); + Ezp_data[i] = zfield_partparser->getField(x,y,z); + }); + } + if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { + // Points to particle position + Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); + Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); + Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); + ParserWrapper *xfield_partparser = Bx_particle_parser.get(); + ParserWrapper *yfield_partparser = By_particle_parser.get(); + ParserWrapper *zfield_partparser = Bz_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Real x = xp_data[i]; + Real y = yp_data[i]; + Real z = zp_data[i]; + Bxp_data[i] = xfield_partparser->getField(x,y,z); + Byp_data[i] = yfield_partparser->getField(x,y,z); + Bzp_data[i] = zfield_partparser->getField(x,y,z); + }); + } + + // // Field Gather // @@ -1147,13 +1203,72 @@ PhysicalParticleContainer::Evolve (int lev, exfab, eyfab, ezfab, bxfab, byfab, bzfab); } - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); + if (WarpX::E_ext_particle_s=="constant" || + WarpX::E_ext_particle_s=="default") { + amrex::Print() << " const " << WarpX::E_external_particle[0]; + amrex::Print() << " " << WarpX::E_external_particle[1]; + amrex::Print() << " " << WarpX::E_external_particle[2] << "\n"; + Exp.assign(np,WarpX::E_external_particle[0]); + Eyp.assign(np,WarpX::E_external_particle[1]); + Ezp.assign(np,WarpX::E_external_particle[2]); + } + if (WarpX::B_ext_particle_s=="constant" || + WarpX::B_ext_particle_s=="default") { + amrex::Print() << " const " << WarpX::B_external_particle[0]; + amrex::Print() << " " << WarpX::B_external_particle[1]; + amrex::Print() << " " << WarpX::B_external_particle[2] << "\n"; + Bxp.assign(np,WarpX::B_external_particle[0]); + Byp.assign(np,WarpX::B_external_particle[1]); + Bzp.assign(np,WarpX::B_external_particle[2]); + } + // + // copy data from particle container to temp arrays + // + pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); + // to delete comment + if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { + // Points to particle position + Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); + Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); + Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); + ParserWrapper *xfield_partparser = Ex_particle_parser.get(); + ParserWrapper *yfield_partparser = Ey_particle_parser.get(); + ParserWrapper *zfield_partparser = Ez_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Real x = xp_data[i]; + Real y = yp_data[i]; + Real z = zp_data[i]; + Exp_data[i] = xfield_partparser->getField(x,y,z); + Eyp_data[i] = yfield_partparser->getField(x,y,z); + Ezp_data[i] = zfield_partparser->getField(x,y,z); + }); + } + if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { + // Points to particle position + Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); + Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); + Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); + ParserWrapper *xfield_partparser = Bx_particle_parser.get(); + ParserWrapper *yfield_partparser = By_particle_parser.get(); + ParserWrapper *zfield_partparser = Bz_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Real x = xp_data[i]; + Real y = yp_data[i]; + Real z = zp_data[i]; + Bxp_data[i] = xfield_partparser->getField(x,y,z); + Byp_data[i] = yfield_partparser->getField(x,y,z); + Bzp_data[i] = zfield_partparser->getField(x,y,z); + }); + } - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); // Determine which particles deposit/gather in the buffer, and // which particles deposit/gather in the fine patch @@ -1795,19 +1910,75 @@ PhysicalParticleContainer::PushP (int lev, Real dt, const FArrayBox& byfab = By[pti]; const FArrayBox& bzfab = Bz[pti]; - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); - - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); - + if (WarpX::E_ext_particle_s=="constant" || + WarpX::E_ext_particle_s=="default") { + amrex::Print() << " const " << WarpX::E_external_particle[0]; + amrex::Print() << " " << WarpX::E_external_particle[1]; + amrex::Print() << " " << WarpX::E_external_particle[2] << "\n"; + Exp.assign(np,WarpX::E_external_particle[0]); + Eyp.assign(np,WarpX::E_external_particle[1]); + Ezp.assign(np,WarpX::E_external_particle[2]); + } + if (WarpX::B_ext_particle_s=="constant" || + WarpX::B_ext_particle_s=="default") { + amrex::Print() << " const " << WarpX::B_external_particle[0]; + amrex::Print() << " " << WarpX::B_external_particle[1]; + amrex::Print() << " " << WarpX::B_external_particle[2] << "\n"; + Bxp.assign(np,WarpX::B_external_particle[0]); + Byp.assign(np,WarpX::B_external_particle[1]); + Bzp.assign(np,WarpX::B_external_particle[2]); + } // // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); + // to delete comment + if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { + // Points to particle position + Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); + Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); + Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); + ParserWrapper *xfield_partparser = Ex_particle_parser.get(); + ParserWrapper *yfield_partparser = Ey_particle_parser.get(); + ParserWrapper *zfield_partparser = Ez_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Real x = xp_data[i]; + Real y = yp_data[i]; + Real z = zp_data[i]; + Exp_data[i] = xfield_partparser->getField(x,y,z); + Eyp_data[i] = yfield_partparser->getField(x,y,z); + Ezp_data[i] = zfield_partparser->getField(x,y,z); + }); + } + if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { + // Points to particle position + Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); + Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); + Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); + Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); + ParserWrapper *xfield_partparser = Bx_particle_parser.get(); + ParserWrapper *yfield_partparser = By_particle_parser.get(); + ParserWrapper *zfield_partparser = Bz_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Real x = xp_data[i]; + Real y = yp_data[i]; + Real z = zp_data[i]; + Bxp_data[i] = xfield_partparser->getField(x,y,z); + Byp_data[i] = yfield_partparser->getField(x,y,z); + Bzp_data[i] = zfield_partparser->getField(x,y,z); + }); + } + + + int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal(); FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, &exfab, &eyfab, &ezfab, &bxfab, &byfab, &bzfab, -- cgit v1.2.3 From acb42c129e67e716e6b0dd917105c5b3dc31da3f Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Thu, 9 Jan 2020 21:34:58 -0800 Subject: cleaning --- Source/Particles/PhysicalParticleContainer.cpp | 18 ++++++++---------- Source/Particles/WarpXParticleContainer.H | 3 +-- Source/Particles/WarpXParticleContainer.cpp | 2 -- Source/WarpX.H | 12 ------------ Source/WarpX.cpp | 3 --- 5 files changed, 9 insertions(+), 29 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index b11a8e82b..34b8d6cb4 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1033,7 +1033,6 @@ PhysicalParticleContainer::FieldGather (int lev, // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - // to delete comment if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { // Points to particle position Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); @@ -1042,9 +1041,9 @@ PhysicalParticleContainer::FieldGather (int lev, Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); - ParserWrapper *xfield_partparser = Ex_particle_parser.get(); - ParserWrapper *yfield_partparser = Ey_particle_parser.get(); - ParserWrapper *zfield_partparser = Ez_particle_parser.get(); + ParserWrapper *xfield_partparser = Ex_particle_parser.get(); + ParserWrapper *yfield_partparser = Ey_particle_parser.get(); + ParserWrapper *zfield_partparser = Ez_particle_parser.get(); amrex::ParallelFor(pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { Real x = xp_data[i]; @@ -1063,9 +1062,9 @@ PhysicalParticleContainer::FieldGather (int lev, Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); - ParserWrapper *xfield_partparser = Bx_particle_parser.get(); - ParserWrapper *yfield_partparser = By_particle_parser.get(); - ParserWrapper *zfield_partparser = Bz_particle_parser.get(); + ParserWrapper *xfield_partparser = Bx_particle_parser.get(); + ParserWrapper *yfield_partparser = By_particle_parser.get(); + ParserWrapper *zfield_partparser = Bz_particle_parser.get(); amrex::ParallelFor(pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { Real x = xp_data[i]; @@ -1076,7 +1075,7 @@ PhysicalParticleContainer::FieldGather (int lev, Bzp_data[i] = zfield_partparser->getField(x,y,z); }); } - + // // Field Gather @@ -1225,7 +1224,7 @@ PhysicalParticleContainer::Evolve (int lev, // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - // to delete comment + if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { // Points to particle position Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); @@ -1933,7 +1932,6 @@ PhysicalParticleContainer::PushP (int lev, Real dt, // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - // to delete comment if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { // Points to particle position Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H index b80dfb056..14eb1a96f 100644 --- a/Source/Particles/WarpXParticleContainer.H +++ b/Source/Particles/WarpXParticleContainer.H @@ -323,7 +323,6 @@ public: //amrex::Real getMass () {return mass;} amrex::ParticleReal getMass () const {return mass;} - // to delete comment // ParserWrapper for B_external on the particle std::unique_ptr Bx_particle_parser; std::unique_ptr By_particle_parser; @@ -332,7 +331,7 @@ public: std::unique_ptr Ex_particle_parser; std::unique_ptr Ey_particle_parser; std::unique_ptr Ez_particle_parser; - + protected: diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 9d5f4bcf4..465539d1a 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -115,8 +115,6 @@ WarpXParticleContainer::WarpXParticleContainer (AmrCore* amr_core, int ispecies) m_yp.resize(num_threads); m_zp.resize(num_threads); - - // to delete comment if (WarpX::B_ext_particle_s == "parse_b_ext_particle_function") { Bx_particle_parser.reset(new ParserWrapper( makeParser(WarpX::str_Bx_ext_particle_function))); diff --git a/Source/WarpX.H b/Source/WarpX.H index 91a815f7c..5818df394 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -92,7 +92,6 @@ public: // Initialization Type for External E and B on grid and particles static std::string B_ext_grid_s; static std::string E_ext_grid_s; - // EB parser for particles -- to delete comment static std::string B_ext_particle_s; static std::string E_ext_particle_s; @@ -114,7 +113,6 @@ public: std::unique_ptr Eyfield_parser; std::unique_ptr Ezfield_parser; - // EV parser for particles -- to delete comment // Parser for B_external on the particle static std::string str_Bx_ext_particle_function; static std::string str_By_ext_particle_function; @@ -124,16 +122,6 @@ public: static std::string str_Ey_ext_particle_function; static std::string str_Ez_ext_particle_function; - // -- to delete comment - // ParserWrapper for B_external on the particle - static std::unique_ptr Bx_particle_parser; - static std::unique_ptr By_particle_parser; - static std::unique_ptr Bz_particle_parser; - // ParserWrapper for E_external on the particle - static std::unique_ptr Ex_particle_parser; - static std::unique_ptr Ey_particle_parser; - static std::unique_ptr Ez_particle_parser; - // Algorithms static long current_deposition_algo; static long charge_deposition_algo; diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index bc0edf979..d9be00df8 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -32,7 +32,6 @@ Vector WarpX::B_external_grid(3, 0.0); std::string WarpX::B_ext_grid_s = "default"; std::string WarpX::E_ext_grid_s = "default"; -//to delete comment std::string WarpX::B_ext_particle_s = "default"; std::string WarpX::E_ext_particle_s = "default"; @@ -45,7 +44,6 @@ std::string WarpX::str_Ex_ext_grid_function; std::string WarpX::str_Ey_ext_grid_function; std::string WarpX::str_Ez_ext_grid_function; -// EV parser for particles -- to delete comment // Parser for B_external on the particle std::string WarpX::str_Bx_ext_particle_function; std::string WarpX::str_By_ext_particle_function; @@ -331,7 +329,6 @@ WarpX::ReadParameters () pp.query("zmax_plasma_to_compute_max_step", zmax_plasma_to_compute_max_step); - // -- to delete comment // default values of E_external_particle and B_external_particle // are used to set the E and B field when "constant" or "parser" // is not explicitly used in the input -- cgit v1.2.3 From 81bb731e828d8b8be0ac1da64bb43a4ebfd1d19e Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Fri, 10 Jan 2020 11:26:00 +0100 Subject: added explicit static_cast where needed --- Source/Diagnostics/SliceDiagnostic.cpp | 34 +++++++++++++++----------- Source/Evolve/WarpXEvolveEM.cpp | 5 ++-- Source/Filter/NCIGodfreyFilter.cpp | 2 +- Source/Laser/LaserParticleContainer.cpp | 4 +-- Source/Particles/PhysicalParticleContainer.cpp | 6 +++-- 5 files changed, 30 insertions(+), 21 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Diagnostics/SliceDiagnostic.cpp b/Source/Diagnostics/SliceDiagnostic.cpp index 79f03985b..99eec4468 100644 --- a/Source/Diagnostics/SliceDiagnostic.cpp +++ b/Source/Diagnostics/SliceDiagnostic.cpp @@ -236,8 +236,10 @@ CheckSliceInput( const RealBox real_box, RealBox &slice_cc_nd_box, { // Modify coarsening ratio if the input value is not an exponent of 2 for AMR // if ( slice_cr_ratio[idim] > 0 ) { - int log_cr_ratio = floor ( log2( double(slice_cr_ratio[idim]))); - slice_cr_ratio[idim] = exp2( double(log_cr_ratio) ); + int log_cr_ratio = + static_cast(floor ( log2( double(slice_cr_ratio[idim])))); + slice_cr_ratio[idim] = + static_cast (exp2( double(log_cr_ratio) )); } //// Default coarsening ratio is 1 // @@ -269,20 +271,24 @@ CheckSliceInput( const RealBox real_box, RealBox &slice_cc_nd_box, // check for interpolation -- compute index lo with floor and ceil if ( slice_cc_nd_box.lo(idim) - real_box.lo(idim) >= fac ) { - slice_lo[idim] = floor( ( (slice_cc_nd_box.lo(idim) + slice_lo[idim] = static_cast( + floor( ( (slice_cc_nd_box.lo(idim) - (real_box.lo(idim) + fac ) ) - / dom_geom[0].CellSize(idim)) + fac * 1E-10); - slice_lo2[idim] = ceil( ( (slice_cc_nd_box.lo(idim) + / dom_geom[0].CellSize(idim)) + fac * 1E-10) ); + slice_lo2[idim] = static_cast( + ceil( ( (slice_cc_nd_box.lo(idim) - (real_box.lo(idim) + fac) ) - / dom_geom[0].CellSize(idim)) - fac * 1E-10 ); + / dom_geom[0].CellSize(idim)) - fac * 1E-10 ) ); } else { - slice_lo[idim] = round( (slice_cc_nd_box.lo(idim) + slice_lo[idim] = static_cast( + round( (slice_cc_nd_box.lo(idim) - (real_box.lo(idim) ) ) - / dom_geom[0].CellSize(idim)); - slice_lo2[idim] = ceil((slice_cc_nd_box.lo(idim) + / dom_geom[0].CellSize(idim)) ); + slice_lo2[idim] = static_cast( + ceil((slice_cc_nd_box.lo(idim) - (real_box.lo(idim) ) ) - / dom_geom[0].CellSize(idim) ); + / dom_geom[0].CellSize(idim) ) ); } // flag for interpolation -- if reduced dimension location // @@ -302,10 +308,10 @@ CheckSliceInput( const RealBox real_box, RealBox &slice_cc_nd_box, else { // moving realbox.lo and reabox.hi to nearest coarsenable grid point // - int index_lo = floor(((slice_realbox.lo(idim) + 1E-10 - - (real_box.lo(idim))) / dom_geom[0].CellSize(idim))); - int index_hi = ceil(((slice_realbox.hi(idim) - 1E-10 - - (real_box.lo(idim))) / dom_geom[0].CellSize(idim))); + auto index_lo = static_cast(floor(((slice_realbox.lo(idim) + 1E-10 + - (real_box.lo(idim))) / dom_geom[0].CellSize(idim))) ); + auto index_hi = static_cast(ceil(((slice_realbox.hi(idim) - 1E-10 + - (real_box.lo(idim))) / dom_geom[0].CellSize(idim))) ); bool modify_cr = true; diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index f5491ffe3..b35b3a6ed 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -615,9 +615,10 @@ WarpX::computeMaxStepBoostAccelerator(const amrex::Geometry& a_geom){ // Divide by dt, and update value of max_step. int computed_max_step; if (do_subcycling){ - computed_max_step = interaction_time_boost/dt[0]; + computed_max_step = static_cast(interaction_time_boost/dt[0]); } else { - computed_max_step = interaction_time_boost/dt[maxLevel()]; + computed_max_step = + static_cast(interaction_time_boost/dt[maxLevel()]); } max_step = computed_max_step; Print()<<"max_step computed in computeMaxStepBoostAccelerator: " diff --git a/Source/Filter/NCIGodfreyFilter.cpp b/Source/Filter/NCIGodfreyFilter.cpp index 8723322f6..41ae67768 100644 --- a/Source/Filter/NCIGodfreyFilter.cpp +++ b/Source/Filter/NCIGodfreyFilter.cpp @@ -35,7 +35,7 @@ void NCIGodfreyFilter::ComputeStencils(){ "ERROR: NCI filter requires 5 points in z"); // Interpolate coefficients from the table, and store into prestencil. - int index = tab_length*m_cdtodz; + auto index = static_cast(tab_length*m_cdtodz); index = min(index, tab_length-2); index = max(index, 0); Real weight_right = m_cdtodz - index/tab_length; diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp index a330200cc..1d9689979 100644 --- a/Source/Laser/LaserParticleContainer.cpp +++ b/Source/Laser/LaserParticleContainer.cpp @@ -249,8 +249,8 @@ LaserParticleContainer::InitData (int lev) { auto compute_min_max = [&](Real x, Real y, Real z){ const Vector& pos_plane = InverseTransform({x, y, z}); - int i = pos_plane[0]/S_X; - int j = pos_plane[1]/S_Y; + auto i = static_cast(pos_plane[0]/S_X); + auto j = static_cast(pos_plane[1]/S_Y); plane_lo[0] = std::min(plane_lo[0], i); plane_lo[1] = std::min(plane_lo[1], j); plane_hi[0] = std::max(plane_hi[0], i); diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 94d9bc363..ffe0bb20f 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -450,7 +450,8 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) overlap_box.setBig( dir, int( std::round((overlap_realbox.hi(dir)-overlap_realbox.lo(dir)) /dx[dir] )) - 1); - shifted[dir] = std::round((overlap_realbox.lo(dir)-problo[dir])/dx[dir]); + shifted[dir] = + static_cast(std::round((overlap_realbox.lo(dir)-problo[dir])/dx[dir])); // shifted is exact in non-moving-window direction. That's all we care. } if (no_overlap == 1) { @@ -580,7 +581,8 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) IntVect iv = overlap_box.atOffset(cellid); - const XDim3 r = inj_pos->getPositionUnitBox(i_part, fac); + const XDim3 r = + inj_pos->getPositionUnitBox(i_part, static_cast(fac)); #if (AMREX_SPACEDIM == 3) Real x = overlap_corner[0] + (iv[0]+r.x)*dx[0]; Real y = overlap_corner[1] + (iv[1]+r.y)*dx[1]; -- cgit v1.2.3 From 9d4caa204ae770a8d5c12741205720639fcd3855 Mon Sep 17 00:00:00 2001 From: Luca Fedeli Date: Fri, 10 Jan 2020 12:32:51 +0100 Subject: fixed bug --- Source/Particles/PhysicalParticleContainer.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 94d9bc363..8777ec9b1 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1614,10 +1614,9 @@ PhysicalParticleContainer::PushPX(WarpXParIter& pti, #ifdef WARPX_QED - auto t_chi_max = m_shr_p_qs_engine->get_ref_ctrl().chi_part_min; - if(do_classical_radiation_reaction){ if(m_do_qed_quantum_sync){ + const auto t_chi_max = m_shr_p_qs_engine->get_ref_ctrl().chi_part_min; amrex::ParallelFor( pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { -- cgit v1.2.3 From 7a13ea7dd1670c2c474016f15246b9e4c29062bf Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Fri, 10 Jan 2020 10:53:22 -0800 Subject: modifying input files in test cases and adding comments --- .../inputs.3d_test_optical_depth_evolution | 2 + Examples/Tests/Larmor/inputs.mr | 1 + Examples/Tests/particle_pusher/inputs | 2 + .../test_const_B_analytical/inputs | 1 + Source/Particles/PhysicalParticleContainer.H | 20 ++ Source/Particles/PhysicalParticleContainer.cpp | 257 ++++++--------------- 6 files changed, 97 insertions(+), 186 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution b/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution index 0d4cad2b1..8e4bcc3d7 100644 --- a/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution +++ b/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution @@ -158,9 +158,11 @@ qed_bw.lookup_table_mode = "dummy_builtin" ################################# ### EXTERNAL E FIELD ### (3e15 * [-0.811107105653813 0.324442842261525 0.486664263392288] ) +warpx.E_ext_particle_init_style = "constant" warpx.E_external_particle = -2433321316961438 973328526784575 1459992790176863 #### ### EXTERNAL B FIELD ### (1e7 * [0.28571429 0.42857143 0.85714286] ) +warpx.B_ext_particle_init_style = "constant" warpx.B_external_particle = 2857142.85714286 4285714.28571428 8571428.57142857 #### diff --git a/Examples/Tests/Larmor/inputs.mr b/Examples/Tests/Larmor/inputs.mr index f933aa77a..cef5e0735 100644 --- a/Examples/Tests/Larmor/inputs.mr +++ b/Examples/Tests/Larmor/inputs.mr @@ -34,6 +34,7 @@ geometry.prob_hi = 2.0 2.0 warpx.do_pml = 1 warpx.pml_ncell = 10 +warpx.B_ext_particle_init_style = "constant" warpx.B_external_particle = 0.0 0.00078110417851950768 0.0 # Verbosity diff --git a/Examples/Tests/particle_pusher/inputs b/Examples/Tests/particle_pusher/inputs index 45ba7fa70..53376bb21 100755 --- a/Examples/Tests/particle_pusher/inputs +++ b/Examples/Tests/particle_pusher/inputs @@ -40,5 +40,7 @@ warpx.plot_raw_fields = 0 # External fields # Ex is set to be Ex = -vy*Bz +warpx.B_ext_particle_init_style = "constant" warpx.B_external_particle = 0.0 0.0 1.0 +warpx.E_ext_particle_init_style = "constant" warpx.E_external_particle = -2.994174829214179e+08 0.0 0.0 diff --git a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs index e8fdbe984..03aa89b51 100644 --- a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs +++ b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs @@ -64,4 +64,5 @@ pos_perp2.single_particle_vel = -958.3148474999095 127.77531299998823 255.550625 pos_perp2.single_particle_weight = 1e-08 pos_perp2.do_classical_radiation_reaction = 1 +warpx.B_ext_particle_init_style = "constant" warpx.B_external_particle = 917978.2333474257 1376967.350021139 2753934.700042278 diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H index 0192ffb37..4e817750c 100644 --- a/Source/Particles/PhysicalParticleContainer.H +++ b/Source/Particles/PhysicalParticleContainer.H @@ -47,6 +47,25 @@ public: amrex::Real t, amrex::Real dt) override; #endif // WARPX_DO_ELECTROSTATIC + /** + * \brief Apply external E and B fields on the particles. The E and B + * fields could be defined as a constant or using a parser for reading + * in a mathematical expression. The default value for the E- and B-fields + * is (0.0,0.0,0.0). + * + * \param Exp-Bzp: fields on particles modified based on external E and B + * \param xp,yp,zp: arrays of particle positions required to compute + * mathematical expression for the external fields + * using parser. + */ + void ApplyExternalFieldOnParticles ( WarpXParIter& pti, + RealVector& Exp, RealVector& Eyp, + RealVector& Ezp, RealVector& Bxp, + RealVector& Byp, RealVector& Bzp, + amrex::Gpu::ManagedDeviceVector xp, + amrex::Gpu::ManagedDeviceVector yp, + amrex::Gpu::ManagedDeviceVector zp); + virtual void FieldGather (int lev, const amrex::MultiFab& Ex, const amrex::MultiFab& Ey, @@ -318,6 +337,7 @@ protected: //radiation reaction bool do_classical_radiation_reaction = false; + #ifdef WARPX_QED // A flag to enable quantum_synchrotron process for leptons bool m_do_qed_quantum_sync = false; diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 34b8d6cb4..ebb2b4082 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -961,6 +961,67 @@ PhysicalParticleContainer::EvolveES (const Vector xp, + Gpu::ManagedDeviceVector yp, + Gpu::ManagedDeviceVector zp) +{ + const long np = pti.numParticles(); + + if (WarpX::E_ext_particle_s=="constant" || + WarpX::E_ext_particle_s=="default") { + Exp.assign(np,WarpX::E_external_particle[0]); + Eyp.assign(np,WarpX::E_external_particle[1]); + Ezp.assign(np,WarpX::E_external_particle[2]); + } + if (WarpX::B_ext_particle_s=="constant" || + WarpX::B_ext_particle_s=="default") { + Bxp.assign(np,WarpX::B_external_particle[0]); + Byp.assign(np,WarpX::B_external_particle[1]); + Bzp.assign(np,WarpX::B_external_particle[2]); + } + if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { + Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); + Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); + Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); + Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); + Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); + Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); + ParserWrapper *xfield_partparser = Ex_particle_parser.get(); + ParserWrapper *yfield_partparser = Ey_particle_parser.get(); + ParserWrapper *zfield_partparser = Ez_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Exp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + Eyp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + Ezp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + }); + } + if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { + Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); + Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); + Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); + Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); + Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); + Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); + ParserWrapper *xfield_partparser = Bx_particle_parser.get(); + ParserWrapper *yfield_partparser = By_particle_parser.get(); + ParserWrapper *zfield_partparser = Bz_particle_parser.get(); + amrex::ParallelFor(pti.numParticles(), + [=] AMREX_GPU_DEVICE (long i) { + Bxp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + Byp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + Bzp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + }); + } + +} + + + void PhysicalParticleContainer::FieldGather (int lev, const amrex::MultiFab& Ex, @@ -1010,72 +1071,13 @@ PhysicalParticleContainer::FieldGather (int lev, const FArrayBox& byfab = By[pti]; const FArrayBox& bzfab = Bz[pti]; - if (WarpX::E_ext_particle_s=="constant" || - WarpX::E_ext_particle_s=="default") { - amrex::Print() << " const " << WarpX::E_external_particle[0]; - amrex::Print() << " " << WarpX::E_external_particle[1]; - amrex::Print() << " " << WarpX::E_external_particle[2] << "\n"; - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); - } - if (WarpX::B_ext_particle_s=="constant" || - WarpX::B_ext_particle_s=="default") { - amrex::Print() << " const " << WarpX::B_external_particle[0]; - amrex::Print() << " " << WarpX::B_external_particle[1]; - amrex::Print() << " " << WarpX::B_external_particle[2] << "\n"; - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); - } // // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - - if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { - // Points to particle position - Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); - Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); - Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); - ParserWrapper *xfield_partparser = Ex_particle_parser.get(); - ParserWrapper *yfield_partparser = Ey_particle_parser.get(); - ParserWrapper *zfield_partparser = Ez_particle_parser.get(); - amrex::ParallelFor(pti.numParticles(), - [=] AMREX_GPU_DEVICE (long i) { - Real x = xp_data[i]; - Real y = yp_data[i]; - Real z = zp_data[i]; - Exp_data[i] = xfield_partparser->getField(x,y,z); - Eyp_data[i] = yfield_partparser->getField(x,y,z); - Ezp_data[i] = zfield_partparser->getField(x,y,z); - }); - } - if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { - // Points to particle position - Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); - Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); - Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); - ParserWrapper *xfield_partparser = Bx_particle_parser.get(); - ParserWrapper *yfield_partparser = By_particle_parser.get(); - ParserWrapper *zfield_partparser = Bz_particle_parser.get(); - amrex::ParallelFor(pti.numParticles(), - [=] AMREX_GPU_DEVICE (long i) { - Real x = xp_data[i]; - Real y = yp_data[i]; - Real z = zp_data[i]; - Bxp_data[i] = xfield_partparser->getField(x,y,z); - Byp_data[i] = yfield_partparser->getField(x,y,z); - Bzp_data[i] = zfield_partparser->getField(x,y,z); - }); - } - + ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + m_xp[thread_num], m_yp[thread_num], + m_zp[thread_num]); // // Field Gather @@ -1202,72 +1204,13 @@ PhysicalParticleContainer::Evolve (int lev, exfab, eyfab, ezfab, bxfab, byfab, bzfab); } - if (WarpX::E_ext_particle_s=="constant" || - WarpX::E_ext_particle_s=="default") { - amrex::Print() << " const " << WarpX::E_external_particle[0]; - amrex::Print() << " " << WarpX::E_external_particle[1]; - amrex::Print() << " " << WarpX::E_external_particle[2] << "\n"; - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); - } - if (WarpX::B_ext_particle_s=="constant" || - WarpX::B_ext_particle_s=="default") { - amrex::Print() << " const " << WarpX::B_external_particle[0]; - amrex::Print() << " " << WarpX::B_external_particle[1]; - amrex::Print() << " " << WarpX::B_external_particle[2] << "\n"; - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); - } // // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - - if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { - // Points to particle position - Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); - Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); - Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); - ParserWrapper *xfield_partparser = Ex_particle_parser.get(); - ParserWrapper *yfield_partparser = Ey_particle_parser.get(); - ParserWrapper *zfield_partparser = Ez_particle_parser.get(); - amrex::ParallelFor(pti.numParticles(), - [=] AMREX_GPU_DEVICE (long i) { - Real x = xp_data[i]; - Real y = yp_data[i]; - Real z = zp_data[i]; - Exp_data[i] = xfield_partparser->getField(x,y,z); - Eyp_data[i] = yfield_partparser->getField(x,y,z); - Ezp_data[i] = zfield_partparser->getField(x,y,z); - }); - } - if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { - // Points to particle position - Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); - Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); - Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); - ParserWrapper *xfield_partparser = Bx_particle_parser.get(); - ParserWrapper *yfield_partparser = By_particle_parser.get(); - ParserWrapper *zfield_partparser = Bz_particle_parser.get(); - amrex::ParallelFor(pti.numParticles(), - [=] AMREX_GPU_DEVICE (long i) { - Real x = xp_data[i]; - Real y = yp_data[i]; - Real z = zp_data[i]; - Bxp_data[i] = xfield_partparser->getField(x,y,z); - Byp_data[i] = yfield_partparser->getField(x,y,z); - Bzp_data[i] = zfield_partparser->getField(x,y,z); - }); - } - + ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + m_xp[thread_num], m_yp[thread_num], + m_zp[thread_num]); // Determine which particles deposit/gather in the buffer, and // which particles deposit/gather in the fine patch @@ -1909,73 +1852,14 @@ PhysicalParticleContainer::PushP (int lev, Real dt, const FArrayBox& byfab = By[pti]; const FArrayBox& bzfab = Bz[pti]; - if (WarpX::E_ext_particle_s=="constant" || - WarpX::E_ext_particle_s=="default") { - amrex::Print() << " const " << WarpX::E_external_particle[0]; - amrex::Print() << " " << WarpX::E_external_particle[1]; - amrex::Print() << " " << WarpX::E_external_particle[2] << "\n"; - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); - } - if (WarpX::B_ext_particle_s=="constant" || - WarpX::B_ext_particle_s=="default") { - amrex::Print() << " const " << WarpX::B_external_particle[0]; - amrex::Print() << " " << WarpX::B_external_particle[1]; - amrex::Print() << " " << WarpX::B_external_particle[2] << "\n"; - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); - } // // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { - // Points to particle position - Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); - Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); - Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); - ParserWrapper *xfield_partparser = Ex_particle_parser.get(); - ParserWrapper *yfield_partparser = Ey_particle_parser.get(); - ParserWrapper *zfield_partparser = Ez_particle_parser.get(); - amrex::ParallelFor(pti.numParticles(), - [=] AMREX_GPU_DEVICE (long i) { - Real x = xp_data[i]; - Real y = yp_data[i]; - Real z = zp_data[i]; - Exp_data[i] = xfield_partparser->getField(x,y,z); - Eyp_data[i] = yfield_partparser->getField(x,y,z); - Ezp_data[i] = zfield_partparser->getField(x,y,z); - }); - } - if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { - // Points to particle position - Real* const AMREX_RESTRICT xp_data = m_xp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT yp_data = m_yp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT zp_data = m_zp[thread_num].dataPtr(); - Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); - Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); - Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); - ParserWrapper *xfield_partparser = Bx_particle_parser.get(); - ParserWrapper *yfield_partparser = By_particle_parser.get(); - ParserWrapper *zfield_partparser = Bz_particle_parser.get(); - amrex::ParallelFor(pti.numParticles(), - [=] AMREX_GPU_DEVICE (long i) { - Real x = xp_data[i]; - Real y = yp_data[i]; - Real z = zp_data[i]; - Bxp_data[i] = xfield_partparser->getField(x,y,z); - Byp_data[i] = yfield_partparser->getField(x,y,z); - Bzp_data[i] = zfield_partparser->getField(x,y,z); - }); - } - - + ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + m_xp[thread_num], m_yp[thread_num], + m_zp[thread_num]); int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal(); FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, @@ -2589,4 +2473,5 @@ set_quantum_sync_engine_ptr(std::shared_ptr ptr) { m_shr_p_qs_engine = ptr; } + #endif -- cgit v1.2.3 From 4e1b36d2b7adc7fad187212aa8bac43278e9f307 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Sat, 11 Jan 2020 00:36:38 -0800 Subject: moving external field on particle function to FieldGather (pti,...) --- Source/Particles/PhysicalParticleContainer.H | 2 +- Source/Particles/PhysicalParticleContainer.cpp | 27 ++++++++++++++++---------- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H index dcbbfc1f2..147b632eb 100644 --- a/Source/Particles/PhysicalParticleContainer.H +++ b/Source/Particles/PhysicalParticleContainer.H @@ -58,7 +58,7 @@ public: * mathematical expression for the external fields * using parser. */ - void ApplyExternalFieldOnParticles ( WarpXParIter& pti, + void AssignExternalFieldOnParticles ( WarpXParIter& pti, RealVector& Exp, RealVector& Eyp, RealVector& Ezp, RealVector& Bxp, RealVector& Byp, RealVector& Bzp, diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index eae1b2964..a4a9dbcfc 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -964,7 +964,7 @@ PhysicalParticleContainer::EvolveES (const Vector xp, @@ -1077,9 +1077,9 @@ PhysicalParticleContainer::FieldGather (int lev, // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, - m_xp[thread_num], m_yp[thread_num], - m_zp[thread_num]); + //ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + // m_xp[thread_num], m_yp[thread_num], + // m_zp[thread_num]); // // Field Gather @@ -1210,9 +1210,9 @@ PhysicalParticleContainer::Evolve (int lev, // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, - m_xp[thread_num], m_yp[thread_num], - m_zp[thread_num]); + //ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + // m_xp[thread_num], m_yp[thread_num], + // m_zp[thread_num]); // Determine which particles deposit/gather in the buffer, and // which particles deposit/gather in the fine patch @@ -1858,9 +1858,9 @@ PhysicalParticleContainer::PushP (int lev, Real dt, // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, - m_xp[thread_num], m_yp[thread_num], - m_zp[thread_num]); + //ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + // m_xp[thread_num], m_yp[thread_num], + // m_zp[thread_num]); int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal(); FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, @@ -2229,6 +2229,13 @@ PhysicalParticleContainer::FieldGather (WarpXParIter& pti, // If no particles, do not do anything if (np_to_gather == 0) return; + + // initializing the field value to the externally applied field before + // gathering fields from the grid to the particles. + AssignExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + m_xp[thread_num], m_yp[thread_num], + m_zp[thread_num]); + // Get cell size on gather_lev const std::array& dx = WarpX::CellSize(std::max(gather_lev,0)); -- cgit v1.2.3 From cbcdf651d51af5446a6c2f8a1c1f308d35c14f1c Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 13 Jan 2020 10:21:44 -0800 Subject: wrap openmp pragma in #ifdef _OPENMP --- Source/Particles/PhysicalParticleContainer.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index f22f94e9b..2fea9133a 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -493,7 +493,9 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // Update NextID to include particles created in this function int pid; +#ifdef _OPENMP #pragma omp critical (add_plasma_nextid) +#endif { pid = ParticleType::NextID(); ParticleType::NextID(pid+max_new_particles); -- cgit v1.2.3 From fc98645e5fe7e1bb6a01ea925d87018e4f518419 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Mon, 13 Jan 2020 10:28:24 -0800 Subject: fix EOL whitespace --- Source/Particles/PhysicalParticleContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 2fea9133a..0d9d4fc1a 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -493,9 +493,9 @@ PhysicalParticleContainer::AddPlasma (int lev, RealBox part_realbox) // Update NextID to include particles created in this function int pid; -#ifdef _OPENMP +#ifdef _OPENMP #pragma omp critical (add_plasma_nextid) -#endif +#endif { pid = ParticleType::NextID(); ParticleType::NextID(pid+max_new_particles); -- cgit v1.2.3 From 5f9b4aa7d04ab3b945b180ba079b6482db2e9c24 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Mon, 13 Jan 2020 11:14:17 -0800 Subject: moving E/B parser variables to MultiParticleContainer class. changing input files appropriately. --- .../inputs.3d_test_optical_depth_evolution | 8 +-- Examples/Tests/Larmor/inputs.mr | 4 +- Examples/Tests/particle_pusher/inputs | 8 +-- .../test_const_B_analytical/inputs | 4 +- Source/Particles/MultiParticleContainer.H | 24 +++++++ Source/Particles/MultiParticleContainer.cpp | 79 ++++++++++++++++++++++ Source/Particles/PhysicalParticleContainer.cpp | 53 +++++++-------- .../Particles/RigidInjectedParticleContainer.cpp | 7 -- Source/Particles/WarpXParticleContainer.H | 16 ++--- Source/Particles/WarpXParticleContainer.cpp | 18 ----- Source/WarpX.H | 15 ---- Source/WarpX.cpp | 67 ------------------ 12 files changed, 146 insertions(+), 157 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution b/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution index 8e4bcc3d7..0e1b37a00 100644 --- a/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution +++ b/Examples/Modules/qed/breit_wheeler/inputs.3d_test_optical_depth_evolution @@ -158,11 +158,11 @@ qed_bw.lookup_table_mode = "dummy_builtin" ################################# ### EXTERNAL E FIELD ### (3e15 * [-0.811107105653813 0.324442842261525 0.486664263392288] ) -warpx.E_ext_particle_init_style = "constant" -warpx.E_external_particle = -2433321316961438 973328526784575 1459992790176863 +particles.E_ext_particle_init_style = "constant" +particles.E_external_particle = -2433321316961438 973328526784575 1459992790176863 #### ### EXTERNAL B FIELD ### (1e7 * [0.28571429 0.42857143 0.85714286] ) -warpx.B_ext_particle_init_style = "constant" -warpx.B_external_particle = 2857142.85714286 4285714.28571428 8571428.57142857 +particles.B_ext_particle_init_style = "constant" +particles.B_external_particle = 2857142.85714286 4285714.28571428 8571428.57142857 #### diff --git a/Examples/Tests/Larmor/inputs.mr b/Examples/Tests/Larmor/inputs.mr index cef5e0735..8b197543c 100644 --- a/Examples/Tests/Larmor/inputs.mr +++ b/Examples/Tests/Larmor/inputs.mr @@ -34,8 +34,8 @@ geometry.prob_hi = 2.0 2.0 warpx.do_pml = 1 warpx.pml_ncell = 10 -warpx.B_ext_particle_init_style = "constant" -warpx.B_external_particle = 0.0 0.00078110417851950768 0.0 +particles.B_ext_particle_init_style = "constant" +particles.B_external_particle = 0.0 0.00078110417851950768 0.0 # Verbosity warpx.verbose = 1 diff --git a/Examples/Tests/particle_pusher/inputs b/Examples/Tests/particle_pusher/inputs index 53376bb21..c61ac72c2 100755 --- a/Examples/Tests/particle_pusher/inputs +++ b/Examples/Tests/particle_pusher/inputs @@ -40,7 +40,7 @@ warpx.plot_raw_fields = 0 # External fields # Ex is set to be Ex = -vy*Bz -warpx.B_ext_particle_init_style = "constant" -warpx.B_external_particle = 0.0 0.0 1.0 -warpx.E_ext_particle_init_style = "constant" -warpx.E_external_particle = -2.994174829214179e+08 0.0 0.0 +particles.B_ext_particle_init_style = "constant" +particles.B_external_particle = 0.0 0.0 1.0 +particles.E_ext_particle_init_style = "constant" +particles.E_external_particle = -2.994174829214179e+08 0.0 0.0 diff --git a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs index 03aa89b51..07ae2f17f 100644 --- a/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs +++ b/Examples/Tests/radiation_reaction/test_const_B_analytical/inputs @@ -64,5 +64,5 @@ pos_perp2.single_particle_vel = -958.3148474999095 127.77531299998823 255.550625 pos_perp2.single_particle_weight = 1e-08 pos_perp2.do_classical_radiation_reaction = 1 -warpx.B_ext_particle_init_style = "constant" -warpx.B_external_particle = 917978.2333474257 1376967.350021139 2753934.700042278 +particles.B_ext_particle_init_style = "constant" +particles.B_external_particle = 917978.2333474257 1376967.350021139 2753934.700042278 diff --git a/Source/Particles/MultiParticleContainer.H b/Source/Particles/MultiParticleContainer.H index 9db129b05..f3ea1825c 100644 --- a/Source/Particles/MultiParticleContainer.H +++ b/Source/Particles/MultiParticleContainer.H @@ -8,6 +8,7 @@ #include #include #include +#include #include #ifdef WARPX_QED @@ -215,6 +216,29 @@ public: IonizationProcess ionization_process; + std::string m_B_ext_particle_s = "default"; + std::string m_E_ext_particle_s = "default"; + // External fields added to particle fields. + amrex::Vector m_B_external_particle; + amrex::Vector m_E_external_particle; + // Parser for B_external on the particle + std::string m_str_Bx_ext_particle_function; + std::string m_str_By_ext_particle_function; + std::string m_str_Bz_ext_particle_function; + // Parser for E_external on the particle + std::string m_str_Ex_ext_particle_function; + std::string m_str_Ey_ext_particle_function; + std::string m_str_Ez_ext_particle_function; + // ParserWrapper for B_external on the particle + std::unique_ptr m_Bx_particle_parser; + std::unique_ptr m_By_particle_parser; + std::unique_ptr m_Bz_particle_parser; + // ParserWrapper for E_external on the particle + std::unique_ptr m_Ex_particle_parser; + std::unique_ptr m_Ey_particle_parser; + std::unique_ptr m_Ez_particle_parser; + + protected: // Particle container types diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp index d84bc1afa..78b976209 100644 --- a/Source/Particles/MultiParticleContainer.cpp +++ b/Source/Particles/MultiParticleContainer.cpp @@ -72,6 +72,85 @@ MultiParticleContainer::ReadParameters () { ParmParse pp("particles"); + // allocating and initializing default values of external fields for particles + m_E_external_particle.resize(3); + m_B_external_particle.resize(3); + // initialize E and B fields to 0.0 + for (int idim = 0; idim < 3; ++idim) { + m_E_external_particle[idim] = 0.0; + m_B_external_particle[idim] = 0.0; + } + // default values of E_external_particle and B_external_particle + // are used to set the E and B field when "constant" or "parser" + // is not explicitly used in the input + pp.query("B_ext_particle_init_style", m_B_ext_particle_s); + std::transform(m_B_ext_particle_s.begin(), + m_B_ext_particle_s.end(), + m_B_ext_particle_s.begin(), + ::tolower); + pp.query("E_ext_particle_init_style", m_E_ext_particle_s); + std::transform(m_E_ext_particle_s.begin(), + m_E_ext_particle_s.end(), + m_E_ext_particle_s.begin(), + ::tolower); + // if the input string for B_external on particles is "constant" + // then the values for the external B on particles must + // be provided in the input file. + if (m_B_ext_particle_s == "constant") + pp.getarr("B_external_particle", m_B_external_particle); + + // if the input string for E_external on particles is "constant" + // then the values for the external E on particles must + // be provided in the input file. + if (m_E_ext_particle_s == "constant") + pp.getarr("E_external_particle", m_E_external_particle); + + // if the input string for B_ext_particle_s is + // "parse_b_ext_particle_function" then the mathematical expression + // for the Bx_, By_, Bz_external_particle_function(x,y,z) + // must be provided in the input file. + if (m_B_ext_particle_s == "parse_b_ext_particle_function") { + // store the mathematical expression as string + Store_parserString(pp, "Bx_external_particle_function(x,y,z)", + m_str_Bx_ext_particle_function); + Store_parserString(pp, "By_external_particle_function(x,y,z)", + m_str_By_ext_particle_function); + Store_parserString(pp, "Bz_external_particle_function(x,y,z)", + m_str_Bz_ext_particle_function); + + m_Bx_particle_parser.reset(new ParserWrapper( + makeParser(m_str_Bx_ext_particle_function))); + m_By_particle_parser.reset(new ParserWrapper( + makeParser(m_str_By_ext_particle_function))); + m_Bz_particle_parser.reset(new ParserWrapper( + makeParser(m_str_Bz_ext_particle_function))); + + } + + // if the input string for E_ext_particle_s is + // "parse_e_ext_particle_function" then the mathematical expression + // for the Ex_, Ey_, Ez_external_particle_function(x,y,z) + // must be provided in the input file. + if (m_E_ext_particle_s == "parse_e_ext_particle_function") { + // store the mathematical expression as string + Store_parserString(pp, "Ex_external_particle_function(x,y,z)", + m_str_Ex_ext_particle_function); + Store_parserString(pp, "Ey_external_particle_function(x,y,z)", + m_str_Ey_ext_particle_function); + Store_parserString(pp, "Ez_external_particle_function(x,y,z)", + m_str_Ez_ext_particle_function); + m_Ex_particle_parser.reset(new ParserWrapper( + makeParser(m_str_Ex_ext_particle_function))); + m_Ey_particle_parser.reset(new ParserWrapper( + makeParser(m_str_Ey_ext_particle_function))); + m_Ez_particle_parser.reset(new ParserWrapper( + makeParser(m_str_Ez_ext_particle_function))); + + } + + + + pp.query("nspecies", nspecies); BL_ASSERT(nspecies >= 0); diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index a4a9dbcfc..51448c747 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -972,29 +972,32 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Gpu::ManagedDeviceVector zp) { const long np = pti.numParticles(); - - if (WarpX::E_ext_particle_s=="constant" || - WarpX::E_ext_particle_s=="default") { - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); + /// get WarpX class object + auto & warpx = WarpX::GetInstance(); + /// get MultiParticleContainer class object + auto & mypc = warpx.GetPartContainer(); + if (mypc.m_E_ext_particle_s=="constant" || + mypc.m_E_ext_particle_s=="default") { + Exp.assign(np,mypc.m_E_external_particle[0]); + Eyp.assign(np,mypc.m_E_external_particle[1]); + Ezp.assign(np,mypc.m_E_external_particle[2]); } - if (WarpX::B_ext_particle_s=="constant" || - WarpX::B_ext_particle_s=="default") { - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); + if (mypc.m_B_ext_particle_s=="constant" || + mypc.m_B_ext_particle_s=="default") { + Bxp.assign(np,mypc.m_B_external_particle[0]); + Byp.assign(np,mypc.m_B_external_particle[1]); + Bzp.assign(np,mypc.m_B_external_particle[2]); } - if (WarpX::E_ext_particle_s=="parse_e_ext_particle_function") { + if (mypc.m_E_ext_particle_s=="parse_e_ext_particle_function") { Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); - ParserWrapper *xfield_partparser = Ex_particle_parser.get(); - ParserWrapper *yfield_partparser = Ey_particle_parser.get(); - ParserWrapper *zfield_partparser = Ez_particle_parser.get(); + ParserWrapper *xfield_partparser = mypc.m_Ex_particle_parser.get(); + ParserWrapper *yfield_partparser = mypc.m_Ey_particle_parser.get(); + ParserWrapper *zfield_partparser = mypc.m_Ez_particle_parser.get(); amrex::ParallelFor(pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { Exp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); @@ -1002,16 +1005,16 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Ezp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); }); } - if (WarpX::B_ext_particle_s=="parse_b_ext_particle_function") { + if (mypc.m_B_ext_particle_s=="parse_b_ext_particle_function") { Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); - ParserWrapper *xfield_partparser = Bx_particle_parser.get(); - ParserWrapper *yfield_partparser = By_particle_parser.get(); - ParserWrapper *zfield_partparser = Bz_particle_parser.get(); + ParserWrapper *xfield_partparser = mypc.m_Bx_particle_parser.get(); + ParserWrapper *yfield_partparser = mypc.m_By_particle_parser.get(); + ParserWrapper *zfield_partparser = mypc.m_Bz_particle_parser.get(); amrex::ParallelFor(pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { Bxp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); @@ -1077,9 +1080,6 @@ PhysicalParticleContainer::FieldGather (int lev, // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - //ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, - // m_xp[thread_num], m_yp[thread_num], - // m_zp[thread_num]); // // Field Gather @@ -1210,9 +1210,6 @@ PhysicalParticleContainer::Evolve (int lev, // copy data from particle container to temp arrays // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - //ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, - // m_xp[thread_num], m_yp[thread_num], - // m_zp[thread_num]); // Determine which particles deposit/gather in the buffer, and // which particles deposit/gather in the fine patch @@ -1858,10 +1855,6 @@ PhysicalParticleContainer::PushP (int lev, Real dt, // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - //ApplyExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, - // m_xp[thread_num], m_yp[thread_num], - // m_zp[thread_num]); - int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal(); FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, &exfab, &eyfab, &ezfab, &bxfab, &byfab, &bzfab, @@ -2226,7 +2219,6 @@ PhysicalParticleContainer::FieldGather (WarpXParIter& pti, AMREX_ALWAYS_ASSERT_WITH_MESSAGE((gather_lev==(lev-1)) || (gather_lev==(lev )), "Gather buffers only work for lev-1"); - // If no particles, do not do anything if (np_to_gather == 0) return; @@ -2236,6 +2228,7 @@ PhysicalParticleContainer::FieldGather (WarpXParIter& pti, m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); + // Get cell size on gather_lev const std::array& dx = WarpX::CellSize(std::max(gather_lev,0)); diff --git a/Source/Particles/RigidInjectedParticleContainer.cpp b/Source/Particles/RigidInjectedParticleContainer.cpp index bee71fba1..f3b502a0a 100644 --- a/Source/Particles/RigidInjectedParticleContainer.cpp +++ b/Source/Particles/RigidInjectedParticleContainer.cpp @@ -392,13 +392,6 @@ RigidInjectedParticleContainer::PushP (int lev, Real dt, const FArrayBox& byfab = By[pti]; const FArrayBox& bzfab = Bz[pti]; - Exp.assign(np,WarpX::E_external_particle[0]); - Eyp.assign(np,WarpX::E_external_particle[1]); - Ezp.assign(np,WarpX::E_external_particle[2]); - Bxp.assign(np,WarpX::B_external_particle[0]); - Byp.assign(np,WarpX::B_external_particle[1]); - Bzp.assign(np,WarpX::B_external_particle[2]); - // // copy data from particle container to temp arrays // diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H index 14eb1a96f..39ce1dcda 100644 --- a/Source/Particles/WarpXParticleContainer.H +++ b/Source/Particles/WarpXParticleContainer.H @@ -323,14 +323,14 @@ public: //amrex::Real getMass () {return mass;} amrex::ParticleReal getMass () const {return mass;} - // ParserWrapper for B_external on the particle - std::unique_ptr Bx_particle_parser; - std::unique_ptr By_particle_parser; - std::unique_ptr Bz_particle_parser; - // ParserWrapper for E_external on the particle - std::unique_ptr Ex_particle_parser; - std::unique_ptr Ey_particle_parser; - std::unique_ptr Ez_particle_parser; +// // ParserWrapper for B_external on the particle +// std::unique_ptr Bx_particle_parser; +// std::unique_ptr By_particle_parser; +// std::unique_ptr Bz_particle_parser; +// // ParserWrapper for E_external on the particle +// std::unique_ptr Ex_particle_parser; +// std::unique_ptr Ey_particle_parser; +// std::unique_ptr Ez_particle_parser; protected: diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 465539d1a..9fe331f13 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -115,24 +115,6 @@ WarpXParticleContainer::WarpXParticleContainer (AmrCore* amr_core, int ispecies) m_yp.resize(num_threads); m_zp.resize(num_threads); - if (WarpX::B_ext_particle_s == "parse_b_ext_particle_function") { - Bx_particle_parser.reset(new ParserWrapper( - makeParser(WarpX::str_Bx_ext_particle_function))); - By_particle_parser.reset(new ParserWrapper( - makeParser(WarpX::str_By_ext_particle_function))); - Bz_particle_parser.reset(new ParserWrapper( - makeParser(WarpX::str_Bz_ext_particle_function))); - } - - if (WarpX::E_ext_particle_s == "parse_e_ext_particle_function") { - Ex_particle_parser.reset(new ParserWrapper( - makeParser(WarpX::str_Ex_ext_particle_function))); - Ey_particle_parser.reset(new ParserWrapper( - makeParser(WarpX::str_Ey_ext_particle_function))); - Ez_particle_parser.reset(new ParserWrapper( - makeParser(WarpX::str_Ez_ext_particle_function))); - } - } void diff --git a/Source/WarpX.H b/Source/WarpX.H index 5818df394..9b0110ea8 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -81,10 +81,6 @@ public: static void GotoNextLine (std::istream& is); - // External fields added to particle fields. - static amrex::Vector B_external_particle; - static amrex::Vector E_external_particle; - // Initial field on the grid. static amrex::Vector E_external_grid; static amrex::Vector B_external_grid; @@ -92,8 +88,6 @@ public: // Initialization Type for External E and B on grid and particles static std::string B_ext_grid_s; static std::string E_ext_grid_s; - static std::string B_ext_particle_s; - static std::string E_ext_particle_s; // Parser for B_external on the grid static std::string str_Bx_ext_grid_function; @@ -113,15 +107,6 @@ public: std::unique_ptr Eyfield_parser; std::unique_ptr Ezfield_parser; - // Parser for B_external on the particle - static std::string str_Bx_ext_particle_function; - static std::string str_By_ext_particle_function; - static std::string str_Bz_ext_particle_function; - // Parser for E_external on the particle - static std::string str_Ex_ext_particle_function; - static std::string str_Ey_ext_particle_function; - static std::string str_Ez_ext_particle_function; - // Algorithms static long current_deposition_algo; static long charge_deposition_algo; diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 45ad16b58..07ea8c1af 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -24,16 +24,11 @@ using namespace amrex; -Vector WarpX::B_external_particle(3, 0.0); -Vector WarpX::E_external_particle(3, 0.0); - Vector WarpX::E_external_grid(3, 0.0); Vector WarpX::B_external_grid(3, 0.0); std::string WarpX::B_ext_grid_s = "default"; std::string WarpX::E_ext_grid_s = "default"; -std::string WarpX::B_ext_particle_s = "default"; -std::string WarpX::E_ext_particle_s = "default"; // Parser for B_external on the grid std::string WarpX::str_Bx_ext_grid_function; @@ -44,15 +39,6 @@ std::string WarpX::str_Ex_ext_grid_function; std::string WarpX::str_Ey_ext_grid_function; std::string WarpX::str_Ez_ext_grid_function; -// Parser for B_external on the particle -std::string WarpX::str_Bx_ext_particle_function; -std::string WarpX::str_By_ext_particle_function; -std::string WarpX::str_Bz_ext_particle_function; -// Parser for E_external on the particle -std::string WarpX::str_Ex_ext_particle_function; -std::string WarpX::str_Ey_ext_particle_function; -std::string WarpX::str_Ez_ext_particle_function; - int WarpX::do_moving_window = 0; int WarpX::moving_window_dir = -1; Real WarpX::moving_window_v = std::numeric_limits::max(); @@ -329,59 +315,6 @@ WarpX::ReadParameters () pp.query("zmax_plasma_to_compute_max_step", zmax_plasma_to_compute_max_step); - // default values of E_external_particle and B_external_particle - // are used to set the E and B field when "constant" or "parser" - // is not explicitly used in the input - pp.query("B_ext_particle_init_style", B_ext_particle_s); - std::transform(B_ext_particle_s.begin(), - B_ext_particle_s.end(), - B_ext_particle_s.begin(), - ::tolower); - pp.query("E_ext_particle_init_style", E_ext_particle_s); - std::transform(E_ext_particle_s.begin(), - E_ext_particle_s.end(), - E_ext_particle_s.begin(), - ::tolower); - // if the input string for B_external on particles is "constant" - // then the values for the external B on particles must - // be provided in the input file. - if (B_ext_particle_s == "constant") - pp.getarr("B_external_particle", B_external_particle); - - // if the input string for E_external on particles is "constant" - // then the values for the external E on particles must - // be provided in the input file. - if (E_ext_particle_s == "constant") - pp.getarr("E_external_particle", E_external_particle); - - // if the input string for B_ext_particle_s is - // "parse_b_ext_particle_function" then the mathematical expression - // for the Bx_, By_, Bz_external_particle_function(x,y,z) - // must be provided in the input file. - if (B_ext_particle_s == "parse_b_ext_particle_function") { - // store the mathematical expression as string - Store_parserString(pp, "Bx_external_particle_function(x,y,z)", - str_Bx_ext_particle_function); - Store_parserString(pp, "By_external_particle_function(x,y,z)", - str_By_ext_particle_function); - Store_parserString(pp, "Bz_external_particle_function(x,y,z)", - str_Bz_ext_particle_function); - } - - // if the input string for E_ext_particle_s is - // "parse_e_ext_particle_function" then the mathematical expression - // for the Ex_, Ey_, Ez_external_particle_function(x,y,z) - // must be provided in the input file. - if (E_ext_particle_s == "parse_e_ext_particle_function") { - // store the mathematical expression as string - Store_parserString(pp, "Ex_external_particle_function(x,y,z)", - str_Ex_ext_particle_function); - Store_parserString(pp, "Ey_external_particle_function(x,y,z)", - str_Ey_ext_particle_function); - Store_parserString(pp, "Ez_external_particle_function(x,y,z)", - str_Ez_ext_particle_function); - } - pp.query("do_moving_window", do_moving_window); if (do_moving_window) { -- cgit v1.2.3 From eae5b5934107d1f044c9f869e53b8c41678ea2ea Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Mon, 13 Jan 2020 11:41:22 -0800 Subject: shared memory for parser on gpu --- Source/Particles/PhysicalParticleContainer.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 51448c747..dc6b5f6c1 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1003,7 +1003,11 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Exp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Eyp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Ezp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - }); + } + /* To allocate shared memory for the GPU threads. */ + /* But, for now only 3 doubles (x,y,z) are allocated. */ + amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3 + ); } if (mypc.m_B_ext_particle_s=="parse_b_ext_particle_function") { Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); @@ -1020,7 +1024,11 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Bxp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Byp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Bzp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - }); + } + /* To allocate shared memory for the GPU threads. */ + /* But, for now only 3 doubles (x,y,z) are allocated. */ + amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3 + ); } } -- cgit v1.2.3 From 728214c866b53620aaae1d47e2f8cfb604f7e2fa Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Mon, 13 Jan 2020 12:10:05 -0800 Subject: missing comma --- Source/Particles/PhysicalParticleContainer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index dc6b5f6c1..d4de7bb53 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1003,7 +1003,7 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Exp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Eyp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Ezp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - } + }, /* To allocate shared memory for the GPU threads. */ /* But, for now only 3 doubles (x,y,z) are allocated. */ amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3 @@ -1024,7 +1024,7 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Bxp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Byp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); Bzp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - } + }, /* To allocate shared memory for the GPU threads. */ /* But, for now only 3 doubles (x,y,z) are allocated. */ amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3 -- cgit v1.2.3 From eb6089d8ad31c0fa34acc9592f4fc0f9fe7099fb Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Tue, 14 Jan 2020 11:37:49 -0800 Subject: adding time as an independent variable for parser function (x,y,z,t) --- Source/Initialization/InjectorDensity.cpp | 4 ++-- Source/Initialization/InjectorMomentum.cpp | 4 ++-- Source/Initialization/WarpXInitData.cpp | 4 ++-- Source/Parser/GpuParser.H | 14 ++++++++++---- Source/Parser/GpuParser.cpp | 4 ++++ Source/Parser/WarpXParserWrapper.H | 2 +- Source/Parser/wp_parser_c.h | 2 +- Source/Particles/MultiParticleContainer.cpp | 12 ++++++------ Source/Particles/PhysicalParticleContainer.H | 2 +- Source/Particles/PhysicalParticleContainer.cpp | 26 ++++++++++++++------------ Source/Utils/WarpXMovingWindow.cpp | 2 +- Source/Utils/WarpXUtil.cpp | 3 ++- 12 files changed, 46 insertions(+), 33 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Initialization/InjectorDensity.cpp b/Source/Initialization/InjectorDensity.cpp index 9f711a7af..fa54b342c 100644 --- a/Source/Initialization/InjectorDensity.cpp +++ b/Source/Initialization/InjectorDensity.cpp @@ -36,8 +36,8 @@ InjectorDensity::sharedMemoryNeeded () const noexcept case Type::parser: { // For parser injector, the 3D position of each particle - // is stored in shared memory. - return amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3; + // and time, t, is stored in shared memory. + return amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 4; } default: return 0; diff --git a/Source/Initialization/InjectorMomentum.cpp b/Source/Initialization/InjectorMomentum.cpp index 8fadf0c4b..255883a34 100644 --- a/Source/Initialization/InjectorMomentum.cpp +++ b/Source/Initialization/InjectorMomentum.cpp @@ -30,9 +30,9 @@ InjectorMomentum::sharedMemoryNeeded () const noexcept { case Type::parser: { - // For parser injector, the 3D position of each particle + // For parser injector, the 3D position of each particle and time, t, // is stored in shared memory. - return amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3; + return amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 4; } default: return 0; diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp index be29a1cbc..48c30ae93 100644 --- a/Source/Initialization/WarpXInitData.cpp +++ b/Source/Initialization/WarpXInitData.cpp @@ -535,8 +535,8 @@ WarpX::InitializeExternalFieldsOnGridUsingParser ( mfzfab(i,j,k) = zfield_parser->getField(x,y,z); }, /* To allocate shared memory for the GPU threads. */ - /* But, for now only 3 doubles (x,y,z) are allocated. */ - amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3 + /* But, for now only 4 doubles (x,y,z,t) are allocated. */ + amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 4 ); } diff --git a/Source/Parser/GpuParser.H b/Source/Parser/GpuParser.H index c158ee314..ff855d275 100644 --- a/Source/Parser/GpuParser.H +++ b/Source/Parser/GpuParser.H @@ -17,7 +17,7 @@ public: AMREX_GPU_HOST_DEVICE amrex::Real - operator() (amrex::Real x, amrex::Real y, amrex::Real z) const noexcept + operator() (amrex::Real x, amrex::Real y, amrex::Real z, amrex::Real t=0.0) const noexcept { #ifdef AMREX_USE_GPU @@ -27,15 +27,17 @@ public: amrex::Gpu::SharedMemory gsm; amrex::Real* p = gsm.dataPtr(); int tid = threadIdx.x + threadIdx.y*blockDim.x + threadIdx.z*(blockDim.x*blockDim.y); - p[tid*3] = x; - p[tid*3+1] = y; - p[tid*3+2] = z; + p[tid*4] = x; + p[tid*4+1] = y; + p[tid*4+2] = z; + p[tid*4+3] = t; return wp_ast_eval(m_gpu_parser.ast); #else // WarpX compiled for GPU, function compiled for __host__ m_var.x = x; m_var.y = y; m_var.z = z; + m_t = t; return wp_ast_eval(m_cpu_parser.ast); #endif @@ -49,10 +51,12 @@ public: m_var[tid].x = x; m_var[tid].y = y; m_var[tid].z = z; + m_t[tid] = t; return wp_ast_eval(m_parser[tid]->ast); #endif } + private: #ifdef AMREX_USE_GPU @@ -61,10 +65,12 @@ private: // Copy of the parser running on __host__ struct wp_parser m_cpu_parser; mutable amrex::XDim3 m_var; + mutable amrex::Real m_t; #else // Only one parser struct wp_parser** m_parser; mutable amrex::XDim3* m_var; + mutable amrex::Real* m_t; int nthreads; #endif }; diff --git a/Source/Parser/GpuParser.cpp b/Source/Parser/GpuParser.cpp index 5078b498b..ba904666b 100644 --- a/Source/Parser/GpuParser.cpp +++ b/Source/Parser/GpuParser.cpp @@ -16,6 +16,7 @@ GpuParser::GpuParser (WarpXParser const& wp) wp_parser_regvar_gpu(&m_gpu_parser, "x", 0); wp_parser_regvar_gpu(&m_gpu_parser, "y", 1); wp_parser_regvar_gpu(&m_gpu_parser, "z", 2); + wp_parser_regvar_gpu(&m_gpu_parser, "t", 3); // Initialize CPU parser: allocate memory in CUDA managed memory, // copy all data needed on CPU to m_cpu_parser @@ -28,6 +29,7 @@ GpuParser::GpuParser (WarpXParser const& wp) wp_parser_regvar(&m_cpu_parser, "x", &(m_var.x)); wp_parser_regvar(&m_cpu_parser, "y", &(m_var.y)); wp_parser_regvar(&m_cpu_parser, "z", &(m_var.z)); + wp_parser_regvar(&m_cpu_parser, "t", &(m_t)); #else // not defined AMREX_USE_GPU @@ -39,6 +41,7 @@ GpuParser::GpuParser (WarpXParser const& wp) m_parser = ::new struct wp_parser*[nthreads]; m_var = ::new amrex::XDim3[nthreads]; + m_t = ::new amrex::Real[nthreads]; for (int tid = 0; tid < nthreads; ++tid) { @@ -50,6 +53,7 @@ GpuParser::GpuParser (WarpXParser const& wp) wp_parser_regvar(m_parser[tid], "x", &(m_var[tid].x)); wp_parser_regvar(m_parser[tid], "y", &(m_var[tid].y)); wp_parser_regvar(m_parser[tid], "z", &(m_var[tid].z)); + wp_parser_regvar(m_parser[tid], "t", &(m_t[tid])); } #endif // AMREX_USE_GPU diff --git a/Source/Parser/WarpXParserWrapper.H b/Source/Parser/WarpXParserWrapper.H index 2dd7f72c7..2a355e749 100644 --- a/Source/Parser/WarpXParserWrapper.H +++ b/Source/Parser/WarpXParserWrapper.H @@ -24,7 +24,7 @@ struct ParserWrapper AMREX_GPU_HOST_DEVICE amrex::Real - getField (amrex::Real x, amrex::Real y, amrex::Real z) const noexcept + getField (amrex::Real x, amrex::Real y, amrex::Real z, amrex::Real t=0.0) const noexcept { return m_parser(x,y,z); } diff --git a/Source/Parser/wp_parser_c.h b/Source/Parser/wp_parser_c.h index 970d6b355..2cf0e2c00 100644 --- a/Source/Parser/wp_parser_c.h +++ b/Source/Parser/wp_parser_c.h @@ -30,7 +30,7 @@ wp_ast_eval (struct wp_node* node) #ifdef AMREX_DEVICE_COMPILE extern __shared__ amrex_real extern_xyz[]; int tid = threadIdx.x + threadIdx.y*blockDim.x + threadIdx.z*(blockDim.x*blockDim.y); - amrex_real* x = extern_xyz + tid*3; + amrex_real* x = extern_xyz + tid*4; // parser assumes 4 independent variables (x,y,z,t) #endif switch (node->type) diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp index 0fd81e698..c99bd3c5b 100644 --- a/Source/Particles/MultiParticleContainer.cpp +++ b/Source/Particles/MultiParticleContainer.cpp @@ -111,11 +111,11 @@ MultiParticleContainer::ReadParameters () // must be provided in the input file. if (m_B_ext_particle_s == "parse_b_ext_particle_function") { // store the mathematical expression as string - Store_parserString(pp, "Bx_external_particle_function(x,y,z)", + Store_parserString(pp, "Bx_external_particle_function(x,y,z,t)", m_str_Bx_ext_particle_function); - Store_parserString(pp, "By_external_particle_function(x,y,z)", + Store_parserString(pp, "By_external_particle_function(x,y,z,t)", m_str_By_ext_particle_function); - Store_parserString(pp, "Bz_external_particle_function(x,y,z)", + Store_parserString(pp, "Bz_external_particle_function(x,y,z,t)", m_str_Bz_ext_particle_function); m_Bx_particle_parser.reset(new ParserWrapper( @@ -133,11 +133,11 @@ MultiParticleContainer::ReadParameters () // must be provided in the input file. if (m_E_ext_particle_s == "parse_e_ext_particle_function") { // store the mathematical expression as string - Store_parserString(pp, "Ex_external_particle_function(x,y,z)", + Store_parserString(pp, "Ex_external_particle_function(x,y,z,t)", m_str_Ex_ext_particle_function); - Store_parserString(pp, "Ey_external_particle_function(x,y,z)", + Store_parserString(pp, "Ey_external_particle_function(x,y,z,t)", m_str_Ey_ext_particle_function); - Store_parserString(pp, "Ez_external_particle_function(x,y,z)", + Store_parserString(pp, "Ez_external_particle_function(x,y,z,t)", m_str_Ez_ext_particle_function); m_Ex_particle_parser.reset(new ParserWrapper( makeParser(m_str_Ex_ext_particle_function))); diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H index 147b632eb..8867778f7 100644 --- a/Source/Particles/PhysicalParticleContainer.H +++ b/Source/Particles/PhysicalParticleContainer.H @@ -64,7 +64,7 @@ public: RealVector& Byp, RealVector& Bzp, amrex::Gpu::ManagedDeviceVector xp, amrex::Gpu::ManagedDeviceVector yp, - amrex::Gpu::ManagedDeviceVector zp); + amrex::Gpu::ManagedDeviceVector zp, int lev); virtual void FieldGather (int lev, const amrex::MultiFab& Ex, diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index d4de7bb53..5b80ed2d9 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -969,7 +969,7 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, RealVector& Bxp, RealVector& Byp, RealVector& Bzp, Gpu::ManagedDeviceVector xp, Gpu::ManagedDeviceVector yp, - Gpu::ManagedDeviceVector zp) + Gpu::ManagedDeviceVector zp, int lev) { const long np = pti.numParticles(); /// get WarpX class object @@ -998,15 +998,16 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, ParserWrapper *xfield_partparser = mypc.m_Ex_particle_parser.get(); ParserWrapper *yfield_partparser = mypc.m_Ey_particle_parser.get(); ParserWrapper *zfield_partparser = mypc.m_Ez_particle_parser.get(); + Real time = warpx.gett_new(lev); amrex::ParallelFor(pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { - Exp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - Eyp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - Ezp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + Exp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i],time); + Eyp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i],time); + Ezp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i],time); }, /* To allocate shared memory for the GPU threads. */ - /* But, for now only 3 doubles (x,y,z) are allocated. */ - amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3 + /* But, for now only 3 doubles (x,y,z,t) are allocated. */ + amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 4 ); } if (mypc.m_B_ext_particle_s=="parse_b_ext_particle_function") { @@ -1019,15 +1020,16 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, ParserWrapper *xfield_partparser = mypc.m_Bx_particle_parser.get(); ParserWrapper *yfield_partparser = mypc.m_By_particle_parser.get(); ParserWrapper *zfield_partparser = mypc.m_Bz_particle_parser.get(); + Real time = warpx.gett_new(lev); amrex::ParallelFor(pti.numParticles(), [=] AMREX_GPU_DEVICE (long i) { - Bxp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - Byp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); - Bzp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i]); + Bxp_data[i] = xfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i],time); + Byp_data[i] = yfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i],time); + Bzp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i],time); }, /* To allocate shared memory for the GPU threads. */ - /* But, for now only 3 doubles (x,y,z) are allocated. */ - amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 3 + /* But, for now only 4 doubles (x,y,z,t) are allocated. */ + amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 4 ); } @@ -2234,7 +2236,7 @@ PhysicalParticleContainer::FieldGather (WarpXParIter& pti, // gathering fields from the grid to the particles. AssignExternalFieldOnParticles(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, m_xp[thread_num], m_yp[thread_num], - m_zp[thread_num]); + m_zp[thread_num], lev); // Get cell size on gather_lev diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index e05a64bfe..91dd4e2ca 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -309,7 +309,7 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, #endif srcfab(i,j,k,n) = field_parser->getField(x,y,z); } - , amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double)*3 + , amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double)*4 ); } diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp index e9fb958fd..a154e93df 100644 --- a/Source/Utils/WarpXUtil.cpp +++ b/Source/Utils/WarpXUtil.cpp @@ -185,12 +185,13 @@ void Store_parserString(amrex::ParmParse& pp, std::string query_string, WarpXParser makeParser (std::string const& parse_function) { WarpXParser parser(parse_function); - parser.registerVariables({"x","y","z"}); + parser.registerVariables({"x","y","z","t"}); ParmParse pp("my_constants"); std::set symbols = parser.symbols(); symbols.erase("x"); symbols.erase("y"); symbols.erase("z"); + symbols.erase("t"); for (auto it = symbols.begin(); it != symbols.end(); ) { Real v; if (pp.query(it->c_str(), v)) { -- cgit v1.2.3 From 262de3a369647eac5820c79b010e94865b280db8 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Wed, 15 Jan 2020 12:15:34 -0800 Subject: changes as suggested in review. --- Source/Particles/MultiParticleContainer.H | 8 ------- Source/Particles/MultiParticleContainer.cpp | 32 ++++++++++++++++---------- Source/Particles/PhysicalParticleContainer.H | 5 ++-- Source/Particles/PhysicalParticleContainer.cpp | 5 ---- Source/Particles/WarpXParticleContainer.H | 10 -------- Source/WarpX.H | 2 +- 6 files changed, 24 insertions(+), 38 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/MultiParticleContainer.H b/Source/Particles/MultiParticleContainer.H index f3ea1825c..ed1c2f371 100644 --- a/Source/Particles/MultiParticleContainer.H +++ b/Source/Particles/MultiParticleContainer.H @@ -221,14 +221,6 @@ public: // External fields added to particle fields. amrex::Vector m_B_external_particle; amrex::Vector m_E_external_particle; - // Parser for B_external on the particle - std::string m_str_Bx_ext_particle_function; - std::string m_str_By_ext_particle_function; - std::string m_str_Bz_ext_particle_function; - // Parser for E_external on the particle - std::string m_str_Ex_ext_particle_function; - std::string m_str_Ey_ext_particle_function; - std::string m_str_Ez_ext_particle_function; // ParserWrapper for B_external on the particle std::unique_ptr m_Bx_particle_parser; std::unique_ptr m_By_particle_parser; diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp index c99bd3c5b..ab836ce9d 100644 --- a/Source/Particles/MultiParticleContainer.cpp +++ b/Source/Particles/MultiParticleContainer.cpp @@ -111,19 +111,23 @@ MultiParticleContainer::ReadParameters () // must be provided in the input file. if (m_B_ext_particle_s == "parse_b_ext_particle_function") { // store the mathematical expression as string + std::string str_Bx_ext_particle_function; + std::string str_By_ext_particle_function; + std::string str_Bz_ext_particle_function; Store_parserString(pp, "Bx_external_particle_function(x,y,z,t)", - m_str_Bx_ext_particle_function); + str_Bx_ext_particle_function); Store_parserString(pp, "By_external_particle_function(x,y,z,t)", - m_str_By_ext_particle_function); + str_By_ext_particle_function); Store_parserString(pp, "Bz_external_particle_function(x,y,z,t)", - m_str_Bz_ext_particle_function); + str_Bz_ext_particle_function); + // Parser for B_external on the particle m_Bx_particle_parser.reset(new ParserWrapper( - makeParser(m_str_Bx_ext_particle_function))); + makeParser(str_Bx_ext_particle_function))); m_By_particle_parser.reset(new ParserWrapper( - makeParser(m_str_By_ext_particle_function))); + makeParser(str_By_ext_particle_function))); m_Bz_particle_parser.reset(new ParserWrapper( - makeParser(m_str_Bz_ext_particle_function))); + makeParser(str_Bz_ext_particle_function))); } @@ -133,18 +137,22 @@ MultiParticleContainer::ReadParameters () // must be provided in the input file. if (m_E_ext_particle_s == "parse_e_ext_particle_function") { // store the mathematical expression as string + std::string str_Ex_ext_particle_function; + std::string str_Ey_ext_particle_function; + std::string str_Ez_ext_particle_function; Store_parserString(pp, "Ex_external_particle_function(x,y,z,t)", - m_str_Ex_ext_particle_function); + str_Ex_ext_particle_function); Store_parserString(pp, "Ey_external_particle_function(x,y,z,t)", - m_str_Ey_ext_particle_function); + str_Ey_ext_particle_function); Store_parserString(pp, "Ez_external_particle_function(x,y,z,t)", - m_str_Ez_ext_particle_function); + str_Ez_ext_particle_function); + // Parser for E_external on the particle m_Ex_particle_parser.reset(new ParserWrapper( - makeParser(m_str_Ex_ext_particle_function))); + makeParser(str_Ex_ext_particle_function))); m_Ey_particle_parser.reset(new ParserWrapper( - makeParser(m_str_Ey_ext_particle_function))); + makeParser(str_Ey_ext_particle_function))); m_Ez_particle_parser.reset(new ParserWrapper( - makeParser(m_str_Ez_ext_particle_function))); + makeParser(str_Ez_ext_particle_function))); } diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H index 8867778f7..74d1a0f62 100644 --- a/Source/Particles/PhysicalParticleContainer.H +++ b/Source/Particles/PhysicalParticleContainer.H @@ -53,8 +53,9 @@ public: * in a mathematical expression. The default value for the E- and B-fields * is (0.0,0.0,0.0). * - * \param Exp-Bzp: fields on particles modified based on external E and B - * \param xp,yp,zp: arrays of particle positions required to compute + * \param[in,out] Exp-Bzp pointer to fields on particles modified based + * on external E and B + * \param[in] xp,yp,zp arrays of particle positions required to compute * mathematical expression for the external fields * using parser. */ diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index c04b3d32a..91cc5fb12 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1218,11 +1218,6 @@ PhysicalParticleContainer::Evolve (int lev, exfab, eyfab, ezfab, bxfab, byfab, bzfab); } - // - // copy data from particle container to temp arrays - // - pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); - // Determine which particles deposit/gather in the buffer, and // which particles deposit/gather in the fine patch long nfine_current = np; diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H index 39ce1dcda..398334d93 100644 --- a/Source/Particles/WarpXParticleContainer.H +++ b/Source/Particles/WarpXParticleContainer.H @@ -323,16 +323,6 @@ public: //amrex::Real getMass () {return mass;} amrex::ParticleReal getMass () const {return mass;} -// // ParserWrapper for B_external on the particle -// std::unique_ptr Bx_particle_parser; -// std::unique_ptr By_particle_parser; -// std::unique_ptr Bz_particle_parser; -// // ParserWrapper for E_external on the particle -// std::unique_ptr Ex_particle_parser; -// std::unique_ptr Ey_particle_parser; -// std::unique_ptr Ez_particle_parser; - - protected: std::map particle_comps; diff --git a/Source/WarpX.H b/Source/WarpX.H index ad4fa29b1..ed6233743 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -87,7 +87,7 @@ public: static amrex::Vector E_external_grid; static amrex::Vector B_external_grid; - // Initialization Type for External E and B on grid and particles + // Initialization Type for External E and B on grid static std::string B_ext_grid_s; static std::string E_ext_grid_s; -- cgit v1.2.3 From 2762b9acd8a9e3cb64185c49c8ad19a016a05182 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Wed, 15 Jan 2020 12:23:53 -0800 Subject: fixing typo in comment --- Source/Particles/PhysicalParticleContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 91cc5fb12..5d56a5c42 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1008,7 +1008,7 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Ezp_data[i] = zfield_partparser->getField(xp_data[i],yp_data[i],zp_data[i],time); }, /* To allocate shared memory for the GPU threads. */ - /* But, for now only 3 doubles (x,y,z,t) are allocated. */ + /* But, for now only 4 doubles (x,y,z,t) are allocated. */ amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 4 ); } -- cgit v1.2.3 From d06b6f698729ffca37ddeefa79e3a9407d9f8d81 Mon Sep 17 00:00:00 2001 From: Yinjian Zhao Date: Thu, 23 Jan 2020 14:43:35 -0800 Subject: Change do_not_push to be species specific and add corresponding documentation. --- Docs/source/running_cpp/parameters.rst | 4 ++++ Source/Particles/PhysicalParticleContainer.cpp | 1 + Source/Particles/WarpXParticleContainer.cpp | 1 - 3 files changed, 5 insertions(+), 1 deletion(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Docs/source/running_cpp/parameters.rst b/Docs/source/running_cpp/parameters.rst index cba041e6d..fe01815a2 100644 --- a/Docs/source/running_cpp/parameters.rst +++ b/Docs/source/running_cpp/parameters.rst @@ -386,6 +386,10 @@ Particle initialization If `1` is given, both charge deposition and current deposition will not be done, thus that species does not contribute to the fields. +* ``.do_not_push`` (`0` or `1` optional; default `0`) + If `1` is given, this species will not be pushed + by any pusher during the simulation. + * ``.plot_species`` (`0` or `1` optional; default `1`) Whether to plot particle quantities for this species. diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 0d9d4fc1a..936a64c9c 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -40,6 +40,7 @@ PhysicalParticleContainer::PhysicalParticleContainer (AmrCore* amr_core, int isp pp.query("do_splitting", do_splitting); pp.query("split_type", split_type); pp.query("do_not_deposit", do_not_deposit); + pp.query("do_not_push", do_not_push); pp.query("do_continuous_injection", do_continuous_injection); pp.query("initialize_self_fields", initialize_self_fields); diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index 15a6cff9b..6abc02139 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -129,7 +129,6 @@ WarpXParticleContainer::ReadParameters () do_tiling = true; #endif pp.query("do_tiling", do_tiling); - pp.query("do_not_push", do_not_push); initialized = true; } -- cgit v1.2.3 From eeddd156e1271362528d16f503acde5e5d6fd954 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Fri, 24 Jan 2020 12:29:25 -0800 Subject: I believe we want to pass the position arrays by const ref when assigning the external field. --- Source/Particles/PhysicalParticleContainer.H | 12 ++++++------ Source/Particles/PhysicalParticleContainer.cpp | 19 +++++++++---------- 2 files changed, 15 insertions(+), 16 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H index 74d1a0f62..31d3cbbf3 100644 --- a/Source/Particles/PhysicalParticleContainer.H +++ b/Source/Particles/PhysicalParticleContainer.H @@ -60,12 +60,12 @@ public: * using parser. */ void AssignExternalFieldOnParticles ( WarpXParIter& pti, - RealVector& Exp, RealVector& Eyp, - RealVector& Ezp, RealVector& Bxp, - RealVector& Byp, RealVector& Bzp, - amrex::Gpu::ManagedDeviceVector xp, - amrex::Gpu::ManagedDeviceVector yp, - amrex::Gpu::ManagedDeviceVector zp, int lev); + RealVector& Exp, RealVector& Eyp, + RealVector& Ezp, RealVector& Bxp, + RealVector& Byp, RealVector& Bzp, + const amrex::Gpu::ManagedDeviceVector& xp, + const amrex::Gpu::ManagedDeviceVector& yp, + const amrex::Gpu::ManagedDeviceVector& zp, int lev); virtual void FieldGather (int lev, const amrex::MultiFab& Ex, diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 21c8ddd31..cb9a6b579 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -970,9 +970,9 @@ void PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, RealVector& Exp, RealVector& Eyp, RealVector& Ezp, RealVector& Bxp, RealVector& Byp, RealVector& Bzp, - Gpu::ManagedDeviceVector xp, - Gpu::ManagedDeviceVector yp, - Gpu::ManagedDeviceVector zp, int lev) + const Gpu::ManagedDeviceVector& xp, + const Gpu::ManagedDeviceVector& yp, + const Gpu::ManagedDeviceVector& zp, int lev) { const long np = pti.numParticles(); /// get WarpX class object @@ -992,9 +992,9 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, Bzp.assign(np,mypc.m_B_external_particle[2]); } if (mypc.m_E_ext_particle_s=="parse_e_ext_particle_function") { - Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); - Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); - Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); + const Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); + const Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); + const Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); Real* const AMREX_RESTRICT Exp_data = Exp.dataPtr(); Real* const AMREX_RESTRICT Eyp_data = Eyp.dataPtr(); Real* const AMREX_RESTRICT Ezp_data = Ezp.dataPtr(); @@ -1014,9 +1014,9 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, ); } if (mypc.m_B_ext_particle_s=="parse_b_ext_particle_function") { - Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); - Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); - Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); + const Real* const AMREX_RESTRICT xp_data = xp.dataPtr(); + const Real* const AMREX_RESTRICT yp_data = yp.dataPtr(); + const Real* const AMREX_RESTRICT zp_data = zp.dataPtr(); Real* const AMREX_RESTRICT Bxp_data = Bxp.dataPtr(); Real* const AMREX_RESTRICT Byp_data = Byp.dataPtr(); Real* const AMREX_RESTRICT Bzp_data = Bzp.dataPtr(); @@ -1035,7 +1035,6 @@ PhysicalParticleContainer::AssignExternalFieldOnParticles(WarpXParIter& pti, amrex::Gpu::numThreadsPerBlockParallelFor() * sizeof(double) * 4 ); } - } -- cgit v1.2.3 From 3a7e5e334defbc3c7061575d263bcd110aa9e972 Mon Sep 17 00:00:00 2001 From: Andrew Myers Date: Fri, 24 Jan 2020 12:54:51 -0800 Subject: remove unused variable --- Source/Particles/PhysicalParticleContainer.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 21c8ddd31..56acc5523 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -2031,7 +2031,6 @@ void PhysicalParticleContainer::GetParticleSlice(const int direction, const Real #endif for (WarpXParIter pti(*this, lev); pti.isValid(); ++pti) { - int counter_for_ParticleCopy = 0; const Box& box = pti.validbox(); auto index = std::make_pair(pti.index(), pti.LocalTileIndex()); const RealBox tile_real_box(box, dx, plo); -- cgit v1.2.3 From df33d42347dc65c4cf9fb2072c296ff93be76622 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Mon, 27 Jan 2020 11:12:07 -0800 Subject: GpuSynchronize() to prevent cudaStreams over-writing shared arrays for positions --- Source/Particles/PhysicalParticleContainer.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 7ac887b85..c0960b141 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1112,6 +1112,9 @@ PhysicalParticleContainer::FieldGather (int lev, costarr(i,j,k) += wt; }); } + // synchronize avoids cudaStreams from over-writing the temporary arrays used to + // store positions + Gpu::synchronize(); } } } -- cgit v1.2.3 From 4cca65a294c9a4e53c378c551d31c64d8ca4f135 Mon Sep 17 00:00:00 2001 From: RevathiJambunathan Date: Mon, 27 Jan 2020 11:19:42 -0800 Subject: EOL fix --- Source/Particles/PhysicalParticleContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index c0960b141..d437a5b61 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1112,7 +1112,7 @@ PhysicalParticleContainer::FieldGather (int lev, costarr(i,j,k) += wt; }); } - // synchronize avoids cudaStreams from over-writing the temporary arrays used to + // synchronize avoids cudaStreams from over-writing the temporary arrays used to // store positions Gpu::synchronize(); } -- cgit v1.2.3 From 2b881dce8eac358d9aee18efefaa1ef8283ac70b Mon Sep 17 00:00:00 2001 From: Tools Date: Mon, 27 Jan 2020 12:47:47 -0800 Subject: Automatically add copyright header with update_copyright.sh --- .github/workflows/source.yml | 6 ++++++ .lgtm.yml | 6 ++++++ .readthedocs.yml | 6 ++++++ .travis.yml | 7 +++++++ Docs/requirements.txt | 6 ++++++ Docs/source/conf.py | 8 ++++++++ Docs/source/latex_theory/AMR/AMR.tex | 6 ++++++ Docs/source/latex_theory/Boosted_frame/Boosted_frame.tex | 6 ++++++ Docs/source/latex_theory/PML/PML.tex | 6 ++++++ Docs/source/latex_theory/input_output/input_output.tex | 6 ++++++ Docs/source/latex_theory/intro.tex | 6 ++++++ Docs/source/latex_theory/newcommands.tex | 6 ++++++ Docs/source/latex_theory/theory.tex | 6 ++++++ .../RigidInjection/analysis_rigid_injection_BoostedFrame.py | 8 ++++++++ .../RigidInjection/analysis_rigid_injection_LabFrame.py | 7 +++++++ .../Modules/boosted_diags/analysis_3Dbacktransformed_diag.py | 7 +++++++ Examples/Modules/ionization/analysis_ionization.py | 7 +++++++ Examples/Modules/laser_injection/analysis_laser.py | 8 ++++++++ Examples/Modules/laser_injection_from_file/analysis.py | 8 ++++++++ Examples/Modules/nci_corrector/analysis_ncicorr.py | 8 ++++++++ Examples/Modules/qed/breit_wheeler/analysis_2d_tau_init.py | 7 +++++++ .../qed/breit_wheeler/analysis_3d_optical_depth_evolution.py | 7 +++++++ .../Modules/qed/quantum_synchrotron/analysis_2d_tau_init.py | 7 +++++++ .../relativistic_space_charge_initialization/analysis.py | 7 +++++++ Examples/Modules/space_charge_initialization/analysis.py | 7 +++++++ Examples/Tests/Langmuir/analysis_langmuir.py | 8 ++++++++ Examples/Tests/Langmuir/analysis_langmuir2d.py | 8 ++++++++ Examples/Tests/Langmuir/analysis_langmuir_multi.py | 8 ++++++++ Examples/Tests/Langmuir/analysis_langmuir_multi_2d.py | 8 ++++++++ Examples/Tests/Langmuir/analysis_langmuir_multi_rz.py | 7 +++++++ Examples/Tests/PML/analysis_pml_ckc.py | 8 ++++++++ Examples/Tests/PML/analysis_pml_psatd.py | 8 ++++++++ Examples/Tests/PML/analysis_pml_yee.py | 8 ++++++++ Examples/Tests/SingleParticle/analysis_bilinear_filter.py | 7 +++++++ Examples/Tests/collision/analysis_collision.py | 7 +++++++ Examples/Tests/particle_pusher/analysis_pusher.py | 7 +++++++ Examples/Tests/particles_in_PML/analysis_particles_in_pml.py | 8 ++++++++ Examples/Tests/photon_pusher/analysis_photon_pusher.py | 8 ++++++++ .../test_const_B_analytical/analysis_classicalRR.py | 8 ++++++++ Python/pywarpx/Algo.py | 6 ++++++ Python/pywarpx/Amr.py | 6 ++++++ Python/pywarpx/Bucket.py | 7 +++++++ Python/pywarpx/Constants.py | 6 ++++++ Python/pywarpx/Geometry.py | 6 ++++++ Python/pywarpx/Interpolation.py | 6 ++++++ Python/pywarpx/Langmuirwave.py | 6 ++++++ Python/pywarpx/Lasers.py | 6 ++++++ Python/pywarpx/PGroup.py | 6 ++++++ Python/pywarpx/Particles.py | 6 ++++++ Python/pywarpx/WarpInterface.py | 6 ++++++ Python/pywarpx/WarpX.py | 7 +++++++ Python/pywarpx/WarpXPIC.py | 6 ++++++ Python/pywarpx/__init__.py | 6 ++++++ Python/pywarpx/_libwarpx.py | 7 +++++++ Python/pywarpx/callbacks.py | 6 ++++++ Python/pywarpx/fields.py | 6 ++++++ Python/pywarpx/picmi.py | 8 ++++++++ Python/pywarpx/timestepper.py | 7 +++++++ Python/pywarpx/wx.py | 6 ++++++ Python/setup.py | 8 ++++++++ Regression/TestFillBoundary/compare_guard_cells.sh | 7 +++++++ Regression/prepare_file_travis.py | 7 +++++++ Source/BoundaryConditions/PML.H | 8 ++++++++ Source/BoundaryConditions/PML.cpp | 8 ++++++++ Source/BoundaryConditions/PML_current.H | 7 +++++++ Source/BoundaryConditions/WarpXEvolvePML.cpp | 7 +++++++ Source/BoundaryConditions/WarpX_PML_kernels.H | 7 +++++++ Source/Diagnostics/BackTransformedDiagnostic.H | 7 +++++++ Source/Diagnostics/BackTransformedDiagnostic.cpp | 7 +++++++ Source/Diagnostics/ElectrostaticIO.cpp | 7 +++++++ Source/Diagnostics/FieldIO.H | 7 +++++++ Source/Diagnostics/FieldIO.cpp | 8 ++++++++ Source/Diagnostics/ParticleIO.cpp | 8 ++++++++ Source/Diagnostics/SliceDiagnostic.H | 6 ++++++ Source/Diagnostics/SliceDiagnostic.cpp | 7 +++++++ Source/Diagnostics/WarpXIO.cpp | 9 +++++++++ Source/Diagnostics/WarpXOpenPMD.H | 7 +++++++ Source/Diagnostics/WarpXOpenPMD.cpp | 6 ++++++ Source/Diagnostics/requirements.txt | 6 ++++++ Source/Evolve/WarpXDtType.H | 6 ++++++ Source/Evolve/WarpXEvolveEM.cpp | 10 ++++++++++ Source/Evolve/WarpXEvolveES.cpp | 8 ++++++++ .../PicsarHybridSpectralSolver/PicsarHybridFFTData.H | 6 ++++++ .../PicsarHybridSpectralSolver/PicsarHybridSpectralSolver.cpp | 7 +++++++ .../PicsarHybridSpectralSolver/picsar_hybrid_spectral.F90 | 7 +++++++ .../SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.H | 6 ++++++ .../SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.cpp | 6 ++++++ .../SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H | 7 +++++++ .../SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp | 6 ++++++ .../SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H | 6 ++++++ Source/FieldSolver/SpectralSolver/SpectralFieldData.H | 7 +++++++ Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp | 7 +++++++ Source/FieldSolver/SpectralSolver/SpectralKSpace.H | 7 +++++++ Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp | 7 +++++++ Source/FieldSolver/SpectralSolver/SpectralSolver.H | 6 ++++++ Source/FieldSolver/SpectralSolver/SpectralSolver.cpp | 6 ++++++ Source/FieldSolver/SpectralSolver/WarpX_ComplexForFFT.H | 6 ++++++ Source/FieldSolver/WarpXPushFieldsEM.cpp | 8 ++++++++ Source/FieldSolver/WarpX_FDTD.H | 6 ++++++ Source/FieldSolver/WarpX_K.H | 6 ++++++ Source/Filter/BilinearFilter.H | 7 +++++++ Source/Filter/BilinearFilter.cpp | 7 +++++++ Source/Filter/Filter.H | 6 ++++++ Source/Filter/Filter.cpp | 7 +++++++ Source/Filter/NCIGodfreyFilter.H | 6 ++++++ Source/Filter/NCIGodfreyFilter.cpp | 6 ++++++ Source/FortranInterface/WarpX_f.F90 | 8 ++++++++ Source/FortranInterface/WarpX_f.H | 10 ++++++++++ Source/Initialization/CustomDensityProb.H | 6 ++++++ Source/Initialization/CustomMomentumProb.H | 6 ++++++ Source/Initialization/InitSpaceChargeField.cpp | 6 ++++++ Source/Initialization/InjectorDensity.H | 7 +++++++ Source/Initialization/InjectorDensity.cpp | 7 +++++++ Source/Initialization/InjectorMomentum.H | 7 +++++++ Source/Initialization/InjectorMomentum.cpp | 7 +++++++ Source/Initialization/InjectorPosition.H | 7 +++++++ Source/Initialization/PlasmaInjector.H | 8 ++++++++ Source/Initialization/PlasmaInjector.cpp | 9 +++++++++ Source/Initialization/WarpXInitData.cpp | 9 +++++++++ Source/Laser/LaserParticleContainer.H | 8 ++++++++ Source/Laser/LaserParticleContainer.cpp | 8 ++++++++ Source/Laser/LaserProfiles.H | 6 ++++++ Source/Laser/LaserProfilesImpl/LaserProfileFieldFunction.cpp | 6 ++++++ Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp | 6 ++++++ Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp | 7 +++++++ Source/Laser/LaserProfilesImpl/LaserProfileHarris.cpp | 6 ++++++ Source/Parallelization/GuardCellManager.H | 6 ++++++ Source/Parallelization/GuardCellManager.cpp | 6 ++++++ Source/Parallelization/InterpolateCurrentFineToCoarse.H | 2 +- Source/Parallelization/InterpolateDensityFineToCoarse.H | 2 +- Source/Parallelization/WarpXComm.H | 6 ++++++ Source/Parallelization/WarpXComm.cpp | 8 ++++++++ Source/Parallelization/WarpXComm_K.H | 6 ++++++ Source/Parallelization/WarpXRegrid.cpp | 8 ++++++++ Source/Parallelization/WarpXSumGuardCells.H | 7 +++++++ Source/Parser/GpuParser.H | 7 +++++++ Source/Parser/GpuParser.cpp | 7 +++++++ Source/Parser/WarpXParser.H | 6 ++++++ Source/Parser/WarpXParser.cpp | 6 ++++++ Source/Parser/WarpXParserWrapper.H | 6 ++++++ Source/Particles/Collision/CollisionType.H | 6 ++++++ Source/Particles/Collision/CollisionType.cpp | 6 ++++++ Source/Particles/Collision/ComputeTemperature.H | 6 ++++++ Source/Particles/Collision/ElasticCollisionPerez.H | 6 ++++++ Source/Particles/Collision/ShuffleFisherYates.H | 6 ++++++ Source/Particles/Collision/UpdateMomentumPerezElastic.H | 6 ++++++ Source/Particles/Deposition/ChargeDeposition.H | 7 +++++++ Source/Particles/Deposition/CurrentDeposition.H | 7 +++++++ Source/Particles/Gather/FieldGather.H | 7 +++++++ Source/Particles/MultiParticleContainer.H | 10 ++++++++++ Source/Particles/MultiParticleContainer.cpp | 10 ++++++++++ Source/Particles/ParticleCreation/CopyParticle.H | 6 ++++++ Source/Particles/ParticleCreation/ElementaryProcess.H | 7 +++++++ Source/Particles/ParticleCreation/TransformParticle.H | 6 ++++++ Source/Particles/PhotonParticleContainer.H | 7 +++++++ Source/Particles/PhotonParticleContainer.cpp | 7 +++++++ Source/Particles/PhysicalParticleContainer.H | 9 +++++++++ Source/Particles/PhysicalParticleContainer.cpp | 10 ++++++++++ Source/Particles/Pusher/GetAndSetPosition.H | 7 +++++++ Source/Particles/Pusher/UpdateMomentumBoris.H | 7 +++++++ .../Pusher/UpdateMomentumBorisWithRadiationReaction.H | 6 ++++++ Source/Particles/Pusher/UpdateMomentumHigueraCary.H | 6 ++++++ Source/Particles/Pusher/UpdateMomentumVay.H | 7 +++++++ Source/Particles/Pusher/UpdatePosition.H | 7 +++++++ Source/Particles/Pusher/UpdatePositionPhoton.H | 7 +++++++ Source/Particles/RigidInjectedParticleContainer.H | 7 +++++++ Source/Particles/RigidInjectedParticleContainer.cpp | 9 +++++++++ Source/Particles/ShapeFactors.H | 6 ++++++ Source/Particles/Sorting/Partition.cpp | 6 ++++++ Source/Particles/Sorting/SortingUtils.H | 7 +++++++ Source/Particles/WarpXParticleContainer.H | 9 +++++++++ Source/Particles/WarpXParticleContainer.cpp | 9 +++++++++ Source/Particles/interpolate_cic.F90 | 6 ++++++ Source/Particles/push_particles_ES.F90 | 6 ++++++ Source/Python/WarpXWrappers.cpp | 8 ++++++++ Source/Python/WarpXWrappers.h | 7 +++++++ Source/Python/WarpX_py.H | 7 +++++++ Source/Python/WarpX_py.cpp | 7 +++++++ Source/QED/BreitWheelerDummyTable.H | 6 ++++++ Source/QED/BreitWheelerEngineInnards.H | 6 ++++++ Source/QED/BreitWheelerEngineTableBuilder.H | 6 ++++++ Source/QED/BreitWheelerEngineTableBuilder.cpp | 6 ++++++ Source/QED/BreitWheelerEngineWrapper.H | 6 ++++++ Source/QED/BreitWheelerEngineWrapper.cpp | 6 ++++++ Source/QED/QedChiFunctions.H | 6 ++++++ Source/QED/QedTableParserHelperFunctions.H | 6 ++++++ Source/QED/QedWrapperCommons.H | 6 ++++++ Source/QED/QuantumSyncDummyTable.H | 6 ++++++ Source/QED/QuantumSyncEngineInnards.H | 6 ++++++ Source/QED/QuantumSyncEngineTableBuilder.H | 6 ++++++ Source/QED/QuantumSyncEngineTableBuilder.cpp | 6 ++++++ Source/QED/QuantumSyncEngineWrapper.H | 6 ++++++ Source/QED/QuantumSyncEngineWrapper.cpp | 6 ++++++ Source/Utils/IonizationEnergiesTable.H | 6 ++++++ Source/Utils/NCIGodfreyTables.H | 6 ++++++ Source/Utils/WarpXAlgorithmSelection.H | 7 +++++++ Source/Utils/WarpXAlgorithmSelection.cpp | 8 ++++++++ Source/Utils/WarpXConst.H | 7 +++++++ Source/Utils/WarpXMovingWindow.cpp | 8 ++++++++ Source/Utils/WarpXTagging.cpp | 7 +++++++ Source/Utils/WarpXUtil.H | 7 +++++++ Source/Utils/WarpXUtil.cpp | 8 ++++++++ Source/Utils/WarpX_Complex.H | 7 +++++++ Source/Utils/atomic_data.txt | 6 ++++++ Source/Utils/utils_ES.F90 | 6 ++++++ Source/Utils/write_atomic_data_cpp.py | 7 +++++++ Source/WarpX.H | 11 +++++++++++ Source/WarpX.cpp | 11 +++++++++++ Source/main.cpp | 8 ++++++++ Tools/batchScripts/batch_cori.sh | 7 +++++++ Tools/batchScripts/batch_summit.sh | 7 +++++++ Tools/batchScripts/script_profiling_summit.sh | 7 +++++++ Tools/compute_domain.py | 6 ++++++ Tools/cori_postproc_script.sh | 7 +++++++ Tools/performance_tests/cori.py | 7 +++++++ Tools/performance_tests/functions_perftest.py | 7 +++++++ Tools/performance_tests/run_alltests.py | 7 +++++++ Tools/performance_tests/run_alltests_1node.py | 6 ++++++ Tools/performance_tests/run_automated.py | 7 +++++++ Tools/performance_tests/summit.py | 7 +++++++ Tools/plot_parallel.py | 6 ++++++ Tools/plot_particle_path.py | 7 +++++++ Tools/read_lab_particles.py | 6 ++++++ Tools/read_raw_data.py | 7 +++++++ Tools/script_profiling_summit.sh | 7 +++++++ Tools/update_copyright.sh | 7 +++++++ Tools/update_release.sh | 7 +++++++ Tools/video_yt.py | 6 ++++++ Tools/yt3d_mpi.py | 6 ++++++ run_test.sh | 9 +++++++++ 230 files changed, 1575 insertions(+), 2 deletions(-) (limited to 'Source/Particles/PhysicalParticleContainer.cpp') diff --git a/.github/workflows/source.yml b/.github/workflows/source.yml index 42573f64b..ce9ee7f89 100644 --- a/.github/workflows/source.yml +++ b/.github/workflows/source.yml @@ -1,3 +1,9 @@ +# Copyright 2019-2020 Axel Huebl, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + name: source on: [push, pull_request] diff --git a/.lgtm.yml b/.lgtm.yml index fa3ddd58e..a4fdc14f7 100644 --- a/.lgtm.yml +++ b/.lgtm.yml @@ -1,3 +1,9 @@ +# Copyright 2019 Axel Huebl +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + extraction: cpp: prepare: diff --git a/.readthedocs.yml b/.readthedocs.yml index dc908b3f0..1fdbb2823 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -1,3 +1,9 @@ +# Copyright 2019-2020 Axel Huebl, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + requirements_file: Docs/requirements.txt formats: diff --git a/.travis.yml b/.travis.yml index ccabd3852..20e2c0549 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,10 @@ +# Copyright 2018-2019 Axel Huebl, David Grote, Luca Fedeli +# Maxence Thevenet, Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + dist: xenial language: c++ sudo: true diff --git a/Docs/requirements.txt b/Docs/requirements.txt index 68c49affd..7b59a9d9d 100644 --- a/Docs/requirements.txt +++ b/Docs/requirements.txt @@ -1,3 +1,9 @@ +# Copyright 2019 Axel Huebl, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + sphinx_rtd_theme>=0.3.1 recommonmark sphinx>=2.0 diff --git a/Docs/source/conf.py b/Docs/source/conf.py index e8e5d96e2..a4ab16d09 100644 --- a/Docs/source/conf.py +++ b/Docs/source/conf.py @@ -1,4 +1,12 @@ #!/usr/bin/env python3 + +# Copyright 2017-2020 Andrew Myers, Axel Huebl, Burlen Loring +# Maxence Thevenet, Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # -*- coding: utf-8 -*- # # WarpX documentation build configuration file, created by diff --git a/Docs/source/latex_theory/AMR/AMR.tex b/Docs/source/latex_theory/AMR/AMR.tex index 23e32f6a1..77f224fd3 100644 --- a/Docs/source/latex_theory/AMR/AMR.tex +++ b/Docs/source/latex_theory/AMR/AMR.tex @@ -1,3 +1,9 @@ +% Copyright 2017-2019 Jean-Luc Vay, Remi Lehe +% +% This file is part of WarpX. +% +% License: BSD-3-Clause-LBNL + \input{newcommands} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Docs/source/latex_theory/Boosted_frame/Boosted_frame.tex b/Docs/source/latex_theory/Boosted_frame/Boosted_frame.tex index c0e7f41f8..471863ac3 100644 --- a/Docs/source/latex_theory/Boosted_frame/Boosted_frame.tex +++ b/Docs/source/latex_theory/Boosted_frame/Boosted_frame.tex @@ -1,3 +1,9 @@ +% Copyright 2017-2019 Burlen Loring, Remi Lehe +% +% This file is part of WarpX. +% +% License: BSD-3-Clause-LBNL + \input{newcommands} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Docs/source/latex_theory/PML/PML.tex b/Docs/source/latex_theory/PML/PML.tex index 7c5f09619..205c9d099 100644 --- a/Docs/source/latex_theory/PML/PML.tex +++ b/Docs/source/latex_theory/PML/PML.tex @@ -1,3 +1,9 @@ +% Copyright 2017-2019 Jean-Luc Vay, Remi Lehe +% +% This file is part of WarpX. +% +% License: BSD-3-Clause-LBNL + \input{newcommands} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Docs/source/latex_theory/input_output/input_output.tex b/Docs/source/latex_theory/input_output/input_output.tex index 870ce2e44..e013e2364 100644 --- a/Docs/source/latex_theory/input_output/input_output.tex +++ b/Docs/source/latex_theory/input_output/input_output.tex @@ -1,3 +1,9 @@ +% Copyright 2017-2019 Remi Lehe +% +% This file is part of WarpX. +% +% License: BSD-3-Clause-LBNL + \input{newcommands} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/Docs/source/latex_theory/intro.tex b/Docs/source/latex_theory/intro.tex index 6ce156a54..01283f23d 100644 --- a/Docs/source/latex_theory/intro.tex +++ b/Docs/source/latex_theory/intro.tex @@ -1,3 +1,9 @@ +% Copyright 2017 Remi Lehe +% +% This file is part of WarpX. +% +% License: BSD-3-Clause-LBNL + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Introduction} diff --git a/Docs/source/latex_theory/newcommands.tex b/Docs/source/latex_theory/newcommands.tex index 2b34822c7..de6c597a9 100644 --- a/Docs/source/latex_theory/newcommands.tex +++ b/Docs/source/latex_theory/newcommands.tex @@ -1,3 +1,9 @@ +% Copyright 2017-2019 Jean-Luc Vay, Remi Lehe +% +% This file is part of WarpX. +% +% License: BSD-3-Clause-LBNL + \usepackage{bm} \usepackage{amsmath} diff --git a/Docs/source/latex_theory/theory.tex b/Docs/source/latex_theory/theory.tex index cee24d8ff..aea92dc4a 100644 --- a/Docs/source/latex_theory/theory.tex +++ b/Docs/source/latex_theory/theory.tex @@ -1,3 +1,9 @@ +% Copyright 2017-2019 Jean-Luc Vay, Remi Lehe +% +% This file is part of WarpX. +% +% License: BSD-3-Clause-LBNL + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Reviews of Accelerator Science and Technology %% Trim Size: 11in x 8.5in diff --git a/Examples/Modules/RigidInjection/analysis_rigid_injection_BoostedFrame.py b/Examples/Modules/RigidInjection/analysis_rigid_injection_BoostedFrame.py index 6dd72050e..61bb28d43 100755 --- a/Examples/Modules/RigidInjection/analysis_rigid_injection_BoostedFrame.py +++ b/Examples/Modules/RigidInjection/analysis_rigid_injection_BoostedFrame.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019-2020 Luca Fedeli, Maxence Thevenet, Revathi Jambunathan +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + ''' Analysis script of a WarpX simulation of rigid injection in a boosted frame. diff --git a/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py b/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py index 1a4865dd8..6977f6ff6 100755 --- a/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py +++ b/Examples/Modules/RigidInjection/analysis_rigid_injection_LabFrame.py @@ -1,5 +1,12 @@ #! /usr/bin/env python +# Copyright 2019-2020 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + ''' Analysis script of a WarpX simulation of rigid injection. diff --git a/Examples/Modules/boosted_diags/analysis_3Dbacktransformed_diag.py b/Examples/Modules/boosted_diags/analysis_3Dbacktransformed_diag.py index 3b8e7aa76..262354fe6 100755 --- a/Examples/Modules/boosted_diags/analysis_3Dbacktransformed_diag.py +++ b/Examples/Modules/boosted_diags/analysis_3Dbacktransformed_diag.py @@ -1,5 +1,12 @@ #! /usr/bin/env python +# Copyright 2019 Maxence Thevenet, Revathi Jambunathan +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + ''' Analysis script of a WarpX simulation in a boosted frame. diff --git a/Examples/Modules/ionization/analysis_ionization.py b/Examples/Modules/ionization/analysis_ionization.py index 018aba8ee..6d8bda1e0 100755 --- a/Examples/Modules/ionization/analysis_ionization.py +++ b/Examples/Modules/ionization/analysis_ionization.py @@ -1,5 +1,12 @@ #! /usr/bin/env python +# Copyright 2019-2020 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + """ This script tests the result of the ionization module in WarpX. diff --git a/Examples/Modules/laser_injection/analysis_laser.py b/Examples/Modules/laser_injection/analysis_laser.py index 1951bb29a..c19de0d85 100755 --- a/Examples/Modules/laser_injection/analysis_laser.py +++ b/Examples/Modules/laser_injection/analysis_laser.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Andrew Myers, Jean-Luc Vay, Maxence Thevenet +# Remi Lehe, Weiqun Zhang +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import matplotlib matplotlib.use('Agg') diff --git a/Examples/Modules/laser_injection_from_file/analysis.py b/Examples/Modules/laser_injection_from_file/analysis.py index 9c8629215..5a4038db1 100755 --- a/Examples/Modules/laser_injection_from_file/analysis.py +++ b/Examples/Modules/laser_injection_from_file/analysis.py @@ -1,5 +1,13 @@ #!/usr/bin/env python3 +# Copyright 2020 Andrew Myers, Axel Huebl, Luca Fedeli +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This file is part of the WarpX automated test suite. It is used to test the # injection of a laser pulse from an external binary file. # diff --git a/Examples/Modules/nci_corrector/analysis_ncicorr.py b/Examples/Modules/nci_corrector/analysis_ncicorr.py index 94dd2f838..af23f15ed 100755 --- a/Examples/Modules/nci_corrector/analysis_ncicorr.py +++ b/Examples/Modules/nci_corrector/analysis_ncicorr.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Jean-Luc Vay, Maxence Thevenet, Remi Lehe +# Weiqun Zhang +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import yt import re diff --git a/Examples/Modules/qed/breit_wheeler/analysis_2d_tau_init.py b/Examples/Modules/qed/breit_wheeler/analysis_2d_tau_init.py index 9168c0502..ce21aa059 100755 --- a/Examples/Modules/qed/breit_wheeler/analysis_2d_tau_init.py +++ b/Examples/Modules/qed/breit_wheeler/analysis_2d_tau_init.py @@ -1,4 +1,11 @@ #! /usr/bin/env python + +# Copyright 2019 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import yt import numpy as np import scipy.stats as st diff --git a/Examples/Modules/qed/breit_wheeler/analysis_3d_optical_depth_evolution.py b/Examples/Modules/qed/breit_wheeler/analysis_3d_optical_depth_evolution.py index 617afd6f9..bd14660c2 100755 --- a/Examples/Modules/qed/breit_wheeler/analysis_3d_optical_depth_evolution.py +++ b/Examples/Modules/qed/breit_wheeler/analysis_3d_optical_depth_evolution.py @@ -1,4 +1,11 @@ #! /usr/bin/env python + +# Copyright 2019 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # -*- coding: utf-8 -*- import yt diff --git a/Examples/Modules/qed/quantum_synchrotron/analysis_2d_tau_init.py b/Examples/Modules/qed/quantum_synchrotron/analysis_2d_tau_init.py index 98c95d5ea..2cceed2e4 100755 --- a/Examples/Modules/qed/quantum_synchrotron/analysis_2d_tau_init.py +++ b/Examples/Modules/qed/quantum_synchrotron/analysis_2d_tau_init.py @@ -1,4 +1,11 @@ #! /usr/bin/env python + +# Copyright 2019 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import yt import numpy as np import scipy.stats as st diff --git a/Examples/Modules/relativistic_space_charge_initialization/analysis.py b/Examples/Modules/relativistic_space_charge_initialization/analysis.py index f3ea5bbea..46cd67f07 100755 --- a/Examples/Modules/relativistic_space_charge_initialization/analysis.py +++ b/Examples/Modules/relativistic_space_charge_initialization/analysis.py @@ -1,4 +1,11 @@ #!/usr/bin/env python + +# Copyright 2019-2020 Axel Huebl, Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + """ This script checks the space-charge initialization routine, by verifying that the space-charge field of a Gaussian beam corresponds to diff --git a/Examples/Modules/space_charge_initialization/analysis.py b/Examples/Modules/space_charge_initialization/analysis.py index 3bcdf57f1..675a8e5b5 100755 --- a/Examples/Modules/space_charge_initialization/analysis.py +++ b/Examples/Modules/space_charge_initialization/analysis.py @@ -1,4 +1,11 @@ #!/usr/bin/env python + +# Copyright 2019-2020 Axel Huebl, Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + """ This script checks the space-charge initialization routine, by verifying that the space-charge field of a Gaussian beam corresponds to diff --git a/Examples/Tests/Langmuir/analysis_langmuir.py b/Examples/Tests/Langmuir/analysis_langmuir.py index 2ffb7f56b..1f77c3ebf 100755 --- a/Examples/Tests/Langmuir/analysis_langmuir.py +++ b/Examples/Tests/Langmuir/analysis_langmuir.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Jean-Luc Vay, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import re import matplotlib diff --git a/Examples/Tests/Langmuir/analysis_langmuir2d.py b/Examples/Tests/Langmuir/analysis_langmuir2d.py index d43134115..b119b9afe 100755 --- a/Examples/Tests/Langmuir/analysis_langmuir2d.py +++ b/Examples/Tests/Langmuir/analysis_langmuir2d.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Andrew Myers, David Grote, Jean-Luc Vay +# Maxence Thevenet, Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import matplotlib matplotlib.use('Agg') diff --git a/Examples/Tests/Langmuir/analysis_langmuir_multi.py b/Examples/Tests/Langmuir/analysis_langmuir_multi.py index 890320be8..21f281841 100755 --- a/Examples/Tests/Langmuir/analysis_langmuir_multi.py +++ b/Examples/Tests/Langmuir/analysis_langmuir_multi.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Jean-Luc Vay, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This is a script that analyses the simulation results from # the script `inputs.multi.rt`. This simulates a 3D periodic plasma wave. # The electric field in the simulation is given (in theory) by: diff --git a/Examples/Tests/Langmuir/analysis_langmuir_multi_2d.py b/Examples/Tests/Langmuir/analysis_langmuir_multi_2d.py index 169c56e7b..105f1993a 100755 --- a/Examples/Tests/Langmuir/analysis_langmuir_multi_2d.py +++ b/Examples/Tests/Langmuir/analysis_langmuir_multi_2d.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Jean-Luc Vay, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This is a script that analyses the simulation results from # the script `inputs.multi.rt`. This simulates a 3D periodic plasma wave. # The electric field in the simulation is given (in theory) by: diff --git a/Examples/Tests/Langmuir/analysis_langmuir_multi_rz.py b/Examples/Tests/Langmuir/analysis_langmuir_multi_rz.py index 2ff30eb5e..154105870 100755 --- a/Examples/Tests/Langmuir/analysis_langmuir_multi_rz.py +++ b/Examples/Tests/Langmuir/analysis_langmuir_multi_rz.py @@ -1,5 +1,12 @@ #! /usr/bin/env python +# Copyright 2019 David Grote, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This is a script that analyses the simulation results from # the script `inputs.multi.rz.rt`. This simulates a RZ periodic plasma wave. # The electric field in the simulation is given (in theory) by: diff --git a/Examples/Tests/PML/analysis_pml_ckc.py b/Examples/Tests/PML/analysis_pml_ckc.py index 08019e60b..2ef7d36aa 100755 --- a/Examples/Tests/PML/analysis_pml_ckc.py +++ b/Examples/Tests/PML/analysis_pml_ckc.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2018-2019 Andrew Myers, Jean-Luc Vay, Maxence Thevenet +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import yt ; yt.funcs.mylog.setLevel(0) import numpy as np diff --git a/Examples/Tests/PML/analysis_pml_psatd.py b/Examples/Tests/PML/analysis_pml_psatd.py index c8c1aea6c..164c7a19e 100755 --- a/Examples/Tests/PML/analysis_pml_psatd.py +++ b/Examples/Tests/PML/analysis_pml_psatd.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Jean-Luc Vay, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import yt ; yt.funcs.mylog.setLevel(0) import numpy as np diff --git a/Examples/Tests/PML/analysis_pml_yee.py b/Examples/Tests/PML/analysis_pml_yee.py index c0c91329d..68a953bb3 100755 --- a/Examples/Tests/PML/analysis_pml_yee.py +++ b/Examples/Tests/PML/analysis_pml_yee.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2018-2019 Andrew Myers, Jean-Luc Vay, Maxence Thevenet +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import yt ; yt.funcs.mylog.setLevel(0) import numpy as np diff --git a/Examples/Tests/SingleParticle/analysis_bilinear_filter.py b/Examples/Tests/SingleParticle/analysis_bilinear_filter.py index 494434279..89b89e2e6 100755 --- a/Examples/Tests/SingleParticle/analysis_bilinear_filter.py +++ b/Examples/Tests/SingleParticle/analysis_bilinear_filter.py @@ -1,5 +1,12 @@ #! /usr/bin/env python +# Copyright 2019 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + import sys import yt ; yt.funcs.mylog.setLevel(0) import numpy as np diff --git a/Examples/Tests/collision/analysis_collision.py b/Examples/Tests/collision/analysis_collision.py index 06e8a3db0..57a017591 100755 --- a/Examples/Tests/collision/analysis_collision.py +++ b/Examples/Tests/collision/analysis_collision.py @@ -1,5 +1,12 @@ #! /usr/bin/env python +# Copyright 2019-2020 Yin-YinjiaZhao, Yinjian Zhao +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This script tests the collision module # using electron-ion temperature relaxation. # Initially, electrons and ions are both in equilibrium diff --git a/Examples/Tests/particle_pusher/analysis_pusher.py b/Examples/Tests/particle_pusher/analysis_pusher.py index 0d9fc24c5..2f662a3da 100755 --- a/Examples/Tests/particle_pusher/analysis_pusher.py +++ b/Examples/Tests/particle_pusher/analysis_pusher.py @@ -1,5 +1,12 @@ #! /usr/bin/env python +# Copyright 2019 Yinjian Zhao +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This script tests the particle pusher (HC) # using a force-free field, # in which position x should remain 0. diff --git a/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py index 73e1674e7..bf2130665 100755 --- a/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py +++ b/Examples/Tests/particles_in_PML/analysis_particles_in_pml.py @@ -1,4 +1,12 @@ #! /usr/bin/env python + +# Copyright 2019-2020 Luca Fedeli, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + """ This script tests the absorption of particles in the PML. diff --git a/Examples/Tests/photon_pusher/analysis_photon_pusher.py b/Examples/Tests/photon_pusher/analysis_photon_pusher.py index d0986de48..055730b86 100755 --- a/Examples/Tests/photon_pusher/analysis_photon_pusher.py +++ b/Examples/Tests/photon_pusher/analysis_photon_pusher.py @@ -1,4 +1,12 @@ #! /usr/bin/env python + +# Copyright 2019 Luca Fedeli, Maxence Thevenet, Weiqun Zhang +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import yt import numpy as np import sys diff --git a/Examples/Tests/radiation_reaction/test_const_B_analytical/analysis_classicalRR.py b/Examples/Tests/radiation_reaction/test_const_B_analytical/analysis_classicalRR.py index e385ebfb7..4e5288e4f 100755 --- a/Examples/Tests/radiation_reaction/test_const_B_analytical/analysis_classicalRR.py +++ b/Examples/Tests/radiation_reaction/test_const_B_analytical/analysis_classicalRR.py @@ -1,5 +1,13 @@ #! /usr/bin/env python +# Copyright 2019 Luca Fedeli, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This script contains few simple tests for the radiation reaction pusher # It initializes an electron or a positron with normalized momentum in different # directions, propagating in a static magnetic field (along [2/7,3/7,6/7]). diff --git a/Python/pywarpx/Algo.py b/Python/pywarpx/Algo.py index 0ec132ab3..f80492070 100644 --- a/Python/pywarpx/Algo.py +++ b/Python/pywarpx/Algo.py @@ -1,3 +1,9 @@ +# Copyright 2016 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket algo = Bucket('algo') diff --git a/Python/pywarpx/Amr.py b/Python/pywarpx/Amr.py index 48f1f2250..f9164f4d4 100644 --- a/Python/pywarpx/Amr.py +++ b/Python/pywarpx/Amr.py @@ -1,3 +1,9 @@ +# Copyright 2016 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket amr = Bucket('amr') diff --git a/Python/pywarpx/Bucket.py b/Python/pywarpx/Bucket.py index 6a32c755b..714516fd3 100644 --- a/Python/pywarpx/Bucket.py +++ b/Python/pywarpx/Bucket.py @@ -1,3 +1,10 @@ +# Copyright 2016-2020 Andrew Myers, David Grote, Maxence Thevenet +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import numpy as np class Bucket(object): diff --git a/Python/pywarpx/Constants.py b/Python/pywarpx/Constants.py index 20107ebc4..8a17c9ccc 100644 --- a/Python/pywarpx/Constants.py +++ b/Python/pywarpx/Constants.py @@ -1,3 +1,9 @@ +# Copyright 2018-2019 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket class Constants(Bucket): diff --git a/Python/pywarpx/Geometry.py b/Python/pywarpx/Geometry.py index e4a0b3878..2eddb9b8f 100644 --- a/Python/pywarpx/Geometry.py +++ b/Python/pywarpx/Geometry.py @@ -1,3 +1,9 @@ +# Copyright 2016 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket geometry = Bucket('geometry') diff --git a/Python/pywarpx/Interpolation.py b/Python/pywarpx/Interpolation.py index 28f66f64e..d25539de7 100644 --- a/Python/pywarpx/Interpolation.py +++ b/Python/pywarpx/Interpolation.py @@ -1,3 +1,9 @@ +# Copyright 2016 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket interpolation = Bucket('interpolation') diff --git a/Python/pywarpx/Langmuirwave.py b/Python/pywarpx/Langmuirwave.py index a62d4d6a2..43d672a4a 100644 --- a/Python/pywarpx/Langmuirwave.py +++ b/Python/pywarpx/Langmuirwave.py @@ -1,3 +1,9 @@ +# Copyright 2016 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket langmuirwave = Bucket('langmuirwave') diff --git a/Python/pywarpx/Lasers.py b/Python/pywarpx/Lasers.py index b54156ba1..2970960ec 100644 --- a/Python/pywarpx/Lasers.py +++ b/Python/pywarpx/Lasers.py @@ -1,3 +1,9 @@ +# Copyright 2019-2020 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket lasers = Bucket('lasers', nlasers=0, names=[]) diff --git a/Python/pywarpx/PGroup.py b/Python/pywarpx/PGroup.py index f77a79004..ae9e6800a 100644 --- a/Python/pywarpx/PGroup.py +++ b/Python/pywarpx/PGroup.py @@ -1,3 +1,9 @@ +# Copyright 2017-2019 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import numpy as np from . import _libwarpx diff --git a/Python/pywarpx/Particles.py b/Python/pywarpx/Particles.py index 582e623b7..227cc44d9 100644 --- a/Python/pywarpx/Particles.py +++ b/Python/pywarpx/Particles.py @@ -1,3 +1,9 @@ +# Copyright 2017-2020 Andrew Myers, David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket particles = Bucket('particles', nspecies=0, species_names=[]) diff --git a/Python/pywarpx/WarpInterface.py b/Python/pywarpx/WarpInterface.py index e2c9efa58..8a3823959 100644 --- a/Python/pywarpx/WarpInterface.py +++ b/Python/pywarpx/WarpInterface.py @@ -1,3 +1,9 @@ +# Copyright 2019 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import warp from . import fields from pywarpx import PGroup diff --git a/Python/pywarpx/WarpX.py b/Python/pywarpx/WarpX.py index 2ef3d99c1..22f154775 100644 --- a/Python/pywarpx/WarpX.py +++ b/Python/pywarpx/WarpX.py @@ -1,3 +1,10 @@ +# Copyright 2016-2020 Andrew Myers, David Grote, Maxence Thevenet +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .Bucket import Bucket from .Constants import my_constants from .Amr import amr diff --git a/Python/pywarpx/WarpXPIC.py b/Python/pywarpx/WarpXPIC.py index 77ab8464f..c087d3c7a 100644 --- a/Python/pywarpx/WarpXPIC.py +++ b/Python/pywarpx/WarpXPIC.py @@ -1,3 +1,9 @@ +# Copyright 2017 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from warp.run_modes.timestepper import PICAPI from ._libwarpx import libwarpx diff --git a/Python/pywarpx/__init__.py b/Python/pywarpx/__init__.py index ef335e029..a1e62f85d 100644 --- a/Python/pywarpx/__init__.py +++ b/Python/pywarpx/__init__.py @@ -1,3 +1,9 @@ +# Copyright 2016-2019 Andrew Myers, David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from .WarpX import warpx from .Constants import my_constants from .Amr import amr diff --git a/Python/pywarpx/_libwarpx.py b/Python/pywarpx/_libwarpx.py index 0444140e4..b2a0dae1e 100755 --- a/Python/pywarpx/_libwarpx.py +++ b/Python/pywarpx/_libwarpx.py @@ -1,3 +1,10 @@ +# Copyright 2017-2019 Andrew Myers, David Grote, Remi Lehe +# Weiqun Zhang +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # --- This defines the wrapper functions that directly call the underlying compiled routines import os import sys diff --git a/Python/pywarpx/callbacks.py b/Python/pywarpx/callbacks.py index 68629d164..3d5bb1477 100644 --- a/Python/pywarpx/callbacks.py +++ b/Python/pywarpx/callbacks.py @@ -1,3 +1,9 @@ +# Copyright 2017 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + """call back operations ===================== diff --git a/Python/pywarpx/fields.py b/Python/pywarpx/fields.py index 920c109d6..916e3c887 100644 --- a/Python/pywarpx/fields.py +++ b/Python/pywarpx/fields.py @@ -1,3 +1,9 @@ +# Copyright 2017-2019 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + """Provides wrappers around field and current density on multiFABs Available routines: diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index 70f356475..7332877c3 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -1,3 +1,11 @@ +# Copyright 2018-2020 Andrew Myers, David Grote, Ligia Diana Amorim +# Maxence Thevenet, Remi Lehe, Revathi Jambunathan +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + """Classes following the PICMI standard """ import re diff --git a/Python/pywarpx/timestepper.py b/Python/pywarpx/timestepper.py index 3068cbc82..de5faf36d 100644 --- a/Python/pywarpx/timestepper.py +++ b/Python/pywarpx/timestepper.py @@ -1,3 +1,10 @@ +# Copyright 2017-2018 Andrew Myers, David Grote, Weiqun Zhang +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from ._libwarpx import libwarpx from . import callbacks diff --git a/Python/pywarpx/wx.py b/Python/pywarpx/wx.py index 4ce562b4f..e28be62c8 100644 --- a/Python/pywarpx/wx.py +++ b/Python/pywarpx/wx.py @@ -1,3 +1,9 @@ +# Copyright 2018 David Grote +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from ._libwarpx import * from .timestepper import TimeStepper diff --git a/Python/setup.py b/Python/setup.py index 309d25b92..7b3a4ef44 100644 --- a/Python/setup.py +++ b/Python/setup.py @@ -1,5 +1,13 @@ #!/usr/bin/env python +# Copyright 2016-2020 Andrew Myers, David Grote, Maxence Thevenet +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + """ setup.py file for WarpX """ diff --git a/Regression/TestFillBoundary/compare_guard_cells.sh b/Regression/TestFillBoundary/compare_guard_cells.sh index bd2b9cab9..1fb1a0d12 100755 --- a/Regression/TestFillBoundary/compare_guard_cells.sh +++ b/Regression/TestFillBoundary/compare_guard_cells.sh @@ -1,5 +1,12 @@ #!/bin/bash +# Copyright 2020 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This script compares runs WarpX with (i) default guard cell exchanges and # (ii) exchanging all guard cells, and check that they match to a certain # tolerance level (typically 2.e-15). For a large number of configurations diff --git a/Regression/prepare_file_travis.py b/Regression/prepare_file_travis.py index d461f6f81..abec6baea 100644 --- a/Regression/prepare_file_travis.py +++ b/Regression/prepare_file_travis.py @@ -1,3 +1,10 @@ +# Copyright 2018-2019 Andrew Myers, Luca Fedeli, Maxence Thevenet +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # This script modifies `WarpX-test.ini` (which is used for nightly builds) # and creates the file `travis-test.ini` (which is used for continous # integration on TravisCI (https://travis-ci.org/) diff --git a/Source/BoundaryConditions/PML.H b/Source/BoundaryConditions/PML.H index 5ab84439f..b8ed0ff7a 100644 --- a/Source/BoundaryConditions/PML.H +++ b/Source/BoundaryConditions/PML.H @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Aurore Blelly, Axel Huebl + * Maxence Thevenet, Remi Lehe, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #ifndef WARPX_PML_H_ diff --git a/Source/BoundaryConditions/PML.cpp b/Source/BoundaryConditions/PML.cpp index 51439430d..3f2acc6a8 100644 --- a/Source/BoundaryConditions/PML.cpp +++ b/Source/BoundaryConditions/PML.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Aurore Blelly, Axel Huebl + * Maxence Thevenet, Remi Lehe, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/BoundaryConditions/PML_current.H b/Source/BoundaryConditions/PML_current.H index fa5bbf3f9..1d0249d56 100644 --- a/Source/BoundaryConditions/PML_current.H +++ b/Source/BoundaryConditions/PML_current.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Aurore Blelly, Axel Huebl, Maxence Thevenet + * Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef PML_CURRENT_H_ #define PML_CURRENT_H_ diff --git a/Source/BoundaryConditions/WarpXEvolvePML.cpp b/Source/BoundaryConditions/WarpXEvolvePML.cpp index bd29d1b65..0e3665c86 100644 --- a/Source/BoundaryConditions/WarpXEvolvePML.cpp +++ b/Source/BoundaryConditions/WarpXEvolvePML.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Aurore Blelly, Axel Huebl, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/BoundaryConditions/WarpX_PML_kernels.H b/Source/BoundaryConditions/WarpX_PML_kernels.H index 89fdb4911..8a573c4b9 100644 --- a/Source/BoundaryConditions/WarpX_PML_kernels.H +++ b/Source/BoundaryConditions/WarpX_PML_kernels.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Remi Lehe, Revathi Jambunathan, Revathi Jambunathan + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PML_KERNELS_H_ #define WARPX_PML_KERNELS_H_ diff --git a/Source/Diagnostics/BackTransformedDiagnostic.H b/Source/Diagnostics/BackTransformedDiagnostic.H index 5621d48c6..0d36c97d9 100644 --- a/Source/Diagnostics/BackTransformedDiagnostic.H +++ b/Source/Diagnostics/BackTransformedDiagnostic.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, Maxence Thevenet + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_BackTransformedDiagnostic_H_ #define WARPX_BackTransformedDiagnostic_H_ diff --git a/Source/Diagnostics/BackTransformedDiagnostic.cpp b/Source/Diagnostics/BackTransformedDiagnostic.cpp index 452828f02..4b8a1c971 100644 --- a/Source/Diagnostics/BackTransformedDiagnostic.cpp +++ b/Source/Diagnostics/BackTransformedDiagnostic.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, Maxence Thevenet + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Diagnostics/ElectrostaticIO.cpp b/Source/Diagnostics/ElectrostaticIO.cpp index 332638cff..8fb90ae4c 100644 --- a/Source/Diagnostics/ElectrostaticIO.cpp +++ b/Source/Diagnostics/ElectrostaticIO.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, David Bizzozero + * Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Diagnostics/FieldIO.H b/Source/Diagnostics/FieldIO.H index 7cdc9b710..193fe8bd5 100644 --- a/Source/Diagnostics/FieldIO.H +++ b/Source/Diagnostics/FieldIO.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, David Grote, Igor Andriyash + * Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_FielIO_H_ #define WARPX_FielIO_H_ diff --git a/Source/Diagnostics/FieldIO.cpp b/Source/Diagnostics/FieldIO.cpp index 9c38f1d68..d885e07ad 100644 --- a/Source/Diagnostics/FieldIO.cpp +++ b/Source/Diagnostics/FieldIO.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, David Grote + * Maxence Thevenet, Remi Lehe, Revathi Jambunathan + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Diagnostics/ParticleIO.cpp b/Source/Diagnostics/ParticleIO.cpp index c08d58d36..ca9e86fdd 100644 --- a/Source/Diagnostics/ParticleIO.cpp +++ b/Source/Diagnostics/ParticleIO.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, David Grote + * Luca Fedeli, Maxence Thevenet, Revathi Jambunathan + * Weiqun Zhang, levinem + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Diagnostics/SliceDiagnostic.H b/Source/Diagnostics/SliceDiagnostic.H index 1b9ca3967..68a8c1f92 100644 --- a/Source/Diagnostics/SliceDiagnostic.H +++ b/Source/Diagnostics/SliceDiagnostic.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_SliceDiagnostic_H_ #define WARPX_SliceDiagnostic_H_ diff --git a/Source/Diagnostics/SliceDiagnostic.cpp b/Source/Diagnostics/SliceDiagnostic.cpp index 99eec4468..c6b5dd4da 100644 --- a/Source/Diagnostics/SliceDiagnostic.cpp +++ b/Source/Diagnostics/SliceDiagnostic.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Luca Fedeli, Revathi Jambunathan, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "SliceDiagnostic.H" #include #include diff --git a/Source/Diagnostics/WarpXIO.cpp b/Source/Diagnostics/WarpXIO.cpp index d7a46f7b7..e97750c9a 100644 --- a/Source/Diagnostics/WarpXIO.cpp +++ b/Source/Diagnostics/WarpXIO.cpp @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, Ann Almgren, Axel Huebl + * Burlen Loring, David Grote, Gunther H. Weber + * Junmin Gu, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Diagnostics/WarpXOpenPMD.H b/Source/Diagnostics/WarpXOpenPMD.H index e4b48d605..bd18ec8c1 100644 --- a/Source/Diagnostics/WarpXOpenPMD.H +++ b/Source/Diagnostics/WarpXOpenPMD.H @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Axel Huebl, Junmin Gu, Maxence Thevenet + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_OPEN_PMD_H_ #define WARPX_OPEN_PMD_H_ diff --git a/Source/Diagnostics/WarpXOpenPMD.cpp b/Source/Diagnostics/WarpXOpenPMD.cpp index ed2bf8020..446ef0ff0 100644 --- a/Source/Diagnostics/WarpXOpenPMD.cpp +++ b/Source/Diagnostics/WarpXOpenPMD.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Axel Huebl, Junmin Gu + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "WarpXOpenPMD.H" #include "WarpXAlgorithmSelection.H" #include "FieldIO.H" // for getReversedVec diff --git a/Source/Diagnostics/requirements.txt b/Source/Diagnostics/requirements.txt index 2c29c7422..5a3933299 100644 --- a/Source/Diagnostics/requirements.txt +++ b/Source/Diagnostics/requirements.txt @@ -1,2 +1,8 @@ +# Copyright 2020 Axel Huebl +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # keep this entry for GitHub's dependency graph openPMD-api>=0.10.3 diff --git a/Source/Evolve/WarpXDtType.H b/Source/Evolve/WarpXDtType.H index c2c01db00..89fcb506f 100644 --- a/Source/Evolve/WarpXDtType.H +++ b/Source/Evolve/WarpXDtType.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_DTTYPE_H_ #define WARPX_DTTYPE_H_ diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 1cb17287b..90cec3ecf 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -1,3 +1,13 @@ +/* Copyright 2019-2020 Andrew Myers, Ann Almgren, Aurore Blelly + * Axel Huebl, Burlen Loring, David Grote + * Glenn Richardson, Jean-Luc Vay, Luca Fedeli + * Maxence Thevenet, Remi Lehe, Revathi Jambunathan + * Weiqun Zhang, Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Evolve/WarpXEvolveES.cpp b/Source/Evolve/WarpXEvolveES.cpp index 555ab37ad..7d6260bd4 100644 --- a/Source/Evolve/WarpXEvolveES.cpp +++ b/Source/Evolve/WarpXEvolveES.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, David Bizzozero + * David Grote, Maxence Thevenet, Remi Lehe + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridFFTData.H b/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridFFTData.H index 4e97ab675..44bb42982 100644 --- a/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridFFTData.H +++ b/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridFFTData.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PICSAR_HYBRID_FFTDATA_H_ #define WARPX_PICSAR_HYBRID_FFTDATA_H_ diff --git a/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridSpectralSolver.cpp b/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridSpectralSolver.cpp index 6b7a34271..5b7d95775 100644 --- a/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridSpectralSolver.cpp +++ b/Source/FieldSolver/PicsarHybridSpectralSolver/PicsarHybridSpectralSolver.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/FieldSolver/PicsarHybridSpectralSolver/picsar_hybrid_spectral.F90 b/Source/FieldSolver/PicsarHybridSpectralSolver/picsar_hybrid_spectral.F90 index 35357a63f..96bfb6111 100644 --- a/Source/FieldSolver/PicsarHybridSpectralSolver/picsar_hybrid_spectral.F90 +++ b/Source/FieldSolver/PicsarHybridSpectralSolver/picsar_hybrid_spectral.F90 @@ -1,3 +1,10 @@ +! Copyright 2019 Andrew Myers, Maxence Thevenet, Remi Lehe +! Weiqun Zhang +! +! This file is part of WarpX. +! +! License: BSD-3-Clause-LBNL + module warpx_fft_module use amrex_error_module, only : amrex_error, amrex_abort diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.H index 80ceb2e93..4452002d1 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Axel Huebl, Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PML_PSATD_ALGORITHM_H_ #define WARPX_PML_PSATD_ALGORITHM_H_ diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.cpp index d76259d4c..bae74daf6 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PMLPsatdAlgorithm.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H index b7aed9e40..4abe89d9d 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Maxence Thevenet, Remi Lehe, Revathi Jambunathan + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PSATD_ALGORITHM_H_ #define WARPX_PSATD_ALGORITHM_H_ diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp index d45b01bda..4f4963e95 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/PsatdAlgorithm.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe, Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H index 5d5e376c1..2c4946190 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H +++ b/Source/FieldSolver/SpectralSolver/SpectralAlgorithms/SpectralBaseAlgorithm.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_SPECTRAL_BASE_ALGORITHM_H_ #define WARPX_SPECTRAL_BASE_ALGORITHM_H_ diff --git a/Source/FieldSolver/SpectralSolver/SpectralFieldData.H b/Source/FieldSolver/SpectralSolver/SpectralFieldData.H index dc83d279d..e66a9ce50 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralFieldData.H +++ b/Source/FieldSolver/SpectralSolver/SpectralFieldData.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_SPECTRAL_FIELD_DATA_H_ #define WARPX_SPECTRAL_FIELD_DATA_H_ diff --git a/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp b/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp index edd4df34d..81e2b0907 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralFieldData.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Maxence Thevenet, Remi Lehe, Revathi Jambunathan + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include using namespace amrex; diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpace.H b/Source/FieldSolver/SpectralSolver/SpectralKSpace.H index eb07e8fe6..c8b4f49eb 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralKSpace.H +++ b/Source/FieldSolver/SpectralSolver/SpectralKSpace.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Remi Lehe + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_SPECTRAL_K_SPACE_H_ #define WARPX_SPECTRAL_K_SPACE_H_ diff --git a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp index c21388aba..d0355fc1e 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralKSpace.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Andrew Myers, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.H b/Source/FieldSolver/SpectralSolver/SpectralSolver.H index bd92d003f..a6375e483 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolver.H +++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.H @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Maxence Thevenet, Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_SPECTRAL_SOLVER_H_ #define WARPX_SPECTRAL_SOLVER_H_ diff --git a/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp b/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp index 4b9def013..ca7bd06a0 100644 --- a/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp +++ b/Source/FieldSolver/SpectralSolver/SpectralSolver.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/FieldSolver/SpectralSolver/WarpX_ComplexForFFT.H b/Source/FieldSolver/SpectralSolver/WarpX_ComplexForFFT.H index 43c7a1950..f75c9b19a 100644 --- a/Source/FieldSolver/SpectralSolver/WarpX_ComplexForFFT.H +++ b/Source/FieldSolver/SpectralSolver/WarpX_ComplexForFFT.H @@ -1,3 +1,9 @@ +/* Copyright 2019 David Grote + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_COMPLEXFORFFT_H_ #define WARPX_COMPLEXFORFFT_H_ diff --git a/Source/FieldSolver/WarpXPushFieldsEM.cpp b/Source/FieldSolver/WarpXPushFieldsEM.cpp index 4848b051e..1e922ecd3 100644 --- a/Source/FieldSolver/WarpXPushFieldsEM.cpp +++ b/Source/FieldSolver/WarpXPushFieldsEM.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Aurore Blelly, Axel Huebl + * David Grote, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/FieldSolver/WarpX_FDTD.H b/Source/FieldSolver/WarpX_FDTD.H index b93c0f40a..4ad251264 100644 --- a/Source/FieldSolver/WarpX_FDTD.H +++ b/Source/FieldSolver/WarpX_FDTD.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Axel Huebl, David Grote + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_FDTD_H_ #define WARPX_FDTD_H_ diff --git a/Source/FieldSolver/WarpX_K.H b/Source/FieldSolver/WarpX_K.H index f61a71e21..a4f657909 100644 --- a/Source/FieldSolver/WarpX_K.H +++ b/Source/FieldSolver/WarpX_K.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_K_H_ #define WARPX_K_H_ diff --git a/Source/Filter/BilinearFilter.H b/Source/Filter/BilinearFilter.H index 150ca8e08..f5405946b 100644 --- a/Source/Filter/BilinearFilter.H +++ b/Source/Filter/BilinearFilter.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #ifndef WARPX_BILIN_FILTER_H_ diff --git a/Source/Filter/BilinearFilter.cpp b/Source/Filter/BilinearFilter.cpp index 23abaf8bc..fd9153316 100644 --- a/Source/Filter/BilinearFilter.cpp +++ b/Source/Filter/BilinearFilter.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Filter/Filter.H b/Source/Filter/Filter.H index 1ecb1bff4..4e36a1f1f 100644 --- a/Source/Filter/Filter.H +++ b/Source/Filter/Filter.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Maxence Thevenet, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #ifndef WARPX_FILTER_H_ diff --git a/Source/Filter/Filter.cpp b/Source/Filter/Filter.cpp index 93729a0ae..dbe13747e 100644 --- a/Source/Filter/Filter.cpp +++ b/Source/Filter/Filter.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Filter/NCIGodfreyFilter.H b/Source/Filter/NCIGodfreyFilter.H index de41de7ae..c174422c4 100644 --- a/Source/Filter/NCIGodfreyFilter.H +++ b/Source/Filter/NCIGodfreyFilter.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #ifndef WARPX_GODFREY_FILTER_H_ diff --git a/Source/Filter/NCIGodfreyFilter.cpp b/Source/Filter/NCIGodfreyFilter.cpp index 41ae67768..1a400cb32 100644 --- a/Source/Filter/NCIGodfreyFilter.cpp +++ b/Source/Filter/NCIGodfreyFilter.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Luca Fedeli, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/FortranInterface/WarpX_f.F90 b/Source/FortranInterface/WarpX_f.F90 index 762ed2cd8..dc78f5039 100644 --- a/Source/FortranInterface/WarpX_f.F90 +++ b/Source/FortranInterface/WarpX_f.F90 @@ -1,3 +1,11 @@ +! Copyright 2019 Andrew Myers, Axel Huebl, David Grote +! Ligia Diana Amorim, Mathieu Lobet, Maxence Thevenet +! Remi Lehe, Weiqun Zhang +! +! This file is part of WarpX. +! +! License: BSD-3-Clause-LBNL + module warpx_module diff --git a/Source/FortranInterface/WarpX_f.H b/Source/FortranInterface/WarpX_f.H index 48aaac275..6a732c4ed 100644 --- a/Source/FortranInterface/WarpX_f.H +++ b/Source/FortranInterface/WarpX_f.H @@ -1,3 +1,13 @@ +/* Copyright 2019 Andrew Myers, Aurore Blelly, Axel Huebl + * David Grote, Jean-Luc Vay, Ligia Diana Amorim + * Luca Fedeli, Mathieu Lobet, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_F_H_ #define WARPX_F_H_ diff --git a/Source/Initialization/CustomDensityProb.H b/Source/Initialization/CustomDensityProb.H index c5c159ee8..804b56ce8 100644 --- a/Source/Initialization/CustomDensityProb.H +++ b/Source/Initialization/CustomDensityProb.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Maxence Thevenet, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef CUSTOM_DENSITY_PROB_H_ #define CUSTOM_DENSITY_PROB_H_ diff --git a/Source/Initialization/CustomMomentumProb.H b/Source/Initialization/CustomMomentumProb.H index f8bc29a05..0b4d531c7 100644 --- a/Source/Initialization/CustomMomentumProb.H +++ b/Source/Initialization/CustomMomentumProb.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Maxence Thevenet, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef CUSTOM_MOMENTUM_PROB_H #define CUSTOM_MOMENTUM_PROB_H diff --git a/Source/Initialization/InitSpaceChargeField.cpp b/Source/Initialization/InitSpaceChargeField.cpp index 0a873b742..36914d2c6 100644 --- a/Source/Initialization/InitSpaceChargeField.cpp +++ b/Source/Initialization/InitSpaceChargeField.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Initialization/InjectorDensity.H b/Source/Initialization/InjectorDensity.H index 7e61ae27d..4558eeb96 100644 --- a/Source/Initialization/InjectorDensity.H +++ b/Source/Initialization/InjectorDensity.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef INJECTOR_DENSITY_H_ #define INJECTOR_DENSITY_H_ diff --git a/Source/Initialization/InjectorDensity.cpp b/Source/Initialization/InjectorDensity.cpp index fa54b342c..f59202db9 100644 --- a/Source/Initialization/InjectorDensity.cpp +++ b/Source/Initialization/InjectorDensity.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Axel Huebl, Ligia Diana Amorim, Maxence Thevenet + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Initialization/InjectorMomentum.H b/Source/Initialization/InjectorMomentum.H index 88c954df6..bb5a70784 100644 --- a/Source/Initialization/InjectorMomentum.H +++ b/Source/Initialization/InjectorMomentum.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, Cameron Yang, Maxence Thevenet + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef INJECTOR_MOMENTUM_H_ #define INJECTOR_MOMENTUM_H_ diff --git a/Source/Initialization/InjectorMomentum.cpp b/Source/Initialization/InjectorMomentum.cpp index 255883a34..edbba8ac5 100644 --- a/Source/Initialization/InjectorMomentum.cpp +++ b/Source/Initialization/InjectorMomentum.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Axel Huebl, Maxence Thevenet, Revathi Jambunathan + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Initialization/InjectorPosition.H b/Source/Initialization/InjectorPosition.H index 4ab2fa022..a8d2200e9 100644 --- a/Source/Initialization/InjectorPosition.H +++ b/Source/Initialization/InjectorPosition.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, David Grote, Maxence Thevenet + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef INJECTOR_POSITION_H_ #define INJECTOR_POSITION_H_ diff --git a/Source/Initialization/PlasmaInjector.H b/Source/Initialization/PlasmaInjector.H index 56b32c827..70d99b9a3 100644 --- a/Source/Initialization/PlasmaInjector.H +++ b/Source/Initialization/PlasmaInjector.H @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, David Grote + * Maxence Thevenet, Remi Lehe, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef PLASMA_INJECTOR_H_ #define PLASMA_INJECTOR_H_ diff --git a/Source/Initialization/PlasmaInjector.cpp b/Source/Initialization/PlasmaInjector.cpp index 5f75ed45a..96e82d749 100644 --- a/Source/Initialization/PlasmaInjector.cpp +++ b/Source/Initialization/PlasmaInjector.cpp @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, Cameron Yang + * David Grote, Luca Fedeli, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "PlasmaInjector.H" #include diff --git a/Source/Initialization/WarpXInitData.cpp b/Source/Initialization/WarpXInitData.cpp index 48c30ae93..244f4b8e7 100644 --- a/Source/Initialization/WarpXInitData.cpp +++ b/Source/Initialization/WarpXInitData.cpp @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, Ann Almgren, Aurore Blelly + * Axel Huebl, Burlen Loring, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Laser/LaserParticleContainer.H b/Source/Laser/LaserParticleContainer.H index 1e83ca02f..0d56783ed 100644 --- a/Source/Laser/LaserParticleContainer.H +++ b/Source/Laser/LaserParticleContainer.H @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, David Grote + * Luca Fedeli, Maxence Thevenet, Remi Lehe + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_LaserParticleContainer_H_ #define WARPX_LaserParticleContainer_H_ diff --git a/Source/Laser/LaserParticleContainer.cpp b/Source/Laser/LaserParticleContainer.cpp index 7a75b9f24..de192e65e 100644 --- a/Source/Laser/LaserParticleContainer.cpp +++ b/Source/Laser/LaserParticleContainer.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, David Grote + * Luca Fedeli, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Laser/LaserProfiles.H b/Source/Laser/LaserProfiles.H index f97bf915e..94cfae090 100644 --- a/Source/Laser/LaserProfiles.H +++ b/Source/Laser/LaserProfiles.H @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Luca Fedeli, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_LaserProfiles_H_ #define WARPX_LaserProfiles_H_ diff --git a/Source/Laser/LaserProfilesImpl/LaserProfileFieldFunction.cpp b/Source/Laser/LaserProfilesImpl/LaserProfileFieldFunction.cpp index d34bc6aba..66660d6be 100644 --- a/Source/Laser/LaserProfilesImpl/LaserProfileFieldFunction.cpp +++ b/Source/Laser/LaserProfilesImpl/LaserProfileFieldFunction.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp b/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp index 8f44c2d5f..114464dbf 100644 --- a/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp +++ b/Source/Laser/LaserProfilesImpl/LaserProfileFromTXYEFile.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp b/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp index 18bdec4a7..31e64eca5 100644 --- a/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp +++ b/Source/Laser/LaserProfilesImpl/LaserProfileGaussian.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, Luca Fedeli, Maxence Thevenet + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Laser/LaserProfilesImpl/LaserProfileHarris.cpp b/Source/Laser/LaserProfilesImpl/LaserProfileHarris.cpp index 7fe75cf56..de4879939 100644 --- a/Source/Laser/LaserProfilesImpl/LaserProfileHarris.cpp +++ b/Source/Laser/LaserProfilesImpl/LaserProfileHarris.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index c57745b84..ef7738178 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef GUARDCELLMANAGER_H_ #define GUARDCELLMANAGER_H_ diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index a275f4c00..d845a7447 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "GuardCellManager.H" #include "NCIGodfreyFilter.H" #include diff --git a/Source/Parallelization/InterpolateCurrentFineToCoarse.H b/Source/Parallelization/InterpolateCurrentFineToCoarse.H index 58451c6b7..43cda26df 100644 --- a/Source/Parallelization/InterpolateCurrentFineToCoarse.H +++ b/Source/Parallelization/InterpolateCurrentFineToCoarse.H @@ -1,4 +1,4 @@ -/* Copyright 2019 Axel Huebl, Weiqun Zhang +/* Copyright 2019-2020 Axel Huebl * * This file is part of WarpX. * diff --git a/Source/Parallelization/InterpolateDensityFineToCoarse.H b/Source/Parallelization/InterpolateDensityFineToCoarse.H index 947db2aac..5d679583a 100644 --- a/Source/Parallelization/InterpolateDensityFineToCoarse.H +++ b/Source/Parallelization/InterpolateDensityFineToCoarse.H @@ -1,4 +1,4 @@ -/* Copyright 2019 Axel Huebl, Weiqun Zhang +/* Copyright 2019 Axel Huebl * * This file is part of WarpX. * diff --git a/Source/Parallelization/WarpXComm.H b/Source/Parallelization/WarpXComm.H index 81f00088e..7352e797e 100644 --- a/Source/Parallelization/WarpXComm.H +++ b/Source/Parallelization/WarpXComm.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARALLELIZATION_COMM_H_ #define WARPX_PARALLELIZATION_COMM_H_ diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp index 2e0cbdfad..31bb802f7 100644 --- a/Source/Parallelization/WarpXComm.cpp +++ b/Source/Parallelization/WarpXComm.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Aurore Blelly, Axel Huebl + * David Grote, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Parallelization/WarpXComm_K.H b/Source/Parallelization/WarpXComm_K.H index 169cd0ee1..1b6eceb93 100644 --- a/Source/Parallelization/WarpXComm_K.H +++ b/Source/Parallelization/WarpXComm_K.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Axel Huebl, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_COMM_K_H_ #define WARPX_COMM_K_H_ diff --git a/Source/Parallelization/WarpXRegrid.cpp b/Source/Parallelization/WarpXRegrid.cpp index 29ccc8f4d..54166e8ce 100644 --- a/Source/Parallelization/WarpXRegrid.cpp +++ b/Source/Parallelization/WarpXRegrid.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Ann Almgren, Axel Huebl + * David Grote, Maxence Thevenet, Remi Lehe + * Weiqun Zhang, levinem + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Parallelization/WarpXSumGuardCells.H b/Source/Parallelization/WarpXSumGuardCells.H index 36eb4ed6c..972c1cd2d 100644 --- a/Source/Parallelization/WarpXSumGuardCells.H +++ b/Source/Parallelization/WarpXSumGuardCells.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Maxence Thevenet, Remi Lehe, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_SUM_GUARD_CELLS_H_ #define WARPX_SUM_GUARD_CELLS_H_ diff --git a/Source/Parser/GpuParser.H b/Source/Parser/GpuParser.H index ff855d275..c6d870800 100644 --- a/Source/Parser/GpuParser.H +++ b/Source/Parser/GpuParser.H @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Maxence Thevenet, Revathi Jambunathan, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_GPU_PARSER_H_ #define WARPX_GPU_PARSER_H_ diff --git a/Source/Parser/GpuParser.cpp b/Source/Parser/GpuParser.cpp index ba904666b..22fab6313 100644 --- a/Source/Parser/GpuParser.cpp +++ b/Source/Parser/GpuParser.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Maxence Thevenet, Revathi Jambunathan, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include GpuParser::GpuParser (WarpXParser const& wp) diff --git a/Source/Parser/WarpXParser.H b/Source/Parser/WarpXParser.H index 8c1d854d8..863b35fb8 100644 --- a/Source/Parser/WarpXParser.H +++ b/Source/Parser/WarpXParser.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARSER_H_ #define WARPX_PARSER_H_ diff --git a/Source/Parser/WarpXParser.cpp b/Source/Parser/WarpXParser.cpp index ced536327..8c8be7ecb 100644 --- a/Source/Parser/WarpXParser.cpp +++ b/Source/Parser/WarpXParser.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include "WarpXParser.H" diff --git a/Source/Parser/WarpXParserWrapper.H b/Source/Parser/WarpXParserWrapper.H index 2a4ff6fd2..e32f6e4cd 100644 --- a/Source/Parser/WarpXParserWrapper.H +++ b/Source/Parser/WarpXParserWrapper.H @@ -1,3 +1,9 @@ +/* Copyright 2020 Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARSER_WRAPPER_H_ #define WARPX_PARSER_WRAPPER_H_ diff --git a/Source/Particles/Collision/CollisionType.H b/Source/Particles/Collision/CollisionType.H index d020f47e8..29fdfb029 100644 --- a/Source/Particles/Collision/CollisionType.H +++ b/Source/Particles/Collision/CollisionType.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_COLLISION_COLLISIONTYPE_H_ #define WARPX_PARTICLES_COLLISION_COLLISIONTYPE_H_ diff --git a/Source/Particles/Collision/CollisionType.cpp b/Source/Particles/Collision/CollisionType.cpp index b8014579d..a5bb1482f 100644 --- a/Source/Particles/Collision/CollisionType.cpp +++ b/Source/Particles/Collision/CollisionType.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "CollisionType.H" #include "ShuffleFisherYates.H" #include "ElasticCollisionPerez.H" diff --git a/Source/Particles/Collision/ComputeTemperature.H b/Source/Particles/Collision/ComputeTemperature.H index 770510d74..81cb14dad 100644 --- a/Source/Particles/Collision/ComputeTemperature.H +++ b/Source/Particles/Collision/ComputeTemperature.H @@ -1,3 +1,9 @@ +/* Copyright 2019-2020 Andrew Myers, Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_COLLISION_COMPUTE_TEMPERATURE_H_ #define WARPX_PARTICLES_COLLISION_COMPUTE_TEMPERATURE_H_ diff --git a/Source/Particles/Collision/ElasticCollisionPerez.H b/Source/Particles/Collision/ElasticCollisionPerez.H index 8e16d95cc..b1fa64300 100644 --- a/Source/Particles/Collision/ElasticCollisionPerez.H +++ b/Source/Particles/Collision/ElasticCollisionPerez.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_COLLISION_ELASTIC_COLLISION_PEREZ_H_ #define WARPX_PARTICLES_COLLISION_ELASTIC_COLLISION_PEREZ_H_ diff --git a/Source/Particles/Collision/ShuffleFisherYates.H b/Source/Particles/Collision/ShuffleFisherYates.H index 621e654d6..614b44d37 100644 --- a/Source/Particles/Collision/ShuffleFisherYates.H +++ b/Source/Particles/Collision/ShuffleFisherYates.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_COLLISION_SHUFFLE_FISHER_YATES_H_ #define WARPX_PARTICLES_COLLISION_SHUFFLE_FISHER_YATES_H_ diff --git a/Source/Particles/Collision/UpdateMomentumPerezElastic.H b/Source/Particles/Collision/UpdateMomentumPerezElastic.H index 948e8b075..05c8cd227 100644 --- a/Source/Particles/Collision/UpdateMomentumPerezElastic.H +++ b/Source/Particles/Collision/UpdateMomentumPerezElastic.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_COLLISION_UPDATE_MOMENTUM_PEREZ_ELASTIC_H_ #define WARPX_PARTICLES_COLLISION_UPDATE_MOMENTUM_PEREZ_ELASTIC_H_ diff --git a/Source/Particles/Deposition/ChargeDeposition.H b/Source/Particles/Deposition/ChargeDeposition.H index eec407a2b..669fc4c57 100755 --- a/Source/Particles/Deposition/ChargeDeposition.H +++ b/Source/Particles/Deposition/ChargeDeposition.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, David Grote, Maxence Thevenet + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef CHARGEDEPOSITION_H_ #define CHARGEDEPOSITION_H_ diff --git a/Source/Particles/Deposition/CurrentDeposition.H b/Source/Particles/Deposition/CurrentDeposition.H index 870dbcd33..90039dea2 100644 --- a/Source/Particles/Deposition/CurrentDeposition.H +++ b/Source/Particles/Deposition/CurrentDeposition.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, David Grote, Maxence Thevenet + * Remi Lehe, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef CURRENTDEPOSITION_H_ #define CURRENTDEPOSITION_H_ diff --git a/Source/Particles/Gather/FieldGather.H b/Source/Particles/Gather/FieldGather.H index 57c5d1a4a..0a58f8425 100644 --- a/Source/Particles/Gather/FieldGather.H +++ b/Source/Particles/Gather/FieldGather.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, David Grote, Maxence Thevenet + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef FIELDGATHER_H_ #define FIELDGATHER_H_ diff --git a/Source/Particles/MultiParticleContainer.H b/Source/Particles/MultiParticleContainer.H index ed1c2f371..8dd26ff60 100644 --- a/Source/Particles/MultiParticleContainer.H +++ b/Source/Particles/MultiParticleContainer.H @@ -1,3 +1,13 @@ +/* Copyright 2019-2020 Andrew Myers, Ann Almgren, Axel Huebl + * David Grote, Jean-Luc Vay, Junmin Gu + * Luca Fedeli, Mathieu Lobet, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_ParticleContainer_H_ #define WARPX_ParticleContainer_H_ diff --git a/Source/Particles/MultiParticleContainer.cpp b/Source/Particles/MultiParticleContainer.cpp index ab836ce9d..bbfdace7f 100644 --- a/Source/Particles/MultiParticleContainer.cpp +++ b/Source/Particles/MultiParticleContainer.cpp @@ -1,3 +1,13 @@ +/* Copyright 2019-2020 Andrew Myers, Ann Almgren, Axel Huebl + * David Grote, Jean-Luc Vay, Luca Fedeli + * Mathieu Lobet, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang, Yinjian Zhao + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Particles/ParticleCreation/CopyParticle.H b/Source/Particles/ParticleCreation/CopyParticle.H index 5e51c5283..8b2770891 100644 --- a/Source/Particles/ParticleCreation/CopyParticle.H +++ b/Source/Particles/ParticleCreation/CopyParticle.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef COPYPARTICLE_H_ #define COPYPARTICLE_H_ diff --git a/Source/Particles/ParticleCreation/ElementaryProcess.H b/Source/Particles/ParticleCreation/ElementaryProcess.H index 6c9bdc626..3fe2240cc 100644 --- a/Source/Particles/ParticleCreation/ElementaryProcess.H +++ b/Source/Particles/ParticleCreation/ElementaryProcess.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef ELEMENTARYPROCESS_H_ #define ELEMENTARYPROCESS_H_ diff --git a/Source/Particles/ParticleCreation/TransformParticle.H b/Source/Particles/ParticleCreation/TransformParticle.H index c0158db78..eb5820e32 100644 --- a/Source/Particles/ParticleCreation/TransformParticle.H +++ b/Source/Particles/ParticleCreation/TransformParticle.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef TRANSFORMPARTICLE_H_ #define TRANSFORMPARTICLE_H_ diff --git a/Source/Particles/PhotonParticleContainer.H b/Source/Particles/PhotonParticleContainer.H index 9b688cc59..7750d5ce8 100644 --- a/Source/Particles/PhotonParticleContainer.H +++ b/Source/Particles/PhotonParticleContainer.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, David Grote, Luca Fedeli + * Maxence Thevenet, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PhotonParticleContainer_H_ #define WARPX_PhotonParticleContainer_H_ diff --git a/Source/Particles/PhotonParticleContainer.cpp b/Source/Particles/PhotonParticleContainer.cpp index c03ed00c2..ab85170ac 100644 --- a/Source/Particles/PhotonParticleContainer.cpp +++ b/Source/Particles/PhotonParticleContainer.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Luca Fedeli, Maxence Thevenet + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H index 31d3cbbf3..18a6540d5 100644 --- a/Source/Particles/PhysicalParticleContainer.H +++ b/Source/Particles/PhysicalParticleContainer.H @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, David Grote + * Ligia Diana Amorim, Luca Fedeli, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PhysicalParticleContainer_H_ #define WARPX_PhysicalParticleContainer_H_ diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 7ac887b85..d21ad2247 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1,3 +1,13 @@ +/* Copyright 2019-2020 Andrew Myers, Aurore Blelly, Axel Huebl + * David Grote, Glenn Richardson, Jean-Luc Vay + * Ligia Diana Amorim, Luca Fedeli, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Particles/Pusher/GetAndSetPosition.H b/Source/Particles/Pusher/GetAndSetPosition.H index ae73a74e4..7180f3c55 100644 --- a/Source/Particles/Pusher/GetAndSetPosition.H +++ b/Source/Particles/Pusher/GetAndSetPosition.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Remi Lehe + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_PUSHER_GETANDSETPOSITION_H_ #define WARPX_PARTICLES_PUSHER_GETANDSETPOSITION_H_ diff --git a/Source/Particles/Pusher/UpdateMomentumBoris.H b/Source/Particles/Pusher/UpdateMomentumBoris.H index 160f38ade..13582d7e0 100644 --- a/Source/Particles/Pusher/UpdateMomentumBoris.H +++ b/Source/Particles/Pusher/UpdateMomentumBoris.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Remi Lehe + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_BORIS_H_ #define WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_BORIS_H_ diff --git a/Source/Particles/Pusher/UpdateMomentumBorisWithRadiationReaction.H b/Source/Particles/Pusher/UpdateMomentumBorisWithRadiationReaction.H index 0bc0f5d01..d8489e23e 100644 --- a/Source/Particles/Pusher/UpdateMomentumBorisWithRadiationReaction.H +++ b/Source/Particles/Pusher/UpdateMomentumBorisWithRadiationReaction.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_BORIS_WITHRR_H_ #define WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_BORIS_WITHRR_H_ diff --git a/Source/Particles/Pusher/UpdateMomentumHigueraCary.H b/Source/Particles/Pusher/UpdateMomentumHigueraCary.H index 51d7fd620..de2436ce2 100644 --- a/Source/Particles/Pusher/UpdateMomentumHigueraCary.H +++ b/Source/Particles/Pusher/UpdateMomentumHigueraCary.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_HIGUERACARY_H_ #define WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_HIGUERACARY_H_ diff --git a/Source/Particles/Pusher/UpdateMomentumVay.H b/Source/Particles/Pusher/UpdateMomentumVay.H index f7ec79d89..846d59310 100644 --- a/Source/Particles/Pusher/UpdateMomentumVay.H +++ b/Source/Particles/Pusher/UpdateMomentumVay.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Remi Lehe + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_VAY_H_ #define WARPX_PARTICLES_PUSHER_UPDATEMOMENTUM_VAY_H_ diff --git a/Source/Particles/Pusher/UpdatePosition.H b/Source/Particles/Pusher/UpdatePosition.H index 9943128f1..7f86a106d 100644 --- a/Source/Particles/Pusher/UpdatePosition.H +++ b/Source/Particles/Pusher/UpdatePosition.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Remi Lehe + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_PUSHER_UPDATEPOSITION_H_ #define WARPX_PARTICLES_PUSHER_UPDATEPOSITION_H_ diff --git a/Source/Particles/Pusher/UpdatePositionPhoton.H b/Source/Particles/Pusher/UpdatePositionPhoton.H index 1a0bd114f..3a28e87a1 100644 --- a/Source/Particles/Pusher/UpdatePositionPhoton.H +++ b/Source/Particles/Pusher/UpdatePositionPhoton.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Luca Fedeli, Maxence Thevenet + * Remi Lehe, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_PUSHER_UPDATEPOSITIONPHOTON_H_ #define WARPX_PARTICLES_PUSHER_UPDATEPOSITIONPHOTON_H_ diff --git a/Source/Particles/RigidInjectedParticleContainer.H b/Source/Particles/RigidInjectedParticleContainer.H index fecb9c48e..5e5749093 100644 --- a/Source/Particles/RigidInjectedParticleContainer.H +++ b/Source/Particles/RigidInjectedParticleContainer.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, David Grote, Maxence Thevenet + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_RigidInjectedParticleContainer_H_ #define WARPX_RigidInjectedParticleContainer_H_ diff --git a/Source/Particles/RigidInjectedParticleContainer.cpp b/Source/Particles/RigidInjectedParticleContainer.cpp index f3b502a0a..f9db682d7 100644 --- a/Source/Particles/RigidInjectedParticleContainer.cpp +++ b/Source/Particles/RigidInjectedParticleContainer.cpp @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, David Grote, Glenn Richardson + * Ligia Diana Amorim, Luca Fedeli, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Particles/ShapeFactors.H b/Source/Particles/ShapeFactors.H index be79a4871..dd36fb31f 100644 --- a/Source/Particles/ShapeFactors.H +++ b/Source/Particles/ShapeFactors.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef SHAPEFACTORS_H_ #define SHAPEFACTORS_H_ diff --git a/Source/Particles/Sorting/Partition.cpp b/Source/Particles/Sorting/Partition.cpp index e88af017f..c25c24d5d 100644 --- a/Source/Particles/Sorting/Partition.cpp +++ b/Source/Particles/Sorting/Partition.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Particles/Sorting/SortingUtils.H b/Source/Particles/Sorting/SortingUtils.H index f425c6c7b..f0e991367 100644 --- a/Source/Particles/Sorting/SortingUtils.H +++ b/Source/Particles/Sorting/SortingUtils.H @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Andrew Myers, Maxence Thevenet, Remi Lehe + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PARTICLES_SORTING_SORTINGUTILS_H_ #define WARPX_PARTICLES_SORTING_SORTINGUTILS_H_ diff --git a/Source/Particles/WarpXParticleContainer.H b/Source/Particles/WarpXParticleContainer.H index 4fb4f007b..53ce8d320 100644 --- a/Source/Particles/WarpXParticleContainer.H +++ b/Source/Particles/WarpXParticleContainer.H @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, David Grote + * Jean-Luc Vay, Junmin Gu, Luca Fedeli + * Maxence Thevenet, Remi Lehe, Revathi Jambunathan + * Weiqun Zhang, Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_WarpXParticleContainer_H_ #define WARPX_WarpXParticleContainer_H_ diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp index e6f729935..9fc69bc73 100644 --- a/Source/Particles/WarpXParticleContainer.cpp +++ b/Source/Particles/WarpXParticleContainer.cpp @@ -1,3 +1,12 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, David Grote + * Jean-Luc Vay, Luca Fedeli, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * Yinjian Zhao, levinem + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Particles/interpolate_cic.F90 b/Source/Particles/interpolate_cic.F90 index 3eb361d2f..97bd8c153 100644 --- a/Source/Particles/interpolate_cic.F90 +++ b/Source/Particles/interpolate_cic.F90 @@ -1,3 +1,9 @@ +! Copyright 2019 Maxence Thevenet, Weiqun Zhang +! +! This file is part of WarpX. +! +! License: BSD-3-Clause-LBNL + module warpx_ES_interpolate_cic use iso_c_binding diff --git a/Source/Particles/push_particles_ES.F90 b/Source/Particles/push_particles_ES.F90 index b84f48d5f..60833d456 100644 --- a/Source/Particles/push_particles_ES.F90 +++ b/Source/Particles/push_particles_ES.F90 @@ -1,3 +1,9 @@ +! Copyright 2019 Maxence Thevenet, Weiqun Zhang +! +! This file is part of WarpX. +! +! License: BSD-3-Clause-LBNL + module warpx_ES_push_particles use iso_c_binding diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp index e72d467d7..1507e8227 100644 --- a/Source/Python/WarpXWrappers.cpp +++ b/Source/Python/WarpXWrappers.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019 Andrew Myers, Axel Huebl, David Grote + * Luca Fedeli, Maxence Thevenet, Remi Lehe + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Python/WarpXWrappers.h b/Source/Python/WarpXWrappers.h index 4de885b88..ec6635449 100644 --- a/Source/Python/WarpXWrappers.h +++ b/Source/Python/WarpXWrappers.h @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, David Grote, Maxence Thevenet + * Remi Lehe, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_WRAPPERS_H_ #define WARPX_WRAPPERS_H_ diff --git a/Source/Python/WarpX_py.H b/Source/Python/WarpX_py.H index d8cf22155..b6a813bfc 100644 --- a/Source/Python/WarpX_py.H +++ b/Source/Python/WarpX_py.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_PY_H_ #define WARPX_PY_H_ diff --git a/Source/Python/WarpX_py.cpp b/Source/Python/WarpX_py.cpp index 276d637d7..4ca06b644 100644 --- a/Source/Python/WarpX_py.cpp +++ b/Source/Python/WarpX_py.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include extern "C" { diff --git a/Source/QED/BreitWheelerDummyTable.H b/Source/QED/BreitWheelerDummyTable.H index e03f9d20b..95f65923e 100644 --- a/Source/QED/BreitWheelerDummyTable.H +++ b/Source/QED/BreitWheelerDummyTable.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_breit_wheeler_dummy_tables_h_ #define WARPX_breit_wheeler_dummy_tables_h_ diff --git a/Source/QED/BreitWheelerEngineInnards.H b/Source/QED/BreitWheelerEngineInnards.H index 640cdfa94..d6c644aa3 100644 --- a/Source/QED/BreitWheelerEngineInnards.H +++ b/Source/QED/BreitWheelerEngineInnards.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_breit_wheeler_engine_innards_h_ #define WARPX_breit_wheeler_engine_innards_h_ diff --git a/Source/QED/BreitWheelerEngineTableBuilder.H b/Source/QED/BreitWheelerEngineTableBuilder.H index e30b82208..98b0b17a4 100644 --- a/Source/QED/BreitWheelerEngineTableBuilder.H +++ b/Source/QED/BreitWheelerEngineTableBuilder.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_breit_wheeler_engine_table_builder_h_ #define WARPX_breit_wheeler_engine_table_builder_h_ diff --git a/Source/QED/BreitWheelerEngineTableBuilder.cpp b/Source/QED/BreitWheelerEngineTableBuilder.cpp index 3326d5b59..7cb41f7ea 100644 --- a/Source/QED/BreitWheelerEngineTableBuilder.cpp +++ b/Source/QED/BreitWheelerEngineTableBuilder.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "BreitWheelerEngineTableBuilder.H" //Include the full Breit Wheeler engine with table generation support diff --git a/Source/QED/BreitWheelerEngineWrapper.H b/Source/QED/BreitWheelerEngineWrapper.H index 369c64375..102d15efa 100644 --- a/Source/QED/BreitWheelerEngineWrapper.H +++ b/Source/QED/BreitWheelerEngineWrapper.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_breit_wheeler_engine_wrapper_h_ #define WARPX_breit_wheeler_engine_wrapper_h_ diff --git a/Source/QED/BreitWheelerEngineWrapper.cpp b/Source/QED/BreitWheelerEngineWrapper.cpp index c963d44d1..e1eb55714 100644 --- a/Source/QED/BreitWheelerEngineWrapper.cpp +++ b/Source/QED/BreitWheelerEngineWrapper.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "BreitWheelerEngineWrapper.H" #include "QedTableParserHelperFunctions.H" diff --git a/Source/QED/QedChiFunctions.H b/Source/QED/QedChiFunctions.H index dd8ffac0e..bdeb6df57 100644 --- a/Source/QED/QedChiFunctions.H +++ b/Source/QED/QedChiFunctions.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_amrex_qed_chi_functions_h_ #define WARPX_amrex_qed_chi_functions_h_ diff --git a/Source/QED/QedTableParserHelperFunctions.H b/Source/QED/QedTableParserHelperFunctions.H index 528613727..dd66f626f 100644 --- a/Source/QED/QedTableParserHelperFunctions.H +++ b/Source/QED/QedTableParserHelperFunctions.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_amrex_qed_table_parser_helper_functions_h_ #define WARPX_amrex_qed_table_parser_helper_functions_h_ diff --git a/Source/QED/QedWrapperCommons.H b/Source/QED/QedWrapperCommons.H index 210e7247e..1d4500a81 100644 --- a/Source/QED/QedWrapperCommons.H +++ b/Source/QED/QedWrapperCommons.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_amrex_qed_wrapper_commons_h_ #define WARPX_amrex_qed_wrapper_commons_h_ diff --git a/Source/QED/QuantumSyncDummyTable.H b/Source/QED/QuantumSyncDummyTable.H index 587e8b546..f34c521a3 100644 --- a/Source/QED/QuantumSyncDummyTable.H +++ b/Source/QED/QuantumSyncDummyTable.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_quantum_sync_dummy_tables_h_ #define WARPX_quantum_sync_dummy_tables_h_ diff --git a/Source/QED/QuantumSyncEngineInnards.H b/Source/QED/QuantumSyncEngineInnards.H index 6206b103a..64e67690a 100644 --- a/Source/QED/QuantumSyncEngineInnards.H +++ b/Source/QED/QuantumSyncEngineInnards.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_quantum_sync_engine_innards_h_ #define WARPX_quantum_sync_engine_innards_h_ diff --git a/Source/QED/QuantumSyncEngineTableBuilder.H b/Source/QED/QuantumSyncEngineTableBuilder.H index e70f5d02f..16be2d5eb 100644 --- a/Source/QED/QuantumSyncEngineTableBuilder.H +++ b/Source/QED/QuantumSyncEngineTableBuilder.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_quantum_sync_engine_table_builder_h_ #define WARPX_quantum_sync_engine_table_builder_h_ diff --git a/Source/QED/QuantumSyncEngineTableBuilder.cpp b/Source/QED/QuantumSyncEngineTableBuilder.cpp index 51c3720f2..c4e500122 100644 --- a/Source/QED/QuantumSyncEngineTableBuilder.cpp +++ b/Source/QED/QuantumSyncEngineTableBuilder.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "QuantumSyncEngineTableBuilder.H" //Include the full Quantum Synchrotron engine with table generation support diff --git a/Source/QED/QuantumSyncEngineWrapper.H b/Source/QED/QuantumSyncEngineWrapper.H index df0bdc5f5..e1e3d94eb 100644 --- a/Source/QED/QuantumSyncEngineWrapper.H +++ b/Source/QED/QuantumSyncEngineWrapper.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_quantum_sync_engine_wrapper_h_ #define WARPX_quantum_sync_engine_wrapper_h_ diff --git a/Source/QED/QuantumSyncEngineWrapper.cpp b/Source/QED/QuantumSyncEngineWrapper.cpp index ffafec761..b185251d8 100644 --- a/Source/QED/QuantumSyncEngineWrapper.cpp +++ b/Source/QED/QuantumSyncEngineWrapper.cpp @@ -1,3 +1,9 @@ +/* Copyright 2019 Luca Fedeli, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "QuantumSyncEngineWrapper.H" #include "QedTableParserHelperFunctions.H" diff --git a/Source/Utils/IonizationEnergiesTable.H b/Source/Utils/IonizationEnergiesTable.H index 47b71e4f1..f910fa4fe 100644 --- a/Source/Utils/IonizationEnergiesTable.H +++ b/Source/Utils/IonizationEnergiesTable.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ // This script was automatically generated! // Edit dev/Source/Utils/write_atomic_data_cpp.py instead! #ifndef WARPX_IONIZATION_TABLE_H_ diff --git a/Source/Utils/NCIGodfreyTables.H b/Source/Utils/NCIGodfreyTables.H index 708215c77..0403b10c3 100644 --- a/Source/Utils/NCIGodfreyTables.H +++ b/Source/Utils/NCIGodfreyTables.H @@ -1,3 +1,9 @@ +/* Copyright 2019 Maxence Thevenet + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #ifndef WARPX_GODFREY_COEFF_TABLE_H_ diff --git a/Source/Utils/WarpXAlgorithmSelection.H b/Source/Utils/WarpXAlgorithmSelection.H index 7d26e7af5..919428704 100644 --- a/Source/Utils/WarpXAlgorithmSelection.H +++ b/Source/Utils/WarpXAlgorithmSelection.H @@ -1,3 +1,10 @@ +/* Copyright 2019 David Grote, Luca Fedeli, Remi Lehe + * Yinjian Zhao + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef UTILS_WARPXALGORITHMSELECTION_H_ #define UTILS_WARPXALGORITHMSELECTION_H_ diff --git a/Source/Utils/WarpXAlgorithmSelection.cpp b/Source/Utils/WarpXAlgorithmSelection.cpp index 08272089e..f6e2405a9 100644 --- a/Source/Utils/WarpXAlgorithmSelection.cpp +++ b/Source/Utils/WarpXAlgorithmSelection.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019-2020 Axel Huebl, David Grote, Luca Fedeli + * Remi Lehe, Weiqun Zhang, Yinjian Zhao + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Utils/WarpXConst.H b/Source/Utils/WarpXConst.H index 70436cb72..34e08118d 100644 --- a/Source/Utils/WarpXConst.H +++ b/Source/Utils/WarpXConst.H @@ -1,3 +1,10 @@ +/* Copyright 2019 Andrew Myers, Luca Fedeli, Maxence Thevenet + * Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_CONST_H_ #define WARPX_CONST_H_ diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index 3f607615b..f6cd6de20 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019-2020 Andrew Myers, Axel Huebl, Maxence Thevenet + * Remi Lehe, Revathi Jambunathan, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include "GuardCellManager.H" #include #include diff --git a/Source/Utils/WarpXTagging.cpp b/Source/Utils/WarpXTagging.cpp index 91bb802e8..b2ac48e40 100644 --- a/Source/Utils/WarpXTagging.cpp +++ b/Source/Utils/WarpXTagging.cpp @@ -1,3 +1,10 @@ +/* Copyright 2019 Axel Huebl, Maxence Thevenet, Weiqun Zhang + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Source/Utils/WarpXUtil.H b/Source/Utils/WarpXUtil.H index e7b2ef196..9231fa60a 100644 --- a/Source/Utils/WarpXUtil.H +++ b/Source/Utils/WarpXUtil.H @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Andrew Myers, Luca Fedeli, Maxence Thevenet + * Revathi Jambunathan, Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_UTILS_H_ #define WARPX_UTILS_H_ diff --git a/Source/Utils/WarpXUtil.cpp b/Source/Utils/WarpXUtil.cpp index a154e93df..983654aed 100644 --- a/Source/Utils/WarpXUtil.cpp +++ b/Source/Utils/WarpXUtil.cpp @@ -1,3 +1,11 @@ +/* Copyright 2019-2020 Andrew Myers, Burlen Loring, Luca Fedeli + * Maxence Thevenet, Remi Lehe, Revathi Jambunathan + * Revathi Jambunathan + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/Utils/WarpX_Complex.H b/Source/Utils/WarpX_Complex.H index 1f265d3c5..cda4204a8 100644 --- a/Source/Utils/WarpX_Complex.H +++ b/Source/Utils/WarpX_Complex.H @@ -1,3 +1,10 @@ +/* Copyright 2019-2020 Andrew Myers, David Grote, Maxence Thevenet + * Remi Lehe + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_COMPLEX_H_ #define WARPX_COMPLEX_H_ diff --git a/Source/Utils/atomic_data.txt b/Source/Utils/atomic_data.txt index 140f5a26a..cd58e076a 100644 --- a/Source/Utils/atomic_data.txt +++ b/Source/Utils/atomic_data.txt @@ -1,3 +1,9 @@ +# Copyright 2019 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # Reference: # Kramida, A., Ralchenko, Yu., Reader, J., and NIST ASD Team (2014). # NIST Atomic Spectra Database (ver. 5.2), [Online]. diff --git a/Source/Utils/utils_ES.F90 b/Source/Utils/utils_ES.F90 index baadeb7af..c11e849eb 100644 --- a/Source/Utils/utils_ES.F90 +++ b/Source/Utils/utils_ES.F90 @@ -1,3 +1,9 @@ +! Copyright 2019 Maxence Thevenet, Remi Lehe +! +! This file is part of WarpX. +! +! License: BSD-3-Clause-LBNL + module warpx_ES_utils use iso_c_binding diff --git a/Source/Utils/write_atomic_data_cpp.py b/Source/Utils/write_atomic_data_cpp.py index 09b7b8300..12cafad0c 100644 --- a/Source/Utils/write_atomic_data_cpp.py +++ b/Source/Utils/write_atomic_data_cpp.py @@ -1,3 +1,10 @@ +# Copyright 2019-2020 Axel Huebl, Luca Fedeli, Maxence Thevenet +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + ''' This python script reads ionization tables in atomic_data.txt (generated from the NIST website) and extracts ionization levels into C++ file diff --git a/Source/WarpX.H b/Source/WarpX.H index 1549dded2..be80727d8 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -1,3 +1,14 @@ +/* Copyright 2016-2020 Andrew Myers, Ann Almgren, Aurore Blelly + * Axel Huebl, Burlen Loring, David Grote + * Glenn Richardson, Junmin Gu, Luca Fedeli + * Mathieu Lobet, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang, Yinjian Zhao + * + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #ifndef WARPX_H_ #define WARPX_H_ diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 5f6f2b2e5..cb04bf16f 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -1,3 +1,14 @@ +/* Copyright 2016-2020 Andrew Myers, Ann Almgren, Aurore Blelly + * Axel Huebl, Burlen Loring, David Grote + * Glenn Richardson, Jean-Luc Vay, Junmin Gu + * Mathieu Lobet, Maxence Thevenet, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang, Yinjian Zhao + * levinem + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include #include diff --git a/Source/main.cpp b/Source/main.cpp index 19413da7a..fc705bdf0 100644 --- a/Source/main.cpp +++ b/Source/main.cpp @@ -1,3 +1,11 @@ +/* Copyright 2016-2020 Andrew Myers, Ann Almgren, Axel Huebl + * David Grote, Jean-Luc Vay, Remi Lehe + * Revathi Jambunathan, Weiqun Zhang + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ #include #include diff --git a/Tools/batchScripts/batch_cori.sh b/Tools/batchScripts/batch_cori.sh index e6cd5e1ef..ee2658451 100644 --- a/Tools/batchScripts/batch_cori.sh +++ b/Tools/batchScripts/batch_cori.sh @@ -1,5 +1,12 @@ #!/bin/bash -l +# Copyright 2019 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + #SBATCH -N 2 #SBATCH -t 01:00:00 #SBATCH -q regular diff --git a/Tools/batchScripts/batch_summit.sh b/Tools/batchScripts/batch_summit.sh index 002660b91..8f2f914fb 100644 --- a/Tools/batchScripts/batch_summit.sh +++ b/Tools/batchScripts/batch_summit.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# Copyright 2019 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + #BSUB -P #BSUB -W 00:10 #BSUB -nnodes 2 diff --git a/Tools/batchScripts/script_profiling_summit.sh b/Tools/batchScripts/script_profiling_summit.sh index cd6b0eadd..d14f3f44c 100755 --- a/Tools/batchScripts/script_profiling_summit.sh +++ b/Tools/batchScripts/script_profiling_summit.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# Copyright 2019 Andrew Myers, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + #BSUB -P GEN109 #BSUB -W 0:10 #BSUB -nnodes 1 diff --git a/Tools/compute_domain.py b/Tools/compute_domain.py index 3bc90f001..d67cc86f5 100644 --- a/Tools/compute_domain.py +++ b/Tools/compute_domain.py @@ -1,3 +1,9 @@ +# Copyright 2019-2020 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import numpy as np ''' diff --git a/Tools/cori_postproc_script.sh b/Tools/cori_postproc_script.sh index 5e847c7cc..38d726ef5 100644 --- a/Tools/cori_postproc_script.sh +++ b/Tools/cori_postproc_script.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# Copyright 2019 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + #SBATCH --job-name=postproc #SBATCH --time=00:20:00 #SBATCH -C haswell diff --git a/Tools/performance_tests/cori.py b/Tools/performance_tests/cori.py index db546d24c..b7cf63548 100644 --- a/Tools/performance_tests/cori.py +++ b/Tools/performance_tests/cori.py @@ -1,3 +1,10 @@ +# Copyright 2019 Axel Huebl, Luca Fedeli, Maxence Thevenet +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import os, copy from functions_perftest import test_element diff --git a/Tools/performance_tests/functions_perftest.py b/Tools/performance_tests/functions_perftest.py index 21236ed3b..bf4809bd3 100644 --- a/Tools/performance_tests/functions_perftest.py +++ b/Tools/performance_tests/functions_perftest.py @@ -1,3 +1,10 @@ +# Copyright 2018-2019 Axel Huebl, Luca Fedeli, Maxence Thevenet +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import os, shutil, re, copy import pandas as pd import numpy as np diff --git a/Tools/performance_tests/run_alltests.py b/Tools/performance_tests/run_alltests.py index f3821dcf4..7b0a93350 100644 --- a/Tools/performance_tests/run_alltests.py +++ b/Tools/performance_tests/run_alltests.py @@ -1,3 +1,10 @@ +# Copyright 2017-2020 Luca Fedeli, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import os, sys, shutil import argparse, re, time from functions_perftest import * diff --git a/Tools/performance_tests/run_alltests_1node.py b/Tools/performance_tests/run_alltests_1node.py index ec68f4fbf..5745055e7 100644 --- a/Tools/performance_tests/run_alltests_1node.py +++ b/Tools/performance_tests/run_alltests_1node.py @@ -1,3 +1,9 @@ +# Copyright 2018-2020 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import os, shutil, datetime import argparse, re, time from functions_perftest import * diff --git a/Tools/performance_tests/run_automated.py b/Tools/performance_tests/run_automated.py index a874542b6..21677fa50 100644 --- a/Tools/performance_tests/run_automated.py +++ b/Tools/performance_tests/run_automated.py @@ -1,3 +1,10 @@ +# Copyright 2018-2019 Axel Huebl, Luca Fedeli, Maxence Thevenet +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import os, sys, shutil, datetime, git import argparse, re, time, copy import pandas as pd diff --git a/Tools/performance_tests/summit.py b/Tools/performance_tests/summit.py index b8da1568c..ceacd372c 100644 --- a/Tools/performance_tests/summit.py +++ b/Tools/performance_tests/summit.py @@ -1,3 +1,10 @@ +# Copyright 2019 Axel Huebl, Luca Fedeli, Maxence Thevenet +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # requirements: # - module load python/3.7.0-anaconda3-5.3.0 diff --git a/Tools/plot_parallel.py b/Tools/plot_parallel.py index 494f2717d..6a14ddab4 100644 --- a/Tools/plot_parallel.py +++ b/Tools/plot_parallel.py @@ -1,3 +1,9 @@ +# Copyright 2019 David Grote, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import os import glob import matplotlib diff --git a/Tools/plot_particle_path.py b/Tools/plot_particle_path.py index ef52b4f4b..1b1fed0c0 100644 --- a/Tools/plot_particle_path.py +++ b/Tools/plot_particle_path.py @@ -1,3 +1,10 @@ +# Copyright 2019 Andrew Myers, Jean-Luc Vay, Maxence Thevenet +# Remi Lehe, Weiqun Zhang +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import numpy as np class AMReXParticleHeader(object): diff --git a/Tools/read_lab_particles.py b/Tools/read_lab_particles.py index 96f5f059c..2ae52c0eb 100644 --- a/Tools/read_lab_particles.py +++ b/Tools/read_lab_particles.py @@ -1,3 +1,9 @@ +# Copyright 2018-2019 Andrew Myers, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + import numpy as np from glob import glob import os diff --git a/Tools/read_raw_data.py b/Tools/read_raw_data.py index c907b1fe1..af56bc061 100644 --- a/Tools/read_raw_data.py +++ b/Tools/read_raw_data.py @@ -1,3 +1,10 @@ +# Copyright 2017-2019 Andrew Myers, Axel Huebl, Maxence Thevenet +# Remi Lehe +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + from glob import glob import os import numpy as np diff --git a/Tools/script_profiling_summit.sh b/Tools/script_profiling_summit.sh index cd6b0eadd..d14f3f44c 100755 --- a/Tools/script_profiling_summit.sh +++ b/Tools/script_profiling_summit.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# Copyright 2019 Andrew Myers, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + #BSUB -P GEN109 #BSUB -W 0:10 #BSUB -nnodes 1 diff --git a/Tools/update_copyright.sh b/Tools/update_copyright.sh index 65fc4bafb..0ba94e4f2 100755 --- a/Tools/update_copyright.sh +++ b/Tools/update_copyright.sh @@ -1,5 +1,12 @@ #!/usr/bin/env bash +# Copyright 2020 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This file loops over all WarpX source files, uses git to get the list of # contributors, and writes a copyright header at the beginning of each file # with the list of contributors. diff --git a/Tools/update_release.sh b/Tools/update_release.sh index d45efd15c..0b1dc60b9 100755 --- a/Tools/update_release.sh +++ b/Tools/update_release.sh @@ -1,5 +1,12 @@ #!/usr/bin/env bash +# Copyright 2020 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + + # This script updates release version number in all source files. # # updates occurences like "version = '??.??'" where ??.?? is the version number diff --git a/Tools/video_yt.py b/Tools/video_yt.py index 3f1da8690..6d516983f 100644 --- a/Tools/video_yt.py +++ b/Tools/video_yt.py @@ -1,3 +1,9 @@ +# Copyright 2017-2020 Luca Fedeli, Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + ''' This script loops over 3D plotfiles plt*****, generates a 3D rendering of the data with fields and particles, and saves one image per plotfile to diff --git a/Tools/yt3d_mpi.py b/Tools/yt3d_mpi.py index 2013446c7..5960b1185 100644 --- a/Tools/yt3d_mpi.py +++ b/Tools/yt3d_mpi.py @@ -1,3 +1,9 @@ +# Copyright 2018-2019 Maxence Thevenet +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + ''' This script loops over 3D plotfiles plt*****, generates a 3D rendering of the data with fields and particles, and saves one image per plotfile to diff --git a/run_test.sh b/run_test.sh index 67f4b48cf..39e99e541 100755 --- a/run_test.sh +++ b/run_test.sh @@ -1,4 +1,13 @@ #!/bin/bash + +# Copyright 2018-2020 Axel Huebl, David Grote, Edoardo Zoni +# Luca Fedeli, Maxence Thevenet, Remi Lehe +# +# +# This file is part of WarpX. +# +# License: BSD-3-Clause-LBNL + # This script runs some of WarpX's standard regression tests, but # without comparing the output to previously run simulations. # This checks that: -- cgit v1.2.3