From 9a4c48eac415a3c84eeca8fa307eee8a110af5c6 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Wed, 6 Sep 2023 09:00:53 +0200 Subject: [PATCH] fixed: reading nodes from HDF5 file we need to instance the ProcessAdm and not pass a temporary. holding a reference to a temporary is not enough to keep it alive, which means it is killed and consequently the reader holds an invalid reference. --- src/SIM/SIMinput.C | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/SIM/SIMinput.C b/src/SIM/SIMinput.C index 12a8d81a..55cc4554 100644 --- a/src/SIM/SIMinput.C +++ b/src/SIM/SIMinput.C @@ -148,7 +148,8 @@ bool SIMinput::parseGeometryTag (const TiXmlElement* elem) else if (strstr(file,".hdf5")) { IFEM::cout <<"\tReading global node numbers from "<< file << std::endl; - HDF5Reader hdf5(file,ProcessAdm()); + ProcessAdm adm; + HDF5Reader hdf5(file,adm); const char* field = elem->Attribute("field"); for (int i = 1; i <= nGlPatches; i++) {