[Mesa-users] length of cell

Ebrahim Hassani ee.haji at gmail.com
Sat Jul 4 02:16:58 EDT 2020


Dear Mesa-user

I need to calculate the length of each cell and then multiply the result to
the radius of the star at the position of each cell. The piece of code that
I used in 'run_star_extras.f' file is :

      part3_h1 = 0
      do i = s% nz, 1, -1
      part3_h1 = (s% r(i)) * ( (s% r(i)) - (s% r(i+1)) )
      end do

but it gives the below error:

Fortran runtime error: Index '875' of dimension 1 of array 's%r' above
upper bound of 874

Is there any other way to calculate the length of each cell?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20200704/fa98c02a/attachment.htm>


More information about the Mesa-users mailing list