Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
SegmentSegmentDistance.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_SegmentSegmentDistance_H_
9#define model_SegmentSegmentDistance_H_
10
11#include <cfloat>
12#include <cfloat>
13#include <deque>
14#include <map>
15#include <tuple>
16#include <Eigen/Dense>
17
18namespace model
19{
25 template <int dim>
27 {
28
29 typedef Eigen::Matrix<double,dim,1> VectorDim;
30
31 typedef Eigen::Matrix<long double,dim,1> VectorDimLD;
32
33 typedef std::tuple<VectorDim,double,double> IntersectionPointType;
34 typedef std::deque<IntersectionPointType> IntersectionContainerType;
35
36 static constexpr double tol=100*DBL_EPSILON;
37
38 /**********************************************************************/
39 static long double limitRange(const long double& v);
40
41
42 /**********************************************************************/
43 std::pair<long double,long double> step4U(const long double& T) const;
44
45
46 /**********************************************************************/
47 std::pair<long double,long double> step4(const long double& U) const;
48
49
50 /**********************************************************************/
51 std::pair<long double,long double> step3(const long double& T) const;
52
53
54 /**********************************************************************/
55 std::pair<long double,long double> step2() const;
56
57
58 /**********************************************************************/
59 std::pair<long double,long double> getTU() const;
60
61
62
67 const double degeneracyValue;
68
72
73 const long double R;
74 const long double S1;
75 const long double S2;
76 const long double D1;
77 const long double D2;
78 const long double den;
79
80 const std::pair<long double,long double> tu;
81 const long double t;
82 const long double u;
83 const long double dMin;
86
87
88 /**********************************************************************/
90 const VectorDim& B0,
91 const VectorDim& C0,
92 const VectorDim& D0,
93 const double& degeneracyValue_in=0.0) ;
94
95 /**********************************************************************/
97
98 bool isIntersecting(const double tolerance = FLT_EPSILON) const;
99 };
100}
101#endif
Eigen::Matrix< long double, dim, 1 > VectorDimLD
const std::pair< long double, long double > tu
IntersectionContainerType intersectionSegment() const
std::pair< long double, long double > step4U(const long double &T) const
std::tuple< VectorDim, double, double > IntersectionPointType
static long double limitRange(const long double &v)
std::pair< long double, long double > step2() const
bool isIntersecting(const double tolerance=FLT_EPSILON) const
Eigen::Matrix< double, dim, 1 > VectorDim
std::pair< long double, long double > step3(const long double &T) const
std::pair< long double, long double > getTU() const
SegmentSegmentDistance(const VectorDim &A0, const VectorDim &B0, const VectorDim &C0, const VectorDim &D0, const double &degeneracyValue_in=0.0)
std::pair< long double, long double > step4(const long double &U) const
std::deque< IntersectionPointType > IntersectionContainerType
REAL v[4]