Skip to content
Snippets Groups Projects
Commit f5fe330c authored by guj's avatar guj Committed by Atkins, Charles Vernon
Browse files

removed used method ReadMe()

parent 29644dff
No related branches found
No related tags found
1 merge request!101Hdf5
...@@ -198,18 +198,12 @@ void HDF5Common::CheckWriteGroup() ...@@ -198,18 +198,12 @@ void HDF5Common::CheckWriteGroup()
H5P_DEFAULT); H5P_DEFAULT);
} }
#ifdef NEVER
template <class T> template <class T>
void HDF5Common::ReadMe(Variable<T> &variable, T *data_array, hid_t h5type) void HDF5Common::ReadMe(Variable<T> &variable, T *data_array, hid_t h5type)
{ {
hid_t datasetID = H5Dopen(m_Group_id, variable.m_Name.c_str(), H5P_DEFAULT); hid_t datasetID = H5Dopen(m_Group_id, variable.m_Name.c_str(), H5P_DEFAULT);
#ifdef NEVER
if (_mpi_rank == 0)
{
std::cout << " hdf5 reading variable: " << variable.m_Name
<< " timestep: " << m_CurrentTimeStep << std::endl;
}
#endif
if (datasetID < 0) if (datasetID < 0)
{ {
...@@ -286,4 +280,5 @@ void HDF5Common::ReadMe(Variable<T> &variable, T *data_array, hid_t h5type) ...@@ -286,4 +280,5 @@ void HDF5Common::ReadMe(Variable<T> &variable, T *data_array, hid_t h5type)
H5Sclose(filespace); H5Sclose(filespace);
H5Dclose(datasetID); H5Dclose(datasetID);
} }
#endif
} }
...@@ -38,8 +38,8 @@ public: ...@@ -38,8 +38,8 @@ public:
int GetNumTimeSteps(); int GetNumTimeSteps();
void WriteTimeSteps(); void WriteTimeSteps();
template <class T> //template <class T>
void ReadMe(Variable<T> &variable, T *data_array, hid_t h5type); //void ReadMe(Variable<T> &variable, T *data_array, hid_t h5type);
// void ReadFromHDF5(const char* name, void* data_array); // void ReadFromHDF5(const char* name, void* data_array);
......
...@@ -143,65 +143,6 @@ HDF5Reader::InquireVariableDouble(const std::string &variableName, const bool) ...@@ -143,65 +143,6 @@ HDF5Reader::InquireVariableDouble(const std::string &variableName, const bool)
std::cout << " ... I saw total timesteps: " << totalts << std::endl; std::cout << " ... I saw total timesteps: " << totalts << std::endl;
} }
while (true)
{
double values[1];
UseHDFRead(variableName, values, H5T_NATIVE_DOUBLE);
Variable<double> v =
m_ADIOS.DefineVariable<double>("junk", adios::Dims{8});
_H5File.ReadMe(v, values, H5T_NATIVE_DOUBLE);
Variable<char> v1 =
m_ADIOS.DefineVariable<char>("junk1", adios::Dims{8});
char vv1[1];
_H5File.ReadMe(v1, vv1, H5T_NATIVE_CHAR);
Variable<unsigned char> v2 =
m_ADIOS.DefineVariable<unsigned char>("junk2", adios::Dims{8});
unsigned char vv2[1];
_H5File.ReadMe(v2, vv2, H5T_NATIVE_UCHAR);
Variable<unsigned int> v3 =
m_ADIOS.DefineVariable<unsigned int>("junk3", adios::Dims{8});
unsigned int vv3[1];
_H5File.ReadMe(v3, vv3, H5T_NATIVE_UINT);
Variable<int> v4 = m_ADIOS.DefineVariable<int>("junk4", adios::Dims{8});
int vv4[1];
_H5File.ReadMe(v4, vv4, H5T_NATIVE_INT);
Variable<float> v5 =
m_ADIOS.DefineVariable<float>("junk5", adios::Dims{8});
float vv5[1];
_H5File.ReadMe(v5, vv5, H5T_NATIVE_FLOAT);
Variable<short> v6 =
m_ADIOS.DefineVariable<short>("junk6", adios::Dims{8});
short vv6[1];
_H5File.ReadMe(v6, vv6, H5T_NATIVE_SHORT);
Variable<unsigned short> v7 =
m_ADIOS.DefineVariable<unsigned short>("junk7", adios::Dims{8});
unsigned short vv7[1];
_H5File.ReadMe(v7, vv7, H5T_NATIVE_USHORT);
Variable<long> v8 =
m_ADIOS.DefineVariable<long>("junk8", adios::Dims{8});
long vv8[1];
_H5File.ReadMe(v8, vv8, H5T_NATIVE_LONG);
Variable<unsigned long> v9 =
m_ADIOS.DefineVariable<unsigned long>("junk9", adios::Dims{8});
unsigned long vv9[1];
_H5File.ReadMe(v9, vv9, H5T_NATIVE_ULONG);
if (_H5File.m_CurrentTimeStep >= totalts - 1)
{
break;
}
_H5File.H5_Advance(totalts);
}
return NULL; return NULL;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment