Functions | Variables

main.c File Reference

Athena main program file. More...

Go to the source code of this file.

Functions

static void change_rundir (const char *name)
 Change run directory; create it if it does not exist yet.
static void usage (const char *prog)
 Outputs help.
int main (int argc, char *argv[])
 Athena main program.

Variables

static char * athena_version = "version 4.0 - 01-Jul-2010"

Detailed Description

Athena main program file.

//////////////////////////// ATHENA Main Program \\\\\\\\\\\\\\

Athena - C version developed by JM Stone, TA Gardiner, & PJ Teuben.

Significant additional contributions from X. Bai, K. Beckwith, N. Lemaster, I. Parrish, & A. Skinner. See also the F90 version developed by JF Hawley & JB Simon.

History:

See the GNU General Public License for usage restrictions.

PRIVATE FUNCTION PROTOTYPES:

Definition in file main.c.


Function Documentation

void change_rundir ( const char *  name  )  [static]

Change run directory; create it if it does not exist yet.

Definition at line 723 of file main.c.

References ath_error(), ath_perr(), baton_start(), and baton_stop().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Athena main program.

Steps in main:

  • 1 - check for command line options and respond
  • 2 - read input file and parse command line for changes
  • 3 - set up diagnostic log files
  • 4 - initialize Mesh, Domains, and Grids
  • 5 - set initial conditions
  • 6 - set boundary condition function pointers, and use to set BCs
  • 7 - set function pointers for desired algorithms and physics
  • 8 - write initial conditions to output file(s)
  • 9 - main loop
  • 10 - finish by writing final output(s), diagnostics, and free memory

Definition at line 79 of file main.c.

References advect_particles(), ath_error(), ath_flush_err(), ath_flush_out(), ath_log_close(), ath_log_open(), ath_log_set_level(), ath_pout(), ath_sig_act(), ath_sig_init(), ath_strdup(), athout_fp(), bvals_grav(), bvals_grav_init(), bvals_mhd(), bvals_mhd_init(), bvals_particle(), bvals_particle_init(), bvals_shear_destruct(), bvals_shear_init(), change_rundir(), CourNo, data_output(), data_output_destruct(), MeshS::Domain, MeshS::DomainsPerLevel, MeshS::dt, err_level, exchange_feedback_init(), Fargo(), four_pi_G, Gamma, Gamma_1, Gamma_2, grav_mean_rho, DomainS::Grid, init_grid(), init_mesh(), init_output(), init_particle(), integrate_destruct(), integrate_diff(), integrate_diff_destruct(), integrate_diff_init(), integrate_init(), Iso_csound, Iso_csound2, lr_states_destruct(), lr_states_init(), myID_Comm_world, name, new_dt(), MeshS::NLevels, MeshS::nstep, DomainS::Nx, GridS::Nx, out_level, par_close(), par_cmdline(), par_dist_mpi(), par_dump(), par_getd(), par_geti_def(), par_gets(), par_open(), par_sets(), particle_destruct(), problem(), Prolongate(), restart_grids(), RestrictCorrect(), s, selfg_fc(), selfg_init(), show_config(), show_config_par(), SMR_init(), GridS::time, MeshS::time, usage(), Userwork_after_loop(), and Userwork_in_loop().

static void usage ( const char *  prog  )  [static]

Outputs help.

athena_version is hardwired at beginning of this file CONFIGURE_DATE is macro set when configure script runs

Definition at line 805 of file main.c.

References ath_perr(), athena_version, and show_config().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

char* athena_version = "version 4.0 - 01-Jul-2010" [static]

Definition at line 31 of file main.c.

Referenced by usage().