[mesa-users] "Extra" Storage Space of User-Defined Vectors

Josiah Schwab jwschwab at berkeley.edu
Wed Jul 24 16:52:16 EDT 2013


Hi All,

In an other_physics routine, suppose I calculate a vector (some quantity
defined over the run of the star, like density, 1:s% nz).  I may want to
reuse that vector later on, for example to add it as a profile column.
In a few cases this is already provided like s% extra_heat for the
other_energy routines.

The naive solution is to define a static-size array in run_star_extras.f
that has a size bigger than the maximum expected value of nz.  That will
work, but I was wondering whether there are any arrays for whose size is
automatically managed as the number of zones change.

There are many places to store extra scalars, but I didn't find
anything for extra vectors after perusing star/public.

Thanks,
Josiah




More information about the Mesa-users mailing list