From fbf6690458de5d8bbe080c2d1bc75a0b2826f653 Mon Sep 17 00:00:00 2001 From: Michael Buehlmann Date: Thu, 28 Apr 2022 13:13:51 -0500 Subject: [PATCH 1/2] add missing HACC/GenericIO fields --- src/plugins/output_genericio.cc | 38 ++++++++++++++++----------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/src/plugins/output_genericio.cc b/src/plugins/output_genericio.cc index f77bef8..9e4a850 100644 --- a/src/plugins/output_genericio.cc +++ b/src/plugins/output_genericio.cc @@ -16,6 +16,7 @@ protected: std::vector vx, vy, vz; std::vector mass, hh, uu; std::vector mu, phi, rho; + std::vector zmet, yhe; std::vector mask; public: @@ -85,12 +86,16 @@ public: vy.reserve(vy.size() + npart); vz.reserve(vz.size() + npart); ids.reserve(ids.size() + npart); - + mask.reserve(mask.size() + npart); + // phi doesn't need to be initialized, just needs to be present in data + phi.resize(phi.size() + npart, 0.0f); + + auto _pos = reinterpret_cast(pc.get_pos32_ptr()); auto _vel = reinterpret_cast(pc.get_vel32_ptr()); auto _ids = reinterpret_cast(pc.get_ids64_ptr()); auto _mass = reinterpret_cast(pc.get_mass32_ptr()); - + for(size_t i=0; i Date: Thu, 10 Nov 2022 11:16:28 +0100 Subject: [PATCH 2/2] removed compilation problems with GCC 12 --- include/general.hh | 1 + include/math/vec3.hh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/general.hh b/include/general.hh index 05feb0a..dcf4388 100644 --- a/include/general.hh +++ b/include/general.hh @@ -20,6 +20,7 @@ #include #include +#include #if defined(USE_MPI) #include diff --git a/include/math/vec3.hh b/include/math/vec3.hh index bbaffbc..593c725 100644 --- a/include/math/vec3.hh +++ b/include/math/vec3.hh @@ -30,7 +30,7 @@ public: //! empty constructor vec3_t() - : x(data_[0]),y(data_[1]),z(data_[2]){} + : data_{{T(0),T(0),T(0)}},x(data_[0]),y(data_[1]),z(data_[2]){} //! copy constructor vec3_t( const vec3_t &v)