Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ParticleHistogram2D #4779

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Source/Diagnostics/ReducedDiags/ParticleHistogram2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void ParticleHistogram2D::ComputeDiags (int step)
Array<int,2> tlo{0,0}; // lower bounds
Array<int,2> thi{m_bin_num_abs-1, m_bin_num_ord-1}; // inclusive upper bounds
amrex::TableData<amrex::Real,2> d_data_2D(tlo, thi);
m_h_data_2D = amrex::TableData<amrex::Real,2> (tlo, thi, The_Pinned_Arena());
m_h_data_2D.resize(tlo, thi, The_Pinned_Arena());
auto const& h_table_data = m_h_data_2D.table();

// Initialize data on the host
Expand Down Expand Up @@ -314,6 +314,8 @@ void ParticleHistogram2D::WriteToFile (int step) const
{static_cast<unsigned long>(m_bin_num_ord), static_cast<unsigned long>(m_bin_num_abs)});

series.flush();
i.close();
series.close();
#else
amrex::ignore_unused(step);
WARPX_ABORT_WITH_MESSAGE("ParticleHistogram2D: Needs openPMD-api compiled into WarpX, but was not found!");
Expand Down
Loading