GooseEPM v0.11.0
Loading...
Searching...
No Matches
GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules > Class Template Reference

#include <GooseEPM/System.h>

Public Member Functions

std::string repr () const
 Basic class info.
 
const auto & shape () const
 Return the shape.
 
auto size () const
 Return the size (== prod(shape)).
 
const array_type::tensor< double, Dim > & propagator () const
 Get the propagator (as used internally: reordered/normalised compared to the input).
 
array_type::tensor< ptrdiff_t, 1 > distances (size_t axis=0) const
 Distances along an axis of the propagator.
 
auto alpha () const
 Exponent characterising the shape of the potential.
 
auto failure_rate () const
 Failure rate (parameter).
 
auto failure_idx () const
 For the last failure: index of the failing block.
 
auto failure_x () const
 For the last failure: distance to yielding before failure.
 
void set_t (double t)
 Set the time.
 
double t () const
 Get the time.
 
void set_state (uint64_t state)
 Set the state of the random number generator.
 
uint64_t state () const
 Get the state of the random number generator.
 
void set_epsp (const array_type::tensor< double, Dim > &epsp)
 Set the plastic strain.
 
const array_type::tensor< double, Dim > & epsp () const
 Get the plastic strain.
 
void set_nfails (const array_type::tensor< size_t, Dim > &nfails)
 Set the number of times each block failed.
 
const array_type::tensor< size_t, Dim > & nfails () const
 Get the number of times each block failed.
 
void set_sigmay (const array_type::tensor< double, Dim > &sigmay)
 Set the yield stress.
 
const array_type::tensor< double, Dim > & sigmay () const
 Get the yield stress.
 
void set_sigmay_mean (const array_type::tensor< double, Dim > &value)
 Set the mean wherefrom the yield stress of each block is drawn.
 
const array_type::tensor< double, Dim > & sigmay_mean () const
 Get the mean wherefrom the yield stress of each block is drawn.
 
void set_sigmay_std (const array_type::tensor< double, Dim > &value)
 Set the standard deviation wherefrom the yield stress of each block is drawn.
 
const array_type::tensor< double, Dim > & sigmay_std () const
 Get the standard deviation wherefrom the yield stress of each block is drawn.
 
void set_sigma (const array_type::tensor< double, Dim > &sigma)
 Set the stress.
 
const array_type::tensor< double, Dim > & sigma () const
 Get the stress.
 
void set_sigmabar (double sigmabar)
 Adjust the stress such that the average stress is equal to the argument.
 
double sigmabar () const
 Get the average stress.
 
double epsframe () const
 Get the current position of the loading frame.
 
void set_epsframe (double u)
 Overwrite the current position of the loading frame.
 
void initSigmaFast (double sigma_std, size_t delta_r)
 Generate a stress field that is compatible, using a fast but approximative technique.
 
void initSigmaPropogator (double sigma_std)
 Generate a stress field that is compatible.
 
void makeAthermalFailureStep ()
 Fail an unstable block, chosen randomly from all unstable blocks.
 
void makeAthermalFailureSteps (size_t n)
 Make n steps with SystemBase::makeAthermalFailureStep.
 
size_t makeAthermalFailureSteps_chrono (size_t n, double elapsed)
 Make n steps with SystemBase::makeAthermalFailureStep.
 
void makeWeakestFailureStep (bool allow_stable=false)
 Fail weakest block (unstable) and advance the time by one.
 
void makeWeakestFailureSteps (size_t n, bool allow_stable=false)
 Make n steps with SystemBase::makeWeakestFailureStep.
 
size_t makeWeakestFailureSteps_chrono (size_t n, double elapsed, bool allow_stable=false)
 Make n steps with SystemBase::makeWeakestFailureStep.
 
double temperature () const
 Get the applied temperature.
 
void set_temperature (double temperature)
 Set the applied temperature.
 
array_type::tensor< double, Dimtime_to_failure () const
 Time to failure.
 
void makeThermalFailureStep ()
 Make a thermal failure step.
 
void makeThermalFailureSteps (size_t n)
 Make n steps with SystemBase::makeThermalFailureStep.
 
size_t makeThermalFailureSteps_chrono (size_t n, double elapsed)
 Make n steps with SystemBase::makeThermalFailureStep.
 
