7#ifndef FRICTIONQPOTSPRINGBLOCK_LINE1D_H
8#define FRICTIONQPOTSPRINGBLOCK_LINE1D_H
15#include <GMatTensor/version.h>
36 return GMatTensor::version_dependencies();
45 return GMatTensor::version_compiler();
113 :
public detail::System<1, detail::Cuspy<Generator>, Generator, detail::Laplace1d> {
138 double k_interactions,
141 const std::array<size_t, 1>&
shape,
143 const std::string& distribution,
144 const std::vector<double>& parameters,
145 double offset = -100.0,
149 std::array<size_t, 1>{nchunk},
150 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
151 xt::eval(xt::zeros<uint64_t>(
shape)),
152 detail::string_to_distribution(distribution),
154 prrng::alignment( 2, 30, 6,
false)
175 detail::Cuspy<Generator>,
179 detail::Overdamped> {
201 double k_interactions,
203 const std::array<size_t, 1>&
shape,
205 const std::string& distribution,
206 const std::vector<double>& parameters,
207 double offset = -100.0,
208 size_t nchunk = 5000,
213 std::array<size_t, 1>{nchunk},
214 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
215 xt::eval(xt::zeros<uint64_t>(
shape)),
216 detail::string_to_distribution(distribution),
218 prrng::alignment( 2, 30, 6,
false)
263 detail::Cuspy<Generator>,
266 detail::RandomNormalForcing<1>,
287 double k_interactions,
292 uint64_t seed_forcing,
295 const std::array<size_t, 1>&
shape,
297 const std::string& distribution,
298 const std::vector<double>& parameters,
299 double offset = -100.0,
303 std::array<size_t, 1>{nchunk},
304 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
305 xt::eval(xt::zeros<uint64_t>(
shape)),
306 detail::string_to_distribution(distribution),
308 prrng::alignment( 2, 30, 6,
false)
315 m_gen.generators().shape(), mean, stddev, seed_forcing, dinc_init, dinc
337 :
public detail::System<1, detail::SemiSmooth<Generator>, Generator, detail::Laplace1d> {
353 double k_interactions,
356 const std::array<size_t, 1>&
shape,
358 const std::string& distribution,
359 const std::vector<double>& parameters,
360 double offset = -100.0,
364 std::array<size_t, 1>{nchunk},
365 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
366 xt::eval(xt::zeros<uint64_t>(
shape)),
367 detail::string_to_distribution(distribution),
369 prrng::alignment( 2, 30, 6,
false)
384 :
public detail::System<1, detail::Smooth<Generator>, Generator, detail::Laplace1d> {
398 double k_interactions,
401 const std::array<size_t, 1>&
shape,
403 const std::string& distribution,
404 const std::vector<double>& parameters,
405 double offset = -100.0,
409 std::array<size_t, 1>{nchunk},
410 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
411 xt::eval(xt::zeros<uint64_t>(
shape)),
412 detail::string_to_distribution(distribution),
414 prrng::alignment( 2, 30, 6,
false)
429 :
public detail::System<1, detail::Cuspy<Generator>, Generator, detail::Quartic1d> {
459 const std::array<size_t, 1>&
shape,
461 const std::string& distribution,
462 const std::vector<double>& parameters,
463 double offset = -100.0,
467 std::array<size_t, 1>{nchunk},
468 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
469 xt::eval(xt::zeros<uint64_t>(
shape)),
470 detail::string_to_distribution(distribution),
472 prrng::alignment( 2, 30, 6,
false)
488 detail::Cuspy<Generator>,
491 detail::RandomNormalForcing<1>,
518 uint64_t seed_forcing,
521 const std::array<size_t, 1>&
shape,
523 const std::string& distribution,
524 const std::vector<double>& parameters,
525 double offset = -100.0,
529 std::array<size_t, 1>{nchunk},
530 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
531 xt::eval(xt::zeros<uint64_t>(
shape)),
532 detail::string_to_distribution(distribution),
534 prrng::alignment( 2, 30, 6,
false)
541 m_gen.generators().shape(), mean, stddev, seed_forcing, dinc_init, dinc
563 :
public detail::System<1, detail::Cuspy<Generator>, Generator, detail::QuarticGradient1d> {
593 const std::array<size_t, 1>&
shape,
595 const std::string& distribution,
596 const std::vector<double>& parameters,
597 double offset = -100.0,
601 std::array<size_t, 1>{nchunk},
602 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
603 xt::eval(xt::zeros<uint64_t>(
shape)),
604 detail::string_to_distribution(distribution),
606 prrng::alignment( 2, 30, 6,
false)
621 :
public detail::System<1, detail::Cuspy<Generator>, Generator, detail::LongRange1d> {
647 double k_interactions,
651 const std::array<size_t, 1>&
shape,
653 const std::string& distribution,
654 const std::vector<double>& parameters,
655 double offset = -100.0,
659 std::array<size_t, 1>{nchunk},
660 xt::eval(seed + xt::arange<uint64_t>(
shape[0])),
661 xt::eval(xt::zeros<uint64_t>(
shape)),
662 detail::string_to_distribution(distribution),
664 prrng::alignment( 2, 30, 6,
false)
System_Cuspy_Laplace() assuming overdamped dynamics.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
System_Cuspy_Laplace_Nopassing(double mu, double k_interactions, double k_frame, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000, double eta=0.0, double dt=0.0)
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
detail::Laplace1d m_int
Class to get the forces from particle interaction.
System in which the effect of temperature in mimicked by random forcing.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
detail::Laplace1d m_int
Class to get the forces from particle interaction.
System_Cuspy_Laplace_RandomForcing(double m, double eta, double mu, double k_interactions, double k_frame, double dt, double mean, double stddev, uint64_t seed_forcing, const array_type::tensor< ptrdiff_t, 1 > &dinc_init, const array_type::tensor< ptrdiff_t, 1 > &dinc, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
detail::RandomNormalForcing< 1 > m_ext
Add extra random force to the residual.
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
Standard system with a cuspy potential energy landscape and short range interactions.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
detail::Laplace1d m_int
Class to get the forces from particle interaction.
System_Cuspy_Laplace(double m, double eta, double mu, double k_interactions, double k_frame, double dt, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
Same as System_Cuspy_Laplace() but with a quartic interactions.
detail::LongRange1d m_int
Class to get the forces from particle interaction.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
System_Cuspy_LongRange(double m, double eta, double mu, double k_interactions, double alpha, double k_frame, double dt, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
Same as System_Cuspy_Laplace() but with a quartic interactions.
detail::QuarticGradient1d m_int
Class to get the forces from particle interaction.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
System_Cuspy_QuarticGradient(double m, double eta, double mu, double k2, double k4, double k_frame, double dt, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
See System_Cuspy_Quartic() and System_Cuspy_Laplace_RandomForcing()
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
detail::Quartic1d m_int
Class to get the forces from particle interaction.
detail::RandomNormalForcing< 1 > m_ext
Add extra random force to the residual.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
System_Cuspy_Quartic_RandomForcing(double m, double eta, double mu, double a1, double a2, double k_frame, double dt, double mean, double stddev, uint64_t seed_forcing, const array_type::tensor< ptrdiff_t, 1 > &dinc_init, const array_type::tensor< ptrdiff_t, 1 > &dinc, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
Same as System_Cuspy_Laplace() but with a quartic interactions.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
System_Cuspy_Quartic(double m, double eta, double mu, double a1, double a2, double k_frame, double dt, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
detail::Quartic1d m_int
Class to get the forces from particle interaction.
Same as System_Cuspy_Laplace() but with a semi-smooth potential.
detail::SemiSmooth< Generator > m_pot
Class to get the forces from the local potential energy landscape.
detail::Laplace1d m_int
Class to get the forces from particle interaction.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
System_SemiSmooth_Laplace(double m, double eta, double mu, double kappa, double k_interactions, double k_frame, double dt, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
Same as System_Cuspy_Laplace() but with a smooth potential.
detail::Smooth< Generator > m_pot
Class to get the forces from the local potential energy landscape.
detail::Laplace1d m_int
Class to get the forces from particle interaction.
System_Smooth_Laplace(double m, double eta, double mu, double k_interactions, double k_frame, double dt, const std::array< size_t, 1 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
A piece-wise quadratic local potential energy.
Short range elastic interactions with other particles.
Short range interaction based on a quartic potential.
Short range interaction based on a quartic potential.
Each particle experiences a random force representing the effect of temperature.
A potential energy landscape of each particle that is piecewise smooth.
A potential energy landscape of each particle that is smooth.
System in generic number of dimensions.
const auto & shape() const
Shape of the system.
double eventDrivenStep(double eps, bool kick, int direction=1)
Make event driven step.
auto m() const
The mass of each particle (parameter).
size_t quasistaticActivityFirst() const
Increment with the first plastic event.
auto mu() const
The curvature of each well (parameter).
void timeSteps(size_t n)
Make a number of time steps, see timeStep().
auto eta() const
The damping coefficient (parameter).
size_t quasistaticActivityLast() const
Increment with the last plastic event.
void flowSteps(size_t n, double v_frame)
Make a number of steps with the frame moving at a constant velocity.
void initSystem(double m, double eta, double k_frame, double mu, double dt, detail::Cuspy< Generator > *potential, Generator *chunk, detail::Laplace1d *interactions=nullptr, void *external=nullptr)
Initialise the system.
auto k_frame() const
The stiffness of the loading frame (parameter).
size_t timeStepsUntilEvent(double tol=1e-5, size_t niter_tol=10, size_t max_iter=1e9)
Perform a series of time-steps until the next plastic event, or equilibrium.
void timeStep()
Effectuate one time step using the velocity Verlet algorithm.
auto dt() const
The time step (parameter).
std::vector< std::string > version_compiler()
Return information on the compiler, platform, C++ standard, and the compilation data.
prrng::pcg32_tensor_cumsum< array_type::tensor< double, 2 >, array_type::tensor< ptrdiff_t, 1 >, 1 > Generator
Chunked storage of the cumulative sum of random numbers, used in all classes.
std::vector< std::string > version_dependencies()
Return versions of this library and of all of its dependencies.
xt::xarray< T > array
Arbitrary rank array.
Tensor products / operations.