Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
CrossSlipBranch.h
Go to the documentation of this file.
1#ifndef model_CrossSlipBranch_H
2#define model_CrossSlipBranch_H
3#include <algorithm>
4#include <deque>
5#include <memory>
6#include <optional>
7#include <map>
8#include <vector>
9#include <cmath>
10#include <stdexcept>
11namespace model
12{
13 template<int dim> class DislocationLoopNode;
15 {
16 int target;
17 double length;
19 };
20
21 // Rates are integrated over physical line length, never over node count.
22 // The three uniforms select occurrence, competing target, and location.
23 std::optional<ThermalCrossSlipEvent> sampleThermalCrossSlip(
24 const std::vector<double>& lengths,
25 const std::vector<std::map<int,double>>& rates,
26 const std::map<int,double>& nucleusLengths,
27 const double dt, const double occurrence, const double targetDraw, const double positionDraw);
28
29
30 template<int dim>
32 {
34 std::deque<std::shared_ptr<LoopNodeType>> first;
35 int second;
36 std::optional<ThermalCrossSlipEvent> thermal;
37 CrossSlipBranch(std::deque<std::shared_ptr<LoopNodeType>> nodes,int target);
38 };
39}
40#endif
std::optional< ThermalCrossSlipEvent > sampleThermalCrossSlip(const std::vector< double > &lengths, const std::vector< std::map< int, double > > &rates, const std::map< int, double > &nucleusLengths, const double dt, const double occurrence, const double targetDraw, const double positionDraw)
std::deque< std::shared_ptr< LoopNodeType > > first
CrossSlipBranch(std::deque< std::shared_ptr< LoopNodeType > > nodes, int target)
DislocationLoopNode< dim > LoopNodeType
std::optional< ThermalCrossSlipEvent > thermal