src/wl.cpp
/**
 * Sets Ising lattice for Wang Landau class.
 * @param ising_lattice (System): Reference to System object.
 */
Sets Ising lattice for Wang Landau class.
@param ising_lattice (System): Reference to System object.
Sets Ising lattice for Wang Landau class . @param ising_lattice ( System ) : Reference to System object .
void WL::set_lattice(System &ising_lattice) {
    this->ising_lattice = &(ising_lattice);
    this->ising_lattice->init_spins_random(*(this->rng));
    this->ln_JDOS = new long double[this->ising_lattice->NE * this->ising_lattice->NM];
    this->hist = new unsigned long long[this->ising_lattice->NE * this->ising_lattice->NM];
    for (int i = 0; i < this->ising_lattice->NE * this->ising_lattice->NM; ++i) {
        this->ln_JDOS[i] = 0;
        this->hist[i] = 0;
    }
    this->added_lattice = true;
}
void WL :: set_lattice ( System & ising_lattice ) { this -> ising_lattice = & ( ising_lattice ) ; this -> ising_lattice -> init_spins_random ( * ( this -> rng ) ) ; this -> ln_JDOS = new long double [ this -> ising_lattice -> NE * this -> ising_lattice -> NM ] ; this -> hist = new unsigned long long [ this -> ising_lattice -> NE * this -> ising_lattice -> NM ] ; for ( int i = 0 ; i < this -> ising_lattice -> NE * this -> ising_lattice -> NM ; ++ i ) { this -> ln_JDOS [ i ] = 0 ; this -> hist [ i ] = 0 ; } this -> added_lattice = true ; }
Sets Ising lattice for Wang Landau class.
Sets Ising lattice for Wang Landau class .