next up previous
Next: Loading the Equation of Up: Creating the Numerical Grid Previous: Creating the Numerical Grid

make $\underline{\;\;}$grid

/*******************************************************************/
/* Create computational grid.                                      */
/* Points in the mu-direction are stored in the array mu[i].       */
/* Points in the s-direction are stored in the array s_gp[j].      */
/*******************************************************************/
void make_grid(double s_gp[SDIV+1], 
               double mu[MDIV+1])                        
{ 
  int m, s;                         /* counters */
    
      for(s=1;s<=SDIV;s++) 
         s_gp[s] = SMAX*(s-1.0)/(SDIV-1.0);

	/* s_gp[1] = 0.0     corresponds to the center of the star
	   s_gp[SDIV] = SMAX corresponds to infinity */

	/* SMAX is defined in the file consts.h */

      for(m=1;m<=MDIV;m++) 
         mu[m] = (m-1.0)/(MDIV-1.0);

	/* mu[1] = 0.0    corresponds to the plane of the equator 
	   mu[MDIV] = 1.0 corresponds to the axis of symmetry */

	/* s_gp[0] and mu[0] are not used by the program */

}



root
1999-01-09