pub struct OverrelaxationSweepRotation;
Expand description
Overrelaxation algorithm using rotation method.
Alone it can’t advance the simulation as it preserved the hamiltonian.
You need to use other method with this one.
You can look at super::HybridMethodVec
and super::HybridMethodCouple
.
The algorithm is described https://arxiv.org/abs/hep-lat/0503041 in section 2.1 up to step 2 using \hat X_{NN}
.
Example
use lattice_qcd_rs::simulation::{HeatBathSweep, LatticeState, LatticeStateDefault, OverrelaxationSweepRotation};
use rand::SeedableRng;
let rng = rand::rngs::StdRng::seed_from_u64(0); // change with your seed
let mut heat_bath = HeatBathSweep::new(rng);
let mut overrelax = OverrelaxationSweepRotation::default();
let mut state = LatticeStateDefault::<3>::new_cold(1_f64, 8_f64, 4)?; // 1_f64 : size, 8_f64: beta, 4 number of points.
for _ in 0..2 {
state = state.monte_carlo_step(&mut heat_bath)?;
state = state.monte_carlo_step(&mut overrelax)?;
// operation to track the progress or the evolution
}
// operation at the end of the simulation
Implementations§
Trait Implementations§
source§impl Clone for OverrelaxationSweepRotation
impl Clone for OverrelaxationSweepRotation
source§fn clone(&self) -> OverrelaxationSweepRotation
fn clone(&self) -> OverrelaxationSweepRotation
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for OverrelaxationSweepRotation
impl Debug for OverrelaxationSweepRotation
source§impl<'de> Deserialize<'de> for OverrelaxationSweepRotation
impl<'de> Deserialize<'de> for OverrelaxationSweepRotation
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for OverrelaxationSweepRotation
impl Hash for OverrelaxationSweepRotation
source§impl<const D: usize> MonteCarlo<LatticeStateDefault<D>, D> for OverrelaxationSweepRotation
impl<const D: usize> MonteCarlo<LatticeStateDefault<D>, D> for OverrelaxationSweepRotation
source§fn next_element(
&mut self,
state: LatticeStateDefault<D>
) -> Result<LatticeStateDefault<D>, Self::Error>
fn next_element( &mut self, state: LatticeStateDefault<D> ) -> Result<LatticeStateDefault<D>, Self::Error>
Do one Monte Carlo simulation step. Read more
source§impl Ord for OverrelaxationSweepRotation
impl Ord for OverrelaxationSweepRotation
source§fn cmp(&self, other: &OverrelaxationSweepRotation) -> Ordering
fn cmp(&self, other: &OverrelaxationSweepRotation) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq<OverrelaxationSweepRotation> for OverrelaxationSweepRotation
impl PartialEq<OverrelaxationSweepRotation> for OverrelaxationSweepRotation
source§fn eq(&self, other: &OverrelaxationSweepRotation) -> bool
fn eq(&self, other: &OverrelaxationSweepRotation) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<OverrelaxationSweepRotation> for OverrelaxationSweepRotation
impl PartialOrd<OverrelaxationSweepRotation> for OverrelaxationSweepRotation
source§fn partial_cmp(&self, other: &OverrelaxationSweepRotation) -> Option<Ordering>
fn partial_cmp(&self, other: &OverrelaxationSweepRotation) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for OverrelaxationSweepRotation
impl Eq for OverrelaxationSweepRotation
impl StructuralEq for OverrelaxationSweepRotation
impl StructuralPartialEq for OverrelaxationSweepRotation
Auto Trait Implementations§
impl RefUnwindSafe for OverrelaxationSweepRotation
impl Send for OverrelaxationSweepRotation
impl Sync for OverrelaxationSweepRotation
impl Unpin for OverrelaxationSweepRotation
impl UnwindSafe for OverrelaxationSweepRotation
Blanket Implementations§
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.