1 /* Siconos is a program dedicated to modeling, simulation and control
2 * of non smooth dynamical systems.
3 *
4 * Copyright 2021 INRIA.
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19 #include <stdlib.h> // for malloc
20 #include "Friction_cst.h" // for SICONOS_FRICTION_3D_ONECONTA...
21 #include "SolverOptions.h" // for solver_options_create
22 #include "frictionContact_test_utils.h" // for build_test_collection
23 #include "test_utils.h" // for TestCase
24
build_test_collection(int n_data,const char ** data_collection,int * number_of_tests)25 TestCase * build_test_collection(int n_data, const char ** data_collection, int* number_of_tests)
26 {
27
28 *number_of_tests = 2; //n_data * n_solvers;
29 TestCase * collection = (TestCase*)malloc((*number_of_tests) * sizeof(TestCase));
30
31 int current = 0;
32
33 int d;
34
35 d = 8; // KaplasTower-i1061-4.hdf5.dat
36 // Quartic, default
37 collection[current].filename = data_collection[d];
38 collection[current].options = solver_options_create(SICONOS_FRICTION_3D_ONECONTACT_QUARTIC);
39 current++;
40
41 d = 9; // OneObject-i100000-499.hdf5.dat
42 // Quartic, default
43 collection[current].filename = data_collection[d];
44 collection[current].options = solver_options_create(SICONOS_FRICTION_3D_ONECONTACT_QUARTIC);
45
46 *number_of_tests = current;
47 return collection;
48
49 }
50