aboutsummaryrefslogtreecommitdiff
path: root/Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp')
-rw-r--r--Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp b/Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp
index 9d2b3eac2..72395cc84 100644
--- a/Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp
+++ b/Source/Diagnostics/ReducedDiags/ParticleEnergy.cpp
@@ -23,7 +23,7 @@ using namespace amrex;
ParticleEnergy::ParticleEnergy (std::string rd_name)
: ReducedDiags{rd_name}
{
- // get WarpX class object
+ // get a reference to WarpX instance
auto & warpx = WarpX::GetInstance();
// get MultiParticleContainer class object
@@ -33,7 +33,7 @@ ParticleEnergy::ParticleEnergy (std::string rd_name)
const auto nSpecies = mypc.nSpecies();
// resize data array
- m_data.resize(2*nSpecies+2,0.0);
+ m_data.resize(2*nSpecies+2, 0.0_rt);
// get species names (std::vector<std::string>)
const auto species_names = mypc.GetSpeciesNames();
@@ -43,8 +43,7 @@ ParticleEnergy::ParticleEnergy (std::string rd_name)
if ( m_IsNotRestart )
{
// open file
- std::ofstream ofs{m_path + m_rd_name + "." + m_extension,
- std::ofstream::out | std::ofstream::app};
+ std::ofstream ofs{m_path + m_rd_name + "." + m_extension, std::ofstream::out};
// write header row
ofs << "#";
ofs << "[1]step()";