FrictionQPotSpringBlock v0.22.7
Loading...
Searching...
No Matches
FrictionQPotSpringBlock::detail::RandomNormalForcing< rank > Class Template Reference

Each particle experiences a random force representing the effect of temperature. More...

#include <FrictionQPotSpringBlock/detail.h>

Public Member Functions

template<class T , class S >
 RandomNormalForcing (const S &shape, double mean, double stddev, uint64_t seed, const T &dinc_init, const T &dinc)
 
template<class T , class S >
void force (const T &u, T &f, S inc)
 Update forces based on current slips.
 
uint64_t state () const
 State of the random number generator.
 
void set_state (uint64_t state)
 Change the state of the random number generator.
 
const auto & f_thermal () const
 Current random force.
 
void set_f_thermal (const array_type::tensor< double, rank > &f_thermal)
 Change the random force.
 
const auto & next ()
 Next increment at which the random force is changed.
 
void set_next (const array_type::tensor< ptrdiff_t, rank > &next)
 Overwrite the next increment at which the random force is changed.
 

Protected Attributes

std::array< size_type, rank > m_shape
 Shape of the system.
 
size_type m_N
 Number of particles.
 
array_type::tensor< double, rank > m_f_thermal
 Current applied 'random' forces.
 
double m_mean
 Mean of the random distribution.
 
double m_stddev
 Standard deviation of the random distribution.
 
array_type::tensor< ptrdiff_t, rank > m_next
 Next increment at to draw.
 
array_type::tensor< ptrdiff_t, rank > m_dinc
 #increments between two draws.
 
prrng::pcg32 m_rng
 Random number generator.
 

Detailed Description

template<size_t rank>
class FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >

Each particle experiences a random force representing the effect of temperature.

The random force drawn from a random distribution and is changed every n increments. As such, it is defined by:

  • The mean and standard deviation of the random distribution.
  • The first increment at which the random force is changed.
  • The number of increments between two changes of the random force.
Template Parameters
rankrank of the system

Definition at line 882 of file detail.h.

Constructor & Destructor Documentation

◆ RandomNormalForcing()

template<size_t rank>
template<class T , class S >
FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::RandomNormalForcing ( const S & shape,
double mean,
double stddev,
uint64_t seed,
const T & dinc_init,
const T & dinc )
inline
Parameters
shapeShape of the system.
meanMean of the random distribution.
stddevStandard deviation of the random distribution.
seedSeed for the random number generator.
dinc_initNumber of increments to wait to draw the first random force.
dinc#increments between two draws.

Definition at line 905 of file detail.h.

Member Function Documentation

◆ f_thermal()

template<size_t rank>
const auto & FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::f_thermal ( ) const
inline

Current random force.

Returns
Array.

Definition at line 967 of file detail.h.

◆ force()

template<size_t rank>
template<class T , class S >
void FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::force ( const T & u,
T & f,
S inc )
inline

Update forces based on current slips.

Parameters
uSlip per particle.
fForce per particle (output: added to current result).
incCurrent increment.

Definition at line 931 of file detail.h.

◆ next()

template<size_t rank>
const auto & FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::next ( )
inline

Next increment at which the random force is changed.

Returns
Array

Definition at line 986 of file detail.h.

◆ set_f_thermal()

template<size_t rank>
void FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::set_f_thermal ( const array_type::tensor< double, rank > & f_thermal)
inline

Change the random force.

Parameters
f_thermalNew random force.

Definition at line 976 of file detail.h.

◆ set_next()

template<size_t rank>
void FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::set_next ( const array_type::tensor< ptrdiff_t, rank > & next)
inline

Overwrite the next increment at which the random force is changed.

Parameters
nextNext increment.

Definition at line 995 of file detail.h.

◆ set_state()

template<size_t rank>
void FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::set_state ( uint64_t state)
inline

Change the state of the random number generator.

Parameters
stateState.

Definition at line 958 of file detail.h.

◆ state()

template<size_t rank>
uint64_t FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::state ( ) const
inline

State of the random number generator.

Returns
State.

Definition at line 949 of file detail.h.

Member Data Documentation

◆ m_dinc

template<size_t rank>
array_type::tensor<ptrdiff_t, rank> FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_dinc
protected

#increments between two draws.

Definition at line 890 of file detail.h.

◆ m_f_thermal

template<size_t rank>
array_type::tensor<double, rank> FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_f_thermal
protected

Current applied 'random' forces.

Definition at line 886 of file detail.h.

◆ m_mean

template<size_t rank>
double FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_mean
protected

Mean of the random distribution.

Definition at line 887 of file detail.h.

◆ m_N

template<size_t rank>
size_type FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_N
protected

Number of particles.

Definition at line 885 of file detail.h.

◆ m_next

template<size_t rank>
array_type::tensor<ptrdiff_t, rank> FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_next
protected

Next increment at to draw.

Definition at line 889 of file detail.h.

◆ m_rng

template<size_t rank>
prrng::pcg32 FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_rng
protected

Random number generator.

Definition at line 891 of file detail.h.

◆ m_shape

template<size_t rank>
std::array<size_type, rank> FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_shape
protected

Shape of the system.

Definition at line 884 of file detail.h.

◆ m_stddev

template<size_t rank>
double FrictionQPotSpringBlock::detail::RandomNormalForcing< rank >::m_stddev
protected

Standard deviation of the random distribution.

Definition at line 888 of file detail.h.


The documentation for this class was generated from the following file: