Skip to content

Commit

Permalink
Check mf is not empty before storing mesh. (Consistant with PR4119)
Browse files Browse the repository at this point in the history
guj committed Jan 25, 2024
1 parent 1960528 commit 1c9e34d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/Diagnostics/FlushFormats/FlushFormatPlotPlus.cpp
Original file line number Diff line number Diff line change
@@ -153,13 +153,14 @@ void FlushFormatPlotPlus::BTDWriter(const std::string& prefix,
StepMgr sm(output_iteration, m_Writer.get());

// write mesh
m_Writer->StoreMesh(//parms.nlevs,
if (!mf.empty()) {
m_Writer->StoreMesh(//parms.nlevs,
amrex::GetVecOfConstPtrs(mf),
varnames,
geom,
static_cast<Real>(time)
);

}
// write particles
//for (auto& part_diag : particle_diags) {
for (unsigned whichDiag = 0, n = particle_diags.size(); whichDiag < n; ++whichDiag)

0 comments on commit 1c9e34d

Please sign in to comment.