talpa/main.cpp
// ---------------------------------------------------------
///
/// Run all examples from the SISC submission
///
// ---------------------------------------------------------
Run all examples from the SISC submission
Run all examples from the SISC submission
void run_all_sisc_examples( const char* sisc_script_directory )
    {
        std::cout << "\n\n\n -------------- running all SISC examples -------------- \n\n\n" << std::endl;
        std::vector<std::string> sisc_script_filenames;
        sisc_script_filenames.push_back( "faceoff-params-1.txt" );
        sisc_script_filenames.push_back( "faceoff-params-2.txt" );
        sisc_script_filenames.push_back( "faceoff-params-3.txt" );         
        sisc_script_filenames.push_back( "normal-params-1.txt" );
        sisc_script_filenames.push_back( "normal-params-2.txt" );
        sisc_script_filenames.push_back( "normal-params-3.txt" );      
        sisc_script_filenames.push_back( "mc-params-1.txt" );   
        sisc_script_filenames.push_back( "mc-params-2.txt" );   
        sisc_script_filenames.push_back( "mc-params-3.txt" );         
        sisc_script_filenames.push_back( "enright-parameters.txt" );
        sisc_script_filenames.push_back( "open-curlnoise-parameters.txt" );
        sisc_script_filenames.push_back( "curlnoise-parameters.txt" );
        sisc_script_filenames.push_back( "tangled.txt" );
        for ( unsigned int i = 0; i < sisc_script_filenames.size(); ++i )
        {
            delete sim;
            delete g_surf;
            delete driver;
            char filename[256];
            snprintf( filename, 256, "%s/%s", sisc_script_directory, sisc_script_filenames[i].c_str() );
            init_simulation( filename );
            g_stats.clear();
            std::cout << "\n\n\n ---------------------------- " << std::endl;
            std::cout << "output path: " << g_output_path << std::endl;
            char mkdir_command[1024];
            sprintf( mkdir_command, "mkdir -p %s", g_output_path );
            system(mkdir_command);
            run_simulation();
            std::cout << "\n -------------- sim done -------------- \n\n\n" << std::endl;
        }
    }
void run_all_sisc_examples ( const char * sisc_script_directory ) { std :: cout << " \n \n \n \n \n \n " << std :: endl ; std :: vector < std :: string > sisc_script_filenames ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; sisc_script_filenames . push_back ( " " ) ; for ( unsigned int i = 0 ; i < sisc_script_filenames . size ( ) ; ++ i ) { delete sim ; delete g_surf ; delete driver ; char filename [ 256 ] ; snprintf ( filename , 256 , " " , sisc_script_directory , sisc_script_filenames [ i ] . c_str ( ) ) ; init_simulation ( filename ) ; g_stats . clear ( ) ; std :: cout << " \n \n \n " << std :: endl ; std :: cout << " " << g_output_path << std :: endl ; char mkdir_command [ 1024 ] ; sprintf ( mkdir_command , " " , g_output_path ) ; system ( mkdir_command ) ; run_simulation ( ) ; std :: cout << " \n \n \n \n " << std :: endl ; } }
Run all examples from the SISC submission
Run all examples from the SISC submission
// re-initialize the simulation