Skip to content

Commit

Permalink
disable field output in openpmd
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiqunZhang committed Dec 7, 2023
1 parent 480a876 commit 4e55e9b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions Source/Diagnostics/FlushFormats/FlushFormatOpenPMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,11 @@ FlushFormatOpenPMD::WriteToFile (
// Set step and output directory name.
m_OpenPMDPlotWriter->SetStep(output_iteration, prefix, file_min_digits, isBTD);

// fields: only dumped for coarse level
m_OpenPMDPlotWriter->WriteOpenPMDFieldsAll(
varnames, mf, geom, output_levels, output_iteration, static_cast<amrex::Real>(time), isBTD, full_BTD_snapshot);
if (!mf.empty()) {
// fields: only dumped for coarse level
m_OpenPMDPlotWriter->WriteOpenPMDFieldsAll(
varnames, mf, geom, output_levels, output_iteration, static_cast<amrex::Real>(time), isBTD, full_BTD_snapshot);
}

// particles: all (reside only on locally finest level)
m_OpenPMDPlotWriter->WriteOpenPMDParticles(
Expand Down
2 changes: 1 addition & 1 deletion Source/Diagnostics/RecordingPlaneDiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ RecordingPlaneDiagnostics::Flush (int i_buffer, bool /* force_flush */)
bool const plot_raw_fields_guards = false;

if (nparticles > 0) {
m_flush_format->WriteToFile(m_varnames, m_mf_output[i_buffer], m_geom_output[i_buffer],
m_flush_format->WriteToFile(m_varnames, {}, m_geom_output[i_buffer],
warpx.getistep(), warpx.gett_new(0), m_output_species[i_buffer], nlev_output, m_file_prefix,
m_file_min_digits, plot_raw_fields, plot_raw_fields_guards, use_pinned_pc,
isBTD, i_buffer, m_flush_counter, maxBTDBuffers, geom,
Expand Down

0 comments on commit 4e55e9b

Please sign in to comment.