Merge branch 'develop' into cmake-3.16

This commit is contained in:
Axel Kohlmeyer
2023-08-03 17:39:15 -04:00
1921 changed files with 64340 additions and 91269 deletions

View File

@ -189,6 +189,9 @@ add_executable(test_fix_timestep test_fix_timestep.cpp)
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(test_fix_timestep PRIVATE USING_STATIC_LIBS=1)
endif()
if(FFT_SINGLE)
target_compile_definitions(test_fix_timestep PRIVATE -DFFT_SINGLE)
endif()
target_link_libraries(test_fix_timestep PRIVATE lammps style_tests)
# tests for timestep related fixes (time integration, thermostat, force manipulation, constraints/restraints)

View File

@ -279,6 +279,10 @@ TEST(FixTimestep, plain)
ASSERT_EQ(lmp->atom->natoms, nlocal);
double epsilon = test_config.epsilon;
// relax test precision when using pppm and single precision FFTs
#if defined(FFT_SINGLE)
if (lmp->force->kspace && utils::strmatch(lmp->force->kspace_style, "^pppm")) epsilon *= 2.0e8;
#endif
ErrorStats stats;
@ -411,7 +415,6 @@ TEST(FixTimestep, plain)
ifix = lmp->modify->find_fix("test");
if (!utils::strmatch(lmp->modify->fix[ifix]->style, "^rigid") &&
!utils::strmatch(lmp->modify->fix[ifix]->style, "^nve/limit")) {
if (!verbose) ::testing::internal::CaptureStdout();
cleanup_lammps(lmp, test_config);
if (!verbose) ::testing::internal::GetCapturedStdout();
@ -579,6 +582,10 @@ TEST(FixTimestep, omp)
ASSERT_EQ(lmp->atom->natoms, nlocal);
double epsilon = test_config.epsilon;
// relax test precision when using pppm and single precision FFTs
#if defined(FFT_SINGLE)
if (lmp->force->kspace && utils::strmatch(lmp->force->kspace_style, "^pppm")) epsilon *= 2.0e8;
#endif
ErrorStats stats;