PLUTO
4.4-patch2
|
PLUTO main function. More...
Functions | |
static double | NextTimeStep (timeStep *, Runtime *, Grid *) |
static char * | TotalExecutionTime (double) |
static int | Integrate (Data *, timeStep *, Grid *) |
static void | CheckForOutput (Data *, Runtime *, time_t, Grid *) |
int | main (int argc, char *argv[]) |
The file main.c contains the PLUTO main function and several other top-level routines. main() provides basic code initialization, handles the the principal integration loop and calls the output driver write_data.c. Other useful functions contained in this file are Integrate() which does the actual integration, NextTimeStep() responsible for computing the next time step based on the information available at the last time level.
The standard integration loop consists of the following steps:
Check if file output has to be performed.
Advance equations by a single time-step.
d | pointer to PLUTO Data structure; |
Dts | pointer to time Step structure; |
grid | pointer to grid structure. |
int main | ( | int | argc, |
char * | argv[] | ||
) |
Start PLUTO, initialize functions, define data structures and handle the main integration loop.
[in] | argc | Argument counts. |
[in] | argv | Array of pointers to the strings. |
Compute and return the time step for the next time level using the information from the previous integration (Dts->invDt_hyp and Dts->invDt_par).
[in] | Dts | pointer to the timeStep structure |
[in] | runtime | pointer to the Runtime structure |
[in] | grid | pointer to array of Grid structures |
|
static |
convert a floating-point variable (dt, in seconds) to a string displaying days:hours:minutes:seconds