diff options
author | 2017-06-04 08:24:20 -0700 | |
---|---|---|
committer | 2017-06-04 08:27:46 -0700 | |
commit | 814badb9cd598b97c57b1b9a319c388f540707f6 (patch) | |
tree | 7dfbe4048fda3d5bdcb997289a642cab4db9cca8 /Source/WarpXEvolve.cpp | |
parent | f5a216ad7c0bf20b1a95d5a0ef8c48396694bb18 (diff) | |
download | WarpX-814badb9cd598b97c57b1b9a319c388f540707f6.tar.gz WarpX-814badb9cd598b97c57b1b9a319c388f540707f6.tar.zst WarpX-814badb9cd598b97c57b1b9a319c388f540707f6.zip |
clean up
Diffstat (limited to 'Source/WarpXEvolve.cpp')
-rw-r--r-- | Source/WarpXEvolve.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/Source/WarpXEvolve.cpp b/Source/WarpXEvolve.cpp index 204a90d45..0b971ea12 100644 --- a/Source/WarpXEvolve.cpp +++ b/Source/WarpXEvolve.cpp @@ -42,20 +42,23 @@ WarpX::Evolve (int numsteps) // Beyond one step, we have B^{n-1/2} and E^{n}. // Particles have p^{n-1/2} and x^{n}. + FillBoundaryB(); + if (is_synchronized) { // on first step, push E and X by 0.5*dt - FillBoundaryB(); EvolveE(0.5*dt[0]); mypc->PushX(0.5*dt[0]); mypc->Redistribute(); // Redistribute particles is_synchronized = false; } - ExchangeWithPML(); + FillBoundaryE(); EvolveB(0.5*dt[0]); // We now B^{n} - UpdateAuxiliaryData(); // This will also fill the boundary of fine and coarse patches + FillBoundaryB(); + + UpdateAuxilaryData(); for (int lev = 0; lev <= finest_level; ++lev) { // Evolve particles to p^{n+1/2} and x^{n+1} @@ -106,16 +109,18 @@ WarpX::Evolve (int numsteps) t_new[i] = cur_time; } - if (to_make_plot) { - UpdateAuxiliaryData(); -// xxxxx -#if 0 + if (to_make_plot) + { + FillBoundaryE(); + FillBoundaryB(); + UpdateAuxilaryData(); + for (int lev = 0; lev <= finest_level; ++lev) { mypc->FieldGather(lev, - *Efield[lev][0],*Efield[lev][1],*Efield[lev][2], - *Bfield[lev][0],*Bfield[lev][1],*Bfield[lev][2]); + *Efield_aux[lev][0],*Efield_aux[lev][1],*Efield_aux[lev][2], + *Bfield_aux[lev][0],*Bfield_aux[lev][1],*Bfield_aux[lev][2]); } -#endif + last_plot_file_step = step+1; WritePlotFile(); } |