@@ -8,6 +8,7 @@ extern "C" {
88 #include < metis.h>
99}
1010
11+
1112/* *
1213 * This test is a substep of the SparseLDLSolver.MatrixFactorization test
1314 * It verifies a call of a METIS function.
@@ -17,13 +18,15 @@ extern "C" {
1718TEST (Metis, permutation)
1819{
1920 int n = 15 ;
20-
2121 // input
2222 sofa::type::vector<int > xadj
2323 { 0 , 0 , 0 , 0 , 3 , 6 , 7 , 10 , 14 , 16 , 16 , 18 , 20 , 20 , 21 , 22 };
2424 sofa::type::vector<int > adj
2525 { 4 ,6 ,7 ,3 ,6 ,7 ,8 ,3 ,4 ,7 ,3 ,4 ,6 ,10 ,5 ,11 ,7 ,13 ,8 ,14 ,10 ,11 };
2626
27+ #ifdef METIS_VERSION_5_1_0
28+
29+
2730 // output
2831 sofa::type::vector<int > perm (n);
2932 sofa::type::vector<int > invperm (n);
@@ -38,6 +41,12 @@ TEST(Metis, permutation)
3841
3942 EXPECT_EQ (perm, expectedPerm);
4043 EXPECT_EQ (invperm, expectedInvPerm);
44+ #endif
45+
46+ #ifdef METIS_VERSION_5_2_1
47+
48+ #endif
49+
4150}
4251
4352
@@ -102,6 +111,9 @@ TEST(SparseLDLSolver, MatrixFactorization)
102111 solver->init ();
103112 solver->invert (matrix);
104113
114+ #ifdef METIS_VERSION_5_1_0
115+
116+
105117 auto * genericInvertData = solver->getMatrixInvertData (&matrix);
106118 EXPECT_NE (genericInvertData, nullptr );
107119
@@ -160,4 +172,10 @@ TEST(SparseLDLSolver, MatrixFactorization)
160172
161173 static const sofa::type::vector<int > expected_LT_colptr_Values { 0 , 0 , 0 , 0 , 0 , 0 , 1 , 3 , 3 , 3 , 3 , 4 , 4 , 5 , 7 , 11 };
162174 EXPECT_EQ (invertData->LT_colptr , expected_LT_colptr_Values);
175+
176+ #endif
177+
178+ #ifdef METIS_VERSION_5_2_1
179+
180+ #endif
163181}
0 commit comments