Exemplo n.º 1
0
static void nbSetDefaultFlags(NBodyFlags* nbf)
{
    /* Use default if checkpoint file not specified */
    mwStringDefault(nbf->checkpointFileName, DEFAULT_CHECKPOINT_FILE);

    mwStringDefault(nbf->graphicsBin, NBODY_GRAPHICS_NAME);

    /* Use a specified seed or time seeding */
    nbf->seed = nbf->setSeed ? nbf->seed : (uint32_t) time(NULL);

    if (nbf->checkpointPeriod == 0)
    {
        nbf->checkpointPeriod = NOBOINC_DEFAULT_CHECKPOINT_PERIOD;
    }

    if (BOINC_APPLICATION && nbf->debugLuaLibs)
    {
        mw_printf("Warning: disabling --lua-debug-libraries\n");
        nbf->debugLuaLibs = FALSE;
    }
}
/* Use hardcoded names if files not specified for compatability */
static void setDefaults(SeparationFlags* sf)
{
    mwStringDefault(sf->star_points_file, DEFAULT_STAR_POINTS);
    mwStringDefault(sf->ap_file, DEFAULT_ASTRONOMY_PARAMETERS);
}