Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for dead/diplomovka/xpdp/src/gather.c between version 1.1 and 1.2

version 1.1, 2001/09/20 14:12:00 version 1.2, 2002/07/30 16:10:45
Line 25  void gather(int isp)
Line 25  void gather(int isp)
         sp_n_k[isp][0]  *= 2.;          sp_n_k[isp][0]  *= 2.;
         sp_n_k[isp][nc] *= 2.;          sp_n_k[isp][nc] *= 2.;
   
         // Smoothing the charge density of each species          // Smoothing the charge density of each species
   
         for(i=0; i< nsmoothing; i++) One_2_One(sp_n_k[isp], nc);          for(i=0; i< nsmoothing; i++)
                   One_2_One(sp_n_k[isp], nc);
 } // }}}  } // }}}
   
 // Function void setrho(void) {{{  // Function void setrho(void) {{{
Line 46  void setrho(void)
Line 47  void setrho(void)
 } // }}}  } // }}}
   
 // Smoothing the array using the 1-2-1 method with the proper  // Smoothing the array using the 1-2-1 method with the proper
 // boundary conditions to conserve charge.  // boundary conditions to conserve charge.
   
 // Function void One_2_One(float *ary, int nmax) {{{  // Function void One_2_One(float *ary, int nmax) {{{
 void One_2_One(float *ary, int nmax)  void One_2_One(float *ary, int nmax)
Line 57  void One_2_One(float *ary, int nmax)
Line 58  void One_2_One(float *ary, int nmax)
   
         if(nlocal < nmax) {          if(nlocal < nmax) {
                 free(temp);                  free(temp);
                 temp = (float *)malloc((nmax+1)*sizeof(float));                  temp = (float *) malloc((nmax+1)*sizeof(float));
                 nlocal = nmax;                  nlocal = nmax;
         }          }
   
         temp[0]= (ary[0] +ary[1])/2;          temp[0]= (ary[0] +ary[1])/2;
         for(i=1; i< nmax; i++)  temp[i]= (ary[i-1] +2*ary[i] +ary[i+1])/4;          for(i=1; i< nmax; i++)
         temp[nmax]= (ary[nmax] +ary[nmax-1])/2;                  temp[i] = (ary[i-1] +2*ary[i] +ary[i+1])/4;
           temp[nmax]  = (ary[nmax] +ary[nmax-1])/2;
   
         for(i=0; i<= nmax; i++) ary[i]= temp[i];          for(i=0; i<= nmax; i++)
                   ary[i]= temp[i];
 } // }}}  } // }}}
   
 // Modeline for ViM {{{1  // Modeline for ViM {{{1

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top