const array_type::tensor< double, Dimx () const
 Distance to failure.
 
const array_type::tensor< bool, Dim > & unstable () const
 If a block is unstable.
 
void spatialParticleFailure (size_t idx)
 Fail a block.
 
double shiftImposedShear (int direction=1)
 Change the imposed shear strain such that one block fails in the direction of shear.
 
size_t relaxAthermal (size_t max_steps=1e9, bool max_steps_is_error=true)
 Relax the system by calling SystemBase::makeAthermalFailureStep until there are no more unstable blocks.
 
size_t relaxWeakest (size_t max_steps=1e9, bool max_steps_is_error=true)
 Relax the system by calling SystemBase::makeWeakestFailureStep until there are no more unstable blocks.
 

Static Public Attributes

static constexpr size_t Dim = Dimension
 Dimensionality of the system.
 

Protected Member Functions

void initSystem (const array_type::tensor< double, Dim > &propagator, const std::vector< array_type::tensor< ptrdiff_t, 1 > > &distances, const array_type::tensor< double, Dim > &sigmay_mean, const array_type::tensor< double, Dim > &sigmay_std, uint64_t seed, double failure_rate, double alpha, bool random_stress, StressFixer *stress_fixer=nullptr)
 

Protected Attributes

prrng::pcg32 m_gen
 Random number generator.
 
array_type::tensor< double, Dimm_propagator
 Propagator.
 
std::array< ptrdiff_t, Dimm_offset
 Minimal distance in each direction, used as offset.
 
array_type::tensor< double, Dimm_sig
 Stress.
 
array_type::tensor< double, Dimm_sigy
 Yield stress.
 
array_type::tensor< double, Dimm_sigy_mu
 Mean yield stress.
 
array_type::tensor< double, Dimm_sigy_std
 Standard deviation of yield stress.
 
array_type::tensor< double, Dimm_epsp
 Plastic strain.
 
array_type::tensor< size_t, Dimm_nfails
 Number of times a block failed.
 
array_type::tensor< bool, Dimm_unstable
 Per block: is the block unstable?
 
array_type::tensor< double, Dimm_tau_thermal
 Thermal failure rate.
 
double m_t
 Time.
 
double m_alpha
 Exponent characterising the shape of the potential.
 
StressFixer * m_stress_fixer
 Method to fix the average stress.
 
double m_temperature
 Temperature.
 
double m_inv_temp
 Inverse temperature.
 
double m_tau
 Inverse failure rate.
 
double m_failure_rate
 Failure rate (parameter).
 
size_t m_failure_idx
 For the last failure: index of the failing block.
 
double m_failure_x
 For the last failure: distance to yielding before failure.
 

Detailed Description

template<size_t Dimension, class StressFixer, class Temperature, class FailureRules>
class GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >

Failure

If a block \( f \) fails:

  1. The block looses stress: \( \sigma_f (t + \tau) = \sigma_f (t) - \Delta \sigma_f \) (see above).
  2. The stress in surrounding blocks is changed according to the propagator: \( \sigma (\vec{r}_f + \Delta \vec{r}, t + \tau) = \sigma (\vec{r}_f + \Delta \vec{r}, t) + G(\Delta \vec{r}) \Delta \sigma_f \), with \( \vec{r}_f \) is the position of the failing block and \( \Delta \vec{r} \neq \vec{0} \) the distance to it. Note: the propagator is modified internally, see below.
  3. The plastic strain of the block is increased by: \( \varepsilon^p_f (t + \tau) = \varepsilon^p_f (t) + \Delta \sigma_f / \mu \), where \( \mu \equiv 1 \) is the shear modulus.
Note
In practice the stress of the failing and surrounding blocks is updated in a single step: \( \sigma (\vec{r}_f + \Delta \vec{r}, t + \tau) = \sigma (\vec{r}_f + \Delta \vec{r}, t) + G(\Delta \vec{r}) \Delta \sigma_f \), with \( G(\Delta \vec{r} = \vec{0}) \equiv -1 \). This requirement is enforced internally upon construction.

Dynamics

Which block fails is determined based on the 'temperature', as follows:

Dimension

The dimensionality of the system is the template parameter Dim. In the Python API the system is pre-compiled in all available dimensions. For example:

 // C++
 GooseEPM::SystemStressControl<2> system(...);

 # Python
 system = GooseEPM.SystemStressControl2(...)

