Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
MeshedDislocationLoop.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_MeshedDislocationLoop_h_
9#define model_MeshedDislocationLoop_h_
10
11
12
13
14#ifndef NDEBUG
15#define VerboseMeshedDislocationLoop(N,x) if(verboseMeshedDislocationLoop>=N){std::cout<<x;}
16#else
17#define VerboseMeshedDislocationLoop(N,x)
18#endif
19
20#include <deque>
21#include <vector>
22#include <Plane.h>
24#include <DislocationNetwork.h>
26
27namespace model
28{
29 struct MeshedDislocationLoop //: public TriangularMesh
30 {
31 typedef Eigen::Matrix<double,3,1> VectorDim;
32 typedef Eigen::Matrix<double,3,3> MatrixDim;
33
35 std::map<Eigen::Matrix<double,2,1>,int,CompareType> uniquePointsIDs;
36
37
39 std::vector<VectorDim> periodicShifts;
40 std::deque<VectorDim> points;
41 std::deque<VectorDim> heightPoints;
42 std::deque<VectorDim> displacements;
43 std::deque<VectorDim> heightDisplacements;
44
45 std::deque<MatrixDim> invVertexMatrix;
46 std::deque<MatrixDim> defGradients;
47
48 std::deque<Eigen::Vector3i> triangles;
49
50 // MeshedDislocationLoop(const VectorDim& burgers_in,const DefectiveCrystalBase<3>& ddBase,const GlidePlane<3>& plane_in,const std::vector<Eigen::Matrix<double,3,1>>& globalBndPts,const double& meshSize,const double& localMeshSize);
51// MeshedDislocationLoop(const std::shared_ptr<PeriodicPlanePatch<3>>& patch,const std::vector<Eigen::Matrix<double,3,1>>& globalBndPts,const DislocationNetwork<3,0>& DN,const double& meshSize,const double& localMeshSize);
52 MeshedDislocationLoop(const VectorDim& burgers_in,const GlidePlane<3>& plane,const std::vector<Eigen::Matrix<double,3,1>>& globalBndPts,const DislocationNetwork<3>& DN,const double& meshSize,const double& localMeshSize);
53
54 void update();
55
56 VectorDim plasticDisplacementKernel(const Eigen::Ref<const VectorDim>& x) const;
57 Eigen::Matrix<double,Eigen::Dynamic,3> plasticDisplacement(Eigen::Ref<const Eigen::Matrix<double,Eigen::Dynamic,3>>) const;
58 VectorDim triangleAreaVector(const Eigen::Vector3i&) const;
59 double solidAngle(const VectorDim& x,const size_t& triID) const;
60
61 template <typename T>
62 static int sgn(const T& val)
63 {
64 return (val > T(0)) - (val < T(0));
65 }
66
67 };
68
69}
70#endif
x
Definition int_R.m:12
std::deque< VectorDim > heightDisplacements
MeshedDislocationLoop(const VectorDim &burgers_in, const GlidePlane< 3 > &plane, const std::vector< Eigen::Matrix< double, 3, 1 > > &globalBndPts, const DislocationNetwork< 3 > &DN, const double &meshSize, const double &localMeshSize)
VectorDim triangleAreaVector(const Eigen::Vector3i &) const
std::map< Eigen::Matrix< double, 2, 1 >, int, CompareType > uniquePointsIDs
CompareVectorsByComponent< double, 2, float > CompareType
std::deque< MatrixDim > defGradients
std::deque< VectorDim > displacements
double solidAngle(const VectorDim &x, const size_t &triID) const
VectorDim plasticDisplacementKernel(const Eigen::Ref< const VectorDim > &x) const
Eigen::Matrix< double, Eigen::Dynamic, 3 > plasticDisplacement(Eigen::Ref< const Eigen::Matrix< double, Eigen::Dynamic, 3 > >) const
std::deque< VectorDim > heightPoints
std::vector< VectorDim > periodicShifts
std::deque< MatrixDim > invVertexMatrix
Eigen::Matrix< double, 3, 3 > MatrixDim
Eigen::Matrix< double, 3, 1 > VectorDim
std::deque< Eigen::Vector3i > triangles