Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
DislocationLoopNode.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_DislocationLoopNode_h_
9#define model_DislocationLoopNode_h_
10
11#include <PeriodicGlidePlane.h>
12// #include <PeriodicGlidePlane.hpp>
13
15
16#ifndef NDEBUG
17#define VerboseDislocationLoopNode(N,x) if(verboseDislocationLoopNode>=N){std::cout<<x;}
18#else
19#define VerboseDislocationLoopNode(N,x)
20#endif
21
22namespace model
23{
24
25 template <int dim>
26 class DislocationLoopNode : public LoopNode<DislocationLoopNode<dim>>
27 /* */,public SplineNode<DislocationLoopNode<dim>,dim,0,Hermite>
28 {
29
30
31 std::shared_ptr<PeriodicPlanePatch<dim>> _periodicPlanePatch;
32
33 public:
34
37 typedef typename TraitsType::LoopNetworkType LoopNetworkType;
38 typedef typename TraitsType::LoopType LoopType;
39 typedef typename TraitsType::LoopNodeType LoopNodeType;
40 typedef typename TraitsType::LoopLinkType LoopLinkType;
41 typedef typename TraitsType::NetworkNodeType NetworkNodeType;
42 typedef typename TraitsType::NetworkLinkType NetworkLinkType;
43 typedef typename TraitsType::FlowType FlowType;
44 typedef typename TraitsType::VectorDim VectorDim;
45 typedef typename TraitsType::VectorLowerDim VectorLowerDim;
47
48
50 const std::pair<const std::shared_ptr<PeriodicPlaneEdge<dim>>,const std::shared_ptr<PeriodicPlaneEdge<dim>>> periodicPlaneEdge;
51 //First will always be populated if the ndoe is on an edge..Second will only be populated if the node belongs to multiple edges
52
53 public:
55 const std::shared_ptr<LoopType>&,
56 const std::shared_ptr<NetworkNodeType>&,
57 const VectorDim&,
58 const std::shared_ptr<PeriodicPlanePatch<dim>>&,
59 const std::pair<const std::shared_ptr<PeriodicPlaneEdge<dim>>,const std::shared_ptr<PeriodicPlaneEdge<dim>>>&
60 );
61
63 const std::shared_ptr<LoopType>&,
64 const std::shared_ptr<NetworkNodeType>&,
65 const LoopLinkType* const);
66
67
68
69 std::shared_ptr<DislocationLoopNode> clone(const std::shared_ptr<LoopType>&,
70 const std::shared_ptr<NetworkNodeType>&) const;
71
74
75
76 std::vector<DislocationLoopNodeType*> boundaryPrev() const;
77 std::vector<DislocationLoopNodeType*> boundaryNext() const;
78
79 void updateGeometry();
80
82
83 bool isPhysicalBoundaryNode() const;
84 bool isPeriodicSubdivision() const;
85 // A contour vertex may lie exactly on a periodic seam. It must not be
86 // confused with an artificial subdivision of a straight polygon edge.
88 void set_P(const VectorDim&);
89 void set_P(const VectorLowerDim&);
90 std::shared_ptr<PeriodicPlanePatch<dim>> periodicPlanePatch() const;
91 std::pair<bool,size_t> isRemovable(const double& Lmin,const double& Lmax, const double& relAreaTh);
92 // std::pair<bool,std::set<size_t>> isRemovable(const double& Lmin, const double& relAreaTh);
93 bool isMovableTo(const VectorDim&) const;
94 bool isContractableTo(const LoopNodeType* const other) const;
95 bool isGeometricallyRemovable(const double& Lmin,const double& Lmax, const double& relAreaTh);
96 static void initFromFile(const std::string&);
97
98 };
99
100
101
102}
103#endif
static void initFromFile(const std::string &)
TraitsType::LoopType LoopType
DislocationLoopNode(LoopNetworkType *const, const std::shared_ptr< LoopType > &, const std::shared_ptr< NetworkNodeType > &, const VectorDim &, const std::shared_ptr< PeriodicPlanePatch< dim > > &, const std::pair< const std::shared_ptr< PeriodicPlaneEdge< dim > >, const std::shared_ptr< PeriodicPlaneEdge< dim > > > &)
TraitsType::VectorDim VectorDim
std::pair< bool, size_t > isRemovable(const double &Lmin, const double &Lmax, const double &relAreaTh)
const DislocationLoopNodeType * periodicPrev() const
bool isGeometricallyRemovable(const double &Lmin, const double &Lmax, const double &relAreaTh)
TraitsType::LoopNetworkType LoopNetworkType
std::vector< DislocationLoopNodeType * > boundaryNext() const
std::shared_ptr< PeriodicPlanePatch< dim > > periodicPlanePatch() const
TraitsType::NetworkNodeType NetworkNodeType
bool isMovableTo(const VectorDim &) const
TraitsType::NetworkLinkType NetworkLinkType
TraitsType::FlowType FlowType
TraitsType::LoopLinkType LoopLinkType
std::shared_ptr< DislocationLoopNode > clone(const std::shared_ptr< LoopType > &, const std::shared_ptr< NetworkNodeType > &) const
DislocationLoopNode(LoopNetworkType *const, const std::shared_ptr< LoopType > &, const std::shared_ptr< NetworkNodeType > &, const LoopLinkType *const)
TraitsType::VectorLowerDim VectorLowerDim
std::vector< DislocationLoopNodeType * > boundaryPrev() const
void set_P(const VectorLowerDim &)
TypeTraits< DislocationLoopNodeType > TraitsType
const std::pair< const std::shared_ptr< PeriodicPlaneEdge< dim > >, const std::shared_ptr< PeriodicPlaneEdge< dim > > > periodicPlaneEdge
void set_P(const VectorDim &)
const DislocationLoopNodeType * periodicNext() const
TraitsType::LoopNodeType LoopNodeType
bool isContractableTo(const LoopNodeType *const other) const
SplineNode< DislocationLoopNode< dim >, dim, 0, Hermite > SplineNodeType
DislocationLoopNode< dim > DislocationLoopNodeType
LoopNode(LoopNetworkType *const loopNetwork_in, const std::shared_ptr< LoopType > &loop_in, const std::shared_ptr< NetworkNodeType > &networkNode_in)
Definition LoopNode.h:72