From 19c1fa8c9462db3d6386d8610ce2c44e6730f31c Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 21 Aug 2020 01:01:12 -0400 Subject: [PATCH] need to re-initialize lattice variable after new lattice command --- unittest/commands/test_lattice_region.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/unittest/commands/test_lattice_region.cpp b/unittest/commands/test_lattice_region.cpp index d5d6f070f7..81f358451d 100644 --- a/unittest/commands/test_lattice_region.cpp +++ b/unittest/commands/test_lattice_region.cpp @@ -105,6 +105,7 @@ TEST_F(LatticeRegionTest, lattice_none) lmp->input->one("units lj"); lmp->input->one("lattice none 1.0"); if (!verbose) ::testing::internal::GetCapturedStdout(); + lattice = lmp->domain->lattice; ASSERT_EQ(lattice->xlattice, 1.0); ASSERT_EQ(lattice->ylattice, 1.0); ASSERT_EQ(lattice->zlattice, 1.0); @@ -170,6 +171,7 @@ TEST_F(LatticeRegionTest, lattice_sc) lmp->input->one("units lj"); lmp->input->one("lattice sc 2.0"); if (!verbose) ::testing::internal::GetCapturedStdout(); + lattice = lmp->domain->lattice; ASSERT_DOUBLE_EQ(lattice->xlattice, pow(0.5, 1.0 / 3.0)); ASSERT_DOUBLE_EQ(lattice->ylattice, pow(0.5, 1.0 / 3.0)); ASSERT_DOUBLE_EQ(lattice->zlattice, pow(0.5, 1.0 / 3.0));