443     real *b_interpol,*rho_interpol,*pr_interpol;  
 
  455     CELL  *actual_cell, *previous, *deleted;    
 
  456     CELL  *temp_actual_cell, *temp_previous, *temp_deleted; 
 
  458     gravity= array_1D(3); 
 
  459     v_interpol = array_1D(3);
 
  460     b_interpol = array_1D(3);   
 
  461     rho_interpol = array_1D(1);
 
  462     pr_interpol = array_1D(1);
 
  469     lx[0]=1./gxyz[0].
dx[0];
 
  470     lx[1]=1./gxyz[1].
dx[0];
 
  471     lx[2]=1./gxyz[2].
dx[0];
 
  475     if(list->
first != NULL ){
 
  477         actual_cell=list->
first;
 
  478         temp_actual_cell=temp_list->
first;
 
  480         previous=actual_cell;
 
  481         temp_previous=temp_actual_cell;
 
  483         while(actual_cell !=NULL){
 
  484             pl=&(actual_cell->
part);
 
  485             pl_temp=&(temp_actual_cell->
part);
 
  489             INTERPOL ( v_interpol, pl_temp, uu,  gxyz, 
VX);
 
  518                 v[
i] = v_interpol[
i]; 
 
  549               temp_deleted=temp_actual_cell;
 
  552               temp_previous->
next=temp_actual_cell->
next;
 
  554               if(actual_cell==list->
first  ){
 
  559               if(actual_cell->
next == NULL && actual_cell==list->
first ){
 
  561                 temp_actual_cell=NULL;
 
  563                 actual_cell=actual_cell->
next;
 
  564                 temp_actual_cell=temp_actual_cell->
next;
 
  578                  x[0] = 2*gxyz[0].
xi - x[0];
 
  585               if(x[1]>gxyz[1].xf){ x[1] = gxyz[1].
xi + x[1] - gxyz[1].
xf; }
 
  587               if(x[1]<gxyz[1].xi){ x[1] = gxyz[1].
xf + x[1] - gxyz[1].
xi; }
 
  598 #if( GEOMETRY==CARTESIAN) 
  600             if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf )
 
  603                 if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf &&
 
  604                    x[1]>gxyz[1].xi && x[1]<gxyz[1].xf )
 
  607                     if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf &&
 
  608                        x[1]>gxyz[1].xi && x[1]<gxyz[1].xf &&
 
  609                        x[2]>gxyz[2].xi && x[2]<gxyz[2].xf)
 
  615                             pl->
cell[
i]=(int)( (x[i]-gxyz[i].xi)*lx[
i] ) + gxyz[i].nghost;
 
  628                         previous=actual_cell;
 
  629                         actual_cell=actual_cell->
next;
 
  631                         temp_previous=temp_actual_cell;
 
  632                         temp_actual_cell=temp_actual_cell->
next;
 
  638 # if( GEOMETRY==SPHERICAL  ) 
  640             if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf){
 
  642                 pl->
cell[0]=(int)( (x[0]-gxyz[0].xi)*lx[0] ) + gxyz[0].nghost;
 
  646                 if( x[1]>gxyz[1].xf ){ x[1] = x[1]-gxyz[1].
xf; }
 
  647                 if( x[1]<gxyz[1].xi ){ x[1] = gxyz[1].
xi-x[1]; }
 
  649                 pl->
cell[1]=(int)( (x[1]-gxyz[1].xi)*lx[1] ) + gxyz[1].nghost;
 
  655                 if( x[2]>gxyz[2].xf ){ x[2] = x[2]-gxyz[2].
xf; }
 
  656                 if( x[2]<gxyz[2].xi ){ x[2] = gxyz[2].
xi-x[2]; }
 
  658                 pl->
cell[2]=(int)( (x[2]-gxyz[2].xi)*lx[2] ) + gxyz[2].nghost;
 
  661                 previous=actual_cell;
 
  662                 actual_cell=actual_cell->
next;
 
  663                 temp_previous=temp_actual_cell;
 
  664                 temp_actual_cell=temp_actual_cell->
next;
 
  670 # if( GEOMETRY==POLAR ) 
  673             if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf)
 
  677                 if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf &&
 
  678                    x[2]>gxyz[2].xi && x[2]<gxyz[2].xf  )
 
  682                     pl->
cell[0]=(int)( (x[0]-gxyz[0].xi)*lx[0] ) + gxyz[0].nghost;
 
  687                     pl->
cell[2]=(int)( (x[2]-gxyz[2].xi)*lx[2] ) + gxyz[2].nghost;
 
  693                     if( x[1]>gxyz[1].xf ){ x[1] = x[1]-gxyz[1].
xf; }
 
  694                     if( x[1]<gxyz[1].xi ){ x[1] = gxyz[1].
xi-x[1]; }
 
  697                     pl->
cell[1]=(int)( (x[1]-gxyz[1].xi)*lx[1] ) + gxyz[1].nghost;
 
  706                     previous=actual_cell;
 
  707                     actual_cell=actual_cell->
next;
 
  709                     temp_previous=temp_actual_cell;
 
  710                     temp_actual_cell=temp_actual_cell->
next;
 
  715 # if( GEOMETRY==CYLINDRICAL ) 
  717             if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf)
 
  720                 if(x[0]>gxyz[0].xi && x[0]<gxyz[0].xf &&
 
  721                    x[1]>gxyz[1].xi && x[1]<gxyz[1].xf  )
 
  735                     if( x[2]>gxyz[2].xf ){ x[2] = x[2]-gxyz[2].
xf; }
 
  736                     if( x[2]<gxyz[2].xi ){ x[2] = gxyz[2].
xi-x[2]; }
 
  749                         INTERPOL ( rho_interpol,pl,uu, gxyz, DN);
 
  750                         INTERPOL ( pr_interpol, pl,uu, gxyz, PR);
 
  756                         DIV ( div_v, 
VX, uu, gxyz, indici );
 
  761                           pl->
mag[
i]=b_interpol[
i];
 
  785                     previous=actual_cell;
 
  786                     actual_cell=actual_cell->
next;
 
  788                     temp_previous=temp_actual_cell;
 
  789                     temp_actual_cell=temp_actual_cell->
next;
 
  801                     temp_deleted=temp_actual_cell;
 
  804                     temp_previous->
next=temp_actual_cell->
next;
 
  806                     if(actual_cell==list->
first  ){
 
  811                     if(actual_cell->
next == NULL && actual_cell==list->
first ){
 
  813                         temp_actual_cell=NULL;
 
  815                         actual_cell=actual_cell->
next;
 
  816                         temp_actual_cell=temp_actual_cell->
next;
 
  841     free_array_1D(gravity);
 
  846     free_array_1D(v_interpol);
 
  847     free_array_1D(b_interpol);  
 
  848     free_array_1D(rho_interpol);
 
  849     free_array_1D(pr_interpol);
 
  850     free_array_1D(div_v);
 
void LOCATE_PART(struct PARTICLES *pl, struct GRID gxyz[])
double xf
Leftmost and rightmost point in the local domain. 
void DIV(real *diver_a, int VAR, real ***uu[], struct GRID gxyz[], int indici[])
void INTERPOL(real *a_interpol, struct PARTICLES *pl, real ***uu[], struct GRID gxyz[], int VAR)