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>
impl<State, const D: usize> SimulationStateLeap<State, D>
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>
impl<State, const D: usize> Clone for SimulationStateLeap<State, D>
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>
impl<State, const D: usize> Debug for SimulationStateLeap<State, D>
Source§impl<State, const D: usize> Default for SimulationStateLeap<State, D>
impl<State, const D: usize> Default for SimulationStateLeap<State, D>
Source§impl<'de, State, const D: usize> Deserialize<'de> for SimulationStateLeap<State, D>
impl<'de, State, const D: usize> Deserialize<'de> for SimulationStateLeap<State, D>
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>
impl<State, const D: usize> Display for SimulationStateLeap<State, D>
Source§impl<State, const D: usize> Hash for SimulationStateLeap<State, D>
impl<State, const D: usize> Hash for SimulationStateLeap<State, D>
Source§impl<State, const D: usize> LatticeState<D> for SimulationStateLeap<State, D>
We just transmit the function of State, there is nothing new.
impl<State, const D: usize> LatticeState<D> for SimulationStateLeap<State, D>
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§impl<State, const D: usize> LatticeStateWithEField<D> for SimulationStateLeap<State, D>
We just transmit the function of State, there is nothing new.
impl<State, const D: usize> LatticeStateWithEField<D> for SimulationStateLeap<State, D>
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>
fn reset_e_field<Rng>( &mut self, rng: &mut Rng, ) -> Result<(), StateInitializationError>
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>,
Source§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>
fn new_random_e<R>( lattice: LatticeCyclic<D>, beta: Real, link_matrix: LinkMatrix, rng: &mut R, ) -> Result<Self, Self::Error>
rand_distr::Normal^. Read moreSource§impl<State, const D: usize> Ord for SimulationStateLeap<State, D>
impl<State, const D: usize> Ord for SimulationStateLeap<State, D>
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 for SimulationStateLeap<State, D>
impl<State, const D: usize> PartialEq for SimulationStateLeap<State, D>
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 for SimulationStateLeap<State, D>
impl<State, const D: usize> PartialOrd for SimulationStateLeap<State, D>
Source§impl<State, const D: usize> Serialize for SimulationStateLeap<State, D>
impl<State, const D: usize> Serialize for SimulationStateLeap<State, D>
Source§impl<State, const D: usize> SimulationStateLeapFrog<D> for SimulationStateLeap<State, D>
This state is a leap frog state
impl<State, const D: usize> SimulationStateLeapFrog<D> for SimulationStateLeap<State, D>
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>,
Source§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>,
Source§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>
impl<State, const D: usize> StructuralPartialEq for SimulationStateLeap<State, D>where
State: SimulationStateSynchronous<D> + ?Sized,
Auto Trait Implementations§
impl<State, const D: usize> Freeze for SimulationStateLeap<State, D>where
State: Freeze,
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§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).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.