Skip to content

Commit

Permalink
Fix hdf5 regtests (#1074)
Browse files Browse the repository at this point in the history
  • Loading branch information
marchdf committed May 24, 2024
1 parent 351c0ae commit e986100
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion amr-wind/physics/multiphase/MultiPhase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ MultiPhase::MultiPhase(CFDSim& sim)
m_levelset = &(levelset_eqn.fields().field);
} else {
amrex::Print() << "Please select an interface capturing model between "
"VOF and Levelset: defaultin to VOF "
"VOF and Levelset: defaulting to VOF "
<< std::endl;
m_interface_capturing_method = amr_wind::InterfaceCapturingMethod::VOF;
auto& vof_eqn = sim.pde_manager().register_transport_pde("VOF");
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/utilities/IOManager.H
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ private:
//! Default output variables registered automatically in the code
std::set<std::string> m_pltvars_default;

//! Default output integer variales registered automatically in the code
//! Default output integer variables registered automatically in the code
std::set<std::string> m_int_pltvars_default;

//! Variables for output in checkpoint/restart files
Expand Down
2 changes: 1 addition & 1 deletion amr-wind/wind_energy/actuator/disk/uniform_ct_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ void check_for_removed_syntax(
}
if (pp.contains("num_force_points")) {
stream << error_start
<< "'num_force_points' has been repalced with 'num_points_r'\n";
<< "'num_force_points' has been replaced with 'num_points_r'\n";
}
if (pp.contains("num_theta_force_points")) {
stream << error_start
Expand Down
5 changes: 4 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ macro(setup_test)
set(CURRENT_TEST_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/test_files/${TEST_NAME})
set(PLOT_GOLD ${GOLD_FILES_DIRECTORY}/${TEST_NAME}/plt00010)
set(PLOT_TEST ${CURRENT_TEST_BINARY_DIR}/plt00010)
if("${TEST_NAME}" MATCHES "hdf5$")
set(PLOT_TEST ${PLOT_TEST}.h5)
endif()
file(MAKE_DIRECTORY ${CURRENT_TEST_BINARY_DIR})
file(GLOB TEST_FILES "${CURRENT_TEST_SOURCE_DIR}/*")
file(COPY ${TEST_FILES} DESTINATION "${CURRENT_TEST_BINARY_DIR}/")
Expand Down Expand Up @@ -275,7 +278,7 @@ endif()
if(AMR_WIND_ENABLE_HDF5)
add_test_re(abl_stable_hdf5)
if(AMR_WIND_ENABLE_HDF5_ZFP)
add_test_re(abl_stable_hdf5_zfp)
add_test_re(abl_stable_zfp_hdf5)
endif()
endif()

Expand Down
6 changes: 3 additions & 3 deletions test/test_files/fextrema_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@

# Read the files
cols = ["variables", "minimum_value", "maximum_value"]
inpt = pd.read_csv(
input = pd.read_csv(
args.fname, delim_whitespace=True, skiprows=3, header=None, names=cols
).sort_values(by=["variables"])
gold = pd.read_csv(
args.gold, delim_whitespace=True, skiprows=3, header=None, names=cols
).sort_values(by=["variables"])

# Compare
npt.assert_allclose(inpt.minimum_value, gold.minimum_value, atol=args.tol)
npt.assert_allclose(inpt.maximum_value, gold.maximum_value, atol=args.tol)
npt.assert_allclose(input.minimum_value, gold.minimum_value, atol=args.tol)
npt.assert_allclose(input.maximum_value, gold.maximum_value, atol=args.tol)

0 comments on commit e986100

Please sign in to comment.