Initialisation

By default the stress is chosen randomly (from normal distribution with mean 0 and standard deviation 0.1) according to compatibility, and the system is relaxed to being stable. For customisation you can (in Python code):

 system = System(..., random_stress=False)
 system.sigma = ...
 ...

Since initialisation can be a expensive, you can also use the above to re-use the same initial stress distribution in multiple simulations.

Definition at line 559 of file System.h.

Member Function Documentation

◆ alpha()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
auto GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::alpha ( ) const
inline

Exponent characterising the shape of the potential.

Returns
Scalar

Definition at line 837 of file System.h.

◆ distances()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor< ptrdiff_t, 1 > GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::distances ( size_t  axis = 0) const
inline

Distances along an axis of the propagator.

Parameters
axisAxis.
Returns
list of integers.

Definition at line 827 of file System.h.

◆ epsframe()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::epsframe ( ) const
inline

Get the current position of the loading frame.

Returns
double

Definition at line 1069 of file System.h.

◆ epsp()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< double, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::epsp ( ) const
inline

Get the plastic strain.

Returns
Plastic strain per block.

Definition at line 918 of file System.h.

◆ failure_idx()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
auto GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::failure_idx ( ) const
inline

For the last failure: index of the failing block.

Returns
Scalar

Definition at line 855 of file System.h.

◆ failure_rate()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
auto GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::failure_rate ( ) const
inline

Failure rate (parameter).

Returns
Scalar

Definition at line 846 of file System.h.

◆ failure_x()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
auto GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::failure_x ( ) const
inline

For the last failure: distance to yielding before failure.

Returns
Scalar

Definition at line 864 of file System.h.

◆ initSigmaFast()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::initSigmaFast ( double  sigma_std,
size_t  delta_r 
)
inline

Generate a stress field that is compatible, using a fast but approximative technique.

Parameters
sigma_stdWidth of the normal distribution of stresses (mean == 0).
delta_rDistance to use, see above.

Definition at line 1096 of file System.h.

◆ initSigmaPropogator()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::initSigmaPropogator ( double  sigma_std)
inline

Generate a stress field that is compatible.

Internally the propagator is used.

Note
This protocol computes the convolution between a random field and the propagator. Since the propagator is defined in real space, this can ba quite costly. Instead, it is advised that you compute the convolution in Fourier space, using the expression of the propagator in Fourier space. Any additions to the Python module to this extent are welcome!
Parameters
sigma_stdWidth of the normal distribution of stresses (mean == 0).

Definition at line 1140 of file System.h.

◆ initSystem()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::initSystem ( const array_type::tensor< double, Dim > &  propagator,
const std::vector< array_type::tensor< ptrdiff_t, 1 > > &  distances,
const array_type::tensor< double, Dim > &  sigmay_mean,
const array_type::tensor< double, Dim > &  sigmay_std,
uint64_t  seed,
double  failure_rate,
double  alpha,
bool  random_stress,
StressFixer *  stress_fixer = nullptr 
)
inlineprotected

Parameters
propagatorThe propagator [shape].
distancesThe distance of each row, column, ... of the propagator [shape(0), ...].
sigmay_meanMean yield stress for every block [shape].
sigmay_stdStandard deviation of the yield stress for every block [shape].
seedSeed of the random number generator.
failure_rateFailure rate \( f_0 \).
alphaExponent characterising the shape of the potential.
random_stressInitialise the stress: random, zero mean, no unstable blocks.
stress_fixerMethod to fix the average stress.
Todo:
The failure rate might be rather a time. This should be clarified and documented.

Definition at line 592 of file System.h.

◆ makeAthermalFailureStep()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeAthermalFailureStep ( )
inline

Fail an unstable block, chosen randomly from all unstable blocks.

The time is advanced by \( \exp( 1 / (f_0 n) )\) with \( f_0 \) the failure rate (see constructor) and \( n \) the number of unstable blocks.

Note
If no block is unstable, nothing happens. To identify: system.failure_idx == system.size.

Definition at line 1188 of file System.h.

◆ makeAthermalFailureSteps()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeAthermalFailureSteps ( size_t  n)
inline

Make n steps with SystemBase::makeAthermalFailureStep.

