src/fss.cpp
/**
 * Estimates the Joint Density of States for with the Flat Scan Sampling
 * algorithm, with respect to the parameters and lattice passes beforehand.
 * @param run (int): Should be passed 0, if only doing one run. Used to keep track of how many times 
 * the algorithm has run in a given script.
 * @param verbose (bool): If true, output information about the simulation each iteration.
 */
Estimates the Joint Density of States for with the Flat Scan Sampling
algorithm, with respect to the parameters and lattice passes beforehand.
@param run (int): Should be passed 0, if only doing one run. Used to keep track of how many times
the algorithm has run in a given script.
@param verbose (bool): If true, output information about the simulation each iteration.
Estimates the Joint Density of States for with the Flat Scan Sampling algorithm with respect to the parameters and lattice passes beforehand . @param run ( int ) : Should be passed 0 if only doing one run . Used to keep track of how many times the algorithm has run in a given script . @param verbose ( bool ) : If true output information about the simulation each iteration .
void FSS::simulate(int run, bool verbose) {
    if (!(this->added_lattice && this->added_params && this->added_rng)) {
        printf(" -- Error: forgot to add the simulation parameters, rng or lattice -- ");
    }
    printf("Initiating Flat Scan Sampling Simulation; run: %d \n", run);
    time_t now = time(0);
    std::string t = ctime(&now); t.pop_back();
    printf("    Time: %s \n", t.c_str());
    if (verbose) {    
        printf("    System:  L: %d | Sz: %d | N_atm: %d | lattice: %s | NN: %d \n",
            this->ising_lattice->L, 
            this->ising_lattice->Sz,
            this->ising_lattice->N_atm,
            this->ising_lattice->lattice.c_str(), 
            this->ising_lattice->NN);
        printf("    Simulation Parameters: REP: %lld | skip: %d \n",
            this->REP, 
            this->skip);   
        printf("\n");
    }
    if (this->ising_lattice->Sz == 2) {
        this->simulate_Sz_2(run, verbose);
    } else {
        this->simulate_Sz_S(run, verbose);
    }
    if (verbose) {
        printf("\n");
    }
    printf("    Run time: %fs \n", this->run_time);
    now = time(0);
    t = ctime(&now); t.pop_back();
    printf("    Time: %s \n", t.c_str());
    printf("Finished Flat Scan Sampling Simulation; run : %d \n", run);
}
void FSS :: simulate ( int run , bool verbose ) { if ( ! ( this -> added_lattice && this -> added_params && this -> added_rng ) ) { printf ( " " ) ; } printf ( " \n " , run ) ; time_t now = time ( 0 ) ; std :: string t = ctime ( & now ) ; t . pop_back ( ) ; printf ( " \n " , t . c_str ( ) ) ; if ( verbose ) { printf ( " \n " , this -> ising_lattice -> L , this -> ising_lattice -> Sz , this -> ising_lattice -> N_atm , this -> ising_lattice -> lattice . c_str ( ) , this -> ising_lattice -> NN ) ; printf ( " \n " , this -> REP , this -> skip ) ; printf ( " \n " ) ; } if ( this -> ising_lattice -> Sz == 2 ) { this -> simulate_Sz_2 ( run , verbose ) ; } else { this -> simulate_Sz_S ( run , verbose ) ; } if ( verbose ) { printf ( " \n " ) ; } printf ( " \n " , this -> run_time ) ; now = time ( 0 ) ; t = ctime ( & now ) ; t . pop_back ( ) ; printf ( " \n " , t . c_str ( ) ) ; printf ( " \n " , run ) ; }
Estimates the Joint Density of States for with the Flat Scan Sampling
 algorithm, with respect to the parameters and lattice passes beforehand.
Estimates the Joint Density of States for with the Flat Scan Sampling algorithm with respect to the parameters and lattice passes beforehand .