From 74260bda9f4a8bc74fdafebcf649245c44c4d166 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Sun, 27 Oct 2019 13:38:48 -0700 Subject: forgot to add two files --- Source/Parallelization/GuardCellManager.cpp | 118 ++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 Source/Parallelization/GuardCellManager.cpp (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp new file mode 100644 index 000000000..400bde28f --- /dev/null +++ b/Source/Parallelization/GuardCellManager.cpp @@ -0,0 +1,118 @@ +#include "GuardCellManager.H" + +using namespace amrex; + +void +guardCellManager::Init( + const bool do_subcycling, + const bool do_fdtd_nci_corr, + const bool do_nodal, + const bool do_moving_window, + const bool do_fft_mpi_dec, + const bool aux_is_nodal, + const int moving_window_dir, + const int nox, + const int nox_fft, const int noy_fft, const int noz_fft, + const int nci_corr_stencil, + const int maxwell_fdtd_solver_id, + const int max_level) +{ + // When using subcycling, the particles on the fine level perform two pushes + // before being redistributed ; therefore, we need one extra guard cell + // (the particles may move by 2*c*dt) + const int ngx_tmp = (max_level > 0 && do_subcycling == 1) ? nox+1 : nox; + const int ngy_tmp = (max_level > 0 && do_subcycling == 1) ? nox+1 : nox; + const int ngz_tmp = (max_level > 0 && do_subcycling == 1) ? nox+1 : nox; + + // Ex, Ey, Ez, Bx, By, and Bz have the same number of ghost cells. + // jx, jy, jz and rho have the same number of ghost cells. + // E and B have the same number of ghost cells as j and rho if NCI filter is not used, + // but different number of ghost cells in z-direction if NCI filter is used. + // The number of cells should be even, in order to easily perform the + // interpolation from coarse grid to fine grid. + int ngx = (ngx_tmp % 2) ? ngx_tmp+1 : ngx_tmp; // Always even number + int ngy = (ngy_tmp % 2) ? ngy_tmp+1 : ngy_tmp; // Always even number + int ngz_nonci = (ngz_tmp % 2) ? ngz_tmp+1 : ngz_tmp; // Always even number + int ngz; + if (do_fdtd_nci_corr) { + int ng = ngz_tmp + nci_corr_stencil; + ngz = (ng % 2) ? ng+1 : ng; + } else { + ngz = ngz_nonci; + } + + // J is only interpolated from fine to coarse (not coarse to fine) + // and therefore does not need to be even. + int ngJx = ngx_tmp; + int ngJy = ngy_tmp; + int ngJz = ngz_tmp; + + // When calling the moving window (with one level of refinement), we shift + // the fine grid by 2 cells ; therefore, we need at least 2 guard cells + // on level 1. This may not be necessary for level 0. + if (do_moving_window) { + ngx = std::max(ngx,2); + ngy = std::max(ngy,2); + ngz = std::max(ngz,2); + ngJx = std::max(ngJx,2); + ngJy = std::max(ngJy,2); + ngJz = std::max(ngJz,2); + } + +#if (AMREX_SPACEDIM == 3) + IntVect ngE(ngx,ngy,ngz); + IntVect ngJ(ngJx,ngJy,ngJz); +#elif (AMREX_SPACEDIM == 2) + IntVect ngE(ngx,ngz); + IntVect ngJ(ngJx,ngJz); +#endif + + IntVect ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density + // after pushing particle. + int ngF = (do_moving_window) ? 2 : 0; + // CKC solver requires one additional guard cell + if (maxwell_fdtd_solver_id == 1) ngF = std::max( ngF, 1 ); + +#ifdef WARPX_USE_PSATD + if (do_fft_mpi_dec == false){ + // All boxes should have the same number of guard cells + // (to avoid temporary parallel copies) + // Thus take the max of the required number of guards for each field + // Also: the number of guard cell should be enough to contain + // the stencil of the FFT solver. Here, this number (`ngFFT`) + // is determined *empirically* to be the order of the solver + // for nodal, and half the order of the solver for staggered. + IntVect ngFFT; + if (do_nodal) { + ngFFT = IntVect(AMREX_D_DECL(nox_fft, noy_fft, noz_fft)); + } else { + ngFFT = IntVect(AMREX_D_DECL(nox_fft/2, noy_fft/2, noz_fft/2)); + } + for (int i_dim=0; i_dim(aux_is_nodal and !do_nodal)); + + // Guard cells for field solver + ngB_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); + ngE_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); + ng_MovingWindow = IntVect(AMREX_D_DECL(0,0,0)); // Multiplied by number of cells moved at each timestep + ng_MovingWindow[moving_window_dir] = 1; + int FGcell[4] = {0,1,1,2}; // Index is nox + ng_FieldGather = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); + ngJ_CurrentDepo = ng_FieldGather; + ng_NCIFilter = IntVect(AMREX_D_DECL(0,0,4)); +} -- cgit v1.2.3 From 30abf69638c200cd4fdfb9305a9b02075c0df0b0 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Sun, 27 Oct 2019 14:28:21 -0700 Subject: avoid redeclaring variables --- Source/Parallelization/GuardCellManager.cpp | 14 ++++++++++++++ Source/WarpX.cpp | 6 ++++++ 2 files changed, 20 insertions(+) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 400bde28f..88dab9fd1 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -59,6 +59,7 @@ guardCellManager::Init( ngJz = std::max(ngJz,2); } +/* #if (AMREX_SPACEDIM == 3) IntVect ngE(ngx,ngy,ngz); IntVect ngJ(ngJx,ngJy,ngJz); @@ -70,6 +71,19 @@ guardCellManager::Init( IntVect ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density // after pushing particle. int ngF = (do_moving_window) ? 2 : 0; +*/ + +#if (AMREX_SPACEDIM == 3) + ngE = IntVect(ngx,ngy,ngz); + ngJ = IntVect(ngJx,ngJy,ngJz); +#elif (AMREX_SPACEDIM == 2) + ngE = IntVect(ngx,ngz); + ngJ = IntVect(ngJx,ngJz); +#endif + + ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density + // after pushing particle. + ngF = (do_moving_window) ? 2 : 0; // CKC solver requires one additional guard cell if (maxwell_fdtd_solver_id == 1) ngF = std::max( ngF, 1 ); diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index beb4d3bc8..6a36ebb3e 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -717,6 +717,12 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d int ngF = guard_cells.ngF; IntVect ngextra = guard_cells.ngExtra; + Print()<<"ngE "<nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) { n_current_deposition_buffer = 1; // This forces the allocation of buffers and allows the code associated -- cgit v1.2.3 From e63229421c47538283375f1601d2d38bb25246b9 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Sun, 27 Oct 2019 16:59:48 -0700 Subject: FillBoundaryE/B/F take mandatory argument nguard --- Source/Evolve/WarpXEvolveEM.cpp | 78 ++++++++++++++--------------- Source/Parallelization/GuardCellManager.H | 3 +- Source/Parallelization/GuardCellManager.cpp | 10 ++-- Source/Parallelization/WarpXComm.cpp | 70 +++++++++++++++----------- Source/Python/WarpXWrappers.cpp | 4 +- Source/WarpX.H | 21 ++++---- Source/WarpX.cpp | 6 +-- 7 files changed, 106 insertions(+), 86 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 7a3262703..d2832cb5f 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -75,8 +75,8 @@ WarpX::EvolveEM (int numsteps) // Particles have p^{n} and x^{n}. // is_synchronized is true. if (is_synchronized) { - FillBoundaryE(); - FillBoundaryB(); + FillBoundaryE(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE); UpdateAuxilaryData(); // on first step, push p by -0.5*dt for (int lev = 0; lev <= finest_level; ++lev) { @@ -89,8 +89,8 @@ WarpX::EvolveEM (int numsteps) } else { // Beyond one step, we have E^{n} and B^{n}. // Particles have p^{n-1/2} and x^{n}. - FillBoundaryE(); - FillBoundaryB(); + FillBoundaryE(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE); UpdateAuxilaryData(); } @@ -185,8 +185,8 @@ WarpX::EvolveEM (int numsteps) // slice gen // if (to_make_plot || do_insitu || to_make_slice_plot) { - FillBoundaryE(); - FillBoundaryB(); + FillBoundaryE(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE); UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { @@ -237,8 +237,8 @@ WarpX::EvolveEM (int numsteps) if (write_plot_file || do_insitu) { - FillBoundaryE(); - FillBoundaryB(); + FillBoundaryE(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE); UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { @@ -308,23 +308,23 @@ WarpX::OneStep_nosub (Real cur_time) #ifdef WARPX_USE_PSATD PushPSATD(dt[0]); if (do_pml) DampPML(); - FillBoundaryE(); - FillBoundaryB(); + FillBoundaryE(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE); #else EvolveF(0.5*dt[0], DtType::FirstHalf); - FillBoundaryF(); + FillBoundaryF(guard_cells.ngF); EvolveB(0.5*dt[0]); // We now have B^{n+1/2} - FillBoundaryB(); + FillBoundaryB(guard_cells.ngE); EvolveE(dt[0]); // We now have E^{n+1} - FillBoundaryE(); + FillBoundaryE(guard_cells.ngE); EvolveF(0.5*dt[0], DtType::SecondHalf); EvolveB(0.5*dt[0]); // We now have B^{n+1} if (do_pml) { DampPML(); - FillBoundaryE(); + FillBoundaryE(guard_cells.ngE); } - FillBoundaryB(); + FillBoundaryB(guard_cells.ngE); #endif } @@ -368,21 +368,21 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::FirstHalf); - FillBoundaryB(fine_lev, PatchType::fine); - FillBoundaryF(fine_lev, PatchType::fine); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ngF); EvolveE(fine_lev, PatchType::fine, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::fine); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::SecondHalf); if (do_pml) { DampPML(fine_lev, PatchType::fine); - FillBoundaryE(fine_lev, PatchType::fine); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); } - FillBoundaryB(fine_lev, PatchType::fine); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); // ii) Push particles on the coarse patch and mother grid. // Push the fields on the coarse patch and mother grid @@ -394,19 +394,19 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::coarse, dt[fine_lev]); EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::FirstHalf); - FillBoundaryB(fine_lev, PatchType::coarse); - FillBoundaryF(fine_lev, PatchType::coarse); + FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ngE); + FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ngF); EvolveE(fine_lev, PatchType::coarse, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::coarse); + FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ngE); EvolveB(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); EvolveF(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev], DtType::FirstHalf); - FillBoundaryB(coarse_lev, PatchType::fine); - FillBoundaryF(coarse_lev, PatchType::fine); + FillBoundaryB(coarse_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryF(coarse_lev, PatchType::fine, guard_cells.ngF); EvolveE(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); - FillBoundaryE(coarse_lev, PatchType::fine); + FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ngE); // iii) Get auxiliary fields on the fine grid, at dt[fine_lev] UpdateAuxilaryData(); @@ -422,22 +422,22 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::FirstHalf); - FillBoundaryB(fine_lev, PatchType::fine); - FillBoundaryF(fine_lev, PatchType::fine); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ngF); EvolveE(fine_lev, PatchType::fine, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::fine); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::SecondHalf); if (do_pml) { DampPML(fine_lev, PatchType::fine); - FillBoundaryE(fine_lev, PatchType::fine); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); } - FillBoundaryB(fine_lev, PatchType::fine); - FillBoundaryF(fine_lev, PatchType::fine); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ngF); // v) Push the fields on the coarse patch and mother grid // by only half a coarse step (second half) @@ -446,7 +446,7 @@ WarpX::OneStep_sub1 (Real curtime) AddRhoFromFineLevelandSumBoundary(coarse_lev, ncomps, ncomps); EvolveE(fine_lev, PatchType::coarse, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::coarse); + FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ngE); EvolveB(fine_lev, PatchType::coarse, dt[fine_lev]); EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::SecondHalf); @@ -454,24 +454,24 @@ WarpX::OneStep_sub1 (Real curtime) if (do_pml) { DampPML(fine_lev, PatchType::coarse); // do it twice DampPML(fine_lev, PatchType::coarse); - FillBoundaryE(fine_lev, PatchType::coarse); + FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ngE); } - FillBoundaryB(fine_lev, PatchType::coarse); - FillBoundaryF(fine_lev, PatchType::coarse); + FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ngE); + FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ngF); EvolveE(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); - FillBoundaryE(coarse_lev, PatchType::fine); + FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ngE); EvolveB(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); EvolveF(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev], DtType::SecondHalf); if (do_pml) { DampPML(coarse_lev, PatchType::fine); - FillBoundaryE(coarse_lev, PatchType::fine); + FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ngE); } - FillBoundaryB(coarse_lev, PatchType::fine); + FillBoundaryB(coarse_lev, PatchType::fine, guard_cells.ngE); } void diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index c1ba48b9b..4b85a4332 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -26,7 +26,8 @@ public: amrex::IntVect ngE; amrex::IntVect ngJ; amrex::IntVect ngRho; - int ngF; + amrex::IntVect ngF; + int ngF_int; // Guard cells to exchange data amrex::IntVect ngB_FieldSolver; diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 88dab9fd1..54e5444af 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -83,9 +83,10 @@ guardCellManager::Init( ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density // after pushing particle. - ngF = (do_moving_window) ? 2 : 0; + ngF_int = (do_moving_window) ? 2 : 0; // CKC solver requires one additional guard cell - if (maxwell_fdtd_solver_id == 1) ngF = std::max( ngF, 1 ); + if (maxwell_fdtd_solver_id == 1) ngF_int = std::max( ngF_int, 1 ); + ngF = IntVect(AMREX_D_DECL(ngF_int, ngF_int, ngF_int)); #ifdef WARPX_USE_PSATD if (do_fft_mpi_dec == false){ @@ -108,12 +109,13 @@ guardCellManager::Init( ng_required = std::max( ng_required, ngE[i_dim] ); ng_required = std::max( ng_required, ngJ[i_dim] ); ng_required = std::max( ng_required, ngRho[i_dim] ); - ng_required = std::max( ng_required, ngF ); + ng_required = std::max( ng_required, ngF[i_dim] ); // Set the guard cells to this max ngE[i_dim] = ng_required; ngJ[i_dim] = ng_required; + ngF[i_dim] = ng_required; ngRho[i_dim] = ng_required; - ngF = ng_required; + ngF_int = ng_required; } } #endif diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp index 52df3dc25..0dae38e2e 100644 --- a/Source/Parallelization/WarpXComm.cpp +++ b/Source/Parallelization/WarpXComm.cpp @@ -321,41 +321,41 @@ WarpX::UpdateAuxilaryDataSameType () } void -WarpX::FillBoundaryB () +WarpX::FillBoundaryB (IntVect ng) { for (int lev = 0; lev <= finest_level; ++lev) { - FillBoundaryB(lev); + FillBoundaryB(lev, ng); } } void -WarpX::FillBoundaryE () +WarpX::FillBoundaryE (IntVect ng) { for (int lev = 0; lev <= finest_level; ++lev) { - FillBoundaryE(lev); + FillBoundaryE(lev, ng); } } void -WarpX::FillBoundaryF () +WarpX::FillBoundaryF (IntVect ng) { for (int lev = 0; lev <= finest_level; ++lev) { - FillBoundaryF(lev); + FillBoundaryF(lev, ng); } } void -WarpX::FillBoundaryE(int lev) +WarpX::FillBoundaryE(int lev, IntVect ng) { - FillBoundaryE(lev, PatchType::fine); - if (lev > 0) FillBoundaryE(lev, PatchType::coarse); + FillBoundaryE(lev, PatchType::fine, ng); + if (lev > 0) FillBoundaryE(lev, PatchType::coarse, ng); } void -WarpX::FillBoundaryE (int lev, PatchType patch_type) +WarpX::FillBoundaryE (int lev, PatchType patch_type, IntVect ng) { if (patch_type == PatchType::fine) { @@ -370,8 +370,11 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type) } const auto& period = Geom(lev).periodicity(); - Vector mf{Efield_fp[lev][0].get(),Efield_fp[lev][1].get(),Efield_fp[lev][2].get()}; - amrex::FillBoundary(mf, period); + Efield_fp[lev][0]->FillBoundary(0, Efield_fp[lev][0]->nComp(), ng, period); + Efield_fp[lev][1]->FillBoundary(0, Efield_fp[lev][1]->nComp(), ng, period); + Efield_fp[lev][2]->FillBoundary(0, Efield_fp[lev][2]->nComp(), ng, period); + // Vector mf{Efield_fp[lev][0].get(),Efield_fp[lev][1].get(),Efield_fp[lev][2].get()}; + // amrex::FillBoundary(mf, period); } else if (patch_type == PatchType::coarse) { @@ -386,20 +389,23 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type) } const auto& cperiod = Geom(lev-1).periodicity(); - Vector mf{Efield_cp[lev][0].get(),Efield_cp[lev][1].get(),Efield_cp[lev][2].get()}; - amrex::FillBoundary(mf, cperiod); + Efield_cp[lev][0]->FillBoundary(0, Efield_cp[lev][0]->nComp(), ng, cperiod); + Efield_cp[lev][1]->FillBoundary(0, Efield_cp[lev][1]->nComp(), ng, cperiod); + Efield_cp[lev][2]->FillBoundary(0, Efield_cp[lev][2]->nComp(), ng, cperiod); + // Vector mf{Efield_cp[lev][0].get(),Efield_cp[lev][1].get(),Efield_cp[lev][2].get()}; + // amrex::FillBoundary(mf, cperiod); } } void -WarpX::FillBoundaryB (int lev) +WarpX::FillBoundaryB (int lev, IntVect ng) { - FillBoundaryB(lev, PatchType::fine); - if (lev > 0) FillBoundaryB(lev, PatchType::coarse); + FillBoundaryB(lev, PatchType::fine, ng); + if (lev > 0) FillBoundaryB(lev, PatchType::coarse, ng); } void -WarpX::FillBoundaryB (int lev, PatchType patch_type) +WarpX::FillBoundaryB (int lev, PatchType patch_type, IntVect ng) { if (patch_type == PatchType::fine) { @@ -413,8 +419,11 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type) pml[lev]->FillBoundaryB(patch_type); } const auto& period = Geom(lev).periodicity(); - Vector mf{Bfield_fp[lev][0].get(),Bfield_fp[lev][1].get(),Bfield_fp[lev][2].get()}; - amrex::FillBoundary(mf, period); + Bfield_fp[lev][0]->FillBoundary(0, Bfield_fp[lev][0]->nComp(), ng, period); + Bfield_fp[lev][1]->FillBoundary(0, Bfield_fp[lev][1]->nComp(), ng, period); + Bfield_fp[lev][2]->FillBoundary(0, Bfield_fp[lev][2]->nComp(), ng, period); + // Vector mf{Bfield_fp[lev][0].get(),Bfield_fp[lev][1].get(),Bfield_fp[lev][2].get()}; + // amrex::FillBoundary(mf, period); } else if (patch_type == PatchType::coarse) { @@ -428,20 +437,23 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type) pml[lev]->FillBoundaryB(patch_type); } const auto& cperiod = Geom(lev-1).periodicity(); - Vector mf{Bfield_cp[lev][0].get(),Bfield_cp[lev][1].get(),Bfield_cp[lev][2].get()}; - amrex::FillBoundary(mf, cperiod); + Bfield_cp[lev][0]->FillBoundary(0, Bfield_cp[lev][0]->nComp(), ng, cperiod); + Bfield_cp[lev][1]->FillBoundary(0, Bfield_cp[lev][1]->nComp(), ng, cperiod); + Bfield_cp[lev][2]->FillBoundary(0, Bfield_cp[lev][2]->nComp(), ng, cperiod); + // Vector mf{Bfield_cp[lev][0].get(),Bfield_cp[lev][1].get(),Bfield_cp[lev][2].get()}; + // amrex::FillBoundary(mf, cperiod); } } void -WarpX::FillBoundaryF (int lev) +WarpX::FillBoundaryF (int lev, IntVect ng) { - FillBoundaryF(lev, PatchType::fine); - if (lev > 0) FillBoundaryF(lev, PatchType::coarse); + FillBoundaryF(lev, PatchType::fine, ng); + if (lev > 0) FillBoundaryF(lev, PatchType::coarse, ng); } void -WarpX::FillBoundaryF (int lev, PatchType patch_type) +WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng) { if (patch_type == PatchType::fine && F_fp[lev]) { @@ -453,7 +465,8 @@ WarpX::FillBoundaryF (int lev, PatchType patch_type) } const auto& period = Geom(lev).periodicity(); - F_fp[lev]->FillBoundary(period); + F_fp[lev]->FillBoundary(0, F_fp[lev]->nComp(), ng, period); + // F_fp[lev]->FillBoundary(period); } else if (patch_type == PatchType::coarse && F_cp[lev]) { @@ -465,7 +478,8 @@ WarpX::FillBoundaryF (int lev, PatchType patch_type) } const auto& cperiod = Geom(lev-1).periodicity(); - F_cp[lev]->FillBoundary(cperiod); + F_cp[lev]->FillBoundary(0, F_cp[lev]->nComp(), ng, cperiod); + // F_cp[lev]->FillBoundary(cperiod); } } diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp index be9ec9519..3635bcd45 100644 --- a/Source/Python/WarpXWrappers.cpp +++ b/Source/Python/WarpXWrappers.cpp @@ -378,11 +378,11 @@ extern "C" } void warpx_FillBoundaryE () { WarpX& warpx = WarpX::GetInstance(); - warpx.FillBoundaryE (); + warpx.FillBoundaryE (warpx.getngE()); } void warpx_FillBoundaryB () { WarpX& warpx = WarpX::GetInstance(); - warpx.FillBoundaryB (); + warpx.FillBoundaryB (warpx.getngE()); } void warpx_SyncCurrent () { WarpX& warpx = WarpX::GetInstance(); diff --git a/Source/WarpX.H b/Source/WarpX.H index 4e91d41e8..426609831 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -210,12 +210,12 @@ public: void UpdateAuxilaryDataSameType (); // Fill boundary cells including coarse/fine boundaries - void FillBoundaryB (); - void FillBoundaryE (); - void FillBoundaryF (); - void FillBoundaryE (int lev); - void FillBoundaryB (int lev); - void FillBoundaryF (int lev); + void FillBoundaryB (amrex::IntVect ng); + void FillBoundaryE (amrex::IntVect ng); + void FillBoundaryF (amrex::IntVect ng); + void FillBoundaryE (int lev, amrex::IntVect ng); + void FillBoundaryB (int lev, amrex::IntVect ng); + void FillBoundaryF (int lev, amrex::IntVect ng); void SyncCurrent (); void SyncRho (); @@ -295,6 +295,9 @@ public: const std::array& B, const std::array& dx, int ngrow); + const amrex::IntVect getngE() const { return guard_cells.ngE; }; + const amrex::IntVect getngF() const { return guard_cells.ngF; }; + protected: //! Tagging cells for refinement @@ -332,9 +335,9 @@ private: /// void EvolveEM(int numsteps); - void FillBoundaryB (int lev, PatchType patch_type); - void FillBoundaryE (int lev, PatchType patch_type); - void FillBoundaryF (int lev, PatchType patch_type); + void FillBoundaryB (int lev, PatchType patch_type, amrex::IntVect ng); + void FillBoundaryE (int lev, PatchType patch_type, amrex::IntVect ng); + void FillBoundaryF (int lev, PatchType patch_type, amrex::IntVect ng); void OneStep_nosub (amrex::Real t); void OneStep_sub1 (amrex::Real t); diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index c97c43cd9..0217e0cca 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -714,13 +714,13 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d IntVect ngE = guard_cells.ngE; IntVect ngJ = guard_cells.ngJ; IntVect ngRho = guard_cells.ngRho; - int ngF = guard_cells.ngF; + int ngF_int = guard_cells.ngF_int; IntVect ngextra = guard_cells.ngExtra; Print()<<"ngE "<nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) { @@ -739,7 +739,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d n_field_gather_buffer = n_current_deposition_buffer + 1; } - AllocLevelMFs(lev, ba, dm, ngE, ngJ, ngRho, ngF, ngextra, aux_is_nodal); + AllocLevelMFs(lev, ba, dm, ngE, ngJ, ngRho, ngF_int, ngextra, aux_is_nodal); } void -- cgit v1.2.3 From ca4f2ce00e8cd3e687d803787bf24f9dd2f555e5 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Mon, 28 Oct 2019 10:37:26 -0700 Subject: Pass fewer guard cells in a number of FillBoundary calls --- Source/Evolve/WarpXEvolveEM.cpp | 16 ++++++++++------ Source/Parallelization/GuardCellManager.cpp | 1 + 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index d2832cb5f..8c000077a 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -75,8 +75,8 @@ WarpX::EvolveEM (int numsteps) // Particles have p^{n} and x^{n}. // is_synchronized is true. if (is_synchronized) { - FillBoundaryE(guard_cells.ngE); - FillBoundaryB(guard_cells.ngE); + FillBoundaryE(guard_cells.ng_FieldGather); + FillBoundaryB(guard_cells.ng_FieldGather); UpdateAuxilaryData(); // on first step, push p by -0.5*dt for (int lev = 0; lev <= finest_level; ++lev) { @@ -89,7 +89,9 @@ WarpX::EvolveEM (int numsteps) } else { // Beyond one step, we have E^{n} and B^{n}. // Particles have p^{n-1/2} and x^{n}. + // This is probably overkill FillBoundaryE(guard_cells.ngE); + // This is probably overkill FillBoundaryB(guard_cells.ngE); UpdateAuxilaryData(); @@ -185,7 +187,9 @@ WarpX::EvolveEM (int numsteps) // slice gen // if (to_make_plot || do_insitu || to_make_slice_plot) { + // This is probably overkill FillBoundaryE(guard_cells.ngE); + // This is probably overkill FillBoundaryB(guard_cells.ngE); UpdateAuxilaryData(); @@ -237,7 +241,9 @@ WarpX::EvolveEM (int numsteps) if (write_plot_file || do_insitu) { + // This is probably overkill FillBoundaryE(guard_cells.ngE); + // This is probably overkill FillBoundaryB(guard_cells.ngE); UpdateAuxilaryData(); @@ -314,17 +320,15 @@ WarpX::OneStep_nosub (Real cur_time) EvolveF(0.5*dt[0], DtType::FirstHalf); FillBoundaryF(guard_cells.ngF); EvolveB(0.5*dt[0]); // We now have B^{n+1/2} - FillBoundaryB(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE_FieldSolver); EvolveE(dt[0]); // We now have E^{n+1} - FillBoundaryE(guard_cells.ngE); + FillBoundaryE(guard_cells.ngE_FieldSolver); EvolveF(0.5*dt[0], DtType::SecondHalf); EvolveB(0.5*dt[0]); // We now have B^{n+1} if (do_pml) { DampPML(); - FillBoundaryE(guard_cells.ngE); } - FillBoundaryB(guard_cells.ngE); #endif } diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 54e5444af..c790c3472 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -118,6 +118,7 @@ guardCellManager::Init( ngF_int = ng_required; } } + ngF = IntVect(AMREX_D_DECL(ngF_int, ngF_int, ngF_int)); #endif ngExtra = IntVect(static_cast(aux_is_nodal and !do_nodal)); -- cgit v1.2.3 From 0fe1905133033f128b235a14b04135c064800521 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 29 Oct 2019 20:46:45 -0700 Subject: Reduce number of guard cells exchanged in Moving window and EvolveEM --- Source/Evolve/WarpXEvolveEM.cpp | 17 +++++++-- Source/Parallelization/GuardCellManager.H | 25 ++++++------- Source/Parallelization/GuardCellManager.cpp | 7 +++- Source/Parallelization/WarpXComm.cpp | 21 +++++++++++ Source/Utils/WarpXMovingWindow.cpp | 54 ++++++++++++++++++----------- Source/WarpX.H | 16 +++++---- 6 files changed, 96 insertions(+), 44 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 8ad3b2401..c98a4688e 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -90,15 +90,22 @@ WarpX::EvolveEM (int numsteps) // Beyond one step, we have E^{n} and B^{n}. // Particles have p^{n-1/2} and x^{n}. // This is probably overkill - FillBoundaryE(guard_cells.ngE); + // FillBoundaryE(guard_cells.ngE); // This is probably overkill - FillBoundaryB(guard_cells.ngE); + // FillBoundaryB(guard_cells.ngE); + IntVect my_nc; + my_nc = guard_cells.ng_FieldGather+guard_cells.ng_NCIFilter; + FillBoundaryE(my_nc); + FillBoundaryB(my_nc); + FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); - } if (do_subcycling == 0 || finest_level == 0) { OneStep_nosub(cur_time); + // E : guard cells are up-to-date + // B : guard cells are NOT up-to-date + // F : guard cells are NOT up-to-date } else if (do_subcycling == 1 && finest_level == 1) { OneStep_sub1(cur_time); } else { @@ -108,6 +115,7 @@ WarpX::EvolveEM (int numsteps) if (num_mirrors>0){ applyMirrors(cur_time); + // E : guard cells are NOT up-to-date } #ifdef WARPX_USE_PY @@ -191,6 +199,7 @@ WarpX::EvolveEM (int numsteps) FillBoundaryE(guard_cells.ngE); // This is probably overkill FillBoundaryB(guard_cells.ngE); + FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { @@ -245,6 +254,7 @@ WarpX::EvolveEM (int numsteps) FillBoundaryE(guard_cells.ngE); // This is probably overkill FillBoundaryB(guard_cells.ngE); + FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { @@ -325,6 +335,7 @@ WarpX::OneStep_nosub (Real cur_time) EvolveE(dt[0]); // We now have E^{n+1} FillBoundaryE(guard_cells.ngE_FieldSolver); EvolveF(0.5*dt[0], DtType::SecondHalf); + FillBoundaryF(guard_cells.ngF); EvolveB(0.5*dt[0]); // We now have B^{n+1} if (do_pml) { DampPML(); diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 4b85a4332..706b5df79 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -22,20 +22,21 @@ public: const int max_level); // Guard cells to initialize multifabs - amrex::IntVect ngExtra; - amrex::IntVect ngE; - amrex::IntVect ngJ; - amrex::IntVect ngRho; - amrex::IntVect ngF; - int ngF_int; + amrex::IntVect ngExtra = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngE = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngJ = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngRho = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngF = amrex::IntVect::TheZeroVector(); + int ngF_int = 0; // Guard cells to exchange data - amrex::IntVect ngB_FieldSolver; - amrex::IntVect ngE_FieldSolver; - amrex::IntVect ng_FieldGather; - amrex::IntVect ngJ_CurrentDepo; - amrex::IntVect ng_MovingWindow; - amrex::IntVect ng_NCIFilter; + amrex::IntVect ngB_FieldSolver = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngE_FieldSolver = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngJ_CurrentDepo = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_NCIFilter = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_Aux = amrex::IntVect::TheZeroVector(); }; #endif // GUARDCELLMANAGER_H_ diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index c790c3472..166f0d58d 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -131,5 +131,10 @@ guardCellManager::Init( int FGcell[4] = {0,1,1,2}; // Index is nox ng_FieldGather = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); ngJ_CurrentDepo = ng_FieldGather; - ng_NCIFilter = IntVect(AMREX_D_DECL(0,0,4)); + if (do_fdtd_nci_corr){ + ng_NCIFilter = IntVect::TheZeroVector(); + ng_NCIFilter[AMREX_SPACEDIM-1] = 4; + } + ng_Aux = 2*ng_FieldGather+ng_NCIFilter; + ng_Aux = ng_Aux.min(ngE); } diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp index 0dae38e2e..7d2473f30 100644 --- a/Source/Parallelization/WarpXComm.cpp +++ b/Source/Parallelization/WarpXComm.cpp @@ -483,6 +483,27 @@ WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng) } } +void +WarpX::FillBoundaryAux (IntVect ng) +{ + for (int lev = 0; lev <= finest_level-1; ++lev) + { + FillBoundaryAux(lev, ng); + } +} + +void +WarpX::FillBoundaryAux (int lev, IntVect ng) +{ + const auto& period = Geom(lev).periodicity(); + Efield_aux[lev][0]->FillBoundary(0, Efield_aux[lev][0]->nComp(), ng, period); + Efield_aux[lev][1]->FillBoundary(0, Efield_aux[lev][1]->nComp(), ng, period); + Efield_aux[lev][2]->FillBoundary(0, Efield_aux[lev][2]->nComp(), ng, period); + Bfield_aux[lev][0]->FillBoundary(0, Bfield_aux[lev][0]->nComp(), ng, period); + Bfield_aux[lev][1]->FillBoundary(0, Bfield_aux[lev][1]->nComp(), ng, period); + Bfield_aux[lev][2]->FillBoundary(0, Bfield_aux[lev][2]->nComp(), ng, period); +} + void WarpX::SyncCurrent () { diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index c577da7f3..59810d817 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -99,32 +99,34 @@ WarpX::MoveWindow (bool move_j) for (int dim = 0; dim < 3; ++dim) { // Fine grid - shiftMF(*Bfield_fp[lev][dim], geom[lev], num_shift, dir, B_external_grid[dim]); - shiftMF(*Efield_fp[lev][dim], geom[lev], num_shift, dir, E_external_grid[dim]); + shiftMF(*Bfield_fp[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE, B_external_grid[dim]); + shiftMF(*Efield_fp[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE, E_external_grid[dim]); if (move_j) { - shiftMF(*current_fp[lev][dim], geom[lev], num_shift, dir); + shiftMF(*current_fp[lev][dim], geom[lev], num_shift, dir, guard_cells.ngJ); } if (do_pml && pml[lev]->ok()) { const std::array& pml_B = pml[lev]->GetB_fp(); const std::array& pml_E = pml[lev]->GetE_fp(); - shiftMF(*pml_B[dim], geom[lev], num_shift, dir); - shiftMF(*pml_E[dim], geom[lev], num_shift, dir); + IntVect ng_exchange = pml_B[dim]->nGrowVect(); + shiftMF(*pml_B[dim], geom[lev], num_shift, dir, ng_exchange); + shiftMF(*pml_E[dim], geom[lev], num_shift, dir, ng_exchange); } if (lev > 0) { // Coarse grid - shiftMF(*Bfield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, B_external_grid[dim]); - shiftMF(*Efield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, E_external_grid[dim]); - shiftMF(*Bfield_aux[lev][dim], geom[lev], num_shift, dir); - shiftMF(*Efield_aux[lev][dim], geom[lev], num_shift, dir); + shiftMF(*Bfield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, guard_cells.ngE, B_external_grid[dim]); + shiftMF(*Efield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, guard_cells.ngE, E_external_grid[dim]); + shiftMF(*Bfield_aux[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE); + shiftMF(*Efield_aux[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE); if (move_j) { - shiftMF(*current_cp[lev][dim], geom[lev-1], num_shift_crse, dir); + shiftMF(*current_cp[lev][dim], geom[lev-1], num_shift_crse, dir, guard_cells.ngJ); } if (do_pml && pml[lev]->ok()) { const std::array& pml_B = pml[lev]->GetB_cp(); const std::array& pml_E = pml[lev]->GetE_cp(); - shiftMF(*pml_B[dim], geom[lev-1], num_shift_crse, dir); - shiftMF(*pml_E[dim], geom[lev-1], num_shift_crse, dir); + IntVect ng_exchange = pml_B[dim]->nGrowVect(); + shiftMF(*pml_B[dim], geom[lev-1], num_shift_crse, dir, ng_exchange); + shiftMF(*pml_E[dim], geom[lev-1], num_shift_crse, dir, ng_exchange); } } } @@ -132,19 +134,21 @@ WarpX::MoveWindow (bool move_j) // Shift scalar component F for dive cleaning if (do_dive_cleaning) { // Fine grid - shiftMF(*F_fp[lev], geom[lev], num_shift, dir); + shiftMF(*F_fp[lev], geom[lev], num_shift, dir, guard_cells.ngF); if (do_pml && pml[lev]->ok()) { MultiFab* pml_F = pml[lev]->GetF_fp(); - shiftMF(*pml_F, geom[lev], num_shift, dir); + IntVect ng_exchange = pml_F->nGrowVect(); + shiftMF(*pml_F, geom[lev], num_shift, dir, ng_exchange); } if (lev > 0) { // Coarse grid - shiftMF(*F_cp[lev], geom[lev-1], num_shift_crse, dir); + shiftMF(*F_cp[lev], geom[lev-1], num_shift_crse, dir, guard_cells.ngF); if (do_pml && pml[lev]->ok()) { MultiFab* pml_F = pml[lev]->GetF_cp(); - shiftMF(*pml_F, geom[lev-1], num_shift_crse, dir); + IntVect ng_exchange = pml_F->nGrowVect(); + shiftMF(*pml_F, geom[lev-1], num_shift_crse, dir, ng_exchange); } - shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir); + shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir, guard_cells.ngRho); } } @@ -152,10 +156,10 @@ WarpX::MoveWindow (bool move_j) if (move_j) { if (rho_fp[lev]){ // Fine grid - shiftMF(*rho_fp[lev], geom[lev], num_shift, dir); + shiftMF(*rho_fp[lev], geom[lev], num_shift, dir, guard_cells.ngRho); if (lev > 0){ // Coarse grid - shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir); + shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir, guard_cells.ngRho); } } } @@ -204,7 +208,7 @@ WarpX::MoveWindow (bool move_j) void WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, - amrex::Real external_field) + IntVect ng_exchange, amrex::Real external_field) { BL_PROFILE("WarpX::shiftMF()"); const BoxArray& ba = mf.boxArray(); @@ -216,7 +220,15 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, MultiFab tmpmf(ba, dm, nc, ng); MultiFab::Copy(tmpmf, mf, 0, 0, nc, ng); - tmpmf.FillBoundary(geom.periodicity()); + + // Not sure why this is needed, but it is... + ng_exchange[0] = 1; + ng_exchange[1] = num_shift; // 2 + Print()<<"ng_exchange "< Date: Wed, 30 Oct 2019 11:40:55 -0700 Subject: no need to pass ng in ShiftMF --- Source/Evolve/WarpXEvolveEM.cpp | 13 ++++---- Source/Parallelization/GuardCellManager.H | 3 +- Source/Parallelization/GuardCellManager.cpp | 9 +++-- Source/Utils/WarpXMovingWindow.cpp | 52 +++++++++++++---------------- Source/WarpX.H | 2 +- 5 files changed, 39 insertions(+), 40 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index c98a4688e..8707b9fde 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -93,10 +93,9 @@ WarpX::EvolveEM (int numsteps) // FillBoundaryE(guard_cells.ngE); // This is probably overkill // FillBoundaryB(guard_cells.ngE); - IntVect my_nc; - my_nc = guard_cells.ng_FieldGather+guard_cells.ng_NCIFilter; - FillBoundaryE(my_nc); - FillBoundaryB(my_nc); + IntVect ng_gather = guard_cells.ng_FieldGather+guard_cells.ng_NCIFilter; + FillBoundaryE(ng_gather); + FillBoundaryB(ng_gather); FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); } @@ -328,12 +327,12 @@ WarpX::OneStep_nosub (Real cur_time) FillBoundaryB(guard_cells.ngE); #else EvolveF(0.5*dt[0], DtType::FirstHalf); - FillBoundaryF(guard_cells.ngF); + FillBoundaryF(guard_cells.ng_FieldSolver); EvolveB(0.5*dt[0]); // We now have B^{n+1/2} - FillBoundaryB(guard_cells.ngE_FieldSolver); + FillBoundaryB(guard_cells.ng_FieldSolver); EvolveE(dt[0]); // We now have E^{n+1} - FillBoundaryE(guard_cells.ngE_FieldSolver); + FillBoundaryE(guard_cells.ng_FieldSolver); EvolveF(0.5*dt[0], DtType::SecondHalf); FillBoundaryF(guard_cells.ngF); EvolveB(0.5*dt[0]); // We now have B^{n+1} diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 706b5df79..e241eed75 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -30,8 +30,7 @@ public: int ngF_int = 0; // Guard cells to exchange data - amrex::IntVect ngB_FieldSolver = amrex::IntVect::TheZeroVector(); - amrex::IntVect ngE_FieldSolver = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); amrex::IntVect ngJ_CurrentDepo = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 166f0d58d..a67e15eb7 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -1,4 +1,5 @@ #include "GuardCellManager.H" +#include using namespace amrex; @@ -121,11 +122,15 @@ guardCellManager::Init( ngF = IntVect(AMREX_D_DECL(ngF_int, ngF_int, ngF_int)); #endif + Print()<<"rrr ngE : "<(aux_is_nodal and !do_nodal)); // Guard cells for field solver - ngB_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); - ngE_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); + ng_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); ng_MovingWindow = IntVect(AMREX_D_DECL(0,0,0)); // Multiplied by number of cells moved at each timestep ng_MovingWindow[moving_window_dir] = 1; int FGcell[4] = {0,1,1,2}; // Index is nox diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index 59810d817..db58ad53c 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -99,34 +99,32 @@ WarpX::MoveWindow (bool move_j) for (int dim = 0; dim < 3; ++dim) { // Fine grid - shiftMF(*Bfield_fp[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE, B_external_grid[dim]); - shiftMF(*Efield_fp[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE, E_external_grid[dim]); + shiftMF(*Bfield_fp[lev][dim], geom[lev], num_shift, dir, B_external_grid[dim]); + shiftMF(*Efield_fp[lev][dim], geom[lev], num_shift, dir, E_external_grid[dim]); if (move_j) { - shiftMF(*current_fp[lev][dim], geom[lev], num_shift, dir, guard_cells.ngJ); + shiftMF(*current_fp[lev][dim], geom[lev], num_shift, dir); } if (do_pml && pml[lev]->ok()) { const std::array& pml_B = pml[lev]->GetB_fp(); const std::array& pml_E = pml[lev]->GetE_fp(); - IntVect ng_exchange = pml_B[dim]->nGrowVect(); - shiftMF(*pml_B[dim], geom[lev], num_shift, dir, ng_exchange); - shiftMF(*pml_E[dim], geom[lev], num_shift, dir, ng_exchange); + shiftMF(*pml_B[dim], geom[lev], num_shift, dir); + shiftMF(*pml_E[dim], geom[lev], num_shift, dir); } if (lev > 0) { // Coarse grid - shiftMF(*Bfield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, guard_cells.ngE, B_external_grid[dim]); - shiftMF(*Efield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, guard_cells.ngE, E_external_grid[dim]); - shiftMF(*Bfield_aux[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE); - shiftMF(*Efield_aux[lev][dim], geom[lev], num_shift, dir, guard_cells.ngE); + shiftMF(*Bfield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, B_external_grid[dim]); + shiftMF(*Efield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, E_external_grid[dim]); + shiftMF(*Bfield_aux[lev][dim], geom[lev], num_shift, dir); + shiftMF(*Efield_aux[lev][dim], geom[lev], num_shift, dir); if (move_j) { - shiftMF(*current_cp[lev][dim], geom[lev-1], num_shift_crse, dir, guard_cells.ngJ); + shiftMF(*current_cp[lev][dim], geom[lev-1], num_shift_crse, dir); } if (do_pml && pml[lev]->ok()) { const std::array& pml_B = pml[lev]->GetB_cp(); const std::array& pml_E = pml[lev]->GetE_cp(); - IntVect ng_exchange = pml_B[dim]->nGrowVect(); - shiftMF(*pml_B[dim], geom[lev-1], num_shift_crse, dir, ng_exchange); - shiftMF(*pml_E[dim], geom[lev-1], num_shift_crse, dir, ng_exchange); + shiftMF(*pml_B[dim], geom[lev-1], num_shift_crse, dir); + shiftMF(*pml_E[dim], geom[lev-1], num_shift_crse, dir); } } } @@ -134,21 +132,19 @@ WarpX::MoveWindow (bool move_j) // Shift scalar component F for dive cleaning if (do_dive_cleaning) { // Fine grid - shiftMF(*F_fp[lev], geom[lev], num_shift, dir, guard_cells.ngF); + shiftMF(*F_fp[lev], geom[lev], num_shift, dir); if (do_pml && pml[lev]->ok()) { MultiFab* pml_F = pml[lev]->GetF_fp(); - IntVect ng_exchange = pml_F->nGrowVect(); - shiftMF(*pml_F, geom[lev], num_shift, dir, ng_exchange); + shiftMF(*pml_F, geom[lev], num_shift, dir); } if (lev > 0) { // Coarse grid - shiftMF(*F_cp[lev], geom[lev-1], num_shift_crse, dir, guard_cells.ngF); + shiftMF(*F_cp[lev], geom[lev-1], num_shift_crse, dir); if (do_pml && pml[lev]->ok()) { MultiFab* pml_F = pml[lev]->GetF_cp(); - IntVect ng_exchange = pml_F->nGrowVect(); - shiftMF(*pml_F, geom[lev-1], num_shift_crse, dir, ng_exchange); + shiftMF(*pml_F, geom[lev-1], num_shift_crse, dir); } - shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir, guard_cells.ngRho); + shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir); } } @@ -156,10 +152,10 @@ WarpX::MoveWindow (bool move_j) if (move_j) { if (rho_fp[lev]){ // Fine grid - shiftMF(*rho_fp[lev], geom[lev], num_shift, dir, guard_cells.ngRho); + shiftMF(*rho_fp[lev], geom[lev], num_shift, dir); if (lev > 0){ // Coarse grid - shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir, guard_cells.ngRho); + shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir); } } } @@ -208,7 +204,7 @@ WarpX::MoveWindow (bool move_j) void WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, - IntVect ng_exchange, amrex::Real external_field) + amrex::Real external_field) { BL_PROFILE("WarpX::shiftMF()"); const BoxArray& ba = mf.boxArray(); @@ -222,11 +218,11 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, MultiFab::Copy(tmpmf, mf, 0, 0, nc, ng); // Not sure why this is needed, but it is... - ng_exchange[0] = 1; - ng_exchange[1] = num_shift; // 2 - Print()<<"ng_exchange "< Date: Thu, 31 Oct 2019 16:40:10 -0700 Subject: Each call to FillBoundary in regular PIC loop (FDTD) uses fewer guard cells --- Source/Evolve/WarpXEvolveEM.cpp | 39 +++++++++++++---------- Source/Parallelization/GuardCellManager.H | 1 + Source/Parallelization/GuardCellManager.cpp | 27 +++++++++++----- Source/Parallelization/WarpXComm.cpp | 49 ++++++++++++++++++----------- Source/Utils/WarpXMovingWindow.cpp | 48 +++++++++++++++------------- Source/WarpX.H | 10 +++--- 6 files changed, 104 insertions(+), 70 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 8707b9fde..3247ca64f 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -75,8 +75,10 @@ WarpX::EvolveEM (int numsteps) // Particles have p^{n} and x^{n}. // is_synchronized is true. if (is_synchronized) { - FillBoundaryE(guard_cells.ng_FieldGather); - FillBoundaryB(guard_cells.ng_FieldGather); + // FillBoundaryE(guard_cells.ng_FieldGather, guard_cells.ngExtra); + // FillBoundaryB(guard_cells.ng_FieldGather, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); + FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); UpdateAuxilaryData(); // on first step, push p by -0.5*dt for (int lev = 0; lev <= finest_level; ++lev) { @@ -90,12 +92,14 @@ WarpX::EvolveEM (int numsteps) // Beyond one step, we have E^{n} and B^{n}. // Particles have p^{n-1/2} and x^{n}. // This is probably overkill - // FillBoundaryE(guard_cells.ngE); // This is probably overkill - // FillBoundaryB(guard_cells.ngE); - IntVect ng_gather = guard_cells.ng_FieldGather+guard_cells.ng_NCIFilter; - FillBoundaryE(ng_gather); - FillBoundaryB(ng_gather); + // IntVect ng_gather = guard_cells.ng_FieldGather+guard_cells.ng_NCIFilter; + // FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); + // FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); + // FillBoundaryE(ng_gather, guard_cells.ngExtra); + // FillBoundaryB(ng_gather, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ng_FieldGatherAndNCIFilter, guard_cells.ngExtra); + FillBoundaryB(guard_cells.ng_FieldGatherAndNCIFilter, guard_cells.ngExtra); FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); } @@ -195,9 +199,9 @@ WarpX::EvolveEM (int numsteps) if (to_make_plot || do_insitu || to_make_slice_plot) { // This is probably overkill - FillBoundaryE(guard_cells.ngE); + FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); // This is probably overkill - FillBoundaryB(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); @@ -250,9 +254,9 @@ WarpX::EvolveEM (int numsteps) if (write_plot_file || do_insitu) { // This is probably overkill - FillBoundaryE(guard_cells.ngE); + FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); // This is probably overkill - FillBoundaryB(guard_cells.ngE); + FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); @@ -323,23 +327,24 @@ WarpX::OneStep_nosub (Real cur_time) #ifdef WARPX_USE_PSATD PushPSATD(dt[0]); if (do_pml) DampPML(); - FillBoundaryE(guard_cells.ngE); - FillBoundaryB(guard_cells.ngE); + FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); + FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); #else + Print()<<"Push fields\n"; EvolveF(0.5*dt[0], DtType::FirstHalf); FillBoundaryF(guard_cells.ng_FieldSolver); EvolveB(0.5*dt[0]); // We now have B^{n+1/2} - FillBoundaryB(guard_cells.ng_FieldSolver); - + // FillBoundaryB(guard_cells.ng_FieldSolver, guard_cells.ngExtra); + FillBoundaryB(guard_cells.ng_FieldSolver, IntVect::TheZeroVector()); EvolveE(dt[0]); // We now have E^{n+1} - FillBoundaryE(guard_cells.ng_FieldSolver); + // FillBoundaryE(guard_cells.ng_FieldSolver, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ng_FieldSolver, IntVect::TheZeroVector()); EvolveF(0.5*dt[0], DtType::SecondHalf); FillBoundaryF(guard_cells.ngF); EvolveB(0.5*dt[0]); // We now have B^{n+1} if (do_pml) { DampPML(); } - #endif } diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index e241eed75..93f1e9fd1 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -32,6 +32,7 @@ public: // Guard cells to exchange data amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_FieldGatherAndNCIFilter = amrex::IntVect::TheZeroVector(); amrex::IntVect ngJ_CurrentDepo = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_NCIFilter = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index a67e15eb7..9f3e5b18d 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -110,7 +110,7 @@ guardCellManager::Init( ng_required = std::max( ng_required, ngE[i_dim] ); ng_required = std::max( ng_required, ngJ[i_dim] ); ng_required = std::max( ng_required, ngRho[i_dim] ); - ng_required = std::max( ng_required, ngF[i_dim] ); +v ng_required = std::max( ng_required, ngF[i_dim] ); // Set the guard cells to this max ngE[i_dim] = ng_required; ngJ[i_dim] = ng_required; @@ -122,11 +122,6 @@ guardCellManager::Init( ngF = IntVect(AMREX_D_DECL(ngF_int, ngF_int, ngF_int)); #endif - Print()<<"rrr ngE : "<(aux_is_nodal and !do_nodal)); // Guard cells for field solver @@ -134,12 +129,28 @@ guardCellManager::Init( ng_MovingWindow = IntVect(AMREX_D_DECL(0,0,0)); // Multiplied by number of cells moved at each timestep ng_MovingWindow[moving_window_dir] = 1; int FGcell[4] = {0,1,1,2}; // Index is nox - ng_FieldGather = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); - ngJ_CurrentDepo = ng_FieldGather; + ng_FieldGather = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])) + 2*ngExtra; + + ng_FieldGather = ng_FieldGather.min(ngE); if (do_fdtd_nci_corr){ ng_NCIFilter = IntVect::TheZeroVector(); ng_NCIFilter[AMREX_SPACEDIM-1] = 4; } + + ng_FieldGatherAndNCIFilter = ng_FieldGather + ng_NCIFilter; + ng_FieldGatherAndNCIFilter = ng_FieldGatherAndNCIFilter.min(ngE); + ng_Aux = 2*ng_FieldGather+ng_NCIFilter; ng_Aux = ng_Aux.min(ngE); + + Print()<<"rrr ngE : "< #include #include +#include "WarpXAlgorithmSelection.H" #include #include @@ -321,20 +322,20 @@ WarpX::UpdateAuxilaryDataSameType () } void -WarpX::FillBoundaryB (IntVect ng) +WarpX::FillBoundaryB (IntVect ng, IntVect ng_extra_fine) { for (int lev = 0; lev <= finest_level; ++lev) { - FillBoundaryB(lev, ng); + FillBoundaryB(lev, ng, ng_extra_fine); } } void -WarpX::FillBoundaryE (IntVect ng) +WarpX::FillBoundaryE (IntVect ng, IntVect ng_extra_fine) { for (int lev = 0; lev <= finest_level; ++lev) { - FillBoundaryE(lev, ng); + FillBoundaryE(lev, ng, ng_extra_fine); } } @@ -348,9 +349,11 @@ WarpX::FillBoundaryF (IntVect ng) } void -WarpX::FillBoundaryE(int lev, IntVect ng) +WarpX::FillBoundaryE(int lev, IntVect ng, IntVect ng_extra_fine) { - FillBoundaryE(lev, PatchType::fine, ng); + Print()<<"FillBoundaryE ng_extra_fine "<< ng_extra_fine <<'\n'; + Print()<<"FillBoundaryE exchanges "<< ng+ng_extra_fine <<'\n'; + FillBoundaryE(lev, PatchType::fine, ng+ng_extra_fine); if (lev > 0) FillBoundaryE(lev, PatchType::coarse, ng); } @@ -370,11 +373,12 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type, IntVect ng) } const auto& period = Geom(lev).periodicity(); + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + ng <= Efield_fp[lev][0]->nGrowVect(), + "Error: in FillBoundaryE, requested more guard cells than allocated"); Efield_fp[lev][0]->FillBoundary(0, Efield_fp[lev][0]->nComp(), ng, period); Efield_fp[lev][1]->FillBoundary(0, Efield_fp[lev][1]->nComp(), ng, period); Efield_fp[lev][2]->FillBoundary(0, Efield_fp[lev][2]->nComp(), ng, period); - // Vector mf{Efield_fp[lev][0].get(),Efield_fp[lev][1].get(),Efield_fp[lev][2].get()}; - // amrex::FillBoundary(mf, period); } else if (patch_type == PatchType::coarse) { @@ -389,18 +393,21 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type, IntVect ng) } const auto& cperiod = Geom(lev-1).periodicity(); + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + ng <= Efield_cp[lev][0]->nGrowVect(), + "Error: in FillBoundaryE, requested more guard cells than allocated"); Efield_cp[lev][0]->FillBoundary(0, Efield_cp[lev][0]->nComp(), ng, cperiod); Efield_cp[lev][1]->FillBoundary(0, Efield_cp[lev][1]->nComp(), ng, cperiod); Efield_cp[lev][2]->FillBoundary(0, Efield_cp[lev][2]->nComp(), ng, cperiod); - // Vector mf{Efield_cp[lev][0].get(),Efield_cp[lev][1].get(),Efield_cp[lev][2].get()}; - // amrex::FillBoundary(mf, cperiod); } } void -WarpX::FillBoundaryB (int lev, IntVect ng) +WarpX::FillBoundaryB (int lev, IntVect ng, IntVect ng_extra_fine) { - FillBoundaryB(lev, PatchType::fine, ng); + Print()<<"FillBoundaryB ng_extra_fine "<< ng_extra_fine <<'\n'; + Print()<<"FillBoundaryB exchanges "<< ng+ng_extra_fine <<'\n'; + FillBoundaryB(lev, PatchType::fine, ng + ng_extra_fine); if (lev > 0) FillBoundaryB(lev, PatchType::coarse, ng); } @@ -419,11 +426,12 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type, IntVect ng) pml[lev]->FillBoundaryB(patch_type); } const auto& period = Geom(lev).periodicity(); + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + ng <= Bfield_fp[lev][0]->nGrowVect(), + "Error: in FillBoundaryB, requested more guard cells than allocated"); Bfield_fp[lev][0]->FillBoundary(0, Bfield_fp[lev][0]->nComp(), ng, period); Bfield_fp[lev][1]->FillBoundary(0, Bfield_fp[lev][1]->nComp(), ng, period); Bfield_fp[lev][2]->FillBoundary(0, Bfield_fp[lev][2]->nComp(), ng, period); - // Vector mf{Bfield_fp[lev][0].get(),Bfield_fp[lev][1].get(),Bfield_fp[lev][2].get()}; - // amrex::FillBoundary(mf, period); } else if (patch_type == PatchType::coarse) { @@ -437,11 +445,12 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type, IntVect ng) pml[lev]->FillBoundaryB(patch_type); } const auto& cperiod = Geom(lev-1).periodicity(); + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + ng <= Bfield_cp[lev][0]->nGrowVect(), + "Error: in FillBoundaryB, requested more guard cells than allocated"); Bfield_cp[lev][0]->FillBoundary(0, Bfield_cp[lev][0]->nComp(), ng, cperiod); Bfield_cp[lev][1]->FillBoundary(0, Bfield_cp[lev][1]->nComp(), ng, cperiod); Bfield_cp[lev][2]->FillBoundary(0, Bfield_cp[lev][2]->nComp(), ng, cperiod); - // Vector mf{Bfield_cp[lev][0].get(),Bfield_cp[lev][1].get(),Bfield_cp[lev][2].get()}; - // amrex::FillBoundary(mf, cperiod); } } @@ -465,8 +474,10 @@ WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng) } const auto& period = Geom(lev).periodicity(); + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + ng <= F_fp[lev]->nGrowVect(), + "Error: in FillBoundaryF, requested more guard cells than allocated"); F_fp[lev]->FillBoundary(0, F_fp[lev]->nComp(), ng, period); - // F_fp[lev]->FillBoundary(period); } else if (patch_type == PatchType::coarse && F_cp[lev]) { @@ -478,8 +489,10 @@ WarpX::FillBoundaryF (int lev, PatchType patch_type, IntVect ng) } const auto& cperiod = Geom(lev-1).periodicity(); + AMREX_ALWAYS_ASSERT_WITH_MESSAGE( + ng <= F_cp[lev]->nGrowVect(), + "Error: in FillBoundaryF, requested more guard cells than allocated"); F_cp[lev]->FillBoundary(0, F_cp[lev]->nComp(), ng, cperiod); - // F_cp[lev]->FillBoundary(cperiod); } } diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index db58ad53c..8770d2059 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -1,3 +1,4 @@ +#include "GuardCellManager.H" #include #include @@ -28,6 +29,9 @@ WarpX::MoveWindow (bool move_j) { if (do_moving_window == 0) return 0; + IntVect ng_extra = guard_cells.ngExtra; + IntVect ng_zero = IntVect::TheZeroVector(); + // Update the continuous position of the moving window, // and of the plasma injection moving_window_x += moving_window_v * dt[0]; @@ -99,32 +103,32 @@ WarpX::MoveWindow (bool move_j) for (int dim = 0; dim < 3; ++dim) { // Fine grid - shiftMF(*Bfield_fp[lev][dim], geom[lev], num_shift, dir, B_external_grid[dim]); - shiftMF(*Efield_fp[lev][dim], geom[lev], num_shift, dir, E_external_grid[dim]); + shiftMF(*Bfield_fp[lev][dim], geom[lev], num_shift, dir, ng_extra, B_external_grid[dim]); + shiftMF(*Efield_fp[lev][dim], geom[lev], num_shift, dir, ng_extra, E_external_grid[dim]); if (move_j) { - shiftMF(*current_fp[lev][dim], geom[lev], num_shift, dir); + shiftMF(*current_fp[lev][dim], geom[lev], num_shift, dir, ng_zero); } if (do_pml && pml[lev]->ok()) { const std::array& pml_B = pml[lev]->GetB_fp(); const std::array& pml_E = pml[lev]->GetE_fp(); - shiftMF(*pml_B[dim], geom[lev], num_shift, dir); - shiftMF(*pml_E[dim], geom[lev], num_shift, dir); + shiftMF(*pml_B[dim], geom[lev], num_shift, dir, ng_extra); + shiftMF(*pml_E[dim], geom[lev], num_shift, dir, ng_extra); } if (lev > 0) { // Coarse grid - shiftMF(*Bfield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, B_external_grid[dim]); - shiftMF(*Efield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, E_external_grid[dim]); - shiftMF(*Bfield_aux[lev][dim], geom[lev], num_shift, dir); - shiftMF(*Efield_aux[lev][dim], geom[lev], num_shift, dir); + shiftMF(*Bfield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, ng_zero, B_external_grid[dim]); + shiftMF(*Efield_cp[lev][dim], geom[lev-1], num_shift_crse, dir, ng_zero, E_external_grid[dim]); + shiftMF(*Bfield_aux[lev][dim], geom[lev], num_shift, dir, ng_zero); + shiftMF(*Efield_aux[lev][dim], geom[lev], num_shift, dir, ng_zero); if (move_j) { - shiftMF(*current_cp[lev][dim], geom[lev-1], num_shift_crse, dir); + shiftMF(*current_cp[lev][dim], geom[lev-1], num_shift_crse, dir, ng_zero); } if (do_pml && pml[lev]->ok()) { const std::array& pml_B = pml[lev]->GetB_cp(); const std::array& pml_E = pml[lev]->GetE_cp(); - shiftMF(*pml_B[dim], geom[lev-1], num_shift_crse, dir); - shiftMF(*pml_E[dim], geom[lev-1], num_shift_crse, dir); + shiftMF(*pml_B[dim], geom[lev-1], num_shift_crse, dir, ng_extra); + shiftMF(*pml_E[dim], geom[lev-1], num_shift_crse, dir, ng_extra); } } } @@ -132,19 +136,19 @@ WarpX::MoveWindow (bool move_j) // Shift scalar component F for dive cleaning if (do_dive_cleaning) { // Fine grid - shiftMF(*F_fp[lev], geom[lev], num_shift, dir); + shiftMF(*F_fp[lev], geom[lev], num_shift, dir, ng_zero); if (do_pml && pml[lev]->ok()) { MultiFab* pml_F = pml[lev]->GetF_fp(); - shiftMF(*pml_F, geom[lev], num_shift, dir); + shiftMF(*pml_F, geom[lev], num_shift, dir, ng_extra); } if (lev > 0) { // Coarse grid - shiftMF(*F_cp[lev], geom[lev-1], num_shift_crse, dir); + shiftMF(*F_cp[lev], geom[lev-1], num_shift_crse, dir, ng_zero); if (do_pml && pml[lev]->ok()) { MultiFab* pml_F = pml[lev]->GetF_cp(); - shiftMF(*pml_F, geom[lev-1], num_shift_crse, dir); + shiftMF(*pml_F, geom[lev-1], num_shift_crse, dir, ng_zero); } - shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir); + shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir, ng_zero); } } @@ -152,10 +156,10 @@ WarpX::MoveWindow (bool move_j) if (move_j) { if (rho_fp[lev]){ // Fine grid - shiftMF(*rho_fp[lev], geom[lev], num_shift, dir); + shiftMF(*rho_fp[lev], geom[lev], num_shift, dir, ng_zero); if (lev > 0){ // Coarse grid - shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir); + shiftMF(*rho_cp[lev], geom[lev-1], num_shift_crse, dir, ng_zero); } } } @@ -204,7 +208,7 @@ WarpX::MoveWindow (bool move_j) void WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, - amrex::Real external_field) + IntVect ng_extra, amrex::Real external_field) { BL_PROFILE("WarpX::shiftMF()"); const BoxArray& ba = mf.boxArray(); @@ -220,12 +224,12 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, // Not sure why this is needed, but it is... IntVect ng_mw = IntVect::TheUnitVector(); ng_mw[dir] = num_shift; + ng_mw += ng_extra; + ng_mw = ng_mw.min(ng); Print()<<"ng_mw "< Date: Thu, 31 Oct 2019 17:37:06 -0700 Subject: remove a bunch of unused variables, and prepare for some renaming --- Source/Evolve/WarpXEvolveEM.cpp | 17 ++++----- Source/Parallelization/GuardCellManager.H | 15 +++++--- Source/Parallelization/GuardCellManager.cpp | 56 +++++++++++++---------------- 3 files changed, 41 insertions(+), 47 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 3247ca64f..4e44aea48 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -75,8 +75,7 @@ WarpX::EvolveEM (int numsteps) // Particles have p^{n} and x^{n}. // is_synchronized is true. if (is_synchronized) { - // FillBoundaryE(guard_cells.ng_FieldGather, guard_cells.ngExtra); - // FillBoundaryB(guard_cells.ng_FieldGather, guard_cells.ngExtra); + // Not called at each iteration, so exchange all guard cells FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); UpdateAuxilaryData(); @@ -91,15 +90,11 @@ WarpX::EvolveEM (int numsteps) } else { // Beyond one step, we have E^{n} and B^{n}. // Particles have p^{n-1/2} and x^{n}. - // This is probably overkill - // This is probably overkill - // IntVect ng_gather = guard_cells.ng_FieldGather+guard_cells.ng_NCIFilter; - // FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); - // FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); - // FillBoundaryE(ng_gather, guard_cells.ngExtra); - // FillBoundaryB(ng_gather, guard_cells.ngExtra); - FillBoundaryE(guard_cells.ng_FieldGatherAndNCIFilter, guard_cells.ngExtra); - FillBoundaryB(guard_cells.ng_FieldGatherAndNCIFilter, guard_cells.ngExtra); + + // E and B are up-to-date inside the domain only + FillBoundaryE(guard_cells.ng_FieldGather, guard_cells.ngExtra); + FillBoundaryB(guard_cells.ng_FieldGather, guard_cells.ngExtra); + // E and B are up-to-date inside the domain only FillBoundaryAux(guard_cells.ng_Aux); UpdateAuxilaryData(); } diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 93f1e9fd1..19b5ac14a 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -22,21 +22,26 @@ public: const int max_level); // Guard cells to initialize multifabs - amrex::IntVect ngExtra = amrex::IntVect::TheZeroVector(); amrex::IntVect ngE = amrex::IntVect::TheZeroVector(); amrex::IntVect ngJ = amrex::IntVect::TheZeroVector(); amrex::IntVect ngRho = amrex::IntVect::TheZeroVector(); + amrex::IntVect ngExtra = amrex::IntVect::TheZeroVector(); amrex::IntVect ngF = amrex::IntVect::TheZeroVector(); int ngF_int = 0; + + //amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); + //amrex::IntVect ng_alloc_J = amrex::IntVect::TheZeroVector(); + //amrex::IntVect ng_alloc_Rho = amrex::IntVect::TheZeroVector(); + //amrex::IntVect ng_alloc_F = amrex::IntVect::TheZeroVector(); + //int ng_alloc_F_int = 0; // Guard cells to exchange data amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); - amrex::IntVect ng_FieldGatherAndNCIFilter = amrex::IntVect::TheZeroVector(); - amrex::IntVect ngJ_CurrentDepo = amrex::IntVect::TheZeroVector(); - amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); - amrex::IntVect ng_NCIFilter = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_Aux = amrex::IntVect::TheZeroVector(); + + // Extra guard cells for fine level of E and B + amrex::IntVect ng_Extra = amrex::IntVect::TheZeroVector(); }; #endif // GUARDCELLMANAGER_H_ diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 9f3e5b18d..3777c7fcc 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -1,4 +1,5 @@ #include "GuardCellManager.H" +#include "NCIGodfreyFilter.H" #include using namespace amrex; @@ -60,20 +61,6 @@ guardCellManager::Init( ngJz = std::max(ngJz,2); } -/* -#if (AMREX_SPACEDIM == 3) - IntVect ngE(ngx,ngy,ngz); - IntVect ngJ(ngJx,ngJy,ngJz); -#elif (AMREX_SPACEDIM == 2) - IntVect ngE(ngx,ngz); - IntVect ngJ(ngJx,ngJz); -#endif - - IntVect ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density - // after pushing particle. - int ngF = (do_moving_window) ? 2 : 0; -*/ - #if (AMREX_SPACEDIM == 3) ngE = IntVect(ngx,ngy,ngz); ngJ = IntVect(ngJx,ngJy,ngJz); @@ -110,7 +97,7 @@ guardCellManager::Init( ng_required = std::max( ng_required, ngE[i_dim] ); ng_required = std::max( ng_required, ngJ[i_dim] ); ng_required = std::max( ng_required, ngRho[i_dim] ); -v ng_required = std::max( ng_required, ngF[i_dim] ); + ng_required = std::max( ng_required, ngF[i_dim] ); // Set the guard cells to this max ngE[i_dim] = ng_required; ngJ[i_dim] = ng_required; @@ -124,23 +111,30 @@ v ng_required = std::max( ng_required, ngF[i_dim] ); ngExtra = IntVect(static_cast(aux_is_nodal and !do_nodal)); - // Guard cells for field solver + // Compute number of cells required for Field Solver ng_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); - ng_MovingWindow = IntVect(AMREX_D_DECL(0,0,0)); // Multiplied by number of cells moved at each timestep - ng_MovingWindow[moving_window_dir] = 1; - int FGcell[4] = {0,1,1,2}; // Index is nox - ng_FieldGather = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])) + 2*ngExtra; + // Compute number of cells required for Field Gather + int FGcell[4] = {0,1,1,2}; // Index is nox + IntVect ng_FieldGather_noNCI = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); + // Add one cell if momentum_conserving gather in a staggered-field simulation + ng_FieldGather_noNCI += ngExtra; + // Not sure why, but need one extra guard cell when using MR + if (max_level >= 1) ng_FieldGather_noNCI += ngExtra; + ng_FieldGather_noNCI = ng_FieldGather_noNCI.min(ngE); + // If NCI filter, add guard cells in the z direction + IntVect ng_NCIFilter = IntVect::TheZeroVector(); + if (do_fdtd_nci_corr) + ng_NCIFilter[AMREX_SPACEDIM-1] = NCIGodfreyFilter::m_stencil_width; + // Note: communications of guard cells for bilinear filter are handled + // separately. + ng_FieldGather = ng_FieldGather_noNCI + ng_NCIFilter; + + // Guard cells for auxiliary grid + ng_Aux = 2*ng_FieldGather_noNCI + ng_NCIFilter; + + // Make sure we do not exchange more guard cells than allocated. ng_FieldGather = ng_FieldGather.min(ngE); - if (do_fdtd_nci_corr){ - ng_NCIFilter = IntVect::TheZeroVector(); - ng_NCIFilter[AMREX_SPACEDIM-1] = 4; - } - - ng_FieldGatherAndNCIFilter = ng_FieldGather + ng_NCIFilter; - ng_FieldGatherAndNCIFilter = ng_FieldGatherAndNCIFilter.min(ngE); - - ng_Aux = 2*ng_FieldGather+ng_NCIFilter; ng_Aux = ng_Aux.min(ngE); Print()<<"rrr ngE : "< Date: Thu, 31 Oct 2019 18:00:23 -0700 Subject: more systematic names for guard cell variables --- Source/Evolve/WarpXEvolveEM.cpp | 79 +++++++++++++++-------------- Source/Parallelization/GuardCellManager.H | 20 +++----- Source/Parallelization/GuardCellManager.cpp | 61 +++++++++------------- Source/Utils/WarpXMovingWindow.cpp | 2 +- Source/WarpX.H | 4 +- Source/WarpX.cpp | 24 ++++----- 6 files changed, 84 insertions(+), 106 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 4e44aea48..2d28641d2 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -76,8 +76,8 @@ WarpX::EvolveEM (int numsteps) // is_synchronized is true. if (is_synchronized) { // Not called at each iteration, so exchange all guard cells - FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); - FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); UpdateAuxilaryData(); // on first step, push p by -0.5*dt for (int lev = 0; lev <= finest_level; ++lev) { @@ -92,10 +92,11 @@ WarpX::EvolveEM (int numsteps) // Particles have p^{n-1/2} and x^{n}. // E and B are up-to-date inside the domain only - FillBoundaryE(guard_cells.ng_FieldGather, guard_cells.ngExtra); - FillBoundaryB(guard_cells.ng_FieldGather, guard_cells.ngExtra); - // E and B are up-to-date inside the domain only - FillBoundaryAux(guard_cells.ng_Aux); + FillBoundaryE(guard_cells.ng_FieldGather, guard_cells.ng_Extra); + FillBoundaryB(guard_cells.ng_FieldGather, guard_cells.ng_Extra); + // E and B: enough guard cells to update Aux or call Field Gather in fp and cp + // Need to update Aux on lower levels, to interpolate to higher levels. + FillBoundaryAux(guard_cells.ng_UpdateAux); UpdateAuxilaryData(); } @@ -194,10 +195,10 @@ WarpX::EvolveEM (int numsteps) if (to_make_plot || do_insitu || to_make_slice_plot) { // This is probably overkill - FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); // This is probably overkill - FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); - FillBoundaryAux(guard_cells.ng_Aux); + FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryAux(guard_cells.ng_UpdateAux); UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { @@ -249,10 +250,10 @@ WarpX::EvolveEM (int numsteps) if (write_plot_file || do_insitu) { // This is probably overkill - FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); // This is probably overkill - FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); - FillBoundaryAux(guard_cells.ng_Aux); + FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryAux(guard_cells.ng_UpdateAux); UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { @@ -322,8 +323,8 @@ WarpX::OneStep_nosub (Real cur_time) #ifdef WARPX_USE_PSATD PushPSATD(dt[0]); if (do_pml) DampPML(); - FillBoundaryE(guard_cells.ngE, guard_cells.ngExtra); - FillBoundaryB(guard_cells.ngE, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); #else Print()<<"Push fields\n"; EvolveF(0.5*dt[0], DtType::FirstHalf); @@ -335,7 +336,7 @@ WarpX::OneStep_nosub (Real cur_time) // FillBoundaryE(guard_cells.ng_FieldSolver, guard_cells.ngExtra); FillBoundaryE(guard_cells.ng_FieldSolver, IntVect::TheZeroVector()); EvolveF(0.5*dt[0], DtType::SecondHalf); - FillBoundaryF(guard_cells.ngF); + FillBoundaryF(guard_cells.ng_alloc_F); EvolveB(0.5*dt[0]); // We now have B^{n+1} if (do_pml) { DampPML(); @@ -382,21 +383,21 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::FirstHalf); - FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); - FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ngF); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_alloc_F); EvolveE(fine_lev, PatchType::fine, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::SecondHalf); if (do_pml) { DampPML(fine_lev, PatchType::fine); - FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); } - FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); // ii) Push particles on the coarse patch and mother grid. // Push the fields on the coarse patch and mother grid @@ -408,19 +409,19 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::coarse, dt[fine_lev]); EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::FirstHalf); - FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ngE); - FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ngF); + FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); + FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ng_alloc_F); EvolveE(fine_lev, PatchType::coarse, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ngE); + FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); EvolveB(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); EvolveF(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev], DtType::FirstHalf); - FillBoundaryB(coarse_lev, PatchType::fine, guard_cells.ngE); - FillBoundaryF(coarse_lev, PatchType::fine, guard_cells.ngF); + FillBoundaryB(coarse_lev, PatchType::fine, guard_cells.ng_alloc_EB); + FillBoundaryF(coarse_lev, PatchType::fine, guard_cells.ng_alloc_F); EvolveE(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); - FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ng_alloc_EB); // iii) Get auxiliary fields on the fine grid, at dt[fine_lev] UpdateAuxilaryData(); @@ -436,22 +437,22 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::FirstHalf); - FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); - FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ngF); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_alloc_F); EvolveE(fine_lev, PatchType::fine, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::SecondHalf); if (do_pml) { DampPML(fine_lev, PatchType::fine); - FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); } - FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ngE); - FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ngF); + FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ng_alloc_EB); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_alloc_F); // v) Push the fields on the coarse patch and mother grid // by only half a coarse step (second half) @@ -460,7 +461,7 @@ WarpX::OneStep_sub1 (Real curtime) AddRhoFromFineLevelandSumBoundary(coarse_lev, ncomps, ncomps); EvolveE(fine_lev, PatchType::coarse, dt[fine_lev]); - FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ngE); + FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); EvolveB(fine_lev, PatchType::coarse, dt[fine_lev]); EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::SecondHalf); @@ -468,24 +469,24 @@ WarpX::OneStep_sub1 (Real curtime) if (do_pml) { DampPML(fine_lev, PatchType::coarse); // do it twice DampPML(fine_lev, PatchType::coarse); - FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ngE); + FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); } - FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ngE); - FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ngF); + FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); + FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ng_alloc_F); EvolveE(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); - FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ng_alloc_EB); EvolveB(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); EvolveF(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev], DtType::SecondHalf); if (do_pml) { DampPML(coarse_lev, PatchType::fine); - FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ng_alloc_EB); } - FillBoundaryB(coarse_lev, PatchType::fine, guard_cells.ngE); + FillBoundaryB(coarse_lev, PatchType::fine, guard_cells.ng_alloc_EB); } void diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 19b5ac14a..7e6a0d9f5 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -21,24 +21,16 @@ public: const int maxwell_fdtd_solver_id, const int max_level); - // Guard cells to initialize multifabs - amrex::IntVect ngE = amrex::IntVect::TheZeroVector(); - amrex::IntVect ngJ = amrex::IntVect::TheZeroVector(); - amrex::IntVect ngRho = amrex::IntVect::TheZeroVector(); - amrex::IntVect ngExtra = amrex::IntVect::TheZeroVector(); - amrex::IntVect ngF = amrex::IntVect::TheZeroVector(); - int ngF_int = 0; - - //amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); - //amrex::IntVect ng_alloc_J = amrex::IntVect::TheZeroVector(); - //amrex::IntVect ng_alloc_Rho = amrex::IntVect::TheZeroVector(); - //amrex::IntVect ng_alloc_F = amrex::IntVect::TheZeroVector(); - //int ng_alloc_F_int = 0; + amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_alloc_J = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_alloc_Rho = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_alloc_F = amrex::IntVect::TheZeroVector(); + int ng_alloc_F_int = 0; // Guard cells to exchange data amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); - amrex::IntVect ng_Aux = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_UpdateAux = amrex::IntVect::TheZeroVector(); // Extra guard cells for fine level of E and B amrex::IntVect ng_Extra = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 3777c7fcc..d970cd464 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -62,19 +62,19 @@ guardCellManager::Init( } #if (AMREX_SPACEDIM == 3) - ngE = IntVect(ngx,ngy,ngz); - ngJ = IntVect(ngJx,ngJy,ngJz); + ng_alloc_EB = IntVect(ngx,ngy,ngz); + ng_alloc_J = IntVect(ngJx,ngJy,ngJz); #elif (AMREX_SPACEDIM == 2) - ngE = IntVect(ngx,ngz); - ngJ = IntVect(ngJx,ngJz); + ng_alloc_EB = IntVect(ngx,ngz); + ng_alloc_J = IntVect(ngJx,ngJz); #endif - ngRho = ngJ+1; //One extra ghost cell, so that it's safe to deposit charge density + ng_alloc_Rho = ng_alloc_J+1; //One extra ghost cell, so that it's safe to deposit charge density // after pushing particle. - ngF_int = (do_moving_window) ? 2 : 0; + ng_alloc_F_int = (do_moving_window) ? 2 : 0; // CKC solver requires one additional guard cell - if (maxwell_fdtd_solver_id == 1) ngF_int = std::max( ngF_int, 1 ); - ngF = IntVect(AMREX_D_DECL(ngF_int, ngF_int, ngF_int)); + if (maxwell_fdtd_solver_id == 1) ng_alloc_F_int = std::max( ng_alloc_F_int, 1 ); + ng_alloc_F = IntVect(AMREX_D_DECL(ng_alloc_F_int, ng_alloc_F_int, ng_alloc_F_int)); #ifdef WARPX_USE_PSATD if (do_fft_mpi_dec == false){ @@ -94,22 +94,22 @@ guardCellManager::Init( for (int i_dim=0; i_dim(aux_is_nodal and !do_nodal)); + ng_Extra = IntVect(static_cast(aux_is_nodal and !do_nodal)); // Compute number of cells required for Field Solver ng_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); @@ -118,10 +118,10 @@ guardCellManager::Init( int FGcell[4] = {0,1,1,2}; // Index is nox IntVect ng_FieldGather_noNCI = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); // Add one cell if momentum_conserving gather in a staggered-field simulation - ng_FieldGather_noNCI += ngExtra; + ng_FieldGather_noNCI += ng_Extra; // Not sure why, but need one extra guard cell when using MR - if (max_level >= 1) ng_FieldGather_noNCI += ngExtra; - ng_FieldGather_noNCI = ng_FieldGather_noNCI.min(ngE); + if (max_level >= 1) ng_FieldGather_noNCI += ng_Extra; + ng_FieldGather_noNCI = ng_FieldGather_noNCI.min(ng_alloc_EB); // If NCI filter, add guard cells in the z direction IntVect ng_NCIFilter = IntVect::TheZeroVector(); if (do_fdtd_nci_corr) @@ -131,20 +131,9 @@ guardCellManager::Init( ng_FieldGather = ng_FieldGather_noNCI + ng_NCIFilter; // Guard cells for auxiliary grid - ng_Aux = 2*ng_FieldGather_noNCI + ng_NCIFilter; + ng_UpdateAux = 2*ng_FieldGather_noNCI + ng_NCIFilter; // Make sure we do not exchange more guard cells than allocated. - ng_FieldGather = ng_FieldGather.min(ngE); - ng_Aux = ng_Aux.min(ngE); - - Print()<<"rrr ngE : "<& B, const std::array& dx, int ngrow); - const amrex::IntVect getngE() const { return guard_cells.ngE; }; - const amrex::IntVect getngF() const { return guard_cells.ngF; }; + const amrex::IntVect getngE() const { return guard_cells.ng_alloc_EB; }; + const amrex::IntVect getngF() const { return guard_cells.ng_alloc_F; }; protected: diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 1915434b6..489692b35 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -717,18 +717,6 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d maxwell_fdtd_solver_id, maxLevel()); - IntVect ngE = guard_cells.ngE; - IntVect ngJ = guard_cells.ngJ; - IntVect ngRho = guard_cells.ngRho; - int ngF_int = guard_cells.ngF_int; - IntVect ngextra = guard_cells.ngExtra; - - Print()<<"ngE "<nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) { n_current_deposition_buffer = 1; // This forces the allocation of buffers and allows the code associated @@ -738,14 +726,22 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d } if (n_current_deposition_buffer < 0) { - n_current_deposition_buffer = ngJ.max(); + n_current_deposition_buffer = guard_cells.ng_alloc_J.max(); } if (n_field_gather_buffer < 0) { // Field gather buffer should be larger than current deposition buffers n_field_gather_buffer = n_current_deposition_buffer + 1; } - AllocLevelMFs(lev, ba, dm, ngE, ngJ, ngRho, ngF_int, ngextra, aux_is_nodal); + //IntVect ngE = guard_cells.ng_alloc_EB; + //IntVect ngJ = guard_cells.ng_alloc_J; + //IntVect ngRho = guard_cells.ng_alloc_Rho; + //int ngF_int = guard_cells.ng_alloc_F_int; + //IntVect ngextra = guard_cells.ngExtra; + + AllocLevelMFs(lev, ba, dm, guard_cells.ng_alloc_EB, guard_cells.ng_alloc_J, + guard_cells.ng_alloc_Rho, guard_cells.ng_alloc_F_int, + guard_cells.ng_Extra, aux_is_nodal); } void -- cgit v1.2.3 From 82c791de01622ff1556203902c0782e396719629 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Thu, 31 Oct 2019 18:25:55 -0700 Subject: cleaning and use better naming --- Source/Evolve/WarpXEvolveEM.cpp | 21 ++++++++++++++------- Source/Parallelization/GuardCellManager.cpp | 10 +++++++++- Source/Utils/WarpXMovingWindow.cpp | 6 ++++-- 3 files changed, 27 insertions(+), 10 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 2d28641d2..550f7a708 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -194,10 +194,11 @@ WarpX::EvolveEM (int numsteps) // slice gen // if (to_make_plot || do_insitu || to_make_slice_plot) { - // This is probably overkill + // This is probably overkill, but it's not called often FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); - // This is probably overkill + // This is probably overkill, but it's not called often FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + // This is probably overkill, but it's not called often FillBoundaryAux(guard_cells.ng_UpdateAux); UpdateAuxilaryData(); @@ -249,10 +250,11 @@ WarpX::EvolveEM (int numsteps) if (write_plot_file || do_insitu) { - // This is probably overkill + // This is probably overkill, but it's not called often FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); - // This is probably overkill + // This is probably overkill, but it's not called often FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + // This is probably overkill FillBoundaryAux(guard_cells.ng_UpdateAux); UpdateAuxilaryData(); @@ -314,6 +316,10 @@ WarpX::OneStep_nosub (Real cur_time) SyncRho(); + // At this point, J is up-to-date inside the domain, and E and B are + // up-to-date including enough guard cells for first step of the field + // solve. + // For extended PML: copy J from regular grid to PML, and damp J in PML if (do_pml && pml_has_particles) CopyJPML(); if (do_pml && do_pml_j_damping) DampJPML(); @@ -326,14 +332,13 @@ WarpX::OneStep_nosub (Real cur_time) FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); #else - Print()<<"Push fields\n"; EvolveF(0.5*dt[0], DtType::FirstHalf); FillBoundaryF(guard_cells.ng_FieldSolver); EvolveB(0.5*dt[0]); // We now have B^{n+1/2} - // FillBoundaryB(guard_cells.ng_FieldSolver, guard_cells.ngExtra); + FillBoundaryB(guard_cells.ng_FieldSolver, IntVect::TheZeroVector()); EvolveE(dt[0]); // We now have E^{n+1} - // FillBoundaryE(guard_cells.ng_FieldSolver, guard_cells.ngExtra); + FillBoundaryE(guard_cells.ng_FieldSolver, IntVect::TheZeroVector()); EvolveF(0.5*dt[0], DtType::SecondHalf); FillBoundaryF(guard_cells.ng_alloc_F); @@ -341,6 +346,8 @@ WarpX::OneStep_nosub (Real cur_time) if (do_pml) { DampPML(); } + // E and B are up-to-date in the domain, but all guard cells are + // outdated. #endif } diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index d970cd464..415a13c00 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -107,12 +107,16 @@ guardCellManager::Init( } } ng_alloc_F = IntVect(AMREX_D_DECL(ng_alloc_F_int, ng_alloc_F_int, ng_alloc_F_int)); -#endif +#endif ng_Extra = IntVect(static_cast(aux_is_nodal and !do_nodal)); // Compute number of cells required for Field Solver +#ifdef WARPX_USE_PSATD + ng_FieldSolver = ng_alloc_EB; +#else ng_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); +#endif // Compute number of cells required for Field Gather int FGcell[4] = {0,1,1,2}; // Index is nox @@ -136,4 +140,8 @@ guardCellManager::Init( // Make sure we do not exchange more guard cells than allocated. ng_FieldGather = ng_FieldGather.min(ng_alloc_EB); ng_UpdateAux = ng_UpdateAux.min(ng_alloc_EB); + // Only FillBoundary(ng_FieldGather) is called between consecutive + // field solves. So ng_FieldGather must have enough cells + // for the field solve too. + ng_FieldGather = ng_FieldGather.max(ng_FieldSolver); } diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index d59d0d8b0..e3819966d 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -223,11 +223,13 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, // Not sure why this is needed, but it is... IntVect ng_mw = IntVect::TheUnitVector(); + // Enough guard cells in the MW direction ng_mw[dir] = num_shift; + // Add the extra cell (if momentum-conserving gather with staggered field solve) ng_mw += ng_extra; + // Make sure we don't exceed number of guard cells allocated ng_mw = ng_mw.min(ng); - Print()<<"ng_mw "< Date: Thu, 31 Oct 2019 18:57:09 -0700 Subject: do not update aux grids if PSATD --- Source/Evolve/WarpXEvolveEM.cpp | 6 ++++++ Source/Parallelization/GuardCellManager.cpp | 11 +++++++++++ 2 files changed, 17 insertions(+) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 550f7a708..6f935d84a 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -96,7 +96,9 @@ WarpX::EvolveEM (int numsteps) FillBoundaryB(guard_cells.ng_FieldGather, guard_cells.ng_Extra); // E and B: enough guard cells to update Aux or call Field Gather in fp and cp // Need to update Aux on lower levels, to interpolate to higher levels. +#ifndef WARPX_USE_PSATD FillBoundaryAux(guard_cells.ng_UpdateAux); +#endif UpdateAuxilaryData(); } @@ -199,7 +201,9 @@ WarpX::EvolveEM (int numsteps) // This is probably overkill, but it's not called often FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); // This is probably overkill, but it's not called often +#ifndef WARPX_USE_PSATD FillBoundaryAux(guard_cells.ng_UpdateAux); +#endif UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { @@ -255,7 +259,9 @@ WarpX::EvolveEM (int numsteps) // This is probably overkill, but it's not called often FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); // This is probably overkill +#ifndef WARPX_USE_PSATD FillBoundaryAux(guard_cells.ng_UpdateAux); +#endif UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 415a13c00..60a4a3d4f 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -144,4 +144,15 @@ guardCellManager::Init( // field solves. So ng_FieldGather must have enough cells // for the field solve too. ng_FieldGather = ng_FieldGather.max(ng_FieldSolver); + + Print()<<"ng_alloc_EB "< Date: Wed, 6 Nov 2019 16:08:55 -0800 Subject: exchange 1 extra guard cell when moving window and PMLs --- Source/Evolve/WarpXEvolveEM.cpp | 2 ++ Source/Parallelization/GuardCellManager.H | 1 + Source/Parallelization/GuardCellManager.cpp | 4 ++++ 3 files changed, 7 insertions(+) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index e08344624..f6463fbe6 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -352,6 +352,8 @@ WarpX::OneStep_nosub (Real cur_time) EvolveB(0.5*dt[0]); // We now have B^{n+1} if (do_pml) { DampPML(); +FillBoundaryE(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); +FillBoundaryB(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); } // E and B are up-to-date in the domain, but all guard cells are // outdated. diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 7e6a0d9f5..53d5ccc08 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -31,6 +31,7 @@ public: amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_UpdateAux = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); // Extra guard cells for fine level of E and B amrex::IntVect ng_Extra = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 60a4a3d4f..6deb45f0e 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -145,6 +145,9 @@ guardCellManager::Init( // for the field solve too. ng_FieldGather = ng_FieldGather.max(ng_FieldSolver); + ng_MovingWindow = IntVect::TheZeroVector(); + ng_MovingWindow[moving_window_dir] = 1; + Print()<<"ng_alloc_EB "< Date: Sun, 10 Nov 2019 14:14:42 -0800 Subject: pfew fix bug (that could lead to SEGFAULT), and indentation --- Source/Evolve/WarpXEvolveEM.cpp | 4 ++-- Source/Parallelization/GuardCellManager.cpp | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index f6463fbe6..147ea3b4c 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -352,8 +352,8 @@ WarpX::OneStep_nosub (Real cur_time) EvolveB(0.5*dt[0]); // We now have B^{n+1} if (do_pml) { DampPML(); -FillBoundaryE(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); -FillBoundaryB(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); + FillBoundaryE(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); + FillBoundaryB(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); } // E and B are up-to-date in the domain, but all guard cells are // outdated. diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 6deb45f0e..9d4a06f73 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -145,8 +145,9 @@ guardCellManager::Init( // for the field solve too. ng_FieldGather = ng_FieldGather.max(ng_FieldSolver); - ng_MovingWindow = IntVect::TheZeroVector(); - ng_MovingWindow[moving_window_dir] = 1; + if (do_moving_window){ + ng_MovingWindow[moving_window_dir] = 1; + } Print()<<"ng_alloc_EB "< Date: Mon, 11 Nov 2019 18:32:23 -0800 Subject: move FillBoundaryF call to where needed, and allow for extra guard cells --- Source/Evolve/WarpXEvolveEM.cpp | 2 +- Source/Parallelization/GuardCellManager.H | 4 +++- Source/Parallelization/GuardCellManager.cpp | 15 ++++++++++++++- Source/WarpX.H | 3 +++ Source/WarpX.cpp | 14 +++++++++++++- 5 files changed, 34 insertions(+), 4 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index db3c88aa7..7131e4305 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -471,7 +471,6 @@ WarpX::OneStep_sub1 (Real curtime) } FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); - FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); // v) Push the fields on the coarse patch and mother grid // by only half a coarse step (second half) @@ -486,6 +485,7 @@ WarpX::OneStep_sub1 (Real curtime) EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::SecondHalf); if (do_pml) { + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); DampPML(fine_lev, PatchType::coarse); // do it twice DampPML(fine_lev, PatchType::coarse); FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 53d5ccc08..19378302e 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -19,7 +19,9 @@ public: const int nox_fft, const int noy_fft, const int noz_fft, const int nci_corr_stencil, const int maxwell_fdtd_solver_id, - const int max_level); + const int max_level, + const int extra_guard_cells_alloc, + const int extra_guard_cells_exchange); amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_alloc_J = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 9d4a06f73..6a60177c0 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -17,7 +17,9 @@ guardCellManager::Init( const int nox_fft, const int noy_fft, const int noz_fft, const int nci_corr_stencil, const int maxwell_fdtd_solver_id, - const int max_level) + const int max_level, + const int extra_guard_cells_alloc, + const int extra_guard_cells_exchange) { // When using subcycling, the particles on the fine level perform two pushes // before being redistributed ; therefore, we need one extra guard cell @@ -149,6 +151,17 @@ guardCellManager::Init( ng_MovingWindow[moving_window_dir] = 1; } + ng_alloc_EB += extra_guard_cells_alloc; + ng_alloc_J += extra_guard_cells_alloc; + ng_alloc_Rho += extra_guard_cells_alloc; + ng_alloc_F += extra_guard_cells_alloc; + ng_alloc_F_int += extra_guard_cells_alloc; + + ng_FieldSolver += extra_guard_cells_exchange; + ng_FieldGather += extra_guard_cells_exchange; + ng_UpdateAux += extra_guard_cells_exchange; + ng_MovingWindow += extra_guard_cells_exchange; + Print()<<"ng_alloc_EB "<nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) { n_current_deposition_buffer = 1; -- cgit v1.2.3 From 35c888f9901e9da412261556b768f7d37752d965 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 12 Nov 2019 08:21:09 -0800 Subject: Revert "move FillBoundaryF call to where needed, and allow for extra guard cells" This reverts commit 89069ca7ba61dc34f9b392c75d0d4e2f3c2e0938. --- Source/Evolve/WarpXEvolveEM.cpp | 2 +- Source/Parallelization/GuardCellManager.H | 4 +--- Source/Parallelization/GuardCellManager.cpp | 15 +-------------- Source/WarpX.H | 3 --- Source/WarpX.cpp | 14 +------------- 5 files changed, 4 insertions(+), 34 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 7131e4305..db3c88aa7 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -471,6 +471,7 @@ WarpX::OneStep_sub1 (Real curtime) } FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); // v) Push the fields on the coarse patch and mother grid // by only half a coarse step (second half) @@ -485,7 +486,6 @@ WarpX::OneStep_sub1 (Real curtime) EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::SecondHalf); if (do_pml) { - FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); DampPML(fine_lev, PatchType::coarse); // do it twice DampPML(fine_lev, PatchType::coarse); FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 19378302e..53d5ccc08 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -19,9 +19,7 @@ public: const int nox_fft, const int noy_fft, const int noz_fft, const int nci_corr_stencil, const int maxwell_fdtd_solver_id, - const int max_level, - const int extra_guard_cells_alloc, - const int extra_guard_cells_exchange); + const int max_level); amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_alloc_J = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 6a60177c0..9d4a06f73 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -17,9 +17,7 @@ guardCellManager::Init( const int nox_fft, const int noy_fft, const int noz_fft, const int nci_corr_stencil, const int maxwell_fdtd_solver_id, - const int max_level, - const int extra_guard_cells_alloc, - const int extra_guard_cells_exchange) + const int max_level) { // When using subcycling, the particles on the fine level perform two pushes // before being redistributed ; therefore, we need one extra guard cell @@ -151,17 +149,6 @@ guardCellManager::Init( ng_MovingWindow[moving_window_dir] = 1; } - ng_alloc_EB += extra_guard_cells_alloc; - ng_alloc_J += extra_guard_cells_alloc; - ng_alloc_Rho += extra_guard_cells_alloc; - ng_alloc_F += extra_guard_cells_alloc; - ng_alloc_F_int += extra_guard_cells_alloc; - - ng_FieldSolver += extra_guard_cells_exchange; - ng_FieldGather += extra_guard_cells_exchange; - ng_UpdateAux += extra_guard_cells_exchange; - ng_MovingWindow += extra_guard_cells_exchange; - Print()<<"ng_alloc_EB "<nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) { n_current_deposition_buffer = 1; -- cgit v1.2.3 From 8cc9c8a153b6526dad68ee2bcdcacf912969e747 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 12 Nov 2019 10:54:38 -0800 Subject: fix psatd: problem was in buffer cells --- Source/Evolve/WarpXEvolveEM.cpp | 4 +--- Source/Parallelization/GuardCellManager.H | 2 +- Source/Parallelization/GuardCellManager.cpp | 16 ++++------------ Source/Parallelization/WarpXComm.cpp | 1 - Source/WarpX.cpp | 4 ++-- 5 files changed, 8 insertions(+), 19 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 7131e4305..19031e006 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -339,8 +339,7 @@ WarpX::OneStep_nosub (Real cur_time) FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); #else EvolveF(0.5*dt[0], DtType::FirstHalf); - // FillBoundaryF(guard_cells.ng_FieldSolver); - FillBoundaryF(guard_cells.ng_alloc_F); + FillBoundaryF(guard_cells.ng_FieldSolver); EvolveB(0.5*dt[0]); // We now have B^{n+1/2} FillBoundaryB(guard_cells.ng_FieldSolver, IntVect::TheZeroVector()); @@ -441,7 +440,6 @@ WarpX::OneStep_sub1 (Real curtime) FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ng_FieldGather + guard_cells.ng_Extra); FillBoundaryAux(guard_cells.ng_UpdateAux); - // iii) Get auxiliary fields on the fine grid, at dt[fine_lev] UpdateAuxilaryData(); diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 53d5ccc08..c6fdecaee 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -7,7 +7,7 @@ class guardCellManager{ public: - void Init( + int Init( const bool do_subcycling, const bool do_fdtd_nci_corr, const bool do_nodal, diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 9d4a06f73..cfe6e8470 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -4,7 +4,7 @@ using namespace amrex; -void +int guardCellManager::Init( const bool do_subcycling, const bool do_fdtd_nci_corr, @@ -69,6 +69,8 @@ guardCellManager::Init( ng_alloc_J = IntVect(ngJx,ngJz); #endif + int nJ_buffer = ng_alloc_J.max(); // guard cells for J required for deposition only. + ng_alloc_Rho = ng_alloc_J+1; //One extra ghost cell, so that it's safe to deposit charge density // after pushing particle. ng_alloc_F_int = (do_moving_window) ? 2 : 0; @@ -149,15 +151,5 @@ guardCellManager::Init( ng_MovingWindow[moving_window_dir] = 1; } - Print()<<"ng_alloc_EB "< #include #include -#include "WarpXAlgorithmSelection.H" #include #include diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 10a6b731e..173a3a00f 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -703,7 +703,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d bool aux_is_nodal = (field_gathering_algo == GatheringAlgo::MomentumConserving); - guard_cells.Init( + int nJ_buffer = guard_cells.Init( do_subcycling, WarpX::use_fdtd_nci_corr, do_nodal, @@ -726,7 +726,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d } if (n_current_deposition_buffer < 0) { - n_current_deposition_buffer = guard_cells.ng_alloc_J.max(); + n_current_deposition_buffer = nJ_buffer; } if (n_field_gather_buffer < 0) { // Field gather buffer should be larger than current deposition buffers -- cgit v1.2.3 From bd0735f62d784b906ce34cbda81ddf083dbde33c Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 12 Nov 2019 15:34:29 -0800 Subject: cleaning, and additional checks --- Source/Evolve/WarpXEvolveEM.cpp | 1 + Source/Parallelization/GuardCellManager.H | 3 ++- Source/Parallelization/GuardCellManager.cpp | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 19031e006..38b959808 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -117,6 +117,7 @@ WarpX::EvolveEM (int numsteps) if (num_mirrors>0){ applyMirrors(cur_time); // E : guard cells are NOT up-to-date + // B : guard cells are NOT up-to-date } #ifdef WARPX_USE_PY diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index c6fdecaee..9f2bafa19 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -21,13 +21,14 @@ public: const int maxwell_fdtd_solver_id, const int max_level); + // Guard cells allocated for each multifab amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_alloc_J = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_alloc_Rho = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_alloc_F = amrex::IntVect::TheZeroVector(); int ng_alloc_F_int = 0; - // Guard cells to exchange data + // Guard cells exchanged for specific in the PIC loop amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_UpdateAux = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index cfe6e8470..28670fb91 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -119,6 +119,7 @@ guardCellManager::Init( #else ng_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); #endif + ng_FieldSolver = ng_FieldSolver.min(ng_alloc_EB); // Compute number of cells required for Field Gather int FGcell[4] = {0,1,1,2}; // Index is nox @@ -136,7 +137,8 @@ guardCellManager::Init( // separately. ng_FieldGather = ng_FieldGather_noNCI + ng_NCIFilter; - // Guard cells for auxiliary grid + // Guard cells for auxiliary grid. + // Not sure why there is a 2* here... ng_UpdateAux = 2*ng_FieldGather_noNCI + ng_NCIFilter; // Make sure we do not exchange more guard cells than allocated. -- cgit v1.2.3 From 751b6e3867a2f41db88430476891fecb2e35b053 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 12 Nov 2019 16:36:39 -0800 Subject: no guard cell exchanges for F with Yee solver. Remove print statements --- Source/Evolve/WarpXEvolveEM.cpp | 12 ++++++------ Source/Parallelization/GuardCellManager.H | 1 + Source/Parallelization/GuardCellManager.cpp | 3 +++ Source/Parallelization/WarpXComm.cpp | 4 ---- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 38b959808..af4eb9467 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -340,7 +340,7 @@ WarpX::OneStep_nosub (Real cur_time) FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); #else EvolveF(0.5*dt[0], DtType::FirstHalf); - FillBoundaryF(guard_cells.ng_FieldSolver); + FillBoundaryF(guard_cells.ng_FieldSolverF); EvolveB(0.5*dt[0]); // We now have B^{n+1/2} FillBoundaryB(guard_cells.ng_FieldSolver, IntVect::TheZeroVector()); @@ -427,7 +427,7 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::coarse, dt[fine_lev]); EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::FirstHalf); FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ng_FieldGather); - FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ng_FieldSolver); + FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ng_FieldSolverF); EvolveE(fine_lev, PatchType::coarse, dt[fine_lev]); FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ng_FieldGather); @@ -435,7 +435,7 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); EvolveF(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev], DtType::FirstHalf); FillBoundaryB(coarse_lev, PatchType::fine, guard_cells.ng_FieldGather + guard_cells.ng_Extra); - FillBoundaryF(coarse_lev, PatchType::fine, guard_cells.ng_FieldSolver); + FillBoundaryF(coarse_lev, PatchType::fine, guard_cells.ng_FieldSolverF); EvolveE(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ng_FieldGather + guard_cells.ng_Extra); @@ -456,7 +456,7 @@ WarpX::OneStep_sub1 (Real curtime) EvolveB(fine_lev, PatchType::fine, 0.5*dt[fine_lev]); EvolveF(fine_lev, PatchType::fine, 0.5*dt[fine_lev], DtType::FirstHalf); FillBoundaryB(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); - FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolverF); EvolveE(fine_lev, PatchType::fine, dt[fine_lev]); FillBoundaryE(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); @@ -484,7 +484,7 @@ WarpX::OneStep_sub1 (Real curtime) EvolveF(fine_lev, PatchType::coarse, dt[fine_lev], DtType::SecondHalf); if (do_pml) { - FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolver); + FillBoundaryF(fine_lev, PatchType::fine, guard_cells.ng_FieldSolverF); DampPML(fine_lev, PatchType::coarse); // do it twice DampPML(fine_lev, PatchType::coarse); FillBoundaryE(fine_lev, PatchType::coarse, guard_cells.ng_alloc_EB); @@ -492,7 +492,7 @@ WarpX::OneStep_sub1 (Real curtime) FillBoundaryB(fine_lev, PatchType::coarse, guard_cells.ng_FieldSolver); - FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ng_FieldSolver); + FillBoundaryF(fine_lev, PatchType::coarse, guard_cells.ng_FieldSolverF); EvolveE(coarse_lev, PatchType::fine, 0.5*dt[coarse_lev]); FillBoundaryE(coarse_lev, PatchType::fine, guard_cells.ng_FieldSolver); diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 9f2bafa19..2e1cebff8 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -30,6 +30,7 @@ public: // Guard cells exchanged for specific in the PIC loop amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); + amrex::IntVect ng_FieldSolverF = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_UpdateAux = amrex::IntVect::TheZeroVector(); amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 28670fb91..34454bd7e 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -116,8 +116,10 @@ guardCellManager::Init( // Compute number of cells required for Field Solver #ifdef WARPX_USE_PSATD ng_FieldSolver = ng_alloc_EB; + ng_FieldSolverF = ng_alloc_EB; #else ng_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); + ng_FieldSolverF = IntVect(AMREX_D_DECL(1,1,1)); #endif ng_FieldSolver = ng_FieldSolver.min(ng_alloc_EB); @@ -144,6 +146,7 @@ guardCellManager::Init( // Make sure we do not exchange more guard cells than allocated. ng_FieldGather = ng_FieldGather.min(ng_alloc_EB); ng_UpdateAux = ng_UpdateAux.min(ng_alloc_EB); + ng_FieldSolverF = ng_FieldSolverF.min(ng_alloc_F); // Only FillBoundary(ng_FieldGather) is called between consecutive // field solves. So ng_FieldGather must have enough cells // for the field solve too. diff --git a/Source/Parallelization/WarpXComm.cpp b/Source/Parallelization/WarpXComm.cpp index 5d7e44a8e..f7e9086f9 100644 --- a/Source/Parallelization/WarpXComm.cpp +++ b/Source/Parallelization/WarpXComm.cpp @@ -373,7 +373,6 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type, IntVect ng) AMREX_ALWAYS_ASSERT_WITH_MESSAGE( ng <= Efield_fp[lev][0]->nGrowVect(), "Error: in FillBoundaryE, requested more guard cells than allocated"); - Print()<<"FillBoundaryE exchanges "<< Efield_fp[lev][0]->nGrowVect() <<'\n'; Efield_fp[lev][0]->FillBoundary(ng, period); Efield_fp[lev][1]->FillBoundary(ng, period); Efield_fp[lev][2]->FillBoundary(ng, period); @@ -394,7 +393,6 @@ WarpX::FillBoundaryE (int lev, PatchType patch_type, IntVect ng) AMREX_ALWAYS_ASSERT_WITH_MESSAGE( ng <= Efield_cp[lev][0]->nGrowVect(), "Error: in FillBoundaryE, requested more guard cells than allocated"); - Print()<<"FillBoundaryE exchanges "<< Efield_cp[lev][0]->nGrowVect() <<'\n'; Efield_cp[lev][0]->FillBoundary(ng, cperiod); Efield_cp[lev][1]->FillBoundary(ng, cperiod); Efield_cp[lev][2]->FillBoundary(ng, cperiod); @@ -426,7 +424,6 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type, IntVect ng) AMREX_ALWAYS_ASSERT_WITH_MESSAGE( ng <= Bfield_fp[lev][0]->nGrowVect(), "Error: in FillBoundaryB, requested more guard cells than allocated"); - Print()<<"FillBoundaryB exchanges "<< Bfield_fp[lev][0]->nGrowVect() <<'\n'; Bfield_fp[lev][0]->FillBoundary(ng, period); Bfield_fp[lev][1]->FillBoundary(ng, period); Bfield_fp[lev][2]->FillBoundary(ng, period); @@ -446,7 +443,6 @@ WarpX::FillBoundaryB (int lev, PatchType patch_type, IntVect ng) AMREX_ALWAYS_ASSERT_WITH_MESSAGE( ng <= Bfield_cp[lev][0]->nGrowVect(), "Error: in FillBoundaryB, requested more guard cells than allocated"); - Print()<<"FillBoundaryB exchanges "<< Bfield_cp[lev][0]->nGrowVect() <<'\n'; Bfield_cp[lev][0]->FillBoundary(ng, cperiod); Bfield_cp[lev][1]->FillBoundary(ng, cperiod); Bfield_cp[lev][2]->FillBoundary(ng, cperiod); -- cgit v1.2.3 From 72c751d492c44c0bc4d318aeb195e05636c8c38a Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Fri, 3 Jan 2020 19:30:34 -0800 Subject: include Remi's suggestions --- Source/Evolve/WarpXEvolveEM.cpp | 1 + Source/Parallelization/GuardCellManager.H | 43 +++++++++++++++++++++++++---- Source/Parallelization/GuardCellManager.cpp | 8 ++---- Source/Utils/WarpXMovingWindow.cpp | 3 +- Source/WarpX.H | 6 ++-- Source/WarpX.cpp | 14 +++++----- 6 files changed, 52 insertions(+), 23 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 366be28d2..e313aab01 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -5,6 +5,7 @@ #include #include #include +#include #ifdef WARPX_USE_PY #include #endif diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 2e1cebff8..34cf549cf 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -3,11 +3,33 @@ #include +/** + * \brief This class computes and stores the number of guard cells needed for + * the allocation of the MultiFabs and required for each part of the PIC loop. + */ class guardCellManager{ public: - int Init( + /** + * \brief Initialize number of guard cells depending on the options used. + * + * \param do_subcycling bool, whether to use subcycling + * \param do_fdtd_nci_corr bool, whether to use Godfrey NCI corrector + * \param do_nodal bool, whether the field solver is nodal + * \param do_moving_window bool, whether to use moving window + * \param do_fft_mpi_dec bool, whether to do parallel FFTs for PSATD + * \param aux_is_nodal bool, true if the aux grid is nodal + * \param moving_window_dir direction of moving window + * \param nox order of current deposition + * \param nox_fft order of PSATD in x direction + * \param noy_fft order of PSATD in y direction + * \param noz_fft order of PSATD in z direction + * \param nci_corr_stencil stencil of NCI corrector + * \param maxwell_fdtd_solver_id if of Maxwell solver + * \param max_level max level of the simulation + */ + void Init( const bool do_subcycling, const bool do_fdtd_nci_corr, const bool do_nodal, @@ -21,21 +43,32 @@ public: const int maxwell_fdtd_solver_id, const int max_level); - // Guard cells allocated for each multifab + // Guard cells allocated for MultiFabs E and B amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); + // Guard cells allocated for MultiFab J amrex::IntVect ng_alloc_J = amrex::IntVect::TheZeroVector(); + // Guard cells allocated for MultiFab Rho amrex::IntVect ng_alloc_Rho = amrex::IntVect::TheZeroVector(); + // Guard cells allocated for MultiFab F amrex::IntVect ng_alloc_F = amrex::IntVect::TheZeroVector(); - int ng_alloc_F_int = 0; - // Guard cells exchanged for specific in the PIC loop + // Guard cells exchanged for specific parts of the PIC loop + + // Number of guard cells of E and B that must exchanged before Field Solver amrex::IntVect ng_FieldSolver = amrex::IntVect::TheZeroVector(); + // Number of guard cells of F that must exchanged before Field Solver amrex::IntVect ng_FieldSolverF = amrex::IntVect::TheZeroVector(); + // Number of guard cells of E and B that must exchanged before Field Gather amrex::IntVect ng_FieldGather = amrex::IntVect::TheZeroVector(); + // Number of guard cells of E and B that must exchanged before updating the Aux grid amrex::IntVect ng_UpdateAux = amrex::IntVect::TheZeroVector(); + // Number of guard cells of all MultiFabs that must exchanged before moving window amrex::IntVect ng_MovingWindow = amrex::IntVect::TheZeroVector(); - // Extra guard cells for fine level of E and B + // When the auxiliary grid is nodal but the field solver is staggered + // (typically with momentum-conserving gather with FDTD Yee solver), + // An extra guard cell is needed on the fine grid to do the interpolation + // for E and B. amrex::IntVect ng_Extra = amrex::IntVect::TheZeroVector(); }; diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 34454bd7e..99feca516 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -4,7 +4,7 @@ using namespace amrex; -int +void guardCellManager::Init( const bool do_subcycling, const bool do_fdtd_nci_corr, @@ -69,11 +69,9 @@ guardCellManager::Init( ng_alloc_J = IntVect(ngJx,ngJz); #endif - int nJ_buffer = ng_alloc_J.max(); // guard cells for J required for deposition only. - ng_alloc_Rho = ng_alloc_J+1; //One extra ghost cell, so that it's safe to deposit charge density // after pushing particle. - ng_alloc_F_int = (do_moving_window) ? 2 : 0; + int ng_alloc_F_int = (do_moving_window) ? 2 : 0; // CKC solver requires one additional guard cell if (maxwell_fdtd_solver_id == 1) ng_alloc_F_int = std::max( ng_alloc_F_int, 1 ); ng_alloc_F = IntVect(AMREX_D_DECL(ng_alloc_F_int, ng_alloc_F_int, ng_alloc_F_int)); @@ -155,6 +153,4 @@ guardCellManager::Init( if (do_moving_window){ ng_MovingWindow[moving_window_dir] = 1; } - - return nJ_buffer; } diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index 2c0c6eac9..7044d75d8 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -221,8 +221,7 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, MultiFab tmpmf(ba, dm, nc, ng); MultiFab::Copy(tmpmf, mf, 0, 0, nc, ng); - // Not sure why this is needed, but it is... - IntVect ng_mw = IntVect::TheUnitVector(); + IntVect ng_mw = IntVect::TheZeroVector(); // Enough guard cells in the MW direction ng_mw[dir] = num_shift; // Add the extra cell (if momentum-conserving gather with staggered field solve) diff --git a/Source/WarpX.H b/Source/WarpX.H index 4b2404198..80d4e3367 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -138,7 +138,7 @@ public: // do nodal static int do_nodal; - + const amrex::MultiFab& getcurrent (int lev, int direction) {return *current_fp[lev][direction];} const amrex::MultiFab& getEfield (int lev, int direction) {return *Efield_aux[lev][direction];} const amrex::MultiFab& getBfield (int lev, int direction) {return *Bfield_aux[lev][direction];} @@ -455,8 +455,8 @@ private: void AllocLevelMFs (int lev, const amrex::BoxArray& ba, const amrex::DistributionMapping& dm, const amrex::IntVect& ngE, const amrex::IntVect& ngJ, - const amrex::IntVect& ngRho, int ngF, const amrex::IntVect& ngextra, - const bool aux_is_nodal); + const amrex::IntVect& ngRho, const amrex::IntVect& ngF, + const amrex::IntVect& ngextra, const bool aux_is_nodal); amrex::Vector istep; // which step? amrex::Vector nsubsteps; // how many substeps on each level? diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 470c8ea7e..c9bd0c5d7 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -720,7 +720,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d bool aux_is_nodal = (field_gathering_algo == GatheringAlgo::MomentumConserving); - int nJ_buffer = guard_cells.Init( + guard_cells.Init( do_subcycling, WarpX::use_fdtd_nci_corr, do_nodal, @@ -743,7 +743,7 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d } if (n_current_deposition_buffer < 0) { - n_current_deposition_buffer = nJ_buffer; + n_current_deposition_buffer = guard_cells.ng_alloc_J.max(); } if (n_field_gather_buffer < 0) { // Field gather buffer should be larger than current deposition buffers @@ -751,14 +751,14 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d } AllocLevelMFs(lev, ba, dm, guard_cells.ng_alloc_EB, guard_cells.ng_alloc_J, - guard_cells.ng_alloc_Rho, guard_cells.ng_alloc_F_int, + guard_cells.ng_alloc_Rho, guard_cells.ng_alloc_F, guard_cells.ng_Extra, aux_is_nodal); } void WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm, - const IntVect& ngE, const IntVect& ngJ, const IntVect& ngRho, int ngF, - const IntVect& ngextra, const bool aux_is_nodal) + const IntVect& ngE, const IntVect& ngJ, const IntVect& ngRho, + const IntVect& ngF, const IntVect& ngextra, const bool aux_is_nodal) { #if defined WARPX_DIM_RZ @@ -799,7 +799,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm if (do_dive_cleaning) { - F_fp[lev].reset (new MultiFab(amrex::convert(ba,IntVect::TheUnitVector()),dm,ncomps, ngF)); + F_fp[lev].reset (new MultiFab(amrex::convert(ba,IntVect::TheUnitVector()),dm,ncomps, ngF.max())); } #ifdef WARPX_USE_PSATD else @@ -884,7 +884,7 @@ WarpX::AllocLevelMFs (int lev, const BoxArray& ba, const DistributionMapping& dm } if (do_dive_cleaning) { - F_cp[lev].reset (new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,ncomps, ngF)); + F_cp[lev].reset (new MultiFab(amrex::convert(cba,IntVect::TheUnitVector()),dm,ncomps, ngF.max())); } #ifdef WARPX_USE_PSATD else -- cgit v1.2.3 From b2651026588db900ba9091f3af5a0d4664eb8fd4 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Wed, 8 Jan 2020 13:28:58 -0800 Subject: option to always exchange all guard cells --- Source/Parallelization/GuardCellManager.H | 3 +- Source/Parallelization/GuardCellManager.cpp | 73 +++++++++++++++++------------ Source/WarpX.H | 2 + Source/WarpX.cpp | 5 +- 4 files changed, 51 insertions(+), 32 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Parallelization/GuardCellManager.H b/Source/Parallelization/GuardCellManager.H index 34cf549cf..c57745b84 100644 --- a/Source/Parallelization/GuardCellManager.H +++ b/Source/Parallelization/GuardCellManager.H @@ -41,7 +41,8 @@ public: const int nox_fft, const int noy_fft, const int noz_fft, const int nci_corr_stencil, const int maxwell_fdtd_solver_id, - const int max_level); + const int max_level, + const bool exchange_all_guard_cells); // Guard cells allocated for MultiFabs E and B amrex::IntVect ng_alloc_EB = amrex::IntVect::TheZeroVector(); diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 99feca516..41d82a6e9 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -17,7 +17,8 @@ guardCellManager::Init( const int nox_fft, const int noy_fft, const int noz_fft, const int nci_corr_stencil, const int maxwell_fdtd_solver_id, - const int max_level) + const int max_level, + const bool exchange_all_guard_cells) { // When using subcycling, the particles on the fine level perform two pushes // before being redistributed ; therefore, we need one extra guard cell @@ -119,38 +120,50 @@ guardCellManager::Init( ng_FieldSolver = IntVect(AMREX_D_DECL(1,1,1)); ng_FieldSolverF = IntVect(AMREX_D_DECL(1,1,1)); #endif - ng_FieldSolver = ng_FieldSolver.min(ng_alloc_EB); - // Compute number of cells required for Field Gather - int FGcell[4] = {0,1,1,2}; // Index is nox - IntVect ng_FieldGather_noNCI = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); - // Add one cell if momentum_conserving gather in a staggered-field simulation - ng_FieldGather_noNCI += ng_Extra; - // Not sure why, but need one extra guard cell when using MR - if (max_level >= 1) ng_FieldGather_noNCI += ng_Extra; - ng_FieldGather_noNCI = ng_FieldGather_noNCI.min(ng_alloc_EB); - // If NCI filter, add guard cells in the z direction - IntVect ng_NCIFilter = IntVect::TheZeroVector(); - if (do_fdtd_nci_corr) - ng_NCIFilter[AMREX_SPACEDIM-1] = NCIGodfreyFilter::m_stencil_width; - // Note: communications of guard cells for bilinear filter are handled - // separately. - ng_FieldGather = ng_FieldGather_noNCI + ng_NCIFilter; + if (exchange_all_guard_cells){ + // Run in safe mode: exchange all allocated guard cells at each + // call of FillBoundary + ng_FieldSolver = ng_alloc_EB; + ng_FieldSolverF = ng_alloc_F; + ng_FieldGather = ng_alloc_EB; + ng_UpdateAux = ng_alloc_EB; + ng_MovingWindow = ng_alloc_EB; + } else { + + ng_FieldSolver = ng_FieldSolver.min(ng_alloc_EB); + + // Compute number of cells required for Field Gather + int FGcell[4] = {0,1,1,2}; // Index is nox + IntVect ng_FieldGather_noNCI = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); + // Add one cell if momentum_conserving gather in a staggered-field simulation + ng_FieldGather_noNCI += ng_Extra; + // Not sure why, but need one extra guard cell when using MR + if (max_level >= 1) ng_FieldGather_noNCI += ng_Extra; + ng_FieldGather_noNCI = ng_FieldGather_noNCI.min(ng_alloc_EB); + // If NCI filter, add guard cells in the z direction + IntVect ng_NCIFilter = IntVect::TheZeroVector(); + if (do_fdtd_nci_corr) + ng_NCIFilter[AMREX_SPACEDIM-1] = NCIGodfreyFilter::m_stencil_width; + // Note: communications of guard cells for bilinear filter are handled + // separately. + ng_FieldGather = ng_FieldGather_noNCI + ng_NCIFilter; - // Guard cells for auxiliary grid. - // Not sure why there is a 2* here... - ng_UpdateAux = 2*ng_FieldGather_noNCI + ng_NCIFilter; + // Guard cells for auxiliary grid. + // Not sure why there is a 2* here... + ng_UpdateAux = 2*ng_FieldGather_noNCI + ng_NCIFilter; - // Make sure we do not exchange more guard cells than allocated. - ng_FieldGather = ng_FieldGather.min(ng_alloc_EB); - ng_UpdateAux = ng_UpdateAux.min(ng_alloc_EB); - ng_FieldSolverF = ng_FieldSolverF.min(ng_alloc_F); - // Only FillBoundary(ng_FieldGather) is called between consecutive - // field solves. So ng_FieldGather must have enough cells - // for the field solve too. - ng_FieldGather = ng_FieldGather.max(ng_FieldSolver); + // Make sure we do not exchange more guard cells than allocated. + ng_FieldGather = ng_FieldGather.min(ng_alloc_EB); + ng_UpdateAux = ng_UpdateAux.min(ng_alloc_EB); + ng_FieldSolverF = ng_FieldSolverF.min(ng_alloc_F); + // Only FillBoundary(ng_FieldGather) is called between consecutive + // field solves. So ng_FieldGather must have enough cells + // for the field solve too. + ng_FieldGather = ng_FieldGather.max(ng_FieldSolver); - if (do_moving_window){ - ng_MovingWindow[moving_window_dir] = 1; + if (do_moving_window){ + ng_MovingWindow[moving_window_dir] = 1; + } } } diff --git a/Source/WarpX.H b/Source/WarpX.H index 7609e3343..24939961d 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -132,6 +132,8 @@ public: static int do_subcycling; + static bool exchange_all_guard_cells; + // buffers static int n_field_gather_buffer; //! in number of cells from the edge (identical for each dimension) static int n_current_deposition_buffer; //! in number of cells from the edge (identical for each dimension) diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index c9bd0c5d7..22ea37fe4 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -78,6 +78,7 @@ Real WarpX::particle_slice_width_lab = 0.0; bool WarpX::do_dynamic_scheduling = true; int WarpX::do_subcycling = 0; +bool WarpX::exchange_all_guard_cells = 0; #if (AMREX_SPACEDIM == 3) IntVect WarpX::Bx_nodal_flag(1,0,0); @@ -293,6 +294,7 @@ WarpX::ReadParameters () pp.query("verbose", verbose); pp.query("regrid_int", regrid_int); pp.query("do_subcycling", do_subcycling); + pp.query("exchange_all_guard_cells", exchange_all_guard_cells); pp.query("override_sync_int", override_sync_int); AMREX_ALWAYS_ASSERT_WITH_MESSAGE(do_subcycling != 1 || max_level <= 1, @@ -732,7 +734,8 @@ WarpX::AllocLevelData (int lev, const BoxArray& ba, const DistributionMapping& d nox_fft, noy_fft, noz_fft, NCIGodfreyFilter::m_stencil_width, maxwell_fdtd_solver_id, - maxLevel()); + maxLevel(), + exchange_all_guard_cells); if (mypc->nSpeciesDepositOnMainGrid() && n_current_deposition_buffer == 0) { n_current_deposition_buffer = 1; -- cgit v1.2.3 From 2d5d85d72f845713872fb190528a02da17b96f46 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Wed, 8 Jan 2020 13:30:53 -0800 Subject: delete EOL whitespace --- Source/Parallelization/GuardCellManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 41d82a6e9..7f72553b6 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -132,7 +132,7 @@ guardCellManager::Init( } else { ng_FieldSolver = ng_FieldSolver.min(ng_alloc_EB); - + // Compute number of cells required for Field Gather int FGcell[4] = {0,1,1,2}; // Index is nox IntVect ng_FieldGather_noNCI = IntVect(AMREX_D_DECL(FGcell[nox],FGcell[nox],FGcell[nox])); -- cgit v1.2.3 From ab87830fc7ed2677f77772f6af76fdf1a6b6ec96 Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Tue, 14 Jan 2020 17:05:11 -0800 Subject: fix error MW 1 MR 1 subcycling 0 --- Source/Evolve/WarpXEvolveEM.cpp | 15 +++++++++++++++ Source/Parallelization/GuardCellManager.cpp | 4 +++- Source/Utils/WarpXMovingWindow.cpp | 4 +++- Source/WarpX.H | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) (limited to 'Source/Parallelization/GuardCellManager.cpp') diff --git a/Source/Evolve/WarpXEvolveEM.cpp b/Source/Evolve/WarpXEvolveEM.cpp index 1831a87bf..c94293987 100644 --- a/Source/Evolve/WarpXEvolveEM.cpp +++ b/Source/Evolve/WarpXEvolveEM.cpp @@ -17,6 +17,15 @@ using namespace amrex; +void +WarpX::all_FillBoundary() +{ + FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); + FillBoundaryF(guard_cells.ng_alloc_F); + FillBoundaryAux(guard_cells.ng_UpdateAux); +} + void WarpX::EvolveEM (int numsteps) { @@ -355,11 +364,17 @@ WarpX::OneStep_nosub (Real cur_time) FillBoundaryF(guard_cells.ng_alloc_F); DampPML(); FillBoundaryE(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); + FillBoundaryF(guard_cells.ng_MovingWindow); FillBoundaryB(guard_cells.ng_MovingWindow, IntVect::TheZeroVector()); } // E and B are up-to-date in the domain, but all guard cells are // outdated. #endif +//FillBoundaryE(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); +//FillBoundaryB(guard_cells.ng_alloc_EB, guard_cells.ng_Extra); +//FillBoundaryF(guard_cells.ng_alloc_F); +//FillBoundaryAux(guard_cells.ng_UpdateAux); +//all_FillBoundary(); } /* /brief Perform one PIC iteration, with subcycling diff --git a/Source/Parallelization/GuardCellManager.cpp b/Source/Parallelization/GuardCellManager.cpp index 7f72553b6..a275f4c00 100644 --- a/Source/Parallelization/GuardCellManager.cpp +++ b/Source/Parallelization/GuardCellManager.cpp @@ -128,7 +128,9 @@ guardCellManager::Init( ng_FieldSolverF = ng_alloc_F; ng_FieldGather = ng_alloc_EB; ng_UpdateAux = ng_alloc_EB; - ng_MovingWindow = ng_alloc_EB; + if (do_moving_window){ + ng_MovingWindow = ng_alloc_EB; + } } else { ng_FieldSolver = ng_FieldSolver.min(ng_alloc_EB); diff --git a/Source/Utils/WarpXMovingWindow.cpp b/Source/Utils/WarpXMovingWindow.cpp index a5d022005..eb01af24e 100644 --- a/Source/Utils/WarpXMovingWindow.cpp +++ b/Source/Utils/WarpXMovingWindow.cpp @@ -238,7 +238,8 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, MultiFab tmpmf(ba, dm, nc, ng); MultiFab::Copy(tmpmf, mf, 0, 0, nc, ng); - IntVect ng_mw = IntVect::TheZeroVector(); + IntVect ng_mw = IntVect::TheUnitVector(); + // IntVect ng_mw = IntVect::TheZeroVector(); // Enough guard cells in the MW direction ng_mw[dir] = num_shift; // Add the extra cell (if momentum-conserving gather with staggered field solve) @@ -247,6 +248,7 @@ WarpX::shiftMF (MultiFab& mf, const Geometry& geom, int num_shift, int dir, ng_mw = ng_mw.min(ng); // Fill guard cells. tmpmf.FillBoundary(ng_mw, geom.periodicity()); + // tmpmf.FillBoundary(ng, geom.periodicity()); // Make a box that covers the region that the window moved into const IndexType& typ = ba.ixType(); diff --git a/Source/WarpX.H b/Source/WarpX.H index b9f969abb..b91535e41 100644 --- a/Source/WarpX.H +++ b/Source/WarpX.H @@ -433,6 +433,8 @@ private: /// void EvolveEM(int numsteps); + void all_FillBoundary(); + void FillBoundaryB (int lev, PatchType patch_type, amrex::IntVect ng); void FillBoundaryE (int lev, PatchType patch_type, amrex::IntVect ng); void FillBoundaryF (int lev, PatchType patch_type, amrex::IntVect ng); -- 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/Parallelization/GuardCellManager.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