Parameters
nNumber of steps to take.

Definition at line 1222 of file System.h.

◆ makeAthermalFailureSteps_chrono()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
size_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeAthermalFailureSteps_chrono ( size_t  n,
double  elapsed 
)
inline

Make n steps with SystemBase::makeAthermalFailureStep.

Stop at fewer steps once t seconds elapsed.

Parameters
nMaximum number of steps to take.
elapsedMaximum run time in seconds.
Returns
Number of steps taken.

Definition at line 1237 of file System.h.

◆ makeThermalFailureStep()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeThermalFailureStep ( )
inline

Make a thermal failure step.

The block with the shortest time to failure is failed (and time is advanced by that value). Thereby:

  • Unstable blocks are failed at a rate \( f_0 \) (failure_rate). This corresponds to a time to failure \( \tau = 1 / f_0 \).
  • Stable blocks are failed a rate proportional that depends on their energy barrier. This corresponds to a time to failure \( \tau_T = \tau \exp( x^\alpha / T ) \), where temperature \( T \) is in units of the Boltzmann constant, and the energy barrier \( \Delta E \equiv x^\alpha \), with \( x \) the distance to failure.

Definition at line 1375 of file System.h.

◆ makeThermalFailureSteps()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeThermalFailureSteps ( size_t  n)
inline

Make n steps with SystemBase::makeThermalFailureStep.

Parameters
nNumber of steps to take.

Definition at line 1392 of file System.h.

◆ makeThermalFailureSteps_chrono()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
size_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeThermalFailureSteps_chrono ( size_t  n,
double  elapsed 
)
inline

Make n steps with SystemBase::makeThermalFailureStep.

Stop at fewer steps once t seconds elapsed.

Parameters
nMaximum number of steps to take.
elapsedMaximum run time in seconds.
Returns
Number of steps taken.

Definition at line 1407 of file System.h.

◆ makeWeakestFailureStep()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeWeakestFailureStep ( bool  allow_stable = false)
inline

Fail weakest block (unstable) and advance the time by one.

Parameters
allow_stable
  • If true, allow the failure of any block, also if the weakest block is stable.
  • If false and no block is unstable, nothing happens. To identify: system.failure_idx == system.size.

Definition at line 1263 of file System.h.

◆ makeWeakestFailureSteps()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeWeakestFailureSteps ( size_t  n,
bool  allow_stable = false 
)
inline

Make n steps with SystemBase::makeWeakestFailureStep.

Parameters
nNumber of steps to take.
allow_stableIf true, allow the failure of a stable block.

Definition at line 1291 of file System.h.

◆ makeWeakestFailureSteps_chrono()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
size_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::makeWeakestFailureSteps_chrono ( size_t  n,
double  elapsed,
bool  allow_stable = false 
)
inline

Make n steps with SystemBase::makeWeakestFailureStep.

Stop at fewer steps once t seconds elapsed.

Parameters
nMaximum number of steps to take.
elapsedMaximum run time in seconds.
allow_stableIf true, allow the failure of a stable block.
Returns
Number of steps taken.

Definition at line 1307 of file System.h.

◆ nfails()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< size_t, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::nfails ( ) const
inline

Get the number of times each block failed.

Returns
Number of times each blocks failed.

Definition at line 936 of file System.h.

◆ propagator()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< double, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::propagator ( ) const
inline

Get the propagator (as used internally: reordered/normalised compared to the input).

Returns
Propagator.

Definition at line 817 of file System.h.

◆ relaxAthermal()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
size_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::relaxAthermal ( size_t  max_steps = 1e9,
bool  max_steps_is_error = true 
)
inline

Relax the system by calling SystemBase::makeAthermalFailureStep until there are no more unstable blocks.

Parameters
max_stepsMaximum number of iterations to allow.
max_steps_is_errorIf true, throw std::runtime_error if max_steps is reached.
Returns
Number of iterations taken: max_steps corresponds to a failure to converge.

Definition at line 1556 of file System.h.

◆ relaxWeakest()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
size_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::relaxWeakest ( size_t  max_steps = 1e9,
bool  max_steps_is_error = true 
)
inline

Relax the system by calling SystemBase::makeWeakestFailureStep until there are no more unstable blocks.

