30 #include "utilities/geometry_utilities.h"
231 typename PointType::Pointer pSecondPoint,
232 typename PointType::Pointer pThirdPoint )
241 :
BaseType( ThisPoints, &msGeometryData )
250 ) :
BaseType(GeometryId, rThisPoints, &msGeometryData)
257 const std::string& rGeometryName,
259 ) :
BaseType(rGeometryName, rThisPoints, &msGeometryData)
342 template<
class TOtherPo
intType>
362 return typename BaseType::Pointer(
new Triangle3D3( rThisPoints ) );
376 return typename BaseType::Pointer(
new Triangle3D3( NewGeometryId, rThisPoints ) );
388 auto p_geometry =
typename BaseType::Pointer(
new Triangle3D3( rGeometry.
Points() ) );
389 p_geometry->SetData(rGeometry.
GetData());
404 auto p_geometry =
typename BaseType::Pointer(
new Triangle3D3( NewGeometryId, rGeometry.
Points() ) );
405 p_geometry->SetData(rGeometry.
GetData());
416 rResult.
resize( 3, 2 ,
false);
418 rResult( 0, 0 ) = 0.0;
419 rResult( 0, 1 ) = 0.0;
420 rResult( 1, 0 ) = 1.0;
421 rResult( 1, 1 ) = 0.0;
422 rResult( 2, 0 ) = 0.0;
423 rResult( 2, 1 ) = 1.0;
440 rResult.
resize( 3,
false );
441 std::fill( rResult.
begin(), rResult.
end(), 1.00 / 3.00 );
470 return std::sqrt(2.0 *
Area());
488 const double s = (
a+
b+
c) / 2.0;
490 return std::sqrt(s*(s-
a)*(s-
b)*(s-
c));
536 const double sa = (
a[0]*
a[0])+(
a[1]*
a[1])+(
a[2]*
a[2]);
537 const double sb = (
b[0]*
b[0])+(
b[1]*
b[1])+(
b[2]*
b[2]);
538 const double sc = (
c[0]*
c[0])+(
c[1]*
c[1])+(
c[2]*
c[2]);
540 return CalculateMinEdgeLength(sa, sb, sc);
557 const double sa = (
a[0]*
a[0])+(
a[1]*
a[1])+(
a[2]*
a[2]);
558 const double sb = (
b[0]*
b[0])+(
b[1]*
b[1])+(
b[2]*
b[2]);
559 const double sc = (
c[0]*
c[0])+(
c[1]*
c[1])+(
c[2]*
c[2]);
561 return CalculateMaxEdgeLength(sa, sb, sc);
574 return CalculateAvgEdgeLength(
590 return CalculateCircumradius(
606 return CalculateInradius(
616 constexpr
double epsilon = std::numeric_limits<double>::epsilon();
619 double du0 = Distances[0];
620 double du1 = Distances[1];
621 double du2 = Distances[2];
624 if (std::abs(du0)<epsilon) du0 = 0.0;
625 if (std::abs(du1)<epsilon) du1 = 0.0;
626 if (std::abs(du2)<epsilon) du2 = 0.0;
628 const double du0du1 = du0*du1;
629 const double du0du2 = du0*du2;
631 if (du0du1>0.00 && du0du2>0.00)
640 int index =
static_cast<int>(std::abs(
V[0]) < std::abs(
V[1]));
641 return (std::abs(
V[index]) > std::abs(
V[2])) ? index : 2;
654 return LineTriangleOverlap(rThisGeometry[0], rThisGeometry[1]);
657 return TriangleTriangleOverlap(rThisGeometry[0], rThisGeometry[1], rThisGeometry[2]);
660 if ( TriangleTriangleOverlap(rThisGeometry[0], rThisGeometry[1], rThisGeometry[2]) )
return true;
661 else if ( TriangleTriangleOverlap(rThisGeometry[2], rThisGeometry[3], rThisGeometry[0]) )
return true;
665 KRATOS_ERROR <<
"Triangle3D3::HasIntersection : Geometry cannot be identified, please, check the intersecting geometry type." << std::endl;
685 box_center[0] = 0.5 * (rLowPoint[0] + rHighPoint[0]);
686 box_center[1] = 0.5 * (rLowPoint[1] + rHighPoint[1]);
687 box_center[2] = 0.5 * (rLowPoint[2] + rHighPoint[2]);
689 box_half_size[0] = 0.5 * std::abs(rHighPoint[0] - rLowPoint[0]);
690 box_half_size[1] = 0.5 * std::abs(rHighPoint[1] - rLowPoint[1]);
691 box_half_size[2] = 0.5 * std::abs(rHighPoint[2] - rLowPoint[2]);
693 return TriBoxOverlap(box_center, box_half_size);
710 constexpr
double normFactor = 1.0;
716 return normFactor * CalculateInradius(
a,
b,
c) / CalculateCircumradius(
a,
b,
c);
731 constexpr
double normFactor = 1.0;
737 const double sa = (
a[0]*
a[0])+(
a[1]*
a[1])+(
a[2]*
a[2]);
738 const double sb = (
b[0]*
b[0])+(
b[1]*
b[1])+(
b[2]*
b[2]);
739 const double sc = (
c[0]*
c[0])+(
c[1]*
c[1])+(
c[2]*
c[2]);
741 return normFactor * CalculateInradius(std::sqrt(sa),std::sqrt(sb),std::sqrt(sc)) / CalculateMaxEdgeLength(sa,sb,sc);
757 constexpr
double normFactor = 1.0;
763 const double sa = (
a[0]*
a[0])+(
a[1]*
a[1])+(
a[2]*
a[2]);
764 const double sb = (
b[0]*
b[0])+(
b[1]*
b[1])+(
b[2]*
b[2]);
765 const double sc = (
c[0]*
c[0])+(
c[1]*
c[1])+(
c[2]*
c[2]);
767 return normFactor *
Area() / (sa+sb+sc);
782 constexpr
double normFactor = 1.0;
788 const double sa = (
a[0]*
a[0])+(
a[1]*
a[1])+(
a[2]*
a[2]);
789 const double sb = (
b[0]*
b[0])+(
b[1]*
b[1])+(
b[2]*
b[2]);
790 const double sc = (
c[0]*
c[0])+(
c[1]*
c[1])+(
c[2]*
c[2]);
793 double base = CalculateMaxEdgeLength(sa,sb,sc);
795 return normFactor * (
Area() * 2 / base ) / std::sqrt(sa+sb+sc);
810 constexpr
double normFactor = 1.0;
816 return normFactor *
Area() / std::pow(
a+
b+
c, 2);
832 constexpr
double normFactor = 1.0;
838 const double sa = (
a[0]*
a[0])+(
a[1]*
a[1])+(
a[2]*
a[2]);
839 const double sb = (
b[0]*
b[0])+(
b[1]*
b[1])+(
b[2]*
b[2]);
840 const double sc = (
c[0]*
c[0])+(
c[1]*
c[1])+(
c[2]*
c[2]);
843 const double base = CalculateMaxEdgeLength(sa,sb,sc);
845 return normFactor * (
Area() * 2 / base ) / base;
874 const double Tolerance = std::numeric_limits<double>::epsilon()
878 const auto center = this->
Center();
882 const Point point_to_project(rPoint);
888 if (std::abs(distance) > std::numeric_limits<double>::epsilon()) {
889 if (std::abs(distance) > 1.0e-6 *
Length()) {
890 KRATOS_WARNING_FIRST_N(
"Triangle3D3", 10) <<
"The " << rPoint <<
" is in a distance: " << std::abs(distance) << std::endl;
895 noalias(point_projected) = rPoint - normal * distance;
900 if ( (rResult[0] >= (0.0-Tolerance)) && (rResult[0] <= (1.0+Tolerance)) ) {
901 if ( (rResult[1] >= (0.0-Tolerance)) && (rResult[1] <= (1.0+Tolerance)) ) {
902 if ( (rResult[0] + rResult[1]) <= (1.0+Tolerance) ) {
927 tangent_xi /=
norm_2(tangent_xi);
929 tangent_eta /=
norm_2(tangent_eta);
932 const auto center = this->
Center();
937 rotation_matrix(0,
i) = tangent_xi[
i];
938 rotation_matrix(1,
i) = tangent_eta[
i];
943 noalias(aux_point_to_rotate) = rPoint - center.Coordinates();
944 noalias(destination_point_rotated) =
prod(rotation_matrix, aux_point_to_rotate) + center.Coordinates();
949 noalias(aux_point_to_rotate) = this->
GetPoint(
i).Coordinates() - center.Coordinates();
950 noalias(points_rotated[
i]) =
prod(rotation_matrix, aux_point_to_rotate) + center.Coordinates();
955 J(0,0) = points_rotated[1][0] - points_rotated[0][0];
956 J(0,1) = points_rotated[2][0] - points_rotated[0][0];
957 J(1,0) = points_rotated[1][1] - points_rotated[0][1];
958 J(1,1) = points_rotated[2][1] - points_rotated[0][1];
959 const double det_J =
J(0,0)*
J(1,1) -
J(0,1)*
J(1,0);
962 const double eta = (
J(1,0)*(points_rotated[0][0] - destination_point_rotated[0]) +
963 J(0,0)*(destination_point_rotated[1] - points_rotated[0][1])) /
det_J;
964 const double xi = (
J(1,1)*(destination_point_rotated[0] - points_rotated[0][0]) +
965 J(0,1)*(points_rotated[0][1] - destination_point_rotated[1])) /
det_J;
991 const double Tolerance = std::numeric_limits<double>::epsilon()
994 const Point point(rPointGlobalCoordinates);
1037 std::fill( rResult.
begin(), rResult.
end(), jacobian );
1062 Matrix & DeltaPosition )
const override
1079 std::fill( rResult.
begin(), rResult.
end(), jacobian );
1109 rResult.
resize( 3, 2,
false );
1136 rResult.
resize( 3, 2 ,
false);
1161 if(rResult.size() != integration_points_number)
1163 rResult.
resize(integration_points_number,
false);
1166 const double detJ = 2.0*(this->
Area());
1168 for (
unsigned int pnt = 0; pnt < integration_points_number; pnt++ )
1170 rResult[pnt] = detJ;
1197 return 2.0*(this->
Area());
1215 return 2.0*(this->
Area());
1351 switch ( ShapeFunctionIndex )
1354 return( 1.0 -rPoint[0] - rPoint[1] );
1356 return( rPoint[0] );
1358 return( rPoint[1] );
1360 KRATOS_ERROR <<
"Wrong index of shape function!" << *
this << std::endl;
1380 if(rResult.size() != 3)
1385 rResult[0] = 1.0 -rCoordinates[0] - rCoordinates[1];
1386 rResult[1] = rCoordinates[0] ;
1387 rResult[2] = rCoordinates[1] ;
1405 return "2 dimensional triangle with three nodes in 3D space";
1416 rOStream <<
"2 dimensional triangle with three nodes in 3D space";
1437 std::cout << std::endl;
1443 rOStream <<
" Jacobian in the origin\t : " << jacobian;
1455 = CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod );
1456 const int integration_points_number
1460 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1462 Result[pnt] = localGradients[pnt];
1476 = CalculateShapeFunctionsIntegrationPointsLocalGradients( ThisMethod );
1477 const int integration_points_number
1481 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1483 Result[pnt] = localGradients[pnt];
1501 rResult.
resize( 3, 2 ,
false);
1503 rResult( 0, 0 ) = -1.0;
1504 rResult( 0, 1 ) = -1.0;
1505 rResult( 1, 0 ) = 1.0;
1506 rResult( 1, 1 ) = 0.0;
1507 rResult( 2, 0 ) = 0.0;
1508 rResult( 2, 1 ) = 1.0;
1525 rResult.
resize( 3, 2,
false );
1527 rResult( 0, 0 ) = -1.0;
1528 rResult( 0, 1 ) = -1.0;
1529 rResult( 1, 0 ) = 1.0;
1530 rResult( 1, 1 ) = 0.0;
1531 rResult( 2, 0 ) = 0.0;
1532 rResult( 2, 1 ) = 1.0;
1544 if ( rResult.size() != this->PointsNumber() )
1552 rResult[0].
resize( 2, 2 ,
false);
1554 rResult[1].
resize( 2, 2 ,
false);
1555 rResult[2].
resize( 2, 2 ,
false);
1556 rResult[0]( 0, 0 ) = 0.0;
1557 rResult[0]( 0, 1 ) = 0.0;
1558 rResult[0]( 1, 0 ) = 0.0;
1559 rResult[0]( 1, 1 ) = 0.0;
1560 rResult[1]( 0, 0 ) = 0.0;
1561 rResult[1]( 0, 1 ) = 0.0;
1562 rResult[1]( 1, 0 ) = 0.0;
1563 rResult[1]( 1, 1 ) = 0.0;
1564 rResult[2]( 0, 0 ) = 0.0;
1565 rResult[2]( 0, 1 ) = 0.0;
1566 rResult[2]( 1, 0 ) = 0.0;
1567 rResult[2]( 1, 1 ) = 0.0;
1579 if ( rResult.size() != this->PointsNumber() )
1594 rResult[0][0].
resize( 2, 2 ,
false);
1596 rResult[0][1].
resize( 2, 2 ,
false);
1597 rResult[1][0].
resize( 2, 2 ,
false);
1598 rResult[1][1].
resize( 2, 2 ,
false);
1599 rResult[2][0].
resize( 2, 2 ,
false);
1600 rResult[2][1].
resize( 2, 2 ,
false);
1602 for (
int i = 0;
i < 3;
i++ )
1604 rResult[
i][0]( 0, 0 ) = 0.0;
1605 rResult[
i][0]( 0, 1 ) = 0.0;
1606 rResult[
i][0]( 1, 0 ) = 0.0;
1607 rResult[
i][0]( 1, 1 ) = 0.0;
1608 rResult[
i][1]( 0, 0 ) = 0.0;
1609 rResult[
i][1]( 0, 1 ) = 0.0;
1610 rResult[
i][1]( 1, 0 ) = 0.0;
1611 rResult[
i][1]( 1, 1 ) = 0.0;
1650 KRATOS_DEPRECATED_MESSAGE(
"This method is deprecated. Use either \'ProjectionPointLocalToLocalSpace\' or \'ProjectionPointGlobalToLocalSpace\' instead.")
1655 const double Tolerance =
std::numeric_limits<
double>::epsilon()
1658 KRATOS_WARNING(
"ProjectionPoint") <<
"This method is deprecated. Use either \'ProjectionPointLocalToLocalSpace\' or \'ProjectionPointGlobalToLocalSpace\' instead." << std::endl;
1662 this->
GlobalCoordinates(rProjectedPointGlobalCoordinates, rProjectedPointLocalCoordinates);
1670 const double Tolerance = std::numeric_limits<double>::epsilon()
1673 for (std::size_t
i = 0;
i < 3; ++
i) {
1674 rProjectionPointLocalCoordinates[
i] = (rPointLocalCoordinates[
i] < 0.0) ? 0.0 : rPointLocalCoordinates[
i];
1675 rProjectionPointLocalCoordinates[
i] = (rPointLocalCoordinates[
i] > 1.0) ? 1.0 : rPointLocalCoordinates[
i];
1684 const double Tolerance = std::numeric_limits<double>::epsilon()
1721 void save(
Serializer& rSerializer )
const override
1754 static Matrix CalculateShapeFunctionsIntegrationPointsValues(
1758 AllIntegrationPoints();
1761 const int integration_points_number = integration_points.size();
1763 const int points_number = 3;
1765 Matrix shape_function_values( integration_points_number, points_number );
1768 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1770 row( shape_function_values, pnt )[0] = 1.0
1771 - integration_points[pnt].X()
1772 - integration_points[pnt].Y();
1773 row( shape_function_values, pnt )[1] = integration_points[pnt].X();
1774 row( shape_function_values, pnt )[2] = integration_points[pnt].Y();
1777 return shape_function_values;
1790 CalculateShapeFunctionsIntegrationPointsLocalGradients(
1794 AllIntegrationPoints();
1797 const int integration_points_number = integration_points.size();
1803 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1806 result( 0, 0 ) = -1.0;
1807 result( 0, 1 ) = -1.0;
1808 result( 1, 0 ) = 1.0;
1809 result( 1, 1 ) = 0.0;
1810 result( 2, 0 ) = 0.0;
1811 result( 2, 1 ) = 1.0;
1812 d_shape_f_values[pnt] = result;
1815 return d_shape_f_values;
1826 Quadrature<TriangleGaussLegendreIntegrationPoints1, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1827 Quadrature<TriangleGaussLegendreIntegrationPoints2, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1828 Quadrature<TriangleGaussLegendreIntegrationPoints3, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1829 Quadrature<TriangleGaussLegendreIntegrationPoints4, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1830 Quadrature<TriangleGaussLegendreIntegrationPoints5, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1831 Quadrature<TriangleCollocationIntegrationPoints1, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1832 Quadrature<TriangleCollocationIntegrationPoints2, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1833 Quadrature<TriangleCollocationIntegrationPoints3, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1834 Quadrature<TriangleCollocationIntegrationPoints4, 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1835 Quadrature<TriangleCollocationIntegrationPoints5, 2, IntegrationPoint<3> >::GenerateIntegrationPoints()
1838 return integration_points;
1849 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1851 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1853 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1855 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1857 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1859 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1861 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1863 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1865 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1867 Triangle3D3<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1871 return shape_functions_values;
1878 AllShapeFunctionsLocalGradients()
1895 return shape_functions_local_gradients;
1907 inline double CalculateMinEdgeLength(
const double a,
const double b,
const double c)
const {
1920 inline double CalculateMaxEdgeLength(
const double a,
const double b,
const double c)
const {
1933 inline double CalculateAvgEdgeLength(
const double a,
const double b,
const double c)
const {
1934 constexpr
double onethird = 1.0 / 3.0;
1935 return (
a+
b+
c) * onethird;
1947 inline double CalculateCircumradius(
const double a,
const double b,
const double c)
const {
1960 inline double CalculateInradius(
const double a,
const double b,
const double c)
const {
1961 return 0.5 * std::sqrt((
b+
c-
a) * (
c+
a-
b) * (
a+
b-
c) / (
a+
b+
c));
1964 bool LineTriangleOverlap(
1965 const Point& rPoint1,
1966 const Point& rPoint2)
const
1968 array_1d<double,3> intersection_point;
1970 return result == 1 ? true :
false;
1973 bool TriangleTriangleOverlap(
1974 const Point& rPoint1,
1975 const Point& rPoint2,
1976 const Point& rPoint3)
const
1983 array_1d<double, 3> distances_1;
1984 distances_1[0] = plane_1.CalculateSignedDistance(rPoint1);
1985 distances_1[1] = plane_1.CalculateSignedDistance(rPoint2);
1986 distances_1[2] = plane_1.CalculateSignedDistance(rPoint3);
1990 Plane3D plane_2(rPoint1, rPoint2, rPoint3);
1991 array_1d<double, 3> distances_2;
1992 for (
int i = 0;
i < 3; ++
i)
1993 distances_2[
i] = plane_2.CalculateSignedDistance(this->GetPoint(
i));
1998 array_1d<double, 3> intersection_direction;
2004 double vp0 = this->
GetPoint(0)[index];
2005 double vp1 = this->
GetPoint(1)[index];
2006 double vp2 = this->
GetPoint(2)[index];
2008 double up0 = rPoint1[index];
2009 double up1 = rPoint2[index];
2010 double up2 = rPoint3[index];
2013 double a,
b,
c, x0,
x1;
2014 if (ComputeIntervals(vp0, vp1, vp2, distances_2[0], distances_2[1], distances_2[2],
a,
b,
c, x0,
x1))
2016 return CoplanarIntersectionCheck(plane_1.GetNormal(), rPoint1, rPoint2, rPoint3);
2020 double d,
e,
f, y0, y1;
2021 if (ComputeIntervals(up0, up1, up2, distances_1[0], distances_1[1], distances_1[2],
d,
e,
f, y0, y1))
2024 return CoplanarIntersectionCheck(plane_1.GetNormal(), rPoint1, rPoint2, rPoint3);
2027 double xx, yy, xxyy,
tmp;
2032 array_1d<double, 2> isect1, isect2;
2035 isect1[0] =
tmp +
b*
x1*yy;
2036 isect1[1] =
tmp +
c*x0*yy;
2039 isect2[0] =
tmp +
e*xx*y1;
2040 isect2[1] =
tmp +
f*xx*y0;
2042 if (isect1[0] > isect1[1]) {
2043 isect1[1] = isect1[0] + isect1[1];
2044 isect1[0] = isect1[1] - isect1[0];
2045 isect1[1] = isect1[1] - isect1[0];
2048 if (isect2[0] > isect2[1]) {
2049 isect2[1] = isect2[0] + isect2[1];
2050 isect2[0] = isect2[1] - isect2[0];
2051 isect2[1] = isect2[1] - isect2[0];
2054 return (isect1[1]<isect2[0] || isect2[1]<isect1[0]) ? false :
true;
2057 bool ComputeIntervals(
2071 double D0D1 = D0 * D1;
2072 double D0D2 = D0 * D2;
2083 else if (D0D2 > 0.0) {
2091 else if (D1 * D2 > 0.00 || D0 != 0.00) {
2099 else if (D1 != 0.00) {
2106 else if (D2 != 0.00) {
2119 bool CoplanarIntersectionCheck(
2120 const array_1d<double,3>&
N,
2121 const Point& rPoint1,
2122 const Point& rPoint2,
2123 const Point& rPoint3)
const
2125 array_1d<double, 3 >
A;
2130 A[0] = std::abs(
N[0]);
2131 A[1] = std::abs(
N[1]);
2132 A[2] = std::abs(
N[2]);
2152 if (EdgeToTriangleEdgesCheck(i0, i1, this->
GetPoint(0), this->
GetPoint(1), rPoint1, rPoint2, rPoint3))
return true;
2153 if (EdgeToTriangleEdgesCheck(i0, i1, this->
GetPoint(1), this->
GetPoint(2), rPoint1, rPoint2, rPoint3))
return true;
2154 if (EdgeToTriangleEdgesCheck(i0, i1, this->
GetPoint(2), this->
GetPoint(0), rPoint1, rPoint2, rPoint3))
return true;
2158 if (PointInTriangle(i0, i1, this->
GetPoint(0), rPoint1, rPoint2, rPoint3))
return true;
2164 bool EdgeToTriangleEdgesCheck(
2171 const Point&U2)
const
2173 double Ax, Ay, Bx, By, Cx, Cy,
e,
d,
f;
2174 Ax = V1[i0] - V0[i0];
2175 Ay = V1[i1] - V0[i1];
2178 if (EdgeToEdgeIntersectionCheck(Ax, Ay, Bx, By, Cx, Cy,
e,
d,
f, i0, i1, V0, U0, U1) ==
true)
return true;
2181 if (EdgeToEdgeIntersectionCheck(Ax, Ay, Bx, By, Cx, Cy,
e,
d,
f, i0, i1, V0, U1, U2) ==
true)
return true;
2184 if (EdgeToEdgeIntersectionCheck(Ax, Ay, Bx, By, Cx, Cy,
e,
d,
f, i0, i1, V0, U2, U0) ==
true)
return true;
2192 bool EdgeToEdgeIntersectionCheck(
2206 const Point& U1)
const
2208 Bx = U0[i0] - U1[i0];
2209 By = U0[i1] - U1[i1];
2210 Cx = V0[i0] - U0[i0];
2211 Cy = V0[i1] - U0[i1];
2215 if (std::abs(
f) < 1
E-10)
f = 0.00;
2216 if (std::abs(
d) < 1
E-10)
d = 0.00;
2218 if ((
f>0.00 &&
d >= 0.00 &&
d <=
f) || (
f<0.00 && d <= 0.00 && d >=
f)) {
2222 if (
e >= 0.0 &&
e <=
f)
return true;
2224 if (e <= 0.0 && e >=
f)
return true;
2230 bool PointInTriangle(
2236 const Point& U2)
const
2238 double a,
b,
c,d0,
d1,d2;
2241 a = U1[i1] - U0[i1];
2242 b = -(U1[i0] - U0[i0]);
2243 c = -
a * U0[i0] -
b * U0[i1];
2244 d0=
a * V0[i0] +
b * V0[i1] +
c;
2246 a = U2[i1] - U1[i1];
2247 b = -(U2[i0] - U1[i0]);
2248 c = -
a * U1[i0] -
b * U1[i1];
2249 d1=
a * V0[i0] +
b * V0[i1] +
c;
2251 a = U0[i1] - U2[i1];
2252 b = -(U0[i0] - U2[i0]);
2253 c = -
a * U2[i0] -
b * U2[i1];
2254 d2 =
a * V0[i0] +
b * V0[i1] +
c;
2257 if (d0 * d2 > 0.0)
return true;
2270 inline bool TriBoxOverlap(Point& rBoxCenter, Point& rBoxHalfSize)
const
2272 double abs_ex, abs_ey, abs_ez, distance;
2273 array_1d<double,3 > vert0, vert1, vert2;
2274 array_1d<double,3 > edge0, edge1, edge2, normal;
2275 std::pair<double, double> min_max;
2283 noalias(edge0) = vert1 - vert0;
2284 noalias(edge1) = vert2 - vert1;
2285 noalias(edge2) = vert0 - vert2;
2289 abs_ex = std::abs(edge0[0]);
2290 abs_ey = std::abs(edge0[1]);
2291 abs_ez = std::abs(edge0[2]);
2292 if (AxisTestX(edge0[1],edge0[2],abs_ey,abs_ez,vert0,vert2,rBoxHalfSize))
return false;
2293 if (AxisTestY(edge0[0],edge0[2],abs_ex,abs_ez,vert0,vert2,rBoxHalfSize))
return false;
2294 if (AxisTestZ(edge0[0],edge0[1],abs_ex,abs_ey,vert0,vert2,rBoxHalfSize))
return false;
2296 abs_ex = std::abs(edge1[0]);
2297 abs_ey = std::abs(edge1[1]);
2298 abs_ez = std::abs(edge1[2]);
2299 if (AxisTestX(edge1[1],edge1[2],abs_ey,abs_ez,vert1,vert0,rBoxHalfSize))
return false;
2300 if (AxisTestY(edge1[0],edge1[2],abs_ex,abs_ez,vert1,vert0,rBoxHalfSize))
return false;
2301 if (AxisTestZ(edge1[0],edge1[1],abs_ex,abs_ey,vert1,vert0,rBoxHalfSize))
return false;
2303 abs_ex = std::abs(edge2[0]);
2304 abs_ey = std::abs(edge2[1]);
2305 abs_ez = std::abs(edge2[2]);
2306 if (AxisTestX(edge2[1],edge2[2],abs_ey,abs_ez,vert2,vert1,rBoxHalfSize))
return false;
2307 if (AxisTestY(edge2[0],edge2[2],abs_ex,abs_ez,vert2,vert1,rBoxHalfSize))
return false;
2308 if (AxisTestZ(edge2[0],edge2[1],abs_ex,abs_ey,vert2,vert1,rBoxHalfSize))
return false;
2317 min_max = std::minmax({vert0[0], vert1[0], vert2[0]});
2318 if(min_max.first>rBoxHalfSize[0] || min_max.second<-rBoxHalfSize[0])
return false;
2321 min_max = std::minmax({vert0[1], vert1[1], vert2[1]});
2322 if(min_max.first>rBoxHalfSize[1] || min_max.second<-rBoxHalfSize[1])
return false;
2325 min_max = std::minmax({vert0[2], vert1[2], vert2[2]});
2326 if(min_max.first>rBoxHalfSize[2] || min_max.second<-rBoxHalfSize[2])
return false;
2333 if(!PlaneBoxOverlap(normal, distance, rBoxHalfSize))
return false;
2349 bool PlaneBoxOverlap(
const array_1d<double,3>& rNormal,
const double& rDist,
const array_1d<double,3>& rMaxBox)
const
2351 array_1d<double,3> vmin, vmax;
2352 for(
int q = 0;
q < 3;
q++)
2354 if(rNormal[
q] > 0.00)
2356 vmin[
q] = -rMaxBox[
q];
2357 vmax[
q] = rMaxBox[
q];
2361 vmin[
q] = rMaxBox[
q];
2362 vmax[
q] = -rMaxBox[
q];
2365 if(
inner_prod(rNormal, vmin) + rDist > 0.00)
return false;
2366 if(
inner_prod(rNormal, vmax) + rDist >= 0.00)
return true;
2381 bool AxisTestX(
double& rEdgeY,
double& rEdgeZ,
2382 double& rAbsEdgeY,
double& rAbsEdgeZ,
2383 array_1d<double,3>& rVertA,
2384 array_1d<double,3>& rVertC,
2385 Point& rBoxHalfSize)
const
2387 double proj_a, proj_c, rad;
2388 proj_a = rEdgeY*rVertA[2] - rEdgeZ*rVertA[1];
2389 proj_c = rEdgeY*rVertC[2] - rEdgeZ*rVertC[1];
2390 std::pair<double, double> min_max = std::minmax(proj_a, proj_c);
2392 rad = rAbsEdgeZ*rBoxHalfSize[1] + rAbsEdgeY*rBoxHalfSize[2];
2394 if(min_max.first>rad || min_max.second<-rad)
return true;
2408 bool AxisTestY(
double& rEdgeX,
double& rEdgeZ,
2409 double& rAbsEdgeX,
double& rAbsEdgeZ,
2410 array_1d<double,3>& rVertA,
2411 array_1d<double,3>& rVertC,
2412 Point& rBoxHalfSize)
const
2414 double proj_a, proj_c, rad;
2415 proj_a = rEdgeZ*rVertA[0] - rEdgeX*rVertA[2];
2416 proj_c = rEdgeZ*rVertC[0] - rEdgeX*rVertC[2];
2417 std::pair<double, double> min_max = std::minmax(proj_a, proj_c);
2419 rad = rAbsEdgeZ*rBoxHalfSize[0] + rAbsEdgeX*rBoxHalfSize[2];
2421 if(min_max.first>rad || min_max.second<-rad)
return true;
2435 bool AxisTestZ(
double& rEdgeX,
double& rEdgeY,
2436 double& rAbsEdgeX,
double& rAbsEdgeY,
2437 array_1d<double,3>& rVertA,
2438 array_1d<double,3>& rVertC,
2439 Point& rBoxHalfSize)
const
2441 double proj_a, proj_c, rad;
2442 proj_a = rEdgeX*rVertA[1] - rEdgeY*rVertA[0];
2443 proj_c = rEdgeX*rVertC[1] - rEdgeY*rVertC[0];
2444 std::pair<double, double> min_max = std::minmax(proj_a, proj_c);
2446 rad = rAbsEdgeY*rBoxHalfSize[0] + rAbsEdgeX*rBoxHalfSize[1];
2448 if(min_max.first>rad || min_max.second<-rad)
return true;
2489 std::istream& rIStream,
2495 std::ostream& rOStream,
2499 rOStream << std::endl;
2506 template<
class TPo
intType>
const
2507 GeometryData Triangle3D3<TPointType>::msGeometryData(
2510 Triangle3D3<TPointType>::AllIntegrationPoints(),
2511 Triangle3D3<TPointType>::AllShapeFunctionsValues(),
2512 AllShapeFunctionsLocalGradients()
2515 template<
class TPo
intType>
static TPointClass3 FastProject(const TPointClass1 &rPointOrigin, const TPointClass2 &rPointToProject, const array_1d< double, 3 > &rNormal, double &rDistance)
Project a point over a plane (avoiding some steps)
Definition: geometrical_projection_utilities.h:135
Definition: geometry_data.h:60
KratosGeometryType
Definition: geometry_data.h:110
@ Kratos_Quadrilateral3D4
SizeType IntegrationPointsNumber() const
Definition: geometry_data.h:430
IntegrationMethod
Definition: geometry_data.h:76
KratosGeometryFamily
Definition: geometry_data.h:91
IntegrationMethod DefaultIntegrationMethod() const
Definition: geometry_data.h:425
Definition: geometry_dimension.h:42
Geometry base class.
Definition: geometry.h:71
SizeType PointsNumber() const
Definition: geometry.h:528
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: geometry.h:3834
Geometry & operator=(const Geometry &rOther)
Definition: geometry.h:400
virtual CoordinatesArrayType & GlobalCoordinates(CoordinatesArrayType &rResult, CoordinatesArrayType const &LocalCoordinates) const
Definition: geometry.h:2377
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
DataValueContainer & GetData()
Definition: geometry.h:591
KRATOS_DEPRECATED_MESSAGE("This is legacy version (use GenerateEdges instead)") virtual GeometriesArrayType Edges(void)
This method gives you all edges of this geometry.
Definition: geometry.h:2106
std::size_t SizeType
Definition: geometry.h:144
virtual array_1d< double, 3 > UnitNormal(const CoordinatesArrayType &rPointLocalCoordinates) const
It computes the unit normal of the geometry in the given local point.
Definition: geometry.h:1639
const TPointType::Pointer pGetPoint(const int Index) const
Definition: geometry.h:1790
std::size_t IndexType
Definition: geometry.h:137
std::array< Matrix, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> ShapeFunctionsValuesContainerType
Definition: geometry.h:172
const PointsArrayType & Points() const
Definition: geometry.h:1768
bool AllPointsAreValid() const
Checks if the geometry points are valid Checks if the geometry points are valid from the pointer valu...
Definition: geometry.h:4093
std::array< IntegrationPointsArrayType, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> IntegrationPointsContainerType
Definition: geometry.h:167
LumpingMethods
This defines the different methods to compute the lumping methods.
Definition: geometry.h:109
virtual GeometryData::KratosGeometryType GetGeometryType() const
Definition: geometry.h:381
virtual Point Center() const
Definition: geometry.h:1514
TPointType const & GetPoint(const int Index) const
Definition: geometry.h:1816
GeometryData::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: geometry.h:177
SizeType IntegrationPointsNumber() const
Definition: geometry.h:2257
GeometryData::IntegrationMethod IntegrationMethod
Definition: geometry.h:122
static double PointDistanceToTriangle3D(const Point &rTrianglePoint1, const Point &rTrianglePoint2, const Point &rTrianglePoint3, const Point &rPoint)
This function calculates the distance of a 3D point to a 3D triangle.
Definition: geometry_utilities.cpp:172
Short class definition.
Definition: integration_point.h:52
Definition: amatrix_interface.h:41
void swap(Matrix &Other)
Definition: amatrix_interface.h:289
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
iterator end()
Definition: amatrix_interface.h:243
iterator begin()
Definition: amatrix_interface.h:241
static int ComputeTriangleLineIntersection(const TGeometryType &rTriangleGeometry, const array_1d< double, 3 > &rLinePoint1, const array_1d< double, 3 > &rLinePoint2, array_1d< double, 3 > &rIntersectionPoint, const double epsilon=1e-12)
Definition: intersection_utilities.h:101
An two node 3D line geometry with linear shape functions.
Definition: line_3d_2.h:64
Various mathematical utilitiy functions.
Definition: math_utils.h:62
static double Norm3(const TVectorType &a)
Calculates the norm of vector "a" which is assumed to be of size 3.
Definition: math_utils.h:691
static T CrossProduct(const T &a, const T &b)
Performs the vector product of the two input vectors a,b.
Definition: math_utils.h:762
This class defines the node.
Definition: node.h:65
Point class.
Definition: point.h:59
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
A three node 3D triangle geometry with linear shape functions.
Definition: triangle_3d_3.h:77
GeometryData::IntegrationMethod IntegrationMethod
Definition: triangle_3d_3.h:108
ShapeFunctionsSecondDerivativesType & ShapeFunctionsSecondDerivatives(ShapeFunctionsSecondDerivativesType &rResult, const CoordinatesArrayType &rPoint) const override
Definition: triangle_3d_3.h:1542
double DomainSize() const override
This method calculates and returns length, area or volume of this geometry depending to it's dimensio...
Definition: triangle_3d_3.h:515
GeometriesArrayType GenerateFaces() const override
Returns all faces of the current geometry.
Definition: triangle_3d_3.h:1279
BaseType::IntegrationPointType IntegrationPointType
Definition: triangle_3d_3.h:151
Triangle3D3(const std::string &rGeometryName, const PointsArrayType &rThisPoints)
Constructor with Geometry Name.
Definition: triangle_3d_3.h:256
virtual double ShortestAltitudeToLongestEdge() const
Definition: triangle_3d_3.h:830
Geometry< TPointType > GeometryType
Definition: triangle_3d_3.h:88
Matrix & Jacobian(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: triangle_3d_3.h:1134
double Circumradius() const override
Definition: triangle_3d_3.h:588
double InradiusToCircumradiusQuality() const override
Quality functions.
Definition: triangle_3d_3.h:708
BaseType::JacobiansType JacobiansType
Definition: triangle_3d_3.h:186
Matrix & PointsLocalCoordinates(Matrix &rResult) const override
Definition: triangle_3d_3.h:414
double AverageEdgeLength() const override
Definition: triangle_3d_3.h:572
KRATOS_CLASS_POINTER_DEFINITION(Triangle3D3)
virtual Matrix & ShapeFunctionsGradients(Matrix &rResult, PointType &rPoint)
Definition: triangle_3d_3.h:1523
double MaxEdgeLength() const override
Definition: triangle_3d_3.h:551
double ShapeFunctionValue(IndexType ShapeFunctionIndex, const CoordinatesArrayType &rPoint) const override
Definition: triangle_3d_3.h:1348
BaseType::SizeType SizeType
Definition: triangle_3d_3.h:134
int GetMajorAxis(array_1d< double, 3 > const &V) const
Definition: triangle_3d_3.h:638
~Triangle3D3() override
Definition: triangle_3d_3.h:298
Vector & ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType &rCoordinates) const override
Definition: triangle_3d_3.h:1378
Geometry< TPointType > BaseType
Definition: triangle_3d_3.h:86
Triangle3D3(Triangle3D3 const &rOther)
Definition: triangle_3d_3.h:273
BaseType::Pointer Create(const IndexType NewGeometryId, PointsArrayType const &rThisPoints) const override
Creates a new geometry pointer.
Definition: triangle_3d_3.h:371
friend class Triangle3D3
Definition: triangle_3d_3.h:2466
double DeterminantOfJacobian(IndexType IntegrationPoint, IntegrationMethod ThisMethod) const override
Definition: triangle_3d_3.h:1194
Triangle3D3 & operator=(const Triangle3D3 &rOther)
Definition: triangle_3d_3.h:325
BaseType::IntegrationPointsArrayType IntegrationPointsArrayType
Definition: triangle_3d_3.h:160
CoordinatesArrayType & PointLocalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rPoint) const override
Returns the local coordinates of a given arbitrary point.
Definition: triangle_3d_3.h:917
BaseType::GeometriesArrayType GeometriesArrayType
Definition: triangle_3d_3.h:114
BaseType::ShapeFunctionsValuesContainerType ShapeFunctionsValuesContainerType
Definition: triangle_3d_3.h:173
BaseType::PointsArrayType PointsArrayType
Definition: triangle_3d_3.h:140
double ShortestAltitudeToEdgeLengthRatio() const override
Definition: triangle_3d_3.h:781
SizeType EdgesNumber() const override
This method gives you number of all edges of this geometry.
Definition: triangle_3d_3.h:1233
TPointType PointType
Definition: triangle_3d_3.h:119
void PrintData(std::ostream &rOStream) const override
Definition: triangle_3d_3.h:1433
BaseType::CoordinatesArrayType CoordinatesArrayType
Definition: triangle_3d_3.h:145
Triangle3D3(const PointsArrayType &ThisPoints)
Definition: triangle_3d_3.h:240
double CalculateDistance(const CoordinatesArrayType &rPointGlobalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Computes the distance between an point in global coordinates and the closest point of this geometry....
Definition: triangle_3d_3.h:989
Triangle3D3(Triangle3D3< TOtherPointType > const &rOther)
Definition: triangle_3d_3.h:290
void PrintInfo(std::ostream &rOStream) const override
Definition: triangle_3d_3.h:1414
GeometriesArrayType GenerateEdges() const override
This method gives you all edges of this geometry.
Definition: triangle_3d_3.h:1246
double InradiusToLongestEdgeQuality() const override
Definition: triangle_3d_3.h:729
bool AllSameSide(array_1d< double, 3 > const &Distances) const
Definition: triangle_3d_3.h:614
std::string Info() const override
Definition: triangle_3d_3.h:1403
double DeterminantOfJacobian(const CoordinatesArrayType &rPoint) const override
Definition: triangle_3d_3.h:1213
ShapeFunctionsThirdDerivativesType & ShapeFunctionsThirdDerivatives(ShapeFunctionsThirdDerivativesType &rResult, const CoordinatesArrayType &rPoint) const override
Definition: triangle_3d_3.h:1577
Vector & LumpingFactors(Vector &rResult, const typename BaseType::LumpingMethods LumpingMethod=BaseType::LumpingMethods::ROW_SUM) const override
Lumping factors for the calculation of the lumped mass matrix.
Definition: triangle_3d_3.h:435
virtual double AreaToEdgeLengthSquareRatio() const
Definition: triangle_3d_3.h:809
SizeType FacesNumber() const override
Returns the number of faces of the current geometry.
Definition: triangle_3d_3.h:1266
BaseType::Pointer Create(PointsArrayType const &rThisPoints) const override
Creates a new geometry pointer.
Definition: triangle_3d_3.h:358
BaseType::IndexType IndexType
Definition: triangle_3d_3.h:127
double Area() const override
This method calculates and returns area or surface area of this geometry depending to it's dimension.
Definition: triangle_3d_3.h:482
Matrix & Jacobian(Matrix &rResult, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const override
Definition: triangle_3d_3.h:1105
BaseType::ShapeFunctionsThirdDerivativesType ShapeFunctionsThirdDerivativesType
Definition: triangle_3d_3.h:209
BaseType::Pointer Create(const IndexType NewGeometryId, const BaseType &rGeometry) const override
Creates a new geometry pointer.
Definition: triangle_3d_3.h:399
Triangle3D3< TPointType > FaceType
Definition: triangle_3d_3.h:98
BaseType::Pointer Create(const BaseType &rGeometry) const override
Creates a new geometry pointer.
Definition: triangle_3d_3.h:384
Triangle3D3(const IndexType GeometryId, const PointsArrayType &rThisPoints)
Constructor with Geometry Id.
Definition: triangle_3d_3.h:247
virtual ShapeFunctionsGradientsType ShapeFunctionsLocalGradients(IntegrationMethod ThisMethod)
Definition: triangle_3d_3.h:1451
GeometryData::KratosGeometryFamily GetGeometryFamily() const override
Definition: triangle_3d_3.h:300
Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: triangle_3d_3.h:1498
int ProjectionPointLocalToLocalSpace(const CoordinatesArrayType &rPointLocalCoordinates, CoordinatesArrayType &rProjectionPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Projects a point onto the geometry Projects a certain point on the geometry, or finds the closest poi...
Definition: triangle_3d_3.h:1667
Line3D2< TPointType > EdgeType
Definition: triangle_3d_3.h:93
bool HasIntersection(const Point &rLowPoint, const Point &rHighPoint) const override
Definition: triangle_3d_3.h:680
Vector & DeterminantOfJacobian(Vector &rResult, IntegrationMethod ThisMethod) const override
Definition: triangle_3d_3.h:1158
void NumberNodesInFaces(DenseVector< unsigned int > &NumberNodesInFaces) const override
Definition: triangle_3d_3.h:1288
double Length() const override
Definition: triangle_3d_3.h:468
BaseType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: triangle_3d_3.h:193
Triangle3D3 & operator=(Triangle3D3< TOtherPointType > const &rOther)
Definition: triangle_3d_3.h:343
JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod) const override
Definition: triangle_3d_3.h:1019
double AreaToEdgeLengthRatio() const override
Definition: triangle_3d_3.h:755
void NodesInFaces(DenseMatrix< unsigned int > &NodesInFaces) const override
Definition: triangle_3d_3.h:1299
int ProjectionPoint(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rProjectedPointGlobalCoordinates, CoordinatesArrayType &rProjectedPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Projects a certain point on the geometry, or finds the closest point, depending on the provided initi...
Definition: triangle_3d_3.h:1651
double Inradius() const override
Definition: triangle_3d_3.h:604
Triangle3D3(typename PointType::Pointer pFirstPoint, typename PointType::Pointer pSecondPoint, typename PointType::Pointer pThirdPoint)
Definition: triangle_3d_3.h:230
int ProjectionPointGlobalToLocalSpace(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rProjectionPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Projects a point onto the geometry Projects a certain point on the geometry, or finds the closest poi...
Definition: triangle_3d_3.h:1681
double MinEdgeLength() const override
Class Interface.
Definition: triangle_3d_3.h:530
GeometryData::KratosGeometryType GetGeometryType() const override
Definition: triangle_3d_3.h:305
bool IsInside(const CoordinatesArrayType &rPoint, CoordinatesArrayType &rResult, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Returns whether given arbitrary point is inside the Geometry and the respective local point for the g...
Definition: triangle_3d_3.h:871
BaseType::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: triangle_3d_3.h:179
BaseType::NormalType NormalType
Definition: triangle_3d_3.h:214
BaseType::IntegrationPointsContainerType IntegrationPointsContainerType
Definition: triangle_3d_3.h:167
BaseType::ShapeFunctionsSecondDerivativesType ShapeFunctionsSecondDerivativesType
Definition: triangle_3d_3.h:201
JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod, Matrix &DeltaPosition) const override
Definition: triangle_3d_3.h:1060
bool HasIntersection(const GeometryType &rThisGeometry) const override
Test the intersection with another geometry.
Definition: triangle_3d_3.h:649
GeometriesArrayType Faces(void) override
Definition: triangle_3d_3.h:1329
array_1d< double, 3 > Normal(const CoordinatesArrayType &rPointLocalCoordinates) const override
It returns a vector that is normal to its corresponding geometry in the given local point.
Definition: triangle_3d_3.h:853
virtual ShapeFunctionsGradientsType ShapeFunctionsLocalGradients()
Definition: triangle_3d_3.h:1472
Short class definition.
Definition: array_1d.h:61
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_WARNING(label)
Definition: logger.h:265
#define KRATOS_WARNING_FIRST_N(label, logger_count)
Definition: logger.h:272
static double max(double a, double b)
Definition: GeometryFunctions.h:79
static double min(double a, double b)
Definition: GeometryFunctions.h:71
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
const GeometryData BrepCurve< TContainerPointType, TContainerPointEmbeddedType >::msGeometryData & msGeometryDimension
Definition: brep_curve.h:483
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::MatrixRow< const TExpressionType > row(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t RowIndex)
Definition: amatrix_interface.h:649
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
const GeometryData Triangle3D3< TPointType >::msGeometryData & msGeometryDimension(), Triangle3D3< TPointType >::AllShapeFunctionsValues(), AllShapeFunctionsLocalGradients()
Definition: brep_curve.h:483
q
Definition: generate_convection_diffusion_explicit_element.py:109
f
Definition: generate_convection_diffusion_explicit_element.py:112
V
Definition: generate_droplet_dynamics.py:256
x1
Definition: generate_frictional_mortar_condition.py:121
X1
Definition: generate_frictional_mortar_condition.py:119
E
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:26
int C
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:27
a
Definition: generate_stokes_twofluid_element.py:77
tuple tmp
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:98
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
def load(f)
Definition: ode_solve.py:307
tuple const
Definition: ode_solve.py:403
int d
Definition: ode_solve.py:397
float temp
Definition: rotating_cone.py:85
J
Definition: sensitivityMatrix.py:58
A
Definition: sensitivityMatrix.py:70
N
Definition: sensitivityMatrix.py:29
det_J
Definition: sensitivityMatrix.py:67
B
Definition: sensitivityMatrix.py:76
namespace
Definition: array_1d.h:793
integer i
Definition: TensorModule.f:17
subroutine d1(DSTRAN, D, dtime, NDI, NSHR, NTENS)
Definition: TensorModule.f:594
e
Definition: run_cpp_mpi_tests.py:31