Skip to content
Snippets Groups Projects
Commit 77d35317 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

split declarations

parent 35587d89
No related branches found
No related tags found
1 merge request!454Further changes suggested by clang-tidy
...@@ -38,7 +38,9 @@ TEST_F(LatticeTest, declarationTest) ...@@ -38,7 +38,9 @@ TEST_F(LatticeTest, declarationTest)
// tests volume of the unit cell // tests volume of the unit cell
TEST_F(LatticeTest, volumeTest) TEST_F(LatticeTest, volumeTest)
{ {
R3 a1(4, 0, 0), a2(0, 2.1, 0), a3(0, 0, 1); R3 a1(4, 0, 0);
R3 a2(0, 2.1, 0);
R3 a3(0, 0, 1);
Lattice3D l1(a1, a2, a3); Lattice3D l1(a1, a2, a3);
EXPECT_EQ(8.4, l1.unitCellVolume()); // 8.4 is the expected volume for the given lattice vectors EXPECT_EQ(8.4, l1.unitCellVolume()); // 8.4 is the expected volume for the given lattice vectors
...@@ -47,7 +49,9 @@ TEST_F(LatticeTest, volumeTest) ...@@ -47,7 +49,9 @@ TEST_F(LatticeTest, volumeTest)
// tests whether reciprocal lattice basis vectors have been initialized or not // tests whether reciprocal lattice basis vectors have been initialized or not
TEST_F(LatticeTest, reciprocalTest) TEST_F(LatticeTest, reciprocalTest)
{ {
R3 a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1); R3 a1(1, 0, 0);
R3 a2(0, 1, 0);
R3 a3(0, 0, 1);
Lattice3D l1(a1, a2, a3); Lattice3D l1(a1, a2, a3);
R3 b1, b2, b3, m_ra, m_rb, m_rc; R3 b1, b2, b3, m_ra, m_rb, m_rc;
...@@ -69,7 +73,9 @@ TEST_F(LatticeTest, reciprocalTest) ...@@ -69,7 +73,9 @@ TEST_F(LatticeTest, reciprocalTest)
// tests whether Lattice has been transformed correctly // tests whether Lattice has been transformed correctly
TEST_F(LatticeTest, transformTest) TEST_F(LatticeTest, transformTest)
{ {
R3 a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1); R3 a1(1, 0, 0);
R3 a2(0, 1, 0);
R3 a3(0, 0, 1);
Lattice3D l1(a1, a2, a3); Lattice3D l1(a1, a2, a3);
// use rotation by 90 degrees around z axis as a transformation // use rotation by 90 degrees around z axis as a transformation
...@@ -90,7 +96,9 @@ TEST_F(LatticeTest, transformTest) ...@@ -90,7 +96,9 @@ TEST_F(LatticeTest, transformTest)
// tests the nearest REC. LATTICE point to a given REC. SPACE vector // tests the nearest REC. LATTICE point to a given REC. SPACE vector
TEST_F(LatticeTest, NearestReciprocalLatticeVectorCoordinatesTest) TEST_F(LatticeTest, NearestReciprocalLatticeVectorCoordinatesTest)
{ {
R3 a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1); R3 a1(1, 0, 0);
R3 a2(0, 1, 0);
R3 a3(0, 0, 1);
Lattice3D l1(a1, a2, a3); Lattice3D l1(a1, a2, a3);
// vector_in is in REC. SPACE coordinates // vector_in is in REC. SPACE coordinates
...@@ -106,7 +114,9 @@ TEST_F(LatticeTest, NearestReciprocalLatticeVectorCoordinatesTest) ...@@ -106,7 +114,9 @@ TEST_F(LatticeTest, NearestReciprocalLatticeVectorCoordinatesTest)
// radius of a given REC. SPACE vector // radius of a given REC. SPACE vector
TEST_F(LatticeTest, reciprocalLatticeVectorsWithinRadiusTest) TEST_F(LatticeTest, reciprocalLatticeVectorsWithinRadiusTest)
{ {
R3 a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1); R3 a1(1, 0, 0);
R3 a2(0, 1, 0);
R3 a3(0, 0, 1);
Lattice3D l1(a1, a2, a3); Lattice3D l1(a1, a2, a3);
R3 b1, b2, b3; R3 b1, b2, b3;
...@@ -134,7 +144,9 @@ TEST_F(LatticeTest, FCCLatticeTest) ...@@ -134,7 +144,9 @@ TEST_F(LatticeTest, FCCLatticeTest)
// creates FCC lattice onto a new Lattice instance l1 // creates FCC lattice onto a new Lattice instance l1
Lattice3D l1 = bake::FCCLattice(1); Lattice3D l1 = bake::FCCLattice(1);
R3 fcc1(0, 0.5, 0.5), fcc2(0.5, 0, 0.5), fcc3(0.5, 0.5, 0); R3 fcc1(0, 0.5, 0.5);
R3 fcc2(0.5, 0, 0.5);
R3 fcc3(0.5, 0.5, 0);
EXPECT_EQ(fcc1, l1.getBasisVectorA()); EXPECT_EQ(fcc1, l1.getBasisVectorA());
EXPECT_EQ(fcc2, l1.getBasisVectorB()); EXPECT_EQ(fcc2, l1.getBasisVectorB());
...@@ -159,7 +171,9 @@ TEST_F(LatticeTest, HexagonalLattice2DTest) ...@@ -159,7 +171,9 @@ TEST_F(LatticeTest, HexagonalLattice2DTest)
// vectors are manually changed using the setVectorValue method // vectors are manually changed using the setVectorValue method
TEST_F(LatticeTest, onChangeTest) TEST_F(LatticeTest, onChangeTest)
{ {
R3 a1(1, 0, 0), a2(0, 1, 0), a3(0, 0, 1); R3 a1(1, 0, 0);
R3 a2(0, 1, 0);
R3 a3(0, 0, 1);
Lattice3D l1(a1, a2, a3); Lattice3D l1(a1, a2, a3);
R3 b1, b2, b3, m_ra, m_rb, m_rc; R3 b1, b2, b3, m_ra, m_rb, m_rc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment