7#ifndef FRICTIONQPOTSPRINGBLOCK_LINE2D_H
8#define FRICTIONQPOTSPRINGBLOCK_LINE2D_H
15#include <GMatTensor/version.h>
32 seed + xt::arange<uint64_t>(shape[0] * shape[1]).reshape(shape);
55 return GMatTensor::version_dependencies();
64 return GMatTensor::version_compiler();
78 :
public detail::System<2, detail::Cuspy<Generator>, Generator, detail::Laplace2d> {
92 double k_interactions,
95 const std::array<size_t, 2>&
shape,
97 const std::string& distribution,
98 const std::vector<double>& parameters,
99 double offset = -100.0,
103 std::array<size_t, 1>{nchunk},
104 detail::get_initstate_2d(seed,
shape),
105 xt::eval(xt::zeros<uint64_t>(
shape)),
106 detail::string_to_distribution(distribution),
108 prrng::alignment( 2, 30, 6,
false)
123 :
public detail::System<2, detail::Cuspy<Generator>, Generator, detail::QuarticGradient2d> {
141 const std::array<size_t, 2>&
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 detail::get_initstate_2d(seed,
shape),
151 xt::eval(xt::zeros<uint64_t>(
shape)),
152 detail::string_to_distribution(distribution),
154 prrng::alignment( 2, 30, 6,
false)
array_type::tensor< uint64_t, 2 > get_initstate_2d(uint64_t seed, const std::array< size_t, 2 > &shape)
Get the default initial state.
Identical to Line1d::System_Cuspy_Laplace() but with '2d' interactions.
System_Cuspy_Laplace(double m, double eta, double mu, double k_interactions, double k_frame, double dt, const std::array< size_t, 2 > &shape, uint64_t seed, const std::string &distribution, const std::vector< double > ¶meters, double offset=-100.0, size_t nchunk=5000)
Standard system with a cuspy potential energy landscape and short range interactions.
detail::Laplace2d m_int
Class to get the forces from particle interaction.
detail::Cuspy< Generator > m_pot
Class to get the forces from the local potential energy landscape.
Generator m_gen
Pointer to chunk of yield 'positions' (automatically updated if needed)
Identical to Line1d::System_Cuspy_QuarticGradient() but with '2d' interactions.
System_Cuspy_QuarticGradient(double m, double eta, double mu, double k2, double k4, double k_frame, double dt, const std::array< size_t, 2 > &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::QuarticGradient2d 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.
A piece-wise quadratic local potential energy.
Short range interactions based on the Laplacian .
Short range interactions based on quartic interactions.
System in generic number of dimensions.
const auto & shape() const
Shape of the system.
auto m() const
The mass of each particle (parameter).
auto mu() const
The curvature of each well (parameter).
auto eta() const
The damping coefficient (parameter).
void initSystem(double m, double eta, double k_frame, double mu, double dt, detail::Cuspy< Generator > *potential, Generator *chunk, detail::Laplace2d *interactions=nullptr, void *external=nullptr)
Initialise the system.
auto k_frame() const
The stiffness of the loading frame (parameter).
auto dt() const
The time step (parameter).
prrng::pcg32_tensor_cumsum< array_type::tensor< double, 3 >, array_type::tensor< ptrdiff_t, 2 >, 2 > Generator
Chunked storage of the cumulative sum of random numbers, used in all classes.
std::vector< std::string > version_compiler()
Return information on the compiler, platform, C++ standard, and the compilation data.
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.