diff options
Diffstat (limited to 'Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp')
-rw-r--r-- | Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp b/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp index 4655128d5..513d97f3a 100644 --- a/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp +++ b/Source/Diagnostics/FlushFormats/FlushFormatPlotfile.cpp @@ -71,15 +71,17 @@ FlushFormatPlotfile::WriteToFile ( VisMF::Header::Version current_version = VisMF::GetHeaderVersion(); VisMF::SetHeaderVersion(amrex::VisMF::Header::Version_v1); if (plot_raw_fields) rfs.emplace_back("raw_fields"); - amrex::WriteMultiLevelPlotfile(filename, nlev, - amrex::GetVecOfConstPtrs(mf), - varnames, geom, - static_cast<Real>(time), iteration, warpx.refRatio(), - "HyperCLaw-V1.1", - "Level_", - "Cell", - rfs - ); + if (varnames.size() > 0) { + amrex::WriteMultiLevelPlotfile(filename, nlev, + amrex::GetVecOfConstPtrs(mf), + varnames, geom, + static_cast<Real>(time), iteration, warpx.refRatio(), + "HyperCLaw-V1.1", + "Level_", + "Cell", + rfs + ); + } WriteAllRawFields(plot_raw_fields, nlev, filename, plot_raw_fields_guards); |