update format

This commit is contained in:
Axel Kohlmeyer
2021-04-03 11:04:02 -04:00
parent cfc39b5a73
commit 7244ccf8b1

View File

@ -346,10 +346,13 @@ TEST_F(LibraryProperties, neighlist)
lammps_command(lmp, "run 0 post no"); lammps_command(lmp, "run 0 post no");
if (!verbose) ::testing::internal::GetCapturedStdout(); if (!verbose) ::testing::internal::GetCapturedStdout();
int nhisto = *(double *)lammps_extract_fix(lmp,"dist",LMP_STYLE_GLOBAL,LMP_TYPE_VECTOR,0,0); int nhisto =
*(double *)lammps_extract_fix(lmp, "dist", LMP_STYLE_GLOBAL, LMP_TYPE_VECTOR, 0, 0);
int nskip = *(double *)lammps_extract_fix(lmp, "dist", LMP_STYLE_GLOBAL, LMP_TYPE_VECTOR, 1, 0); int nskip = *(double *)lammps_extract_fix(lmp, "dist", LMP_STYLE_GLOBAL, LMP_TYPE_VECTOR, 1, 0);
double minval = *(double *)lammps_extract_fix(lmp,"dist",LMP_STYLE_GLOBAL,LMP_TYPE_VECTOR,2,0); double minval =
double maxval = *(double *)lammps_extract_fix(lmp,"dist",LMP_STYLE_GLOBAL,LMP_TYPE_VECTOR,3,0); *(double *)lammps_extract_fix(lmp, "dist", LMP_STYLE_GLOBAL, LMP_TYPE_VECTOR, 2, 0);
double maxval =
*(double *)lammps_extract_fix(lmp, "dist", LMP_STYLE_GLOBAL, LMP_TYPE_VECTOR, 3, 0);
// 21 pair distances counted, none skipped, smallest 1.0, largest 2.1 // 21 pair distances counted, none skipped, smallest 1.0, largest 2.1
EXPECT_EQ(nhisto, 21); EXPECT_EQ(nhisto, 21);
EXPECT_EQ(nskip, 0); EXPECT_EQ(nskip, 0);
@ -388,8 +391,10 @@ TEST_F(LibraryProperties, neighlist)
EXPECT_EQ(num, nlocal); EXPECT_EQ(num, nlocal);
for (int i = 0; i < num; ++i) { for (int i = 0; i < num; ++i) {
lammps_neighlist_element_neighbors(lmp, idx, i, &iatom, &inum, &neighbors); lammps_neighlist_element_neighbors(lmp, idx, i, &iatom, &inum, &neighbors);
if (i < 4) EXPECT_EQ(inum, 3); if (i < 4)
else EXPECT_EQ(inum,0); EXPECT_EQ(inum, 3);
else
EXPECT_EQ(inum, 0);
EXPECT_NE(neighbors, nullptr); EXPECT_NE(neighbors, nullptr);
} }