fixed: build without HDF5

This commit is contained in:
Arne Morten Kvarving
2018-11-05 13:05:41 +01:00
parent d6029006fd
commit dcdd716389
4 changed files with 10 additions and 3 deletions

View File

@@ -27,7 +27,10 @@
FieldFuncBase::FieldFuncBase (const std::string& fName) :
hdf5(nullptr), pAdm(nullptr), pidx(0)
#ifdef HAS_HDF5
hdf5(nullptr), pAdm(nullptr),
#endif
pidx(0)
{
lastLevel = 0;
lastTime = 0.0;

View File

@@ -62,8 +62,10 @@ protected:
virtual void clearField() = 0;
private:
#ifdef HAS_HDF5
HDF5Writer* hdf5; //!< The HDF5-file containing the field data
ProcessAdm* pAdm; //!< Process administrator for the HDF5-file reader
#endif
mutable int lastLevel; //!< The last time level read from
mutable double lastTime; //!< The time of \a lastLevel

View File

@@ -147,12 +147,12 @@ void HDF5Writer::openFile(int level, bool restart)
H5Gclose(H5Gcreate2(file,str.str().c_str(),0,H5P_DEFAULT,H5P_DEFAULT));
#ifdef HAVE_MPI
H5Pclose(acc_tpl);
#endif
#endif
if (restart)
m_restart_file = file;
else
m_file = file;
#endif
}
@@ -376,6 +376,7 @@ void HDF5Writer::writeSIM (int level, const DataEntry& entry,
if (!entry.second.enabled || !entry.second.data || entry.second.data2.empty())
return;
#ifdef HAS_HDF5
const SIMbase* sim = static_cast<const SIMbase*>(entry.second.data);
const Vector* sol = static_cast<const Vector*>(entry.second.data2.front());
const Vectors* proj = nullptr;
@@ -405,7 +406,6 @@ void HDF5Writer::writeSIM (int level, const DataEntry& entry,
}
}
#ifdef HAS_HDF5
NormBase* norm = sim->getNormIntegrand();
const IntegrandBase* prob = sim->getProblem();
bool usedescription = entry.second.results < 0;

View File

@@ -211,8 +211,10 @@ protected:
private:
hid_t m_file; //!< The HDF5 handle for our file
hid_t m_restart_file; //!< The HDF5 handle for our restart file
#ifdef HAS_HDF5
unsigned int m_flag; //!< The file flags to open HDF5 file with
unsigned int m_restart_flag; //!< The file flags to open the restart file with
#endif
bool m_keepOpen; //!< If \e true, we always keep the file open
std::string m_restart_name; //!< The restart file to use
#ifdef HAVE_MPI