Parameters
max_stepsMaximum number of iterations to allow.
max_steps_is_errorIf true, throw std::runtime_error if max_steps is reached.
Returns
Number of iterations taken: max_steps corresponds to a failure to converge.

Definition at line 1580 of file System.h.

◆ repr()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
std::string GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::repr ( ) const
inline

Basic class info.

Returns
std::string

Definition at line 770 of file System.h.

◆ set_epsframe()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_epsframe ( double  u)
inline

Overwrite the current position of the loading frame.

Warning
The position is accepted without any checks. The stress field may be incompatible.
Parameters
uCurrent position of the loading frame.

Definition at line 1082 of file System.h.

◆ set_epsp()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_epsp ( const array_type::tensor< double, Dim > &  epsp)
inline

Set the plastic strain.

Parameters
epspPlastic strain per block.

Definition at line 909 of file System.h.

◆ set_nfails()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_nfails ( const array_type::tensor< size_t, Dim > &  nfails)
inline

Set the number of times each block failed.

Parameters
nfailsNumber of times each blocks failed.

Definition at line 927 of file System.h.

◆ set_sigma()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_sigma ( const array_type::tensor< double, Dim > &  sigma)
inline

Set the stress.

Warning
The stress is accepted without any checks. If you operate at imposed stress, call SystemBase::set_sigmabar to correct the average stress.
Parameters
sigmaStress per block.

Definition at line 1007 of file System.h.

◆ set_sigmabar()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_sigmabar ( double  sigmabar)
inline

Adjust the stress such that the average stress is equal to the argument.

Note
If the system is operated at imposed stress, the target average stress is fixes here.
If the propagator is defined according to the fixed stress protocol, the average stress is fixed to the here specified value.
Parameters
sigmabarImposed stress.

Definition at line 1034 of file System.h.

◆ set_sigmay()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_sigmay ( const array_type::tensor< double, Dim > &  sigmay)
inline

Set the yield stress.

Parameters
sigmayYield stress per block.

Definition at line 945 of file System.h.

◆ set_sigmay_mean()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_sigmay_mean ( const array_type::tensor< double, Dim > &  value)
inline

Set the mean wherefrom the yield stress of each block is drawn.

Parameters
valueMean per block.

Definition at line 964 of file System.h.

◆ set_sigmay_std()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_sigmay_std ( const array_type::tensor< double, Dim > &  value)
inline

Set the standard deviation wherefrom the yield stress of each block is drawn.

Parameters
valueStandard deviation per block.

Definition at line 983 of file System.h.

◆ set_state()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_state ( uint64_t  state)
inline

Set the state of the random number generator.

Parameters
stateState.

Definition at line 891 of file System.h.

◆ set_t()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_t ( double  t)
inline

Set the time.

Parameters
tTime.

Definition at line 873 of file System.h.

◆ set_temperature()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::set_temperature ( double  temperature)
inline

Set the applied temperature.

Definition at line 1339 of file System.h.

◆ shape()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const auto & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::shape ( ) const
inline

Return the shape.

Returns
Shape

Definition at line 799 of file System.h.

◆ shiftImposedShear()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::shiftImposedShear ( int  direction = 1)
inline

Change the imposed shear strain such that one block fails in the direction of shear.

Warning
If you call this from a system that is not relaxed (one or more blocks are unstable), the system will move in the opposite direction than imposed.
Parameters
directionSelect positive (+1) or negative (-1) direction.
Returns
The stress increment.

Definition at line 1527 of file System.h.

◆ sigma()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< double, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::sigma ( ) const
inline

Get the stress.

Returns
Stress.

Definition at line 1017 of file System.h.

◆ sigmabar()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::sigmabar ( ) const
inline

Get the average stress.

Returns
Average stress.

Definition at line 1055 of file System.h.

◆ sigmay()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< double, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::sigmay ( ) const
inline

Get the yield stress.

Returns
Yield stress per block.

Definition at line 955 of file System.h.

◆ sigmay_mean()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< double, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::sigmay_mean ( ) const
inline

Get the mean wherefrom the yield stress of each block is drawn.

Returns
Mean per block.

Definition at line 974 of file System.h.

◆ sigmay_std()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< double, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::sigmay_std ( ) const
inline

Get the standard deviation wherefrom the yield stress of each block is drawn.

