Merge branch 'develop' into always-exceptions

# Conflicts:
#	src/library.cpp
This commit is contained in:
Axel Kohlmeyer
2023-08-03 16:46:32 -04:00
626 changed files with 8068 additions and 4460 deletions

View File

@ -199,6 +199,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;