Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
DislocationLoop.h
Go to the documentation of this file.
1/* This file is part of MoDELib, the Mechanics Of Defects Evolution Library.
2 *
3 *
4 * MoDELib is distributed without any warranty under the
5 * GNU General Public License (GPL) v2 <http://www.gnu.org/licenses/>.
6 */
7
8#ifndef model_DislocationLoop_h_
9#define model_DislocationLoop_h_
10
11
14#include <CrossSlipBranch.h>
15
16
17#ifndef NDEBUG
18#define VerboseDislocationLoop(N,x) if(verboseDislocationLoop>=N){std::cout<<x;}
19#else
20#define VerboseDislocationLoop(N,x)
21#endif
22
23namespace model
24{
25 template <int _dim>
26 class DislocationLoop : public Loop<DislocationLoop<_dim>>
27 {
28
29 public:
30
32 typedef typename TraitsType::LoopNetworkType LoopNetworkType;
33 typedef typename TraitsType::LoopType LoopType;
34 typedef typename TraitsType::LoopNodeType LoopNodeType;
35 typedef typename TraitsType::LoopLinkType LoopLinkType;
36 typedef typename TraitsType::NetworkNodeType NetworkNodeType;
37 typedef typename TraitsType::NetworkLinkType NetworkLinkType;
38 typedef typename TraitsType::FlowType FlowType;
39 typedef typename TraitsType::VectorDim VectorDim;
40 typedef typename TraitsType::MatrixDim MatrixDim;
41 typedef typename TraitsType::GrainType GrainType;
42 typedef typename TraitsType::GlidePlaneType GlidePlaneType;
43 typedef typename TraitsType::PeriodicGlidePlaneType PeriodicGlidePlaneType;
44 typedef typename TraitsType::ReciprocalLatticeDirectionType ReciprocalLatticeDirectionType;
46
47 const std::shared_ptr<GlidePlaneType> glidePlane;
48 const std::shared_ptr<PeriodicGlidePlaneType> periodicGlidePlane;
51 const int loopType;
52
53 private:
54
55 VectorDim nA;
56 VectorDim nAR;
57 double _slippedArea;
58 double _slippedAreaRate;
59 VectorDim _rightHandedUnitNormal;
60 VectorDim _rightHandedUnitNormal_old;
61 std::unique_ptr<ReciprocalLatticeDirectionType> _rightHandedNormal;
62 std::shared_ptr<SlipSystem> _slipSystem;
63
64 public:
65
67 const VectorDim&,
68 const std::shared_ptr<GlidePlaneType>& glidePlane_in);
70 std::shared_ptr<LoopType> clone() const;
71 // Read current contour geometry without advancing timestep history.
73 double currentAreaRate() const;
74 const double& slippedArea() const;
75 const double& slippedAreaRate() const;
79 std::tuple<double,double,double,double> loopLength() const;
80 std::shared_ptr<SlipSystem> searchSlipSystem() const;
87 const std::shared_ptr<SlipSystem>& slipSystem() const;
89 double solidAngle(const VectorDim& x) const;
90 void crossSlipBranches(std::deque<CrossSlipBranch<_dim>>& csNodes,const double dt=-1.0) const;
92 std::vector<MeshedDislocationLoop> meshed(const double& meshSize,const double& localMeshSize) const;
93 static void initFromFile(const std::string&);
94 static double planarSolidAngle(const VectorDim& x,const VectorDim& planePoint,const VectorDim& rhN,const std::vector<std::pair<VectorDim,VectorDim>>& polygonSegments);
95 bool flippedInsideOut(const int& N,const double& areaThreshold) const;
96 template <typename T> static int sgn(const T& val);
97 };
98
99}
100#endif
const DislocationLoopPatches< _dim > & patches() const
VectorDim currentAreaVector() const
TraitsType::ReciprocalLatticeDirectionType ReciprocalLatticeDirectionType
TraitsType::LoopLinkType LoopLinkType
TraitsType::MatrixDim MatrixDim
const VectorDim & rightHandedUnitNormal() const
DislocationLoopPatches< _dim > _patches
TraitsType::LoopNodeType LoopNodeType
std::shared_ptr< LoopType > clone() const
const double & slippedArea() const
TraitsType::NetworkLinkType NetworkLinkType
std::tuple< double, double, double, double > loopLength() const
const VectorDim & rightHandedUnitNormalOld() const
bool flippedInsideOut(const int &N, const double &areaThreshold) const
void crossSlipBranches(std::deque< CrossSlipBranch< _dim > > &csNodes, const double dt=-1.0) const
DislocationLoop(LoopNetworkType *const, const VectorDim &, const std::shared_ptr< GlidePlaneType > &glidePlane_in)
TraitsType::NetworkNodeType NetworkNodeType
static double planarSolidAngle(const VectorDim &x, const VectorDim &planePoint, const VectorDim &rhN, const std::vector< std::pair< VectorDim, VectorDim > > &polygonSegments)
TraitsType::FlowType FlowType
const ReciprocalLatticeDirectionType & rightHandedNormal() const
const std::shared_ptr< SlipSystem > & slipSystem() const
TraitsType::LoopType LoopType
TraitsType::GrainType GrainType
TraitsType::VectorDim VectorDim
TraitsType::GlidePlaneType GlidePlaneType
TraitsType::LoopNetworkType LoopNetworkType
MatrixDim averagePlasticDistortion() const
const double & slippedAreaRate() const
TypeTraits< DislocationLoop< _dim > > TraitsType
const std::shared_ptr< PeriodicGlidePlaneType > periodicGlidePlane
const std::shared_ptr< GlidePlaneType > glidePlane
std::vector< MeshedDislocationLoop > meshed(const double &meshSize, const double &localMeshSize) const
static int sgn(const T &val)
std::shared_ptr< SlipSystem > searchSlipSystem() const
MatrixDim averagePlasticDistortionRate() const
double solidAngle(const VectorDim &x) const
TraitsType::PeriodicGlidePlaneType PeriodicGlidePlaneType
VectorDim burgers() const
static void initFromFile(const std::string &)
Loop(LoopNetworkType *const loopNetwork_in, const FlowType &f)
Definition Loop.h:61
x
Definition int_R.m:12