apply clang-format
This commit is contained in:
@ -518,6 +518,4 @@ void FixEfield::update_efield_variables()
|
|||||||
input->variable->compute_atom(evar, igroup, &efield[0][3], 4, 0);
|
input->variable->compute_atom(evar, igroup, &efield[0][3], 4, 0);
|
||||||
|
|
||||||
modify->addstep_compute(update->ntimestep + 1);
|
modify->addstep_compute(update->ntimestep + 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -542,8 +542,9 @@ TEST(DihedralStyle, kokkos_omp)
|
|||||||
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
if (test_config.skip_tests.count(test_info_->name())) GTEST_SKIP();
|
||||||
if (!Info::has_accelerator_feature("KOKKOS", "api", "openmp")) GTEST_SKIP();
|
if (!Info::has_accelerator_feature("KOKKOS", "api", "openmp")) GTEST_SKIP();
|
||||||
|
|
||||||
LAMMPS::argv args = {"DihedralStyle", "-log", "none", "-echo", "screen", "-nocite",
|
LAMMPS::argv args = {"DihedralStyle", "-log", "none", "-echo", "screen",
|
||||||
"-k", "on", "t", "4", "-sf", "kk"};
|
"-nocite", "-k", "on", "t", "4",
|
||||||
|
"-sf", "kk"};
|
||||||
|
|
||||||
::testing::internal::CaptureStdout();
|
::testing::internal::CaptureStdout();
|
||||||
LAMMPS *lmp = init_lammps(args, test_config, true);
|
LAMMPS *lmp = init_lammps(args, test_config, true);
|
||||||
|
|||||||
@ -252,7 +252,8 @@ void generate_yaml_file(const char *outfile, const TestConfig &config)
|
|||||||
auto *t = lmp->atom->torque;
|
auto *t = lmp->atom->torque;
|
||||||
for (int i = 1; i <= natoms; ++i) {
|
for (int i = 1; i <= natoms; ++i) {
|
||||||
const int j = lmp->atom->map(i);
|
const int j = lmp->atom->map(i);
|
||||||
block += fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, t[j][0], t[j][1], t[j][2]);
|
block +=
|
||||||
|
fmt::format("{:3} {:23.16e} {:23.16e} {:23.16e}\n", i, t[j][0], t[j][1], t[j][2]);
|
||||||
}
|
}
|
||||||
writer.emit_block("run_torque", block);
|
writer.emit_block("run_torque", block);
|
||||||
}
|
}
|
||||||
@ -302,8 +303,8 @@ TEST(FixTimestep, plain)
|
|||||||
EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon);
|
EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon);
|
||||||
EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon);
|
EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon);
|
||||||
if (lmp->atom->torque_flag)
|
if (lmp->atom->torque_flag)
|
||||||
EXPECT_TORQUES("run_torques (normal run, verlet)", lmp->atom, test_config.run_torque, epsilon);
|
EXPECT_TORQUES("run_torques (normal run, verlet)", lmp->atom, test_config.run_torque,
|
||||||
|
epsilon);
|
||||||
|
|
||||||
auto *ifix = lmp->modify->get_fix_by_id("test");
|
auto *ifix = lmp->modify->get_fix_by_id("test");
|
||||||
if (!ifix) {
|
if (!ifix) {
|
||||||
@ -893,7 +894,8 @@ TEST(FixTimestep, kokkos_omp)
|
|||||||
EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon);
|
EXPECT_POSITIONS("run_pos (normal run, verlet)", lmp->atom, test_config.run_pos, epsilon);
|
||||||
EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon);
|
EXPECT_VELOCITIES("run_vel (normal run, verlet)", lmp->atom, test_config.run_vel, epsilon);
|
||||||
if (lmp->atom->torque_flag)
|
if (lmp->atom->torque_flag)
|
||||||
EXPECT_TORQUES("run_torque (normal run, verlet)", lmp->atom, test_config.run_torque, epsilon);
|
EXPECT_TORQUES("run_torque (normal run, verlet)", lmp->atom, test_config.run_torque,
|
||||||
|
epsilon);
|
||||||
|
|
||||||
auto *ifix = lmp->modify->get_fix_by_id("test");
|
auto *ifix = lmp->modify->get_fix_by_id("test");
|
||||||
|
|
||||||
@ -1023,4 +1025,3 @@ TEST(FixTimestep, kokkos_omp)
|
|||||||
cleanup_lammps(lmp, test_config);
|
cleanup_lammps(lmp, test_config);
|
||||||
if (!verbose) ::testing::internal::GetCapturedStdout();
|
if (!verbose) ::testing::internal::GetCapturedStdout();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -126,13 +126,11 @@ TEST(FmtLib, insert_neg_double)
|
|||||||
TEST(FmtLib, int_for_double)
|
TEST(FmtLib, int_for_double)
|
||||||
{
|
{
|
||||||
const double val = -1.5;
|
const double val = -1.5;
|
||||||
std::string text;
|
ASSERT_THROW(auto text = fmt::format("word {:d}", val), std::exception);
|
||||||
ASSERT_THROW( text = fmt::format("word {:d}", val), std::exception);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(FmtLib, double_for_int)
|
TEST(FmtLib, double_for_int)
|
||||||
{
|
{
|
||||||
const int val = 15;
|
const int val = 15;
|
||||||
std::string text;
|
ASSERT_THROW(auto text = fmt::format("word {:g}", val), std::exception);
|
||||||
ASSERT_THROW( text = fmt::format("word {:g}", val), std::exception);
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user