From adb52483effae34cf86e0eb83804171d4215b0d1 Mon Sep 17 00:00:00 2001 From: Junmin Gu Date: Mon, 30 Oct 2023 20:09:21 -0400 Subject: [PATCH] removed comments and a few fixes to be consistant with the openPMD-api outputs --- .../FlushFormats/FlushFormatPlotPlus.cpp | 26 +++++-------------- Source/Diagnostics/FlushFormats/warpxBTD.H | 11 ++++---- Source/Diagnostics/FlushFormats/warpxWriter.H | 1 - 3 files changed, 11 insertions(+), 27 deletions(-) diff --git a/Source/Diagnostics/FlushFormats/FlushFormatPlotPlus.cpp b/Source/Diagnostics/FlushFormats/FlushFormatPlotPlus.cpp index fce325cd92c..263052dec62 100644 --- a/Source/Diagnostics/FlushFormats/FlushFormatPlotPlus.cpp +++ b/Source/Diagnostics/FlushFormats/FlushFormatPlotPlus.cpp @@ -91,7 +91,7 @@ FlushFormatPlotPlus::WriteToFile ( int snapshotID, [[maybe_unused]] int bufferID, [[maybe_unused]] int numBuffers, - const amrex::Geometry& /*full_BTD_snapshot*/, + const amrex::Geometry& full_BTD_snapshot, bool isLastBTDFlush, const amrex::Vector& totalParticlesFlushedAlready) const { WARPX_PROFILE("FlushFormatPlotPlus::WriteToFile()"); @@ -101,20 +101,6 @@ FlushFormatPlotPlus::WriteToFile ( std::string plot_name = amrex::Concatenate(prefix, snapshotID, file_min_digits); plot_name = plot_name+"/buffer"; const std::string& filename = amrex::Concatenate(plot_name, iteration[0], file_min_digits); -/* - if (!isBTD) - { - amrex::Print() << Utils::TextMsg::Info("Writing plotfile " + filename); - } else - { - amrex::Print() << Utils::TextMsg::Info("Writing buffer " + std::to_string(bufferID+1) + " of " + std::to_string(numBuffers) - + " to snapshot " + std::to_string(snapshotID) + " in plotfile BTD " + plot_name ); - if (isLastBTDFlush) - { - amrex::Print() << Utils::TextMsg::Info("Finished writing snapshot " + std::to_string(snapshotID) + " in plotfile BTD " + filename); - } - } -*/ { // amrex-bp version WARPX_PROFILE("FlushFormatPlotPlus_OpenPMDPlotFiles()"); @@ -122,7 +108,10 @@ FlushFormatPlotPlus::WriteToFile ( std::string opmdPrefix = prefix; if (isBTD) { - BTDWriter(opmdPrefix, snapshotID, varnames, mf, geom, time, particle_diags, use_pinned_pc, isLastBTDFlush, totalParticlesFlushedAlready); + amrex::Vector btd_geoms(geom.size()); + for (auto i=0; i varnames, @@ -254,7 +242,7 @@ void FlushFormatPlotPlus::GetNames(const ParticleDiag& part_diag, ) const { WarpXParticleContainer* pc = part_diag.getParticleContainer(); - real_names.push_back("weight"); + real_names.push_back("weighting"); real_names.push_back("momentum_x"); real_names.push_back("momentum_y"); @@ -407,7 +395,6 @@ void AMReXWithOpenPMD::SetWriter(amrex::openpmd_api::AMReX_openPMDWriter* w) AMReXWithOpenPMD::~AMReXWithOpenPMD() { - amrex::Print()<<" openpmd_api::close handler "<iterations.contains( m_CurrentStep ); - amrex::Print()< 0) { - amrex::Print() <<"btd allocate np="<