55// _|\_\_| \__,_|\__|\___/ ____/
66// Multi-Physics
77//
8- // License: BSD License
9- // Kratos default license: kratos/license.txt
8+ // License: BSD License
9+ // Kratos default license: kratos/license.txt
1010//
1111// Main authors: Vicente Mataix Ferrandiz
1212//
13- # if !defined(KRATOS_EXACT_MORTAR_INTEGRATION_UTILITY_H_INCLUDED)
14- #define KRATOS_EXACT_MORTAR_INTEGRATION_UTILITY_H_INCLUDED
13+
14+ #pragma once
1515
1616// System includes
1717#include < iostream>
@@ -47,19 +47,8 @@ namespace Kratos {
4747// /@name Type Definitions
4848// /@{
4949
50- // / Geometric definitions
51- typedef Point PointType;
52- typedef Node NodeType;
53- typedef Geometry<NodeType> GeometryType;
54- typedef Geometry<PointType> GeometryPointType;
55-
56- // /Type definition for integration methods
57- typedef GeometryData::IntegrationMethod IntegrationMethod;
58- typedef IntegrationPoint<2 > IntegrationPointType;
59- typedef GeometryType::IntegrationPointsArrayType IntegrationPointsType;
60-
6150 // / The definition of the size type
62- typedef std::size_t SizeType ;
51+ using SizeType = std::size_t ;
6352
6453// /@}
6554// /@name Enum's
@@ -91,50 +80,70 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
9180 // /@name Type Definitions
9281 // /@{
9382
94- // / The type of points belongfs to be considered
95- typedef typename std::conditional<TNumNodes == 2 , PointBelongsLine2D2N, typename std::conditional<TNumNodes == 3 , typename std::conditional<TNumNodesMaster == 3 , PointBelongsTriangle3D3N, PointBelongsTriangle3D3NQuadrilateral3D4N>::type, typename std::conditional<TNumNodesMaster == 3 , PointBelongsQuadrilateral3D4NTriangle3D3N, PointBelongsQuadrilateral3D4N>::type>::type>::type BelongType;
83+ // / The definition of the class
84+ using ClassType = ExactMortarIntegrationUtility<TDim, TNumNodes, TBelong, TNumNodesMaster>;
85+
86+ // / Geometric definitions
87+ using GeometryType = Geometry<Node>;
88+ using GeometryPointType = Geometry<Point>;
89+
90+ // / Type definition for integration methods
91+ using IntegrationMethod = GeometryData::IntegrationMethod;
92+ using IntegrationPointType = IntegrationPoint<2 >;
93+ using IntegrationPointsType = GeometryType::IntegrationPointsArrayType;
94+
95+ // / The type of points to be considered
96+ using BelongType = typename std::conditional<TNumNodes == 2 ,
97+ PointBelongsLine2D2N,
98+ typename std::conditional<TNumNodes == 3 ,
99+ typename std::conditional<TNumNodesMaster == 3 ,
100+ PointBelongsTriangle3D3N,
101+ PointBelongsTriangle3D3NQuadrilateral3D4N>::type,
102+ typename std::conditional<TNumNodesMaster == 3 ,
103+ PointBelongsQuadrilateral3D4NTriangle3D3N,
104+ PointBelongsQuadrilateral3D4N>::type>::type>::type;
96105
97106 // / The definition of the point with belonging
98- typedef PointBelong<TNumNodes, TNumNodesMaster> PointBelongType ;
107+ using PointBelongType = PointBelong<TNumNodes, TNumNodesMaster>;
99108
100- // / An array of points belong
101- typedef std::vector<array_1d<PointBelongType, TDim>> VectorArrayPointsBelong ;
109+ // / An array of points with belonging
110+ using VectorArrayPointsBelong = std::vector<array_1d<PointBelongType, TDim>>;
102111
103- // / A vector of points
104- typedef std::vector<array_1d<PointType , TDim>> VectorArrayPoints ;
112+ // / A vector of normal points
113+ using VectorArrayPoints = std::vector<array_1d<Point , TDim>>;
105114
106115 // / The type of array of points to be considered depending if we are interested in derivatives or not
107- typedef typename std::conditional<TBelong, VectorArrayPointsBelong,VectorArrayPoints>::type ConditionArrayListType ;
116+ using ConditionArrayListType = typename std::conditional<TBelong, VectorArrayPointsBelong, VectorArrayPoints>::type;
108117
109118 // / A vector of points for derivatives
110- typedef std::vector<PointBelongType> VectorPointsBelong ;
119+ using VectorPointsBelong = std::vector<PointBelongType>;
111120
112121 // / A vector of normal points
113- typedef std::vector<PointType> VectorPoints ;
122+ using VectorPoints = std::vector<Point> ;
114123
115124 // / The type of vector of points to be considered depending if we are interested in define derivatives or not
116- typedef typename std::conditional<TBelong, VectorPointsBelong, VectorPoints>::type PointListType ;
125+ using PointListType = typename std::conditional<TBelong, VectorPointsBelong, VectorPoints>::type;
117126
118- // / An array of points belong
119- typedef array_1d<PointBelongType, 3 > ArrayPointsBelong ;
127+ // / An array of points with belonging
128+ using ArrayPointsBelong = array_1d<PointBelongType, 3 >;
120129
121130 // / An array of normal points
122- typedef array_1d<PointType , 3 > ArrayPoints ;
131+ using ArrayPoints = array_1d<Point , 3 >;
123132
124- // / The type of arrayt of points to be used depending if we are interested in derivatives or not
125- typedef typename std::conditional<TBelong, ArrayPointsBelong, ArrayPoints>::type ArrayTriangleType ;
133+ // / The type of array of points to be used depending if we are interested in derivatives or not
134+ using ArrayTriangleType = typename std::conditional<TBelong, ArrayPointsBelong, ArrayPoints>::type;
126135
127136 // / The points line geometry
128- typedef Line2D2<Point> LineType ;
137+ using LineType = Line2D2<Point>;
129138
130139 // / The points triangle geometry
131- typedef Triangle3D3<Point> TriangleType ;
140+ using TriangleType = Triangle3D3<Point>;
132141
133142 // / The geometry that will be considered for decomposition
134- typedef typename std::conditional<TDim == 2 , LineType, TriangleType>::type DecompositionType ;
143+ using DecompositionType = typename std::conditional<TDim == 2 , LineType, TriangleType>::type;
135144
136145 // / The definition of the index type
137- typedef std::size_t IndexType ;
146+ using IndexType = std::size_t ;
138147
139148 // / Definition of epsilon
140149 static constexpr double ZeroTolerance = std::numeric_limits<double >::epsilon ();
@@ -434,11 +443,11 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
434443 * @return True if there is a intersection point, false otherwise
435444 */
436445 static inline bool Clipping2D (
437- PointType & rPointIntersection,
438- const PointType & rPointOrig1,
439- const PointType & rPointOrig2,
440- const PointType & rPointDest1,
441- const PointType & rPointDest2
446+ Point & rPointIntersection,
447+ const Point & rPointOrig1,
448+ const Point & rPointOrig2,
449+ const Point & rPointDest1,
450+ const Point & rPointDest2
442451 )
443452 {
444453 const array_1d<double , 3 >& r_coord_point_orig1 = rPointOrig1.Coordinates ();
@@ -501,8 +510,8 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
501510 * @return angle The angle formed
502511 */
503512 static inline double AnglePoints (
504- const PointType & rPointOrig1,
505- const PointType & rPointOrig2,
513+ const Point & rPointOrig1,
514+ const Point & rPointOrig2,
506515 const array_1d<double , 3 >& rAxis1,
507516 const array_1d<double , 3 >& rAxis2
508517 )
@@ -524,8 +533,8 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
524533 * @return check The check done
525534 */
526535 static inline bool CheckPoints (
527- const PointType & rPointOrig,
528- const PointType & rPointDest
536+ const Point & rPointOrig,
537+ const Point & rPointDest
529538 )
530539 {
531540// const double tolerance = std::numeric_limits<double>::epsilon(); // NOTE: Giving some problems, too tight
@@ -541,9 +550,9 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
541550 * @return The DetJ
542551 */
543552 static inline double FastTriagleCheck2D (
544- const PointType & rPointOrig1,
545- const PointType & rPointOrig2,
546- const PointType & rPointOrig3
553+ const Point & rPointOrig1,
554+ const Point & rPointOrig2,
555+ const Point & rPointOrig3
547556 )
548557 {
549558 const double x10 = rPointOrig2.X () - rPointOrig1.X ();
@@ -660,7 +669,7 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
660669 PointListType& rPointList,
661670 const GeometryPointType& rSlaveGeometry,
662671 const GeometryPointType& rMasterGeometry,
663- const PointType & rRefCenter
672+ const Point & rRefCenter
664673 );
665674
666675 /* *
@@ -684,7 +693,7 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
684693 const GeometryPointType& rMasterGeometry,
685694 const array_1d<double , 3 >& rSlaveTangentXi,
686695 const array_1d<double , 3 >& rSlaveTangentEta,
687- const PointType & rRefCenter,
696+ const Point & rRefCenter,
688697 const bool IsAllInside = false
689698 );
690699
@@ -700,21 +709,7 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
700709 );
701710
702711 // /@}
703- // /@name Protected Access
704- // /@{
705-
706- // /@}
707- // /@name Protected Inquiry
708- // /@{
709-
710- // /@}
711- // /@name Protected LifeCycle
712- // /@{
713- // /@}
714712private:
715- // /@name Static Member Variables
716- // /@{
717- // /@}
718713 // /@name Member Variables
719714 // /@{
720715
@@ -726,29 +721,5 @@ class KRATOS_API(KRATOS_CORE) ExactMortarIntegrationUtility
726721 bool mConsiderDelaunator ; // / If consider the DelaunatorUtilities in 3D in order to construct the triangles
727722
728723 // /@}
729- // /@name Private Operators
730- // /@{
731-
732- // /@}
733- // /@name Private Operations
734- // /@{
735-
736- // /@}
737- // /@name Private Access
738- // /@{
739- // /@}
740-
741- // /@}
742- // /@name Serialization
743- // /@{
744-
745- // /@name Private Inquiry
746- // /@{
747- // /@}
748-
749- // /@name Unaccessible methods
750- // /@{
751- // /@}
752724}; // Class ExactMortarIntegrationUtility
753725}
754- #endif /* KRATOS_EXACT_MORTAR_INTEGRATION_UTILITY_H_INCLUDED defined */
0 commit comments