1 #ifndef FRICTION_CST_H
2 #define FRICTION_CST_H
3 /** \file Friction_cst.h */
4 /** \enum FRICTION_SOLVER encode the list of solvers as integers, to avoid mispelling
5  * with const char* const  variables
6  */
7 enum FRICTION_SOLVER
8 {
9   /** 2D Frictional Contact solvers */
10   SICONOS_FRICTION_2D_NSGS = 400,
11   SICONOS_FRICTION_2D_CPG = 402,
12   SICONOS_FRICTION_2D_LEMKE = 404,
13   SICONOS_FRICTION_2D_ENUM = 405,
14 
15   /* 3D frictional contact solvers on local formulation */
16 
17   /** Non-smooth Gauss Seidel, local formulation */
18   SICONOS_FRICTION_3D_NSGS = 500,
19   /** Non-smooth Gauss Seidel-velocity, local formulation */
20   SICONOS_FRICTION_3D_NSGSV = 501,
21   /** proximal, local formulation */
22   SICONOS_FRICTION_3D_PROX = 502,
23   /** Tresca, fixed point, local formulation */
24   SICONOS_FRICTION_3D_TFP = 503,
25   /** Non-smooth Newton Alart-Curnier, local formulation */
26   SICONOS_FRICTION_3D_NSN_AC = 504,
27   /** De Saxce fixed point, local formulation */
28   SICONOS_FRICTION_3D_DSFP = 505,
29   /** VI formulation, fixed point projection, local formulation */
30   SICONOS_FRICTION_3D_VI_FPP = 506,
31   /** VI formulation, Extra-gradient, local formulation */
32   SICONOS_FRICTION_3D_VI_EG = 507,
33   /** Hyperplane projection, local formulation */
34   SICONOS_FRICTION_3D_HP = 508,
35   /** Fischer Burmeister fixed point, local formulation */
36   SICONOS_FRICTION_3D_NCPGlockerFBFixedPoint = 510,
37   /** Fixed point projection, local formulation */
38   SICONOS_FRICTION_3D_FPP = 511,
39   /** Extra-gradient, local formulation */
40   SICONOS_FRICTION_3D_EG = 512,
41   /** Non-smooth Newton Fischer Burmeister, local formulation */
42   SICONOS_FRICTION_3D_NSN_FB = 513,
43   /** GAMS/Path (Ferris), local formulation */
44   SICONOS_FRICTION_3D_GAMS_PATH = 514,
45   /** VI formulation, GAMS/Path (Ferris), local formulation */
46   SICONOS_FRICTION_3D_GAMS_PATHVI = 515,
47   /** Alart-Curnier fixed point, local formulation */
48   SICONOS_FRICTION_3D_ACLMFP = 516,
49   /** Second-order Cone LCP, local formulation */
50   SICONOS_FRICTION_3D_SOCLCP = 517,
51   /** GAMS/PATH (Ferris) LCP, local formulation */
52   SICONOS_FRICTION_3D_GAMS_LCP_PATH = 518,
53   /** VI formulation, GAMS/PATH (Ferris) LCP, local formulation */
54   SICONOS_FRICTION_3D_GAMS_LCP_PATHVI = 519,
55   /** Non-smooth Newton, natural map, local formulation */
56   SICONOS_FRICTION_3D_NSN_NM = 520,
57   SICONOS_FRICTION_3D_NSN_AC_TEST = 521,
58   /** Panagiotopoulos, fixed point, local formulation */
59   SICONOS_FRICTION_3D_PFP = 522,
60   /** ADMM local formulation */
61   SICONOS_FRICTION_3D_ADMM = 523,
62 
63   /* 3D Frictional Contact solvers for one contact (used mainly inside NSGS solvers) */
64 
65   /** Non-smooth Newton Alart-Curnier, 'direct', one contact solver */
66   SICONOS_FRICTION_3D_ONECONTACT_NSN= 550,
67   /** Non-smooth Newton Alart-Curnier, 'damped', one contact solver */
68   SICONOS_FRICTION_3D_ONECONTACT_NSN_GP = 551,
69   /** Projection on cone, one contact solver */
70   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCone = 552,
71   /** Projection on cone, one contact solver */
72   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithLocalIteration = 553,
73   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithRegularization = 554,
74   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithDiagonalization = 555,
75   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCone_velocity = 558,
76 
77   /** Fischer Burmeister/Path, Glocker formulation, one contact solver */
78   SICONOS_FRICTION_3D_NCPGlockerFBPATH = 556,
79   /** Newton/Fischer Burmeister, Glocker formulation, one contact solver */
80   SICONOS_FRICTION_3D_NCPGlockerFBNewton = 561,
81   SICONOS_FRICTION_3D_ONECONTACT_QUARTIC = 562,
82   SICONOS_FRICTION_3D_ONECONTACT_QUARTIC_NU = 563,
83   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCylinder = 557,
84   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCylinderWithLocalIteration = 564,
85   SICONOS_FRICTION_3D_ONECONTACT_NSN_GP_HYBRID = 565,
86   SICONOS_FRICTION_3D_VI_FPP_Cylinder = 566,
87   SICONOS_FRICTION_3D_CONVEXQP_PG_CYLINDER = 567,
88 
89   /** 3D Frictional contact local solvers on global formulation */
90   SICONOS_GLOBAL_FRICTION_3D_NSGS_WR = 600,
91   SICONOS_GLOBAL_FRICTION_3D_NSGSV_WR = 601,
92   SICONOS_GLOBAL_FRICTION_3D_PROX_WR = 602,
93   SICONOS_GLOBAL_FRICTION_3D_DSFP_WR = 603,
94   SICONOS_GLOBAL_FRICTION_3D_TFP_WR = 604,
95   SICONOS_GLOBAL_FRICTION_3D_NSGS = 605,
96   SICONOS_GLOBAL_FRICTION_3D_NSN_AC_WR = 606,
97   SICONOS_GLOBAL_FRICTION_3D_NSN_AC = 607,
98   SICONOS_GLOBAL_FRICTION_3D_GAMS_PATH = 608,
99   SICONOS_GLOBAL_FRICTION_3D_GAMS_PATHVI = 609,
100   /** VI formulation, Fixed Point Projection, local formulation */
101   SICONOS_GLOBAL_FRICTION_3D_VI_FPP = 610,
102   /** VI formulation, Extra-gradient, local formulation */
103   SICONOS_GLOBAL_FRICTION_3D_VI_EG = 611,
104   SICONOS_GLOBAL_FRICTION_3D_ACLMFP = 612,
105   SICONOS_GLOBAL_FRICTION_3D_ADMM = 613,
106   SICONOS_GLOBAL_FRICTION_3D_ADMM_WR = 614,
107   SICONOS_GLOBAL_FRICTION_3D_IPM = 615,
108 
109 
110   /** Non-smooth Gauss Seidel, local formulation */
111   SICONOS_ROLLING_FRICTION_3D_NSGS = 3000,
112   SICONOS_ROLLING_FRICTION_3D_ONECONTACT_ProjectionOnCone= 3001,
113   SICONOS_ROLLING_FRICTION_3D_ONECONTACT_ProjectionOnConeWithLocalIteration = 3002,
114   SICONOS_ROLLING_FRICTION_3D_ADMM = 3003,
115 
116   /** Non-smooth Gauss Seidel, local formulation */
117   SICONOS_ROLLING_FRICTION_2D_NSGS = 4000,
118   SICONOS_ROLLING_FRICTION_2D_ONECONTACT_ProjectionOnCone= 4001,
119   SICONOS_ROLLING_FRICTION_2D_ONECONTACT_ProjectionOnConeWithLocalIteration = 4002,
120 
121   /** Non-smooth Gauss Seidel, global formulation */
122   SICONOS_GLOBAL_ROLLING_FRICTION_3D_NSGS_WR = 5000
123 
124 };
125 
126 
127 
128 extern const char* const   SICONOS_FRICTION_2D_NSGS_STR ;
129 extern const char* const   SICONOS_FRICTION_2D_CPG_STR ;
130 extern const char* const   SICONOS_FRICTION_2D_LEMKE_STR ;
131 extern const char* const   SICONOS_FRICTION_2D_ENUM_STR ;
132 
133 extern const char* const   SICONOS_FRICTION_3D_NSGS_STR ;
134 extern const char* const   SICONOS_FRICTION_3D_NSGSV_STR ;
135 extern const char* const   SICONOS_FRICTION_3D_PROX_STR;
136 extern const char* const   SICONOS_FRICTION_3D_TFP_STR ;
137 extern const char* const   SICONOS_FRICTION_3D_PFP_STR ;
138 extern const char* const   SICONOS_FRICTION_3D_NSN_AC_STR ;
139 extern const char* const   SICONOS_FRICTION_3D_NSN_AC_TEST_STR ;
140 extern const char* const   SICONOS_FRICTION_3D_NSN_FB_STR ;
141 extern const char* const   SICONOS_FRICTION_3D_NSN_NM_STR ;
142 extern const char* const   SICONOS_FRICTION_3D_DSFP_STR ;
143 extern const char* const   SICONOS_FRICTION_3D_VI_EG_STR ;
144 extern const char* const   SICONOS_FRICTION_3D_VI_FPP_STR ;
145 extern const char* const   SICONOS_FRICTION_3D_EG_STR ;
146 extern const char* const   SICONOS_FRICTION_3D_FPP_STR ;
147 extern const char* const   SICONOS_FRICTION_3D_HP_STR ;
148 extern const char* const   SICONOS_FRICTION_3D_NCPGlockerFBFixedPoint_STR;
149 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_NSN_STR;
150 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_NSN_GP_STR;
151 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_NSN_GP_HYBRID_STR;
152 extern const char* const   SICONOS_FRICTION_3D_NCPGlockerFBNewton_STR;
153 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithDiagonalization_STR;
154 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCone_STR;
155 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithLocalIteration_STR;
156 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnConeWithRegularization_STR;
157 extern const char* const   SICONOS_FRICTION_3D_NCPGlockerFBPATH_STR;
158 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCylinder_STR;
159 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCylinderWithLocalIteration_STR;
160 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_ProjectionOnCone_velocity_STR;
161 extern const char* const   SICONOS_FRICTION_3D_CONVEXQP_PG_CYLINDER_STR;
162 extern const char* const   SICONOS_FRICTION_3D_VI_FPP_Cylinder_STR;
163 extern const char* const   SICONOS_FRICTION_3D_GAMS_PATH_STR;
164 extern const char* const   SICONOS_FRICTION_3D_GAMS_PATHVI_STR;
165 extern const char* const   SICONOS_FRICTION_3D_GAMS_LCP_PATH_STR;
166 extern const char* const   SICONOS_FRICTION_3D_GAMS_LCP_PATHVI_STR;
167 extern const char* const   SICONOS_FRICTION_3D_SOCLCP_STR;
168 extern const char* const   SICONOS_FRICTION_3D_ACLMFP_STR;
169 extern const char* const   SICONOS_FRICTION_3D_ADMM_STR;
170 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_NSGS_WR_STR ;
171 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_NSGSV_WR_STR ;
172 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_PROX_WR_STR ;
173 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_DSFP_WR_STR ;
174 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_TFP_WR_STR ;
175 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_NSGS_STR ;
176 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_NSN_AC_WR_STR ;
177 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_NSN_AC_STR;
178 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_GAMS_PATH_STR;
179 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_GAMS_PATHVI_STR;
180 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_VI_FPP_STR;
181 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_VI_EG_STR;
182 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_ACLMFP_STR;
183 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_ADMM_STR;
184 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_ADMM_WR_STR;
185 extern const char* const   SICONOS_GLOBAL_FRICTION_3D_IPM_STR;
186 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_QUARTIC_STR ;
187 extern const char* const   SICONOS_FRICTION_3D_ONECONTACT_QUARTIC_NU_STR ;
188 
189 
190 extern const char* const   SICONOS_ROLLING_FRICTION_3D_NSGS_STR ;
191 extern const char* const   SICONOS_ROLLING_FRICTION_3D_ONECONTACT_ProjectionOnCone_STR;
192 extern const char* const   SICONOS_ROLLING_FRICTION_3D_ONECONTACT_ProjectionOnConeWithLocalIteration_STR;
193 extern const char* const   SICONOS_ROLLING_FRICTION_3D_ADMM_STR ;
194 
195 extern const char* const   SICONOS_ROLLING_FRICTION_2D_NSGS_STR ;
196 extern const char* const   SICONOS_ROLLING_FRICTION_2D_ONECONTACT_ProjectionOnCone_STR;
197 extern const char* const   SICONOS_ROLLING_FRICTION_2D_ONECONTACT_ProjectionOnConeWithLocalIteration_STR;
198 
199 extern const char* const   SICONOS_GLOBAL_ROLLING_FRICTION_3D_NSGS_WR_STR ;
200 
201 enum SICONOS_FRICTION_3D_IPARAM
202 {
203   /** index in iparam to store the error strategy for the internal solver */
204   SICONOS_FRICTION_3D_IPARAM_INTERNAL_ERROR_STRATEGY =2,
205   /** index in iparam to store the rescaling  */
206   SICONOS_FRICTION_3D_IPARAM_RESCALING =3,
207   /** index in iparam to store the rescaling  */
208   SICONOS_FRICTION_3D_IPARAM_RESCALING_CONE =4,
209   /** current contact number (example of use: one contact solvers) **/
210   SICONOS_FRICTION_3D_CURRENT_CONTACT_NUMBER =5,
211   /** index in iparam to store the error evaluation method */
212   SICONOS_FRICTION_3D_IPARAM_ERROR_EVALUATION = 7,
213   /** index in iparam to store the frequency of error evaluation method */
214   SICONOS_FRICTION_3D_IPARAM_ERROR_EVALUATION_FREQUENCY = 8,
215   SICONOS_FRICTION_3D_NUMBER_OF_CONTACTS = 17,
216 };
217 
218 enum SICONOS_FRICTION_INTERNAL_ERROR_STRATEGY
219 {
220   SICONOS_FRICTION_3D_INTERNAL_ERROR_STRATEGY_ADAPTIVE =0,
221   SICONOS_FRICTION_3D_INTERNAL_ERROR_STRATEGY_GIVEN_VALUE =1,
222   SICONOS_FRICTION_3D_INTERNAL_ERROR_STRATEGY_ADAPTIVE_N_CONTACT =2
223 };
224 
225 enum SICONOS_FRICTION_3D_RESCALING_ENUM
226 {
227   SICONOS_FRICTION_3D_RESCALING_NO =0,
228   SICONOS_FRICTION_3D_RESCALING_SCALAR=1,
229   SICONOS_FRICTION_3D_RESCALING_BALANCING_M=2,
230   SICONOS_FRICTION_3D_RESCALING_BALANCING_MH=3,
231   SICONOS_FRICTION_3D_RESCALING_BALANCING_MHHT=4
232 };
233 
234 enum SICONOS_FRICTION_3D_RESCALING_CONE_ENUM
235 {
236   SICONOS_FRICTION_3D_RESCALING_CONE_NO =0,
237   SICONOS_FRICTION_3D_RESCALING_CONE_YES=1
238 };
239 
240 enum SICONOS_FRICTION_3D_DPARAM
241 {
242   /** index in dparam to store the internal solver error ratio*/
243   SICONOS_FRICTION_3D_DPARAM_INTERNAL_ERROR_RATIO = 2
244 };
245 
246 
247 enum SICONOS_FRICTION_3D_NSGS_IPARAM
248 {
249   /** index in iparam to store the relaxation strategy */
250   SICONOS_FRICTION_3D_NSGS_RELAXATION=4,
251   /** index in iparam to store the shuffle strategy */
252   SICONOS_FRICTION_3D_NSGS_SHUFFLE=5,
253   /** index in iparam to store the shuffle seed */
254   SICONOS_FRICTION_3D_NSGS_SHUFFLE_SEED=6,
255   /** index in iparam to store the  */
256   SICONOS_FRICTION_3D_NSGS_FREEZING_CONTACT =19,
257   /** index in iparam to store the  */
258   SICONOS_FRICTION_3D_NSGS_FILTER_LOCAL_SOLUTION =14,
259 };
260 enum SICONOS_FRICTION_3D_NSGS_DPARAM
261 {
262   /** index in dparam to store the relaxation strategy */
263   SICONOS_FRICTION_3D_NSGS_RELAXATION_VALUE=8,
264 };
265 
266 
267 enum SICONOS_FRICTION_3D_NSGS_LOCALSOLVER_IPARAM
268 {
269   SICONOS_FRICTION_3D_NSGS_LOCALSOLVER_IPARAM_USE_TRIVIAL_SOLUTION=10
270 };
271 
272 enum SICONOS_FRICTION_3D_NSGS_LOCALSOLVER_USE_TRIVIAL_SOLUTION
273 {
274   SICONOS_FRICTION_3D_NSGS_LOCALSOLVER_USE_TRIVIAL_SOLUTION_FALSE=0,
275   SICONOS_FRICTION_3D_NSGS_LOCALSOLVER_USE_TRIVIAL_SOLUTION_TRUE=1
276 };
277 
278 
279 
280 enum SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_ENUM
281 {
282   /** Evaluation of the error with the expensive function fc3d_compute_error **/
283   SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_FULL = 0,
284   /** Evaluation of the error with the cheap incremental variation **/
285   SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_LIGHT = 1,
286   /** Evaluation of the error with the cheap incremental variation but we modify
287       the incremental toleranve to reach the requred accuracy **/
288   SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_LIGHT_WITH_FULL_FINAL = 2,
289   /** Evaluation of the error with the expensive function fc3d_compute_error and
290       an adaptive frequency for calling the error function  **/
291   SICONOS_FRICTION_3D_NSGS_ERROR_EVALUATION_ADAPTIVE =3,
292 };
293 enum SICONOS_FRICTION_3D_NSGS_SHUFFLE_ENUM
294 {
295   SICONOS_FRICTION_3D_NSGS_SHUFFLE_FALSE=0,
296   SICONOS_FRICTION_3D_NSGS_SHUFFLE_TRUE=1,
297   SICONOS_FRICTION_3D_NSGS_SHUFFLE_TRUE_EACH_LOOP=2
298 };
299 
300 enum SICONOS_FRICTION_3D_NSGS_RELAXATION_ENUM
301 {
302   SICONOS_FRICTION_3D_NSGS_RELAXATION_FALSE,
303   SICONOS_FRICTION_3D_NSGS_RELAXATION_TRUE
304 };
305 enum SICONOS_FRICTION_3D_NSGS_FILTER_LOCAL_SOLUTION_ENUM
306 {
307 
308   SICONOS_FRICTION_3D_NSGS_FILTER_LOCAL_SOLUTION_FALSE =0,
309   SICONOS_FRICTION_3D_NSGS_FILTER_LOCAL_SOLUTION_TRUE =1
310 };
311 
312 
313 enum SICONOS_FRICTION_3D_NSN_IPARAM
314 {
315   /** index in iparam to store the strategy for computing rho */
316   SICONOS_FRICTION_3D_NSN_RHO_STRATEGY = 9,
317   /** index in iparam to store the formulation */
318   SICONOS_FRICTION_3D_NSN_FORMULATION = 10,
319   /** index in iparam to store the line-search */
320   SICONOS_FRICTION_3D_NSN_LINESEARCH = 11,
321   /** index in iparam to store the maximum number of iterations */
322   SICONOS_FRICTION_3D_NSN_LINESEARCH_MAX_ITER = 12,
323   /** index in iparam to set the linear solver used at each Newton iteration
324    cs_lusol or mumps */
325   SICONOS_FRICTION_3D_NSN_LINEAR_SOLVER = 13,
326   /** index in iparam to store the strategy for the hybrid solver */
327   SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY = 14,
328   /** index in iparam to store the maximum number of loop for the hybrid solver */
329   SICONOS_FRICTION_3D_NSN_HYBRID_MAX_LOOP = 15,
330   /** index in iparam to store the maximum number of iterations for the projection solver */
331   SICONOS_FRICTION_3D_NSN_HYBRID_MAX_ITER = 16,
332   /** index in iparam used to check if memory allocation has already be done (if true/1) or not (if 0/false) for internal work array. */
333   SICONOS_FRICTION_3D_NSN_MEMORY_ALLOCATED= 17,
334   /** index in iparam to store the boolean to know if allocation of dwork is needed */
335   SICONOS_FRICTION_3D_NSN_MPI_COM= 18
336 
337 };
338 
339 enum SICONOS_FC3D_NSN_LINEAR_SOLVER
340   {
341    SICONOS_FRICTION_3D_NSN_USE_CSLUSOL = 0,
342    SICONOS_FRICTION_3D_NSN_USE_MUMPS = 1
343   };
344 
345 enum SICONOS_FRICTION_3D_NSN_DPARAM
346 {
347   /** index in dparam to store the rho value for projection formulation */
348   SICONOS_FRICTION_3D_NSN_RHO = 3,
349 };
350 
351 
352 enum SICONOS_FRICTION_3D_NSN_RHO_STRATEGY_ENUM
353 {
354   /** A constant value given in dparam[SICONOS_FRICTION_3D_NSN_RHO] is used */
355   SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_CONSTANT = 0,
356   /** A computed value stored in dparam[SICONOS_FRICTION_3D_NSN_RHO] is used */
357   SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_SPECTRAL_NORM =1,
358   /** A computed value stored in dparam[SICONOS_FRICTION_3D_NSN_RHO] is used */
359   SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_SPLIT_SPECTRAL_NORM_COND = 2,
360   /** An adaptive strategy for rho is used */
361   SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_SPLIT_SPECTRAL_NORM =3,
362   /** An adaptive strategy for rho is used */
363   SICONOS_FRICTION_3D_NSN_FORMULATION_RHO_STRATEGY_ADAPTIVE =4,
364 };
365 
366 
367 enum SICONOS_FRICTION_3D_NSN_FORMULATION_ENUM
368 {
369   SICONOS_FRICTION_3D_NSN_FORMULATION_ALARTCURNIER_STD =0,
370   SICONOS_FRICTION_3D_NSN_FORMULATION_JEANMOREAU_STD = 1,
371   SICONOS_FRICTION_3D_NSN_FORMULATION_ALARTCURNIER_GENERATED =2,
372   SICONOS_FRICTION_3D_NSN_FORMULATION_JEANMOREAU_GENERATED =3,
373   SICONOS_FRICTION_3D_NSN_FORMULATION_NULL = 4 ,
374 };
375 
376 
377 enum SICONOS_FRICTION_3D_NSN_LINESEARCH_ENUM
378 {
379   SICONOS_FRICTION_3D_NSN_LINESEARCH_GOLDSTEINPRICE = 0 ,
380   SICONOS_FRICTION_3D_NSN_LINESEARCH_ARMIJO = 1,
381   SICONOS_FRICTION_3D_NSN_LINESEARCH_NO=-1,
382 };
383 
384 enum SICONOS_FRICTION_3D_NSN_HYBRID_ENUM
385 {
386   /** No strategy for the hybrid solver */
387   SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_NO = 0,
388   /** Loop PLI-NSN strategy for the hybrid solver */
389   SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_PLI_NSN_LOOP = 1,
390   /** NSN and after Loop PLI-NSN strategy for the hybrid solver */
391   SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_NSN_AND_PLI_NSN_LOOP = 2,
392   /** VI_EG preconditionning to NSN strategy for the hybrid solver */
393   SICONOS_FRICTION_3D_NSN_HYBRID_STRATEGY_VI_EG_NSN =3
394 };
395 
396 
397 
398 enum SICONOS_FRICTION_3D_PROXIMAL_IPARAM
399 {
400   /** index in iparam to store the error strategy for the internal solver */
401   SICONOS_FRICTION_3D_FP_ERROR_STRATEGY = 2,
402   /** index in iparam to store the relaxation strategy*/
403   SICONOS_FRICTION_3D_PROXIMAL_IPARAM_CUMULATIVE_ITER_DONE = 6,
404   /** index in iparam to store the relaxation strategy*/
405   SICONOS_FRICTION_3D_PROXIMAL_IPARAM_RELAXATION = 8,
406   /** index in iparam to store the proximal strategy*/
407   SICONOS_FRICTION_3D_PROXIMAL_IPARAM_STRATEGY = 9,
408 };
409 
410 
411 enum SICONOS_FRICTION_3D_PROXIMAL_DPARAM
412 {
413   /** index in dparam to store the parameter alpha*/
414   SICONOS_FRICTION_3D_PROXIMAL_DPARAM_ALPHA =3,
415   SICONOS_FRICTION_3D_PROXIMAL_DPARAM_SIGMA =4,
416   SICONOS_FRICTION_3D_PROXIMAL_DPARAM_NU =5,
417   SICONOS_FRICTION_3D_PROXIMAL_DPARAM_RELAXATION =8,
418 
419 };
420 
421 enum SICONOS_FRICTION_3D_PROXIMAL
422 {
423   /** Proximal algorithm */
424   SICONOS_FRICTION_3D_PROXIMAL_PROX = 0,
425 
426   /** Regularization algorithm */
427   SICONOS_FRICTION_3D_PROXIMAL_REGULARIZATION = 1
428 
429 };
430 
431 enum SICONOS_FRICTION_3D_ADMM_IPARAM_ENUM
432 {
433   /** index in iparam to store the strategy for computing rho */
434   SICONOS_FRICTION_3D_ADMM_IPARAM_RHO_STRATEGY = 9,
435   /** index in iparam to store the strategy for computing rho */
436   SICONOS_FRICTION_3D_ADMM_IPARAM_INITIAL_RHO = 10,
437   /** index in iparam to store the acceleration parameter */
438   SICONOS_FRICTION_3D_ADMM_IPARAM_ACCELERATION= 11,
439   /** index in iparam to store the symmetry parameter */
440   SICONOS_FRICTION_3D_ADMM_IPARAM_SYMMETRY= 12,
441   /** index in iparam to store the sparse storage parameter */
442   SICONOS_FRICTION_3D_ADMM_IPARAM_SPARSE_STORAGE= 13,
443   /** index in iparam to get problem info */
444   SICONOS_FRICTION_3D_ADMM_IPARAM_GET_PROBLEM_INFO= 14,
445   SICONOS_FRICTION_3D_ADMM_IPARAM_UPDATE_S= 15,
446   SICONOS_FRICTION_3D_ADMM_IPARAM_FULL_H= 17
447 };
448 
449 enum SICONOS_FRICTION_3D_ADMM_DPARAM_ENUM
450 {
451   /** index in dparam to store the rho value for projection formulation */
452   SICONOS_FRICTION_3D_ADMM_RHO = 3,
453   /** index in dparam to store the eta value for the restarting criteria */
454   SICONOS_FRICTION_3D_ADMM_RESTART_ETA = 4,
455   /** index in dparam to store the tau value for the balancing residual technique */
456   SICONOS_FRICTION_3D_ADMM_BALANCING_RESIDUAL_TAU = 5,
457   /** index in dparam to store the phi value for the balancing residual technique */
458   SICONOS_FRICTION_3D_ADMM_BALANCING_RESIDUAL_PHI = 6
459 };
460 
461 enum SICONOS_FRICTION_3D_ADMM_ACCELERATION_ENUM
462 {
463   SICONOS_FRICTION_3D_ADMM_NO_ACCELERATION= 0,
464   SICONOS_FRICTION_3D_ADMM_ACCELERATION= 1,
465   SICONOS_FRICTION_3D_ADMM_ACCELERATION_AND_RESTART= 2
466 };
467 
468 enum SICONOS_FRICTION_3D_ADMM_SYMMETRY_ENUM
469 {
470   /* default choice. We check symmetry of the problem (Matrix M)
471    * if the problem is not symmetric, we called an asymmetric
472    * version of the algo is possible */
473   SICONOS_FRICTION_3D_ADMM_CHECK_SYMMETRY= 0,
474   /* The symmetric version of the algorithm is used even if
475    *  the system is not symmetric using the LU solver */
476   SICONOS_FRICTION_3D_ADMM_FORCED_SYMMETRY= 1,
477   /* The asymmetric version of the algorithm is used even if
478    *  the system is symmetric */
479   SICONOS_FRICTION_3D_ADMM_FORCED_ASYMMETRY= 2,
480   /* The symmetric version of the algorithm is used and the matrix
481    *is systematically symmetrized*/
482   SICONOS_FRICTION_3D_ADMM_SYMMETRIZE= 3,
483   /* The symmetric version of the algorithm is used and we assume
484    *  that the data are symmetric */
485   SICONOS_FRICTION_3D_ADMM_ASSUME_SYMMETRY= 4
486 };
487 
488 enum SICONOS_FRICTION_3D_ADMM_STORAGE_ENUM
489 {
490   SICONOS_FRICTION_3D_ADMM_KEEP_STORAGE= 0,
491   SICONOS_FRICTION_3D_ADMM_FORCED_SPARSE_STORAGE= 1
492 };
493 
494 enum SICONOS_FRICTION_3D_ADMM_GET_PROBLEM_INFO_ENUM
495 {
496   SICONOS_FRICTION_3D_ADMM_GET_PROBLEM_INFO_NO= 0,
497   SICONOS_FRICTION_3D_ADMM_GET_PROBLEM_INFO_YES= 1
498 };
499 
500 enum SICONOS_FRICTION_3D_ADMM_UPDATE_S_ENUM
501 {
502   SICONOS_FRICTION_3D_ADMM_UPDATE_S_YES= 0,
503   SICONOS_FRICTION_3D_ADMM_UPDATE_S_NO= 1
504 };
505 
506 enum SICONOS_FRICTION_3D_ADMM_FULL_H_ENUM
507 {
508   SICONOS_FRICTION_3D_ADMM_FULL_H_NO= 0,
509   SICONOS_FRICTION_3D_ADMM_FULL_H_YES= 1
510 };
511 
512 enum SICONOS_FRICTION_3D_ADMM_RHO_STRATEGY_ENUM
513 {
514   /** A constant value given in dparam[SICONOS_FRICTION_3D_NSN_RHO] is used */
515   SICONOS_FRICTION_3D_ADMM_RHO_STRATEGY_CONSTANT = 0,
516   /** An adaptive strategy for rho is used */
517   SICONOS_FRICTION_3D_ADMM_RHO_STRATEGY_RESIDUAL_BALANCING =2,
518   /** An adaptive strategy for rho is used */
519   SICONOS_FRICTION_3D_ADMM_RHO_STRATEGY_SCALED_RESIDUAL_BALANCING =3
520 };
521 
522 enum SICONOS_FRICTION_3D_ADMM_INITIAL_RHO_ENUM
523 {
524   /** A constant value given in dparam[SICONOS_FRICTION_3D_NSN_RHO] is used */
525   SICONOS_FRICTION_3D_ADMM_INITIAL_RHO_GIVEN = 0,
526   /** A computed value stored in dparam[SICONOS_FRICTION_3D_NSN_RHO] is used */
527   SICONOS_FRICTION_3D_ADMM_INITIAL_RHO_NORM_INF =1,
528   /** An adaptive strategy for rho is used */
529   SICONOS_FRICTION_3D_ADMM_INITIAL_RHO_EIGENVALUES =2
530 };
531 
532 enum SICONOS_FRICTION_3D_IPM_IPARAM_ENUM
533 {
534   SICONOS_FRICTION_3D_IPM_IPARAM_NESTEROV_TODD_SCALING= 11,
535   /** index in iparam to store the sparse storage parameter */
536   SICONOS_FRICTION_3D_IPM_IPARAM_SPARSE_STORAGE= 12,
537   /** index in iparam to get problem info */
538   SICONOS_FRICTION_3D_IPM_IPARAM_GET_PROBLEM_INFO= 13
539 
540 };
541 
542 enum SICONOS_FRICTION_3D_IPM_DPARAM_ENUM
543 {
544   /** index in dparam to store the parameter for computation the power of sigma */
545   SICONOS_FRICTION_3D_IPM_SIGMA_PARAMETER_1 = 7,
546   SICONOS_FRICTION_3D_IPM_SIGMA_PARAMETER_2 = 8,
547   SICONOS_FRICTION_3D_IPM_SIGMA_PARAMETER_3 = 9,
548 
549   /** index in dparam to store the parameter for computation the safity coefficient of step length */
550   SICONOS_FRICTION_3D_IPM_GAMMA_PARAMETER_1 = 10,
551   SICONOS_FRICTION_3D_IPM_GAMMA_PARAMETER_2 = 11,
552 };
553 
554 
555 enum SICONOS_FRICTION_3D_IPM_STORAGE_ENUM
556 {
557   SICONOS_FRICTION_3D_IPM_KEEP_STORAGE= 0,
558   SICONOS_FRICTION_3D_IPM_FORCED_SPARSE_STORAGE= 1
559 };
560 
561 enum SICONOS_FRICTION_3D_IPM_GET_PROBLEM_INFO_ENUM
562 {
563   SICONOS_FRICTION_3D_IPM_GET_PROBLEM_INFO_NO= 0,
564   SICONOS_FRICTION_3D_IPM_GET_PROBLEM_INFO_YES= 1
565 };
566 
567 
568 #endif
569