Struct lattice_qcd_rs::simulation::state::SimulationStateLeap
source · pub struct SimulationStateLeap<State, const D: usize>where
State: SimulationStateSynchronous<D> + ?Sized,{ /* private fields */ }
Expand description
wrapper for a simulation state using leap frog (SimulationStateLeap
) using a synchronous type
(SimulationStateSynchronous
).
Implementations§
source§impl<State, const D: usize> SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + ?Sized,
impl<State, const D: usize> SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + ?Sized,
sourcepub const fn new_from_state(state: State) -> Self
pub const fn new_from_state(state: State) -> Self
Create a new SimulationStateLeap directly from a state without applying any modification.
In most cases wou will prefer to build it using LatticeStateNew
or Self::from_synchronous
.
sourcepub fn state_mut(&mut self) -> &mut State
pub fn state_mut(&mut self) -> &mut State
get a mutable reference to the state
sourcepub fn from_synchronous<I>(
s: &State,
integrator: &I,
delta_t: Real
) -> Result<Self, I::Error>where
I: SymplecticIntegrator<State, Self, D> + ?Sized,
pub fn from_synchronous<I>( s: &State, integrator: &I, delta_t: Real ) -> Result<Self, I::Error>where I: SymplecticIntegrator<State, Self, D> + ?Sized,
Create a leap state from a sync one by integrating by half a step the e_field.
Errors
Returns an error if the integration failed.
sourcepub fn gauss(&self, point: &LatticePoint<D>) -> Option<CMatrix3>
pub fn gauss(&self, point: &LatticePoint<D>) -> Option<CMatrix3>
Get the gauss coefficient G(x) = \sum_i E_i(x) - U_{-i}(x) E_i(x - i) U^\dagger_{-i}(x)
.
Trait Implementations§
source§impl<State: SimulationStateSynchronous<D> + LatticeStateWithEField<D>, const D: usize> AsMut<State> for SimulationStateLeap<State, D>
impl<State: SimulationStateSynchronous<D> + LatticeStateWithEField<D>, const D: usize> AsMut<State> for SimulationStateLeap<State, D>
source§fn as_mut(&mut self) -> &mut State
fn as_mut(&mut self) -> &mut State
source§impl<State: SimulationStateSynchronous<D> + LatticeStateWithEField<D>, const D: usize> AsRef<State> for SimulationStateLeap<State, D>
impl<State: SimulationStateSynchronous<D> + LatticeStateWithEField<D>, const D: usize> AsRef<State> for SimulationStateLeap<State, D>
source§impl<State, const D: usize> Clone for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + Clone,
impl<State, const D: usize> Clone for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + Clone,
source§fn clone(&self) -> SimulationStateLeap<State, D>
fn clone(&self) -> SimulationStateLeap<State, D>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl<State, const D: usize> Debug for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + Debug,
impl<State, const D: usize> Debug for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + Debug,
source§impl<State, const D: usize> Default for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + Default + ?Sized,
impl<State, const D: usize> Default for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + Default + ?Sized,
source§impl<'de, State, const D: usize> Deserialize<'de> for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + Deserialize<'de>,
impl<'de, State, const D: usize> Deserialize<'de> for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + Deserialize<'de>,
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>,
source§impl<State, const D: usize> Display for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + Display + ?Sized,
impl<State, const D: usize> Display for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + Display + ?Sized,
source§impl<State, const D: usize> Hash for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + Hash,
impl<State, const D: usize> Hash for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + Hash,
source§impl<State, const D: usize> LatticeState<D> for SimulationStateLeap<State, D>where
State: LatticeStateWithEField<D> + SimulationStateSynchronous<D> + ?Sized,
impl<State, const D: usize> LatticeState<D> for SimulationStateLeap<State, D>where State: LatticeStateWithEField<D> + SimulationStateSynchronous<D> + ?Sized,
We just transmit the function of State
, there is nothing new.
source§fn link_matrix(&self) -> &LinkMatrix
fn link_matrix(&self) -> &LinkMatrix
The link matrices of this state.
source§fn set_link_matrix(&mut self, link_matrix: LinkMatrix)
fn set_link_matrix(&mut self, link_matrix: LinkMatrix)
Panic
panic under the same condition as State::set_link_matrix
source§fn lattice(&self) -> &LatticeCyclic<D>
fn lattice(&self) -> &LatticeCyclic<D>
source§fn hamiltonian_links(&self) -> Real
fn hamiltonian_links(&self) -> Real
source§fn monte_carlo_step<M>(self, m: &mut M) -> Result<Self, M::Error>where
Self: Sized,
M: MonteCarlo<Self, D> + ?Sized,
fn monte_carlo_step<M>(self, m: &mut M) -> Result<Self, M::Error>where Self: Sized, M: MonteCarlo<Self, D> + ?Sized,
source§impl<State, const D: usize> LatticeStateWithEField<D> for SimulationStateLeap<State, D>where
State: LatticeStateWithEField<D> + SimulationStateSynchronous<D> + ?Sized,
impl<State, const D: usize> LatticeStateWithEField<D> for SimulationStateLeap<State, D>where State: LatticeStateWithEField<D> + SimulationStateSynchronous<D> + ?Sized,
We just transmit the function of State
, there is nothing new.
source§fn set_e_field(&mut self, e_field: EField<D>)
fn set_e_field(&mut self, e_field: EField<D>)
Panic
panic under the same condition as State::set_e_field
source§fn hamiltonian_efield(&self) -> Real
fn hamiltonian_efield(&self) -> Real
source§fn derivative_u(
link: &LatticeLinkCanonical<D>,
link_matrix: &LinkMatrix,
e_field: &EField<D>,
lattice: &LatticeCyclic<D>
) -> Option<CMatrix3>
fn derivative_u( link: &LatticeLinkCanonical<D>, link_matrix: &LinkMatrix, e_field: &EField<D>, lattice: &LatticeCyclic<D> ) -> Option<CMatrix3>
source§fn derivative_e(
point: &LatticePoint<D>,
link_matrix: &LinkMatrix,
e_field: &EField<D>,
lattice: &LatticeCyclic<D>
) -> Option<SVector<Su3Adjoint, D>>
fn derivative_e( point: &LatticePoint<D>, link_matrix: &LinkMatrix, e_field: &EField<D>, lattice: &LatticeCyclic<D> ) -> Option<SVector<Su3Adjoint, D>>
source§fn reset_e_field<Rng>(
&mut self,
rng: &mut Rng
) -> Result<(), StateInitializationError>where
Rng: Rng + ?Sized,
fn reset_e_field<Rng>( &mut self, rng: &mut Rng ) -> Result<(), StateInitializationError>where Rng: Rng + ?Sized,
rand_distr::StandardNormal
. Read moresource§fn hamiltonian_total(&self) -> Real
fn hamiltonian_total(&self) -> Real
LatticeStateWithEField::hamiltonian_efield
Read moresource§impl<State, const D: usize> LatticeStateWithEFieldNew<D> for SimulationStateLeap<State, D>where
State: LatticeStateWithEField<D> + SimulationStateSynchronous<D> + LatticeStateWithEFieldNew<D>,
impl<State, const D: usize> LatticeStateWithEFieldNew<D> for SimulationStateLeap<State, D>where State: LatticeStateWithEField<D> + SimulationStateSynchronous<D> + LatticeStateWithEFieldNew<D>,
§type Error = <State as LatticeStateWithEFieldNew<D>>::Error
type Error = <State as LatticeStateWithEFieldNew<D>>::Error
source§fn new(
lattice: LatticeCyclic<D>,
beta: Real,
e_field: EField<D>,
link_matrix: LinkMatrix,
t: usize
) -> Result<Self, Self::Error>
fn new( lattice: LatticeCyclic<D>, beta: Real, e_field: EField<D>, link_matrix: LinkMatrix, t: usize ) -> Result<Self, Self::Error>
source§fn new_random_e<R>(
lattice: LatticeCyclic<D>,
beta: Real,
link_matrix: LinkMatrix,
rng: &mut R
) -> Result<Self, Self::Error>where
R: Rng + ?Sized,
fn new_random_e<R>( lattice: LatticeCyclic<D>, beta: Real, link_matrix: LinkMatrix, rng: &mut R ) -> Result<Self, Self::Error>where R: Rng + ?Sized,
rand_distr::Normal
^. Read moresource§impl<State, const D: usize> Ord for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + Ord,
impl<State, const D: usize> Ord for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + Ord,
source§fn cmp(&self, other: &SimulationStateLeap<State, D>) -> Ordering
fn cmp(&self, other: &SimulationStateLeap<State, D>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl<State, const D: usize> PartialEq<SimulationStateLeap<State, D>> for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + PartialEq,
impl<State, const D: usize> PartialEq<SimulationStateLeap<State, D>> for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + PartialEq,
source§fn eq(&self, other: &SimulationStateLeap<State, D>) -> bool
fn eq(&self, other: &SimulationStateLeap<State, D>) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<State, const D: usize> PartialOrd<SimulationStateLeap<State, D>> for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + PartialOrd,
impl<State, const D: usize> PartialOrd<SimulationStateLeap<State, D>> for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + PartialOrd,
source§fn partial_cmp(&self, other: &SimulationStateLeap<State, D>) -> Option<Ordering>
fn partial_cmp(&self, other: &SimulationStateLeap<State, D>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl<State, const D: usize> Serialize for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized + Serialize,
impl<State, const D: usize> Serialize for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + Serialize,
source§impl<State, const D: usize> SimulationStateLeapFrog<D> for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + ?Sized,
impl<State, const D: usize> SimulationStateLeapFrog<D> for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + ?Sized,
This state is a leap frog state
source§fn simulate_to_synchronous<I, State>(
&self,
integrator: &I,
delta_t: Real
) -> Result<State, I::Error>where
Self: Sized,
State: SimulationStateSynchronous<D> + ?Sized,
I: SymplecticIntegrator<State, Self, D> + ?Sized,
fn simulate_to_synchronous<I, State>( &self, integrator: &I, delta_t: Real ) -> Result<State, I::Error>where Self: Sized, State: SimulationStateSynchronous<D> + ?Sized, I: SymplecticIntegrator<State, Self, D> + ?Sized,
source§fn simulate_leap<I, T>(
&self,
integrator: &I,
delta_t: Real
) -> Result<Self, I::Error>where
Self: Sized,
I: SymplecticIntegrator<T, Self, D> + ?Sized,
T: SimulationStateSynchronous<D> + ?Sized,
fn simulate_leap<I, T>( &self, integrator: &I, delta_t: Real ) -> Result<Self, I::Error>where Self: Sized, I: SymplecticIntegrator<T, Self, D> + ?Sized, T: SimulationStateSynchronous<D> + ?Sized,
source§fn simulate_leap_n<I, T>(
&self,
integrator: &I,
delta_t: Real,
numbers_of_times: usize
) -> Result<Self, MultiIntegrationError<I::Error>>where
Self: Sized,
I: SymplecticIntegrator<T, Self, D> + ?Sized,
T: SimulationStateSynchronous<D> + ?Sized,
fn simulate_leap_n<I, T>( &self, integrator: &I, delta_t: Real, numbers_of_times: usize ) -> Result<Self, MultiIntegrationError<I::Error>>where Self: Sized, I: SymplecticIntegrator<T, Self, D> + ?Sized, T: SimulationStateSynchronous<D> + ?Sized,
source§impl<State, const D: usize> SymplecticIntegrator<State, SimulationStateLeap<State, D>, D> for SymplecticEulerwhere
State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + LatticeStateWithEFieldNew<D>,
impl<State, const D: usize> SymplecticIntegrator<State, SimulationStateLeap<State, D>, D> for SymplecticEulerwhere State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + LatticeStateWithEFieldNew<D>,
§type Error = SymplecticEulerError<<State as LatticeStateWithEFieldNew<D>>::Error>
type Error = SymplecticEulerError<<State as LatticeStateWithEFieldNew<D>>::Error>
source§fn integrate_sync_sync(
&self,
l: &State,
delta_t: Real
) -> Result<State, Self::Error>
fn integrate_sync_sync( &self, l: &State, delta_t: Real ) -> Result<State, Self::Error>
source§fn integrate_leap_leap(
&self,
l: &SimulationStateLeap<State, D>,
delta_t: Real
) -> Result<SimulationStateLeap<State, D>, Self::Error>
fn integrate_leap_leap( &self, l: &SimulationStateLeap<State, D>, delta_t: Real ) -> Result<SimulationStateLeap<State, D>, Self::Error>
source§fn integrate_sync_leap(
&self,
l: &State,
delta_t: Real
) -> Result<SimulationStateLeap<State, D>, Self::Error>
fn integrate_sync_leap( &self, l: &State, delta_t: Real ) -> Result<SimulationStateLeap<State, D>, Self::Error>
source§fn integrate_leap_sync(
&self,
l: &SimulationStateLeap<State, D>,
delta_t: Real
) -> Result<State, Self::Error>
fn integrate_leap_sync( &self, l: &SimulationStateLeap<State, D>, delta_t: Real ) -> Result<State, Self::Error>
source§impl<State, const D: usize> SymplecticIntegrator<State, SimulationStateLeap<State, D>, D> for SymplecticEulerRayonwhere
State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + LatticeStateWithEFieldNew<D>,
impl<State, const D: usize> SymplecticIntegrator<State, SimulationStateLeap<State, D>, D> for SymplecticEulerRayonwhere State: SimulationStateSynchronous<D> + LatticeStateWithEField<D> + LatticeStateWithEFieldNew<D>,
§type Error = <State as LatticeStateWithEFieldNew<D>>::Error
type Error = <State as LatticeStateWithEFieldNew<D>>::Error
source§fn integrate_sync_sync(
&self,
l: &State,
delta_t: Real
) -> Result<State, Self::Error>
fn integrate_sync_sync( &self, l: &State, delta_t: Real ) -> Result<State, Self::Error>
source§fn integrate_leap_leap(
&self,
l: &SimulationStateLeap<State, D>,
delta_t: Real
) -> Result<SimulationStateLeap<State, D>, Self::Error>
fn integrate_leap_leap( &self, l: &SimulationStateLeap<State, D>, delta_t: Real ) -> Result<SimulationStateLeap<State, D>, Self::Error>
source§fn integrate_sync_leap(
&self,
l: &State,
delta_t: Real
) -> Result<SimulationStateLeap<State, D>, Self::Error>
fn integrate_sync_leap( &self, l: &State, delta_t: Real ) -> Result<SimulationStateLeap<State, D>, Self::Error>
source§fn integrate_leap_sync(
&self,
l: &SimulationStateLeap<State, D>,
delta_t: Real
) -> Result<State, Self::Error>
fn integrate_leap_sync( &self, l: &SimulationStateLeap<State, D>, delta_t: Real ) -> Result<State, Self::Error>
impl<State, const D: usize> Eq for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized + Eq,
impl<State, const D: usize> StructuralEq for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized,
impl<State, const D: usize> StructuralPartialEq for SimulationStateLeap<State, D>where State: SimulationStateSynchronous<D> + ?Sized,
Auto Trait Implementations§
impl<State, const D: usize> RefUnwindSafe for SimulationStateLeap<State, D>where State: RefUnwindSafe,
impl<State, const D: usize> Send for SimulationStateLeap<State, D>where State: Send,
impl<State, const D: usize> Sync for SimulationStateLeap<State, D>where State: Sync,
impl<State, const D: usize> Unpin for SimulationStateLeap<State, D>where State: Unpin,
impl<State, const D: usize> UnwindSafe for SimulationStateLeap<State, D>where State: UnwindSafe,
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>
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.