Skip to content

Commit

Permalink
Modified to use adf instead of hdf5
Browse files Browse the repository at this point in the history
  • Loading branch information
scharlton2 committed Sep 13, 2019
1 parent 7cc7034 commit c347ef0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion unittest_cg_open_modify/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()

# library dependencies
find_library(CGNS_LIBRARY cgns)
find_package(HDF5 NAMES hdf5)
##find_package(HDF5 NAMES hdf5)

SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES})

Expand Down
2 changes: 1 addition & 1 deletion unittest_cg_open_read/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()

# library dependencies
find_library(CGNS_LIBRARY cgns)
find_package(HDF5 NAMES hdf5)
##find_package(HDF5 NAMES hdf5)

SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES})

Expand Down
2 changes: 1 addition & 1 deletion unittest_lock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()

# library dependencies
find_library(CGNS_LIBRARY cgns)
find_package(HDF5 NAMES hdf5)
##find_package(HDF5 NAMES hdf5)

SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES})

Expand Down
2 changes: 1 addition & 1 deletion unittests_cgnsfile/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ endif()

# library dependencies
find_library(CGNS_LIBRARY cgns)
find_package(HDF5 NAMES hdf5)
##find_package(HDF5 NAMES hdf5)

SET(EXTRA_LIBS ${EXTRA_LIBS} iriclib ${CGNS_LIBRARY} ${HDF5_LIBRARIES})

Expand Down
7 changes: 7 additions & 0 deletions unittests_cgnsfile/case_sol_readwrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,15 @@

#include "fs_copy.h"

#include <cgnsconfig.h> // for CG_BUILD_HDF5
#include <cgns_io.h>
#include <cgnslib.h>
#include <iriclib.h>
#if (CG_BUILD_HDF5 != 0)
#ifdef _MSC_VER
#include <hdf5.h>
#endif
#endif

#include <stdio.h>
#include <stdlib.h>
Expand Down Expand Up @@ -429,12 +432,14 @@ void case_SolWriteDivide(const std::string& origCgnsName)
ier = cg_close(fid);
VERIFY_LOG("cg_close() ier == 0", ier == 0);

#if (CG_BUILD_HDF5 != 0)
#ifdef _MSC_VER
if (hdf) {
// this seems necessary when IRIC_OPTION_DIVIDESOLUTIONS is set on windows
herr_t err = H5close();
VERIFY_LOG("H5close() ier == 0", err >= 0);
}
#endif
#endif

VERIFY_REMOVE("case_soldivide.cgn", hdf);
Expand Down Expand Up @@ -469,12 +474,14 @@ void case_SolWriteDivide(const std::string& origCgnsName)
ier = cg_close(fid);
VERIFY_LOG("cg_close() ier == 0", ier == 0);

#if (CG_BUILD_HDF5 != 0)
#ifdef _MSC_VER
if (hdf) {
// this seems necessary when IRIC_OPTION_DIVIDESOLUTIONS is set on windows
herr_t err = H5close();
VERIFY_LOG("H5close() ier == 0", err >= 0);
}
#endif
#endif

VERIFY_REMOVE("case_soldivide3d.cgn", hdf);
Expand Down
9 changes: 9 additions & 0 deletions unittests_cgnsfile/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "cases.h"

#include <cgnsconfig.h> // for CG_BUILD_HDF5
#include <iostream>

int main(int argc, char* argv[])
Expand Down Expand Up @@ -28,24 +29,32 @@ int main(int argc, char* argv[])
case_Complex();

case_GridRead();
#if (CG_BUILD_HDF5 != 0)
case_GridReadFunc();
#endif
case_GridWrite();

case_SolStartEnd();

case_SolWriteStd_adf();
case_SolWriteDivide_adf();

#if (CG_BUILD_HDF5 != 0)
case_SolWriteStd_hdf5();
case_SolWriteDivide_hdf5();
#endif

case_addGridAndResult();

case_read_adf();
#if (CG_BUILD_HDF5 != 0)
case_read_hdf5();
#endif

case_read_adf_no_results();
#if (CG_BUILD_HDF5 != 0)
case_read_hdf5_no_results();
#endif

return 0;
}

0 comments on commit c347ef0

Please sign in to comment.