Skip to content

Commit

Permalink
Assert that insitu and full diagnostics file prefixes are different (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSinn authored Feb 28, 2023
1 parent d89a876 commit bcd2921
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/particles/beam/BeamParticleContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,11 @@ BeamParticleContainer::InitData (const amrex::Geometry& geom)
}

if (m_insitu_period > 0) {
#ifdef HIPACE_USE_OPENPMD
AMREX_ALWAYS_ASSERT_WITH_MESSAGE(m_insitu_file_prefix !=
Hipace::GetInstance().m_openpmd_writer.m_file_prefix,
"Must choose a different insitu file prefix compared to the full diagnostics");
#endif
// Allocate memory for in-situ diagnostics
m_nslices = geom.Domain().length(2);
m_insitu_rdata.resize(m_nslices*m_insitu_nrp, 0.);
Expand Down

0 comments on commit bcd2921

Please sign in to comment.