31 #include "utilities/geometry_utilities.h"
233 typename PointType::Pointer pSecondPoint,
234 typename PointType::Pointer pThirdPoint,
235 typename PointType::Pointer pFourthPoint )
245 :
BaseType( ThisPoints, &msGeometryData )
255 ) :
BaseType(GeometryId, rThisPoints, &msGeometryData)
262 const std::string& rGeometryName,
264 ) :
BaseType(rGeometryName, rThisPoints, &msGeometryData)
347 template<
class TOtherPo
intType>
369 return typename BaseType::Pointer(
new Quadrilateral3D4( NewGeometryId, rThisPoints ) );
383 auto p_geometry =
typename BaseType::Pointer(
new Quadrilateral3D4( NewGeometryId, rGeometry.
Points() ) );
384 p_geometry->SetData(rGeometry.
GetData());
391 if ((LocalDirectionIndex == 0) || (LocalDirectionIndex == 1)) {
394 KRATOS_ERROR <<
"Possible direction index reaches from 0-1. Given direction index: "
395 << LocalDirectionIndex << std::endl;
405 rResult.
resize( 4, 2,
false );
407 rResult( 0, 0 ) = -1.0;
408 rResult( 0, 1 ) = -1.0;
409 rResult( 1, 0 ) = 1.0;
410 rResult( 1, 1 ) = -1.0;
411 rResult( 2, 0 ) = 1.0;
412 rResult( 2, 1 ) = 1.0;
413 rResult( 3, 0 ) = -1.0;
414 rResult( 3, 1 ) = 1.0;
443 return std::sqrt(
Area() );
470 KRATOS_WARNING(
"Quadrilateral3D4") <<
"Method not well defined. Replace with DomainSize() instead. This method preserves current behaviour but will be changed in June 2023 (returning error instead)" << std::endl;
502 const double Tolerance = std::numeric_limits<double>::epsilon()
505 PointLocalCoordinatesImplementation( rResult, rPoint,
true );
507 if ( std::abs(rResult[0]) <= (1.0+Tolerance) ) {
508 if ( std::abs(rResult[1]) <= (1.0+Tolerance) ) {
527 return PointLocalCoordinatesImplementation(rResult, rPoint);
560 Matrix shape_functions_values =
561 CalculateShapeFunctionsIntegrationPointsValues( ThisMethod );
563 if ( rResult.size() != this->IntegrationPointsNumber( ThisMethod ) )
581 ( this->
GetPoint(
i ).X() ) * ( shape_functions_gradients[pnt](
i, 0 ) );
583 ( this->
GetPoint(
i ).X() ) * ( shape_functions_gradients[pnt](
i, 1 ) );
585 ( this->
GetPoint(
i ).Y() ) * ( shape_functions_gradients[pnt](
i, 0 ) );
587 ( this->
GetPoint(
i ).Y() ) * ( shape_functions_gradients[pnt](
i, 1 ) );
589 ( this->
GetPoint(
i ).Z() ) * ( shape_functions_gradients[pnt](
i, 0 ) );
591 ( this->
GetPoint(
i ).Z() ) * ( shape_functions_gradients[pnt](
i, 1 ) );
594 rResult[pnt] = jacobian;
628 Matrix shape_functions_values = CalculateShapeFunctionsIntegrationPointsValues( ThisMethod );
630 if ( rResult.size() != this->IntegrationPointsNumber( ThisMethod ) )
648 ( this->
GetPoint(
i ).X() - DeltaPosition(
i,0) ) * ( shape_functions_gradients[pnt](
i, 0 ) );
650 ( this->
GetPoint(
i ).X() - DeltaPosition(
i,0) ) * ( shape_functions_gradients[pnt](
i, 1 ) );
652 ( this->
GetPoint(
i ).Y() - DeltaPosition(
i,1) ) * ( shape_functions_gradients[pnt](
i, 0 ) );
654 ( this->
GetPoint(
i ).Y() - DeltaPosition(
i,1) ) * ( shape_functions_gradients[pnt](
i, 1 ) );
656 ( this->
GetPoint(
i ).Z() - DeltaPosition(
i,2) ) * ( shape_functions_gradients[pnt](
i, 0 ) );
658 ( this->
GetPoint(
i ).Z() - DeltaPosition(
i,2) ) * ( shape_functions_gradients[pnt](
i, 1 ) );
661 rResult[pnt] = jacobian;
694 if (rResult.size1() != 3 || rResult.size2() != 2 )
695 rResult.
resize( 3, 2,
false );
705 ( this->
GetPoint(
i ).X() ) * ( shape_functions_gradients(
i, 0 ) );
707 ( this->
GetPoint(
i ).X() ) * ( shape_functions_gradients(
i, 1 ) );
709 ( this->
GetPoint(
i ).Y() ) * ( shape_functions_gradients(
i, 0 ) );
711 ( this->
GetPoint(
i ).Y() ) * ( shape_functions_gradients(
i, 1 ) );
713 ( this->
GetPoint(
i ).Z() ) * ( shape_functions_gradients(
i, 0 ) );
715 ( this->
GetPoint(
i ).Z() ) * ( shape_functions_gradients(
i, 1 ) );
739 if (rResult.size1() != 3 || rResult.size2() != 2 )
740 rResult.
resize( 3, 2,
false );
744 Matrix shape_functions_gradients;
751 rResult( 0, 0 ) += ( this->
GetPoint(
i ).X() ) * ( shape_functions_gradients(
i, 0 ) );
752 rResult( 0, 1 ) += ( this->
GetPoint(
i ).X() ) * ( shape_functions_gradients(
i, 1 ) );
753 rResult( 1, 0 ) += ( this->
GetPoint(
i ).Y() ) * ( shape_functions_gradients(
i, 0 ) );
754 rResult( 1, 1 ) += ( this->
GetPoint(
i ).Y() ) * ( shape_functions_gradients(
i, 1 ) );
755 rResult( 2, 0 ) += ( this->
GetPoint(
i ).Z() ) * ( shape_functions_gradients(
i, 0 ) );
756 rResult( 2, 1 ) += ( this->
GetPoint(
i ).Z() ) * ( shape_functions_gradients(
i, 1 ) );
783 if(rResult.size() != integration_points_number)
785 rResult.
resize(integration_points_number,
false);
789 this->
Jacobian( jacobian, ThisMethod);
791 for (
unsigned int pnt = 0; pnt < integration_points_number; pnt++ )
793 const double det_j = std::pow(jacobian[pnt](0,1),2)*(std::pow(jacobian[pnt](1,0),2) + std::pow(jacobian[pnt](2,0),2)) + std::pow(jacobian[pnt](1,1)*jacobian[pnt](2,0) - jacobian[pnt](1,0)*jacobian[pnt](2,1),2) - 2.0*jacobian[pnt](0,0)*jacobian[pnt](0,1)*(jacobian[pnt](1,0)*jacobian[pnt](1,1) + jacobian[pnt](2,0)*jacobian[pnt](2,1)) + std::pow(jacobian[pnt](0,0),2)*(std::pow(jacobian[pnt](1,1),2) + std::pow(jacobian[pnt](2,1),2));
795 if (det_j < 0.0)
KRATOS_ERROR <<
"WARNING::NEGATIVE VALUE: NOT POSSIBLE TO EVALUATE THE JACOBIAN DETERMINANT" << std::endl;
797 rResult[pnt] = std::sqrt(det_j);
832 this->
Jacobian( jacobian, IntegrationPointIndex, ThisMethod);
834 const double det_j = std::pow(jacobian(0,1),2)*(std::pow(jacobian(1,0),2) + std::pow(jacobian(2,0),2)) + std::pow(jacobian(1,1)*jacobian(2,0) - jacobian(1,0)*jacobian(2,1),2) - 2.0*jacobian(0,0)*jacobian(0,1)*(jacobian(1,0)*jacobian(1,1) + jacobian(2,0)*jacobian(2,1)) + std::pow(jacobian(0,0),2)*(std::pow(jacobian(1,1),2) + std::pow(jacobian(2,1),2));
836 if (det_j < 0.0)
KRATOS_ERROR <<
"WARNING::NEGATIVE VALUE: NOT POSSIBLE TO EVALUATE THE JACOBIAN DETERMINANT" << std::endl;
838 return std::sqrt(det_j);
872 const double det_j = std::pow(jacobian(0,1),2)*(std::pow(jacobian(1,0),2) + std::pow(jacobian(2,0),2)) + std::pow(jacobian(1,1)*jacobian(2,0) - jacobian(1,0)*jacobian(2,1),2) - 2.0*jacobian(0,0)*jacobian(0,1)*(jacobian(1,0)*jacobian(1,1) + jacobian(2,0)*jacobian(2,1)) + std::pow(jacobian(0,0),2)*(std::pow(jacobian(1,1),2) + std::pow(jacobian(2,1),2));
874 if (det_j < 0.0)
KRATOS_ERROR <<
"WARNING::NEGATIVE VALUE: NOT POSSIBLE TO EVALUATE THE JACOBIAN DETERMINANT" << std::endl;
876 return std::sqrt(det_j);
1037 else if ( triangle_1.
HasIntersection(rLowPoint, rHighPoint) )
return true;
1071 switch ( ShapeFunctionIndex )
1074 return( 0.25*( 1.0 - rPoint[0] )*( 1.0 - rPoint[1] ) );
1076 return( 0.25*( 1.0 + rPoint[0] )*( 1.0 - rPoint[1] ) );
1078 return( 0.25*( 1.0 + rPoint[0] )*( 1.0 + rPoint[1] ) );
1080 return( 0.25*( 1.0 - rPoint[0] )*( 1.0 + rPoint[1] ) );
1082 KRATOS_ERROR <<
"Wrong index of shape function!" << *
this << std::endl;
1101 if(rResult.size() != 4) rResult.
resize(4,
false);
1102 rResult[0] = 0.25*( 1.0 - rCoordinates[0] )*( 1.0 - rCoordinates[1] );
1103 rResult[1] = 0.25*( 1.0 + rCoordinates[0] )*( 1.0 - rCoordinates[1] );
1104 rResult[2] = 0.25*( 1.0 + rCoordinates[0] )*( 1.0 + rCoordinates[1] );
1105 rResult[3] = 0.25*( 1.0 - rCoordinates[0] )*( 1.0 + rCoordinates[1] );
1128 const double Tolerance = std::numeric_limits<double>::epsilon()
1132 const Point point(rPointGlobalCoordinates);
1149 return "2 dimensional quadrilateral with four nodes in 3D space";
1181 std::cout << std::endl;
1187 rOStream <<
" Jacobian in the origin\t : " << jacobian;
1200 const int& integration_points_number
1204 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1206 Result[pnt] = shape_function_local_gradient[pnt];
1221 const int integration_points_number
1225 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1227 Result[pnt] = shape_function_local_gradient[pnt];
1247 rResult.
resize( 4, 2,
false );
1249 rResult( 0, 0 ) = -0.25 * ( 1.0 - rPoint[1] );
1250 rResult( 0, 1 ) = -0.25 * ( 1.0 - rPoint[0] );
1251 rResult( 1, 0 ) = 0.25 * ( 1.0 - rPoint[1] );
1252 rResult( 1, 1 ) = -0.25 * ( 1.0 + rPoint[0] );
1253 rResult( 2, 0 ) = 0.25 * ( 1.0 + rPoint[1] );
1254 rResult( 2, 1 ) = 0.25 * ( 1.0 + rPoint[0] );
1255 rResult( 3, 0 ) = -0.25 * ( 1.0 + rPoint[1] );
1256 rResult( 3, 1 ) = 0.25 * ( 1.0 - rPoint[0] );
1274 rResult.
resize( 4, 2,
false );
1275 rResult( 0, 0 ) = -0.25 * ( 1.0 - rPoint.
Y() );
1276 rResult( 0, 1 ) = -0.25 * ( 1.0 - rPoint.
X() );
1277 rResult( 1, 0 ) = 0.25 * ( 1.0 - rPoint.
Y() );
1278 rResult( 1, 1 ) = -0.25 * ( 1.0 + rPoint.
X() );
1279 rResult( 2, 0 ) = 0.25 * ( 1.0 + rPoint.
Y() );
1280 rResult( 2, 1 ) = 0.25 * ( 1.0 + rPoint.
X() );
1281 rResult( 3, 0 ) = -0.25 * ( 1.0 + rPoint.
Y() );
1282 rResult( 3, 1 ) = 0.25 * ( 1.0 - rPoint.
X() );
1297 if ( rResult.size() != this->PointsNumber() )
1305 rResult[0].
resize( 2, 2,
false );
1306 rResult[1].
resize( 2, 2,
false );
1307 rResult[2].
resize( 2, 2,
false );
1308 rResult[3].
resize( 2, 2,
false );
1310 rResult[0]( 0, 0 ) = 0.0;
1311 rResult[0]( 0, 1 ) = 0.25;
1312 rResult[0]( 1, 0 ) = 0.25;
1313 rResult[0]( 1, 1 ) = 0.0;
1314 rResult[1]( 0, 0 ) = 0.0;
1315 rResult[1]( 0, 1 ) = -0.25;
1316 rResult[1]( 1, 0 ) = -0.25;
1317 rResult[1]( 1, 1 ) = 0.0;
1318 rResult[2]( 0, 0 ) = 0.0;
1319 rResult[2]( 0, 1 ) = 0.25;
1320 rResult[2]( 1, 0 ) = 0.25;
1321 rResult[2]( 1, 1 ) = 0.0;
1322 rResult[3]( 0, 0 ) = 0.0;
1323 rResult[3]( 0, 1 ) = -0.25;
1324 rResult[3]( 1, 0 ) = -0.25;
1325 rResult[3]( 1, 1 ) = 0.0;
1340 if ( rResult.size() != this->PointsNumber() )
1354 rResult[0][0].
resize( 2, 2,
false );
1355 rResult[0][1].
resize( 2, 2,
false );
1356 rResult[1][0].
resize( 2, 2,
false );
1357 rResult[1][1].
resize( 2, 2,
false );
1358 rResult[2][0].
resize( 2, 2,
false );
1359 rResult[2][1].
resize( 2, 2,
false );
1360 rResult[3][0].
resize( 2, 2,
false );
1361 rResult[3][1].
resize( 2, 2,
false );
1363 for (
int i = 0;
i < 4;
i++ )
1366 rResult[
i][0]( 0, 0 ) = 0.0;
1367 rResult[
i][0]( 0, 1 ) = 0.0;
1368 rResult[
i][0]( 1, 0 ) = 0.0;
1369 rResult[
i][0]( 1, 1 ) = 0.0;
1370 rResult[
i][1]( 0, 0 ) = 0.0;
1371 rResult[
i][1]( 0, 1 ) = 0.0;
1372 rResult[
i][1]( 1, 0 ) = 0.0;
1373 rResult[
i][1]( 1, 1 ) = 0.0;
1412 KRATOS_DEPRECATED_MESSAGE(
"This method is deprecated. Use either \'ProjectionPointLocalToLocalSpace\' or \'ProjectionPointGlobalToLocalSpace\' instead.")
1417 const double Tolerance =
std::numeric_limits<
double>::epsilon()
1420 KRATOS_WARNING(
"ProjectionPoint") <<
"This method is deprecated. Use either \'ProjectionPointLocalToLocalSpace\' or \'ProjectionPointGlobalToLocalSpace\' instead." << std::endl;
1424 this->
GlobalCoordinates(rProjectedPointGlobalCoordinates, rProjectedPointLocalCoordinates);
1432 const double Tolerance = std::numeric_limits<double>::epsilon()
1446 const double Tolerance = std::numeric_limits<double>::epsilon()
1450 const std::size_t max_number_of_iterations = 10;
1461 for (iter = 0; iter < max_number_of_iterations; ++iter) {
1463 proj_pt_gl_coords = GeometricalProjectionUtilities::FastProject<CoordinatesArrayType>(
1465 rPointGlobalCoordinates,
1481 if (iter >= max_number_of_iterations - 1) {
1513 void save(
Serializer& rSerializer )
const override
1552 BoundedMatrix<double,3,4>
X;
1553 BoundedMatrix<double,3,2>
DN;
1560 static constexpr
double MaxNormPointLocalCoordinates = 300.0;
1561 static constexpr std::size_t MaxIteratioNumberPointLocalCoordinates = 500;
1562 static constexpr
double MaxTolerancePointLocalCoordinates = 1.0e-8;
1569 array_1d<double, 2> DeltaXi =
ZeroVector( 2 );
1570 const array_1d<double, 3> zero_array =
ZeroVector(3);
1571 array_1d<double, 3> CurrentGlobalCoords;
1574 for (
IndexType k = 0;
k < MaxIteratioNumberPointLocalCoordinates;
k++ ) {
1575 noalias(CurrentGlobalCoords) = zero_array;
1578 noalias( CurrentGlobalCoords ) = rPoint - CurrentGlobalCoords;
1581 Matrix shape_functions_gradients;
1586 const array_1d<double, 2>
res =
prod(
trans(
DN), CurrentGlobalCoords);
1589 const double det_j =
J( 0, 0 ) *
J( 1, 1 ) -
J( 0, 1 ) *
J( 1, 0 );
1592 invJ( 0, 0 ) = (
J( 1, 1 ) ) / ( det_j );
1593 invJ( 1, 0 ) = -(
J( 1, 0 ) ) / ( det_j );
1594 invJ( 0, 1 ) = -(
J( 0, 1 ) ) / ( det_j );
1595 invJ( 1, 1 ) = (
J( 0, 0 ) ) / ( det_j );
1597 DeltaXi( 0 ) = invJ( 0, 0 ) *
res[0] + invJ( 0, 1 ) *
res[1];
1598 DeltaXi( 1 ) = invJ( 1, 0 ) *
res[0] + invJ( 1, 1 ) *
res[1];
1600 rResult[0] += DeltaXi[0];
1601 rResult[1] += DeltaXi[1];
1603 if (
norm_2( DeltaXi ) > MaxNormPointLocalCoordinates ) {
1604 KRATOS_WARNING_IF(
"Quadrilateral3D4",
IsInside ==
false &&
k > 0) <<
"detJ =\t" << det_j <<
" DeltaX =\t" << DeltaXi <<
" stopping calculation. Iteration:\t" <<
k << std::endl;
1608 if (
norm_2( DeltaXi ) < MaxTolerancePointLocalCoordinates )
1622 static Matrix CalculateShapeFunctionsIntegrationPointsValues(
1626 AllIntegrationPoints();
1629 const int integration_points_number = integration_points.size();
1631 const int points_number = 4;
1633 Matrix shape_function_values( integration_points_number, points_number );
1636 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1638 shape_function_values( pnt, 0 ) =
1639 0.25 * ( 1.0 - integration_points[pnt].X() )
1640 * ( 1.0 - integration_points[pnt].
Y() );
1641 shape_function_values( pnt, 1 ) =
1642 0.25 * ( 1.0 + integration_points[pnt].X() )
1643 * ( 1.0 - integration_points[pnt].
Y() );
1644 shape_function_values( pnt, 2 ) =
1645 0.25 * ( 1.0 + integration_points[pnt].X() )
1646 * ( 1.0 + integration_points[pnt].
Y() );
1647 shape_function_values( pnt, 3 ) =
1648 0.25 * ( 1.0 - integration_points[pnt].X() )
1649 * ( 1.0 + integration_points[pnt].
Y() );
1652 return shape_function_values;
1669 const int integration_points_number = integration_points.size();
1675 for (
int pnt = 0; pnt < integration_points_number; pnt++ )
1678 result( 0, 0 ) = -0.25 * ( 1.0 - integration_points[pnt].Y() );
1679 result( 0, 1 ) = -0.25 * ( 1.0 - integration_points[pnt].X() );
1680 result( 1, 0 ) = 0.25 * ( 1.0 - integration_points[pnt].Y() );
1681 result( 1, 1 ) = -0.25 * ( 1.0 + integration_points[pnt].X() );
1682 result( 2, 0 ) = 0.25 * ( 1.0 + integration_points[pnt].Y() );
1683 result( 2, 1 ) = 0.25 * ( 1.0 + integration_points[pnt].X() );
1684 result( 3, 0 ) = -0.25 * ( 1.0 + integration_points[pnt].Y() );
1685 result( 3, 1 ) = 0.25 * ( 1.0 - integration_points[pnt].X() );
1686 d_shape_f_values[pnt] = result;
1689 return d_shape_f_values;
1700 Quadrature < QuadrilateralGaussLegendreIntegrationPoints1,
1701 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1702 Quadrature < QuadrilateralGaussLegendreIntegrationPoints2,
1703 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1704 Quadrature < QuadrilateralGaussLegendreIntegrationPoints3,
1705 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1706 Quadrature < QuadrilateralGaussLegendreIntegrationPoints4,
1707 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1708 Quadrature < QuadrilateralGaussLegendreIntegrationPoints5,
1709 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1710 Quadrature < QuadrilateralCollocationIntegrationPoints1,
1711 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1712 Quadrature < QuadrilateralCollocationIntegrationPoints2,
1713 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1714 Quadrature < QuadrilateralCollocationIntegrationPoints3,
1715 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1716 Quadrature < QuadrilateralCollocationIntegrationPoints4,
1717 2, IntegrationPoint<3> >::GenerateIntegrationPoints(),
1718 Quadrature < QuadrilateralCollocationIntegrationPoints5,
1719 2, IntegrationPoint<3> >::GenerateIntegrationPoints()
1722 return integration_points;
1733 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1735 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1737 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1739 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1741 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1743 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1745 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1747 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1749 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1751 Quadrilateral3D4<TPointType>::CalculateShapeFunctionsIntegrationPointsValues(
1755 return shape_functions_values;
1762 AllShapeFunctionsLocalGradients()
1779 return shape_functions_local_gradients;
1818 std::istream& rIStream,
1824 std::ostream& rOStream,
1828 rOStream << std::endl;
1835 template<
class TPo
intType>
1836 const GeometryData Quadrilateral3D4<TPointType>::msGeometryData(
1839 Quadrilateral3D4<TPointType>::AllIntegrationPoints(),
1840 Quadrilateral3D4<TPointType>::AllShapeFunctionsValues(),
1841 AllShapeFunctionsLocalGradients()
1844 template<
class TPo
intType>
Definition: geometry_data.h:60
const ShapeFunctionsGradientsType & ShapeFunctionsLocalGradients() const
Definition: geometry_data.h:607
const Matrix & ShapeFunctionLocalGradient(IndexType IntegrationPointIndex) const
Definition: geometry_data.h:660
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
SizeType size() const
Definition: geometry.h:518
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
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 PointDistanceToQuadrilateral3D(const Point &rQuadrilateralPoint1, const Point &rQuadrilateralPoint2, const Point &rQuadrilateralPoint3, const Point &rQuadrilateralPoint4, const Point &rPoint)
This function calculates the distance of a 3D point to a 3D quadrilateral.
Definition: geometry_utilities.cpp:376
Short class definition.
Definition: integration_point.h:52
static double ComputeDomainSize(const TGeometryType &rGeometry)
This method calculates and returns the domain size of the geometry from any geometry in a generic man...
Definition: integration_utilities.h:63
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
An two node 3D line geometry with linear shape functions.
Definition: line_3d_2.h:64
This class defines the node.
Definition: node.h:65
Point class.
Definition: point.h:59
double Y() const
Definition: point.h:187
double X() const
Definition: point.h:181
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
A four node 3D quadrilateral geometry with bi-linear shape functions.
Definition: quadrilateral_3d_4.h:76
bool HasIntersection(const Point &rLowPoint, const Point &rHighPoint) const override
Definition: quadrilateral_3d_4.h:1025
TPointType PointType
Definition: quadrilateral_3d_4.h:118
Line3D2< TPointType > EdgeType
Definition: quadrilateral_3d_4.h:92
GeometriesArrayType GenerateFaces() const override
Returns all faces of the current geometry.
Definition: quadrilateral_3d_4.h:942
double DeterminantOfJacobian(IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const override
Definition: quadrilateral_3d_4.h:825
SizeType FacesNumber() const override
Returns the number of faces of the current geometry.
Definition: quadrilateral_3d_4.h:929
Quadrilateral3D4(typename PointType::Pointer pFirstPoint, typename PointType::Pointer pSecondPoint, typename PointType::Pointer pThirdPoint, typename PointType::Pointer pFourthPoint)
Definition: quadrilateral_3d_4.h:232
BaseType::PointsArrayType PointsArrayType
Definition: quadrilateral_3d_4.h:139
Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: quadrilateral_3d_4.h:1242
BaseType::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: quadrilateral_3d_4.h:192
JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod) const override
Definition: quadrilateral_3d_4.h:551
BaseType::IntegrationPointsContainerType IntegrationPointsContainerType
Definition: quadrilateral_3d_4.h:166
~Quadrilateral3D4() override
Definition: quadrilateral_3d_4.h:303
double ShapeFunctionValue(IndexType ShapeFunctionIndex, const CoordinatesArrayType &rPoint) const override
Definition: quadrilateral_3d_4.h:1068
Matrix & Jacobian(Matrix &rResult, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const override
Definition: quadrilateral_3d_4.h:687
KRATOS_CLASS_POINTER_DEFINITION(Quadrilateral3D4)
BaseType::Pointer Create(const IndexType NewGeometryId, PointsArrayType const &rThisPoints) const override
Creates a new geometry pointer.
Definition: quadrilateral_3d_4.h:364
std::string Info() const override
Definition: quadrilateral_3d_4.h:1147
BaseType::JacobiansType JacobiansType
Definition: quadrilateral_3d_4.h:185
BaseType::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: quadrilateral_3d_4.h:178
BaseType::ShapeFunctionsValuesContainerType ShapeFunctionsValuesContainerType
Definition: quadrilateral_3d_4.h:172
Quadrilateral3D4(const IndexType GeometryId, const PointsArrayType &rThisPoints)
Constructor with Geometry Id.
Definition: quadrilateral_3d_4.h:252
Matrix & PointsLocalCoordinates(Matrix &rResult) const override
Definition: quadrilateral_3d_4.h:403
Quadrilateral3D4(Quadrilateral3D4 const &rOther)
Definition: quadrilateral_3d_4.h:278
bool HasIntersection(const GeometryType &ThisGeometry) const override
Test the intersection with another geometry.
Definition: quadrilateral_3d_4.h:991
virtual ShapeFunctionsGradientsType ShapeFunctionsLocalGradients(IntegrationMethod ThisMethod)
Definition: quadrilateral_3d_4.h:1195
void NumberNodesInFaces(DenseVector< unsigned int > &NumberNodesInFaces) const override
Definition: quadrilateral_3d_4.h:951
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: quadrilateral_3d_4.h:1443
BaseType::IndexType IndexType
Definition: quadrilateral_3d_4.h:126
double DeterminantOfJacobian(const CoordinatesArrayType &rPoint) const override
Definition: quadrilateral_3d_4.h:866
Quadrilateral3D4(Quadrilateral3D4< TOtherPointType > const &rOther)
Definition: quadrilateral_3d_4.h:295
Quadrilateral3D4(const PointsArrayType &ThisPoints)
Definition: quadrilateral_3d_4.h:244
Vector & ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType &rCoordinates) const override
Definition: quadrilateral_3d_4.h:1099
BaseType::NormalType NormalType
Definition: quadrilateral_3d_4.h:213
GeometriesArrayType Faces(void) override
Definition: quadrilateral_3d_4.h:1050
Quadrilateral3D4< TPointType > FaceType
Definition: quadrilateral_3d_4.h:97
void PrintInfo(std::ostream &rOStream) const override
Definition: quadrilateral_3d_4.h:1158
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: quadrilateral_3d_4.h:1126
BaseType::SizeType SizeType
Definition: quadrilateral_3d_4.h:133
Quadrilateral3D4(const std::string &rGeometryName, const PointsArrayType &rThisPoints)
Constructor with Geometry Id.
Definition: quadrilateral_3d_4.h:261
SizeType PointsNumberInDirection(IndexType LocalDirectionIndex) const override
Returns number of points per direction.
Definition: quadrilateral_3d_4.h:389
JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod, Matrix &DeltaPosition) const override
Definition: quadrilateral_3d_4.h:618
Geometry< TPointType > GeometryType
Definition: quadrilateral_3d_4.h:87
Quadrilateral3D4 & operator=(const Quadrilateral3D4 &rOther)
Definition: quadrilateral_3d_4.h:330
BaseType::ShapeFunctionsSecondDerivativesType ShapeFunctionsSecondDerivativesType
Definition: quadrilateral_3d_4.h:200
bool IsInside(const CoordinatesArrayType &rPoint, CoordinatesArrayType &rResult, const double Tolerance=std::numeric_limits< double >::epsilon()) const override
Definition: quadrilateral_3d_4.h:499
GeometryData::KratosGeometryFamily GetGeometryFamily() const override
Definition: quadrilateral_3d_4.h:305
Geometry< TPointType > BaseType
Definition: quadrilateral_3d_4.h:85
friend class Quadrilateral3D4
Definition: quadrilateral_3d_4.h:1796
double Area() const override
This method calculates and returns area or surface area of this geometry depending to it's dimension.
Definition: quadrilateral_3d_4.h:455
BaseType::CoordinatesArrayType CoordinatesArrayType
Definition: quadrilateral_3d_4.h:144
ShapeFunctionsThirdDerivativesType & ShapeFunctionsThirdDerivatives(ShapeFunctionsThirdDerivativesType &rResult, const CoordinatesArrayType &rPoint) const override
Definition: quadrilateral_3d_4.h:1335
BaseType::IntegrationPointType IntegrationPointType
Definition: quadrilateral_3d_4.h:150
double DomainSize() const override
This method calculates and returns length, area or volume of this geometry depending to it's dimensio...
Definition: quadrilateral_3d_4.h:485
Matrix & Jacobian(Matrix &rResult, const CoordinatesArrayType &rPoint) const override
Definition: quadrilateral_3d_4.h:736
BaseType::ShapeFunctionsThirdDerivativesType ShapeFunctionsThirdDerivativesType
Definition: quadrilateral_3d_4.h:208
void PrintData(std::ostream &rOStream) const override
Definition: quadrilateral_3d_4.h:1177
SizeType EdgesNumber() const override
This method gives you number of all edges of this geometry.
Definition: quadrilateral_3d_4.h:894
CoordinatesArrayType & PointLocalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rPoint) const override
Returns the local coordinates of a given arbitrary point.
Definition: quadrilateral_3d_4.h:522
BaseType::GeometriesArrayType GeometriesArrayType
Definition: quadrilateral_3d_4.h:113
Vector & DeterminantOfJacobian(Vector &rResult, IntegrationMethod ThisMethod) const override
Definition: quadrilateral_3d_4.h:777
double Volume() const override
This method calculates and returns the volume of this geometry.
Definition: quadrilateral_3d_4.h:468
void NodesInFaces(DenseMatrix< unsigned int > &NodesInFaces) const override
Definition: quadrilateral_3d_4.h:963
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: quadrilateral_3d_4.h:1429
BaseType::IntegrationPointsArrayType IntegrationPointsArrayType
Definition: quadrilateral_3d_4.h:159
Quadrilateral3D4 & operator=(Quadrilateral3D4< TOtherPointType > const &rOther)
Definition: quadrilateral_3d_4.h:348
ShapeFunctionsSecondDerivativesType & ShapeFunctionsSecondDerivatives(ShapeFunctionsSecondDerivativesType &rResult, const CoordinatesArrayType &rPoint) const override
Definition: quadrilateral_3d_4.h:1292
GeometryData::IntegrationMethod IntegrationMethod
Definition: quadrilateral_3d_4.h:107
virtual Matrix & ShapeFunctionsGradients(Matrix &rResult, PointType &rPoint)
Definition: quadrilateral_3d_4.h:1269
BaseType::Pointer Create(const IndexType NewGeometryId, const BaseType &rGeometry) const override
Creates a new geometry pointer.
Definition: quadrilateral_3d_4.h:378
double Length() const override
Definition: quadrilateral_3d_4.h:441
GeometryData::KratosGeometryType GetGeometryType() const override
Definition: quadrilateral_3d_4.h:310
GeometriesArrayType GenerateEdges() const override
This method gives you all edges of this geometry.
Definition: quadrilateral_3d_4.h:907
virtual ShapeFunctionsGradientsType ShapeFunctionsLocalGradients()
Definition: quadrilateral_3d_4.h:1216
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: quadrilateral_3d_4.h:1413
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
bool HasIntersection(const GeometryType &rThisGeometry) const override
Test the intersection with another geometry.
Definition: triangle_3d_3.h:649
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_IF(label, conditional)
Definition: logger.h:266
#define KRATOS_WARNING(label)
Definition: logger.h:265
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
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::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
const GeometryData Quadrilateral3D4< TPointType >::msGeometryData & msGeometryDimension(), Quadrilateral3D4< TPointType >::AllShapeFunctionsValues(), AllShapeFunctionsLocalGradients()
Definition: brep_curve.h:483
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
res
Definition: generate_convection_diffusion_explicit_element.py:211
DN
Definition: generate_convection_diffusion_explicit_element.py:98
def load(f)
Definition: ode_solve.py:307
tuple const
Definition: ode_solve.py:403
int k
Definition: quadrature.py:595
float temp
Definition: rotating_cone.py:85
J
Definition: sensitivityMatrix.py:58
namespace
Definition: array_1d.h:793
integer i
Definition: TensorModule.f:17