Go to the documentation of this file.
72 int main( int argc, char **arg)
89 unsigned int k,m,ms,d,nit;
94 GtkWidget *window_cuikexplore;
109 double *initialPoint,*initialPointDOF,*initialSimpPoint;
112 boolean outside,outsideInit;
113 boolean collision,collisionInit;
114 double *pointWithDummies;
119 fprintf(stderr, "Reading parameters from : %s\n", GetFileFullName(&fparam));
163 Error( "The mobility is larger than the number of variables?");
172 Error( "The mobility is larger than the number of dof?");
180 NEW(status. e2d,d, unsigned int);
181 NEW(status. d2e,d, unsigned int)
201 Error( "Insuficient non-fixed degrees of freedom");
207 free(pointWithDummies);
213 NEW(newPointDOF,d, double);
216 NEW(initialPointDOF,d, double);
217 memcpy(initialPointDOF,status. pointDOF,d* sizeof( double));
218 NEW(initialPoint,m, double);
219 memcpy(initialPoint,status. point,m* sizeof( double));
220 NEW(initialSimpPoint,ms, double);
221 memcpy(initialSimpPoint,status. simpPoint,ms* sizeof( double));
229 while((i<ms)&&(!hasS))
241 if ( InitChart(¶meters, TRUE,&ambient,tp,ms,k,status. simpPoint,e,ce,r,
242 &J,&world,&chart)!=0)
243 Error( "Could not define a chart in the start configuration.");
252 fprintf(stderr, "Initial point is out of domain\n");
255 collisionInit=collision;
257 fprintf(stderr, "Initial point is in collision\n");
260 NEW(status. ndx,k, unsigned int);
262 if (( unsigned int)argc>1+k)
264 for(i=0;((ndxOK)&&(i<k));i++)
266 status. ndx[i]=atoi(arg[2+i]);
271 if ((!ndxOK)||(( unsigned int)argc<=1+k))
276 while((i<status. d)&&(j<k)&&(0))
291 while((i<status. d)&&(j<k))
301 Error( "Can not select enough input parameters");
310 status. p=¶meters;
313 gtk_disable_setlocale();
314 gtk_init(&argc,&arg);
316 window_cuikexplore=create_window_cuikexplore((gpointer)(&status));
317 gtk_widget_show(window_cuikexplore);
321 PlotWorld(¶meters,&pt,0.0,worldBase);
334 WorldDOF2Sol(¶meters,newPointDOF,&pointWithDummies,NULL,worldBase);
337 free(pointWithDummies);
354 if ((collision)||(!collide))
361 if ( InitChart(¶meters, TRUE,&ambient,tp,ms,k,simpPoint,e,ce,r,
362 &J,&world,&chart)==0)
364 memcpy(status. simpPoint,simpPoint, sizeof( double)*ms);
378 fprintf(stderr, "Entering the domain-----------------------------------------------------------\n");
384 fprintf(stderr, "Entering C-free -----------------------------------------------------------\n");
390 fprintf(stderr, "Error defining chart. Staying in previous point.\n");
395 fprintf(stderr, "Collision\n");
398 fprintf(stderr, "Out of the ambient space\n");
401 fprintf(stderr, "Error in parametrization. Change it?\n");
404 fprintf(stderr, "Singularity (%f). Change the parametrization?\n", Norm(k,t));
421 memcpy(status. pointDOF,initialPointDOF,d* sizeof( double));
422 memcpy(status. point,initialPoint,m* sizeof( double));
423 memcpy(status. simpPoint,initialSimpPoint,ms* sizeof( double));
425 if ( InitChart(¶meters, TRUE,&ambient,tp,ms,k,status. simpPoint,e,ce,r,
426 &J,&world,&chart)!=0)
427 Error( "Can not move to the initial point?");
432 collision=collisionInit;
434 gtk_main_iteration_do( FALSE);
447 free(initialPointDOF);
449 free(initialSimpPoint);
466 fprintf(stdout, " Wrong number of parameters.\n");
467 fprintf(stdout, " Use:\n");
468 fprintf(stdout, " cuikexplore <world>.world [dof_1 ... dof_k]\n");
469 fprintf(stdout, " Where:\n");
470 fprintf(stdout, " <world>: File describing the problem.\n");
471 fprintf(stdout, " [dof_1 ... dof_k] Index of the variables to be used\n");
472 fprintf(stdout, " as parameters.\n");
473 fprintf(stdout, " File extensions are not required\n");
476 return(EXIT_SUCCESS);
|
Follow us!