Skip to content

Commit

Permalink
Skip last point in boosted-frame diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
RemiLehe committed Sep 29, 2024
1 parent 828e3e4 commit c9507b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ diag_boostedframe.intervals = 100
# Diagnostic that show quantities
# reconstructed in the lab frame
diag_labframe.diag_type = BackTransformed
diag_labframe.num_snapshots_lab = 17
diag_labframe.num_snapshots_lab = 25
diag_labframe.dz_snapshots_lab = 0.1
diag_labframe.format = openpmd
diag_labframe.buffer_size = 64
Expand Down
3 changes: 2 additions & 1 deletion Source/Diagnostics/BTDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,11 +1001,12 @@ BTDiagnostics::GetZSliceInDomainFlag (const int i_buffer, const int lev)
{
auto & warpx = WarpX::GetInstance();
const amrex::RealBox& boost_domain = warpx.Geom(lev).ProbDomain();
const amrex::Real boost_cellsize = warpx.Geom(lev).CellSize(m_moving_window_dir);
const amrex::Real buffer_zmin_lab = m_snapshot_domain_lab[i_buffer].lo( m_moving_window_dir );
const amrex::Real buffer_zmax_lab = m_snapshot_domain_lab[i_buffer].hi( m_moving_window_dir );

const bool slice_not_in_domain =
( m_current_z_boost[i_buffer] <= boost_domain.lo(m_moving_window_dir) ) ||
( m_current_z_boost[i_buffer] <= boost_domain.lo(m_moving_window_dir) + boost_cellsize) ||
( m_current_z_boost[i_buffer] >= boost_domain.hi(m_moving_window_dir) ) ||
( m_current_z_lab[i_buffer] <= buffer_zmin_lab ) ||
( m_current_z_lab[i_buffer] >= buffer_zmax_lab );
Expand Down

0 comments on commit c9507b2

Please sign in to comment.