Returns
Standard deviation per block.

Definition at line 993 of file System.h.

◆ size()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
auto GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::size ( ) const
inline

Return the size (== prod(shape)).

Returns
Size

Definition at line 808 of file System.h.

◆ spatialParticleFailure()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
void GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::spatialParticleFailure ( size_t  idx)
inline

Fail a block.

  • Change the stress in the block.
  • Apply the propagator to change the stress in all 'surrounding' blocks.
  • Increase the plastic strain of that block.
Parameters
idxFlat index of the block to fail.

Definition at line 1457 of file System.h.

◆ state()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
uint64_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::state ( ) const
inline

Get the state of the random number generator.

Returns
State.

Definition at line 900 of file System.h.

◆ t()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::t ( ) const
inline

Get the time.

Returns
Time.

Definition at line 882 of file System.h.

◆ temperature()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::temperature ( ) const
inline

Get the applied temperature.

Definition at line 1328 of file System.h.

◆ time_to_failure()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor< double, Dim > GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::time_to_failure ( ) const
inline

Time to failure.

Returns
Time to failure per block.

Definition at line 1353 of file System.h.

◆ unstable()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< bool, Dim > & GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::unstable ( ) const
inline

If a block is unstable.

Returns
list of bool

Definition at line 1443 of file System.h.

◆ x()

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
const array_type::tensor< double, Dim > GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::x ( ) const
inline

Distance to failure.

Returns
list of doubles

Definition at line 1429 of file System.h.

Member Data Documentation

◆ Dim

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
constexpr size_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::Dim = Dimension
staticconstexpr

Dimensionality of the system.

Definition at line 561 of file System.h.

◆ m_alpha

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_alpha
protected

Exponent characterising the shape of the potential.

Definition at line 576 of file System.h.

◆ m_epsp

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<double, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_epsp
protected

Plastic strain.

Definition at line 571 of file System.h.

◆ m_failure_idx

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
size_t GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_failure_idx
protected

For the last failure: index of the failing block.

Definition at line 582 of file System.h.

◆ m_failure_rate

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_failure_rate
protected

Failure rate (parameter).

Definition at line 581 of file System.h.

◆ m_failure_x

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_failure_x
protected

For the last failure: distance to yielding before failure.

Definition at line 583 of file System.h.

◆ m_gen

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
prrng::pcg32 GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_gen
protected

Random number generator.

Definition at line 564 of file System.h.

◆ m_inv_temp

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_inv_temp
protected

Inverse temperature.

Definition at line 579 of file System.h.

◆ m_nfails

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<size_t, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_nfails
protected

Number of times a block failed.

Definition at line 572 of file System.h.

◆ m_offset

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
std::array<ptrdiff_t, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_offset
protected

Minimal distance in each direction, used as offset.

Definition at line 566 of file System.h.

◆ m_propagator

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<double, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_propagator
protected

Propagator.

Definition at line 565 of file System.h.

◆ m_sig

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<double, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_sig
protected

Stress.

Definition at line 567 of file System.h.

◆ m_sigy

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<double, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_sigy
protected

Yield stress.

Definition at line 568 of file System.h.

◆ m_sigy_mu

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<double, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_sigy_mu
protected

Mean yield stress.

Definition at line 569 of file System.h.

◆ m_sigy_std

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<double, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_sigy_std
protected

Standard deviation of yield stress.

Definition at line 570 of file System.h.

◆ m_stress_fixer

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
StressFixer* GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_stress_fixer
protected

Method to fix the average stress.

Definition at line 577 of file System.h.

◆ m_t

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_t
protected

Time.

Definition at line 575 of file System.h.

◆ m_tau

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_tau
protected

Inverse failure rate.

Definition at line 580 of file System.h.

◆ m_tau_thermal

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<double, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_tau_thermal
protected

Thermal failure rate.

Definition at line 574 of file System.h.

◆ m_temperature

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
double GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_temperature
protected

Temperature.

Definition at line 578 of file System.h.

◆ m_unstable

template<size_t Dimension, class StressFixer , class Temperature , class FailureRules >
array_type::tensor<bool, Dim> GooseEPM::SystemBase< Dimension, StressFixer, Temperature, FailureRules >::m_unstable
protected

Per block: is the block unstable?

Definition at line 573 of file System.h.


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