From 711d8e8092bef2001f1e8fd3987840d9ba193c54 Mon Sep 17 00:00:00 2001 From: Pi-Yueh Chuang Date: Mon, 13 Jul 2020 06:04:57 -0400 Subject: [PATCH] fix #157 -- Move attribute `count` to the corresponding dataset. --- src/misc/probes.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc/probes.cpp b/src/misc/probes.cpp index c675d655..a93963e8 100644 --- a/src/misc/probes.cpp +++ b/src/misc/probes.cpp @@ -562,8 +562,8 @@ PetscErrorCode ProbeVolume::writeVec_HDF5(const Vec &vec, const PetscReal &t) if (count != 0) // add number of time-steps accumulated as attribute { ierr = PetscViewerHDF5WriteAttribute( - viewer, ("/" + field_str + "/" + std::to_string(t)).c_str(), "count", - PETSC_INT, &count); CHKERRQ(ierr); + viewer, std::to_string(t).c_str(), "count", PETSC_INT, &count); + CHKERRQ(ierr); } PetscFunctionReturn(0);