FrictionQPotSpringBlock v0.22.7
Loading...
Searching...
No Matches
FrictionQPotSpringBlock::detail::Cuspy< Generator > Class Template Reference

A piece-wise quadratic local potential energy. More...

#include <FrictionQPotSpringBlock/detail.h>

Public Member Functions

 Cuspy (double mu, Generator *chunk)
 
template<class T >
void force (const T &u, T &f)
 Update forces based on current slips.
 
template<class T >
double maxUniformDisplacement (const T &u, int direction) const
 Find maximum particle displacement for which the system is linear and uniform.
 
template<class T >
void trigger (T &u, size_t p, double eps, int direction) const
 Trigger a specific particle.
 

Protected Types

using stype = typename Generator::size_type
 Size type.
 

Protected Attributes

stype m_N
 Number of particles.
 
double m_mu
 Curvature of the potentials.
 
Generator * m_chunk
 Pointer to chunk of yield 'positions' (automatically updated if needed)
 

Detailed Description

template<class Generator>
class FrictionQPotSpringBlock::detail::Cuspy< Generator >

A piece-wise quadratic local potential energy.

The resulting force is piece-wise linear: \( f_\mathrm{pot}^{(i)} = \mu (u_{\min}^{(i)} - u_i) \). where \( \mu \) is the curvature of the quadratic potentials, and \( u_{\min}^{(i)} \) the position of the current local minimum. The landscape is given by a cumulative sum of random numbers.

Definition at line 114 of file detail.h.

Member Typedef Documentation

◆ stype

template<class Generator >
using FrictionQPotSpringBlock::detail::Cuspy< Generator >::stype = typename Generator::size_type
protected

Size type.

Definition at line 116 of file detail.h.

Constructor & Destructor Documentation

◆ Cuspy()

template<class Generator >
FrictionQPotSpringBlock::detail::Cuspy< Generator >::Cuspy ( double mu,
Generator * chunk )
inline
Parameters
muCurvature of the potentials.
chunkPointer to chunk of yield 'positions' (automatically updated if needed)
Template Parameters
GeneratorThe type of the prrng::pcg32_tensor_cumsum object.

Definition at line 129 of file detail.h.

Member Function Documentation

◆ force()

template<class Generator >
template<class T >
void FrictionQPotSpringBlock::detail::Cuspy< Generator >::force ( const T & u,
T & f )
inline

Update forces based on current slips.

Parameters
uSlip per particle.
fForce per particle (output).

Definition at line 140 of file detail.h.

◆ maxUniformDisplacement()

template<class Generator >
template<class T >
double FrictionQPotSpringBlock::detail::Cuspy< Generator >::maxUniformDisplacement ( const T & u,
int direction ) const
inline

Find maximum particle displacement for which the system is linear and uniform.

Parameters
directionIf +1: move right. If -1 move left.
Returns
Float: particle displacement.
Parameters
uSlip per particle.

Definition at line 177 of file detail.h.

◆ trigger()

template<class Generator >
template<class T >
void FrictionQPotSpringBlock::detail::Cuspy< Generator >::trigger ( T & u,
size_t p,
double eps,
int direction ) const
inline

Trigger a specific particle.

Advance to the yield position right plus a margin of eps / 2, or to the left minus a margin eps / 2.

Parameters
pParticle index.
epsMargin.
directionIf +1: move right. If -1 move left.
uSlip per particle.

Definition at line 194 of file detail.h.

Member Data Documentation

◆ m_chunk

template<class Generator >
Generator* FrictionQPotSpringBlock::detail::Cuspy< Generator >::m_chunk
protected

Pointer to chunk of yield 'positions' (automatically updated if needed)

Definition at line 119 of file detail.h.

◆ m_mu

template<class Generator >
double FrictionQPotSpringBlock::detail::Cuspy< Generator >::m_mu
protected

Curvature of the potentials.

Definition at line 118 of file detail.h.

◆ m_N

template<class Generator >
stype FrictionQPotSpringBlock::detail::Cuspy< Generator >::m_N
protected

Number of particles.

Definition at line 117 of file detail.h.


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