You will need to download GSL and include the path to the gsl libraries in the Makefile or in your environment variables.

The makefile is setup to use gcc, but you may edit this if you wish to use an alternative compiler. Flowcode1.0 offers varying degrees of functionality and should be compiled appropriately:

- Run "make flow" to compile the most basic version of Flowcode1.0. This
version does not calculate power spectra. Instead, it returns values of the
spectral parameters r, n and \alpha for each model generated. These
observables are specified at N
_{obs}, the number of e-folds before the end of inflation, which is chosen at random from the range [46,60]. It also generates the full*path*of the inflationary trajectory - the functions \phi(N), H(N), \epsilon(N), ..., from N_{obs}to the end of inflation. - Run "make mpi" to enable multiprocessing capability. This is a parallelized version of the "flow" compile. It does not generate path data.
- Run "make mpi_savepath" to enable path generation capability with MPI.
- Run "make spectrum" to compile Flowcode1.0 with the ability to calculate scalar and tensor power spectra.

You must indicate with a compiler flag whether you are using a "new" or "old" version of GSL. "Old" is defined as version 1.5 and earlier. The default flag is set to GSL_NEW.

You can download the MPICH implementation or the lam-mpi implementation. Both provide the mpicc compiler required.

- NEQS: The order at which to truncate the flow expansion. This should be 6 or larger.
- kmax: Maximum number of iterations allowed for the flow integration.

- Y: The value of k/aH, where k is the comoving wavenumber of the fluctuation, a is the scale factor and H the Hubble parameter, at which to initialize the mode function. Y = 50 is a good value. Taking Y much larger will improve accuracy but only at the cost of debilitating inefficiency.
- Amp: The amplitude at which to normalize the power spectra.
- knorm: Wavenumber at which to normalize the spectrum (in units of
hMpc
^{-1}). This can be set to anything, but be sure that the value is included in the file that supplies that k-values at which the spectrum is to be integrated (see below).

- NUMEFOLDSMAX/MIN: The number of efolds before the end of inflation at which the quadrupole leaves the horizon is drawn randomly from the ranges set by these values.
- NUMPOINTS: Number of models to generate. This can be made to refer
to the total number of models, total number of models of a particular type (see
*calcpath.c*below), etc.

*esigma.dat:*Logs the values of the flow parameters at N_{obs}.*nr.dat:*Logs the values of n, r and \alpha at this point.*pathxxx.dat:*There is a path file for each model generated containing \phi(N), H(N), the flow parameters, V(N) and KE(N), where V(N) and KE(N) are the reconstructed potential and kinetic energies of the inflaton.

*spec_sxxx.dat:*Scalar spectra. Contains either P(k) or k vs. P(k) (default is set to output P(k) only, but this can be changed in*flow.c*). Outputting P(k) alone is best if feeding spectra to another program, such as CAMB, but outputting k vs. P(k) is clearly needed for plotting these spectra directly.*spec_txxx.dat:*Tensor spectra.

*spectrum.c*: This function calculates the power spectra. The spectrum is interpolated using cubic splines to improve efficiency. In order to maximize versatility, the k-values (in units of hMpc^{-1}) at which to integrate and interpolate the spectrum are user supplied. The included file*ks.dat*is a basic set of k-values to be used for integration, and the file*ks_eval.dat*includes values at which to evaluate the interpolated spectrum.*ks_eval.dat*includes the k-values used by CAMB to evaluate power spectra and is therefore recommended if using Flowcode1.0 with CAMB. If you wish to supply your own files of k-values be sure to change the #defines in spectrum.h:- ki_file: Name of file containing k-values at which to integrate mode functions.
- k_file: File containing k-values at which to evaluate interpolated spectrum.
- kinos: Total number of k's in ki_file.
- knos: Total number of k's in k_file.

*int_de.c:*Integrates the system of flow equations.*calcpath.c:*Calls*int_de.c*and buffers path information. This function also determines what type of model has just been generated and returns one of the following qualifiers^{1}:- asymptote: the model approaches a late-time attractor.
- noconverge: the model does not evolve to a known asymptote.
- nontrivial: inflation ends through a failure of slow-roll, \epsilon > 1.
- insuff: the model does not support enough e-foldings of inflation.

*randoms.c:*Random number generator interface routines.*flow.c:*This is the main driver program that generates initial flow parameters and calls*calcpath.c*and*spectrum.c*. The initial values are chosen by the function*pick_init_vals()*. Full spectra are only calculated if the model is of nontrivial type. Additionally, a wrapper function*we_should_calc_spec()*is defined in*flow.c*that allows the user to define specific criteria that must be met in order for a particular model's spectrum to be calculated. The default condition is that the spectral index at N_{obs}lie between 0.8 < n < 1.2.*flow.c*writes all output files. Another wrapper function,*we_should_save_this_path*allows the user to determine when to write path data to file. The function*save_path()*does the actual writing, and the content of the path files can be modified here.*MyMPI.c:*Wrapper for MPI_Send and MPI_Receive functions.*Build_MPI_type.c:*Custom MPI_Datatypes defined here.*ks.dat:*k-values at which to integrate power spectrum.*ks_eval.dat:*k-values at which to evaluate the interpolated power spectrum (see*spectrum.c*above).*spectrum.h, calcpath.h, randoms.h, mytypes.h:*Header files containing parameter definitions and values, function prototypes, and structure declarations.

*derivs():*The system of flow equations are defined here.*tsratio(), specindex(), dspecindex():*These functions calculate the tensor-to-scalar ratio, spectral index and running of the spectral index, respectively. Observables can be calculated to 2nd- or 3rd-order in the flow parameters. The default behavior is to calculate to 3rd-order. Include the DSECONDORDER compilation flag if you wish to calculate observables to second order.

*scalarsys():*Defines the mode equation of scalar fluctuations as a system of 2 first-order equations.*tensorsys():*Defines the mode equation of tensor fluctuations as a system of 2 first-order equations.

- W.H.Kinney, "Inflation: Flow, fixed points and observables to arbitrary order in slow roll," Phys. Rev. D 66, 083508 (2002) [arXiv:astro-ph/0206032].
- R. Easther and W. H. Kinney, "Monte Carlo reconstruction of the inflationary potential," Phys. Rev. D 67, 043511 (2003) [arXiv:astro-ph/0210345].
- B. A. Powell and W. H. Kinney, "Limits on primordial power spectrum resolution: An an inflationary flow analysis," [arXiv:astro-ph/0706.1982].