69 template<
class TPo
intType>
228 : mId(GenerateSelfAssignedId())
229 , mpGeometryData(&GeometryDataInstance())
235 : mpGeometryData(&GeometryDataInstance())
243 , mpGeometryData(&GeometryDataInstance())
307 GeometryData const *pThisGeometryData = &GeometryDataInstance())
308 : mId(GenerateSelfAssignedId())
309 , mpGeometryData(pThisGeometryData)
310 , mPoints(ThisPoints)
317 GeometryData const* pThisGeometryData = &GeometryDataInstance())
318 : mpGeometryData(pThisGeometryData)
319 , mPoints(ThisPoints)
325 const std::string& GeometryName,
327 GeometryData const* pThisGeometryData = &GeometryDataInstance())
329 , mpGeometryData(pThisGeometryData)
330 , mPoints(ThisPoints)
345 mpGeometryData(rOther.mpGeometryData),
346 mPoints(rOther.mPoints),
364 template<
class TOtherPo
intType>
367 mpGeometryData(rOther.mpGeometryData),
402 mpGeometryData = rOther.mpGeometryData;
403 mPoints = rOther.mPoints;
404 mData = rOther.mData;
419 template<
class TOtherPo
intType>
427 mpGeometryData = rOther.mpGeometryData;
500 return mPoints.
front();
505 return mPoints.
front();
510 return mPoints.
back();
515 return mPoints.
back();
520 return mPoints.
size();
535 KRATOS_ERROR <<
"Trying to access PointsNumberInDirection from geometry base class." << std::endl;
545 mPoints.
swap(rOther.mPoints);
611 return mData.
Has(rThisVariable);
618 const TVariableType& rThisVariable,
619 typename TVariableType::Type
const& rValue)
621 mData.
SetValue(rThisVariable, rValue);
627 template<
class TVariableType>
typename TVariableType::Type&
GetValue(
628 const TVariableType& rThisVariable)
630 return mData.
GetValue(rThisVariable);
633 template<
class TVariableType>
typename TVariableType::Type
const&
GetValue(
634 const TVariableType& rThisVariable)
const
636 return mData.
GetValue(rThisVariable);
661 const double Input) {}
695 bool& rOutput)
const {}
700 int& rOutput)
const {}
705 double& rOutput)
const {}
744 return (
typeid(rLHS) ==
typeid(rRHS));
801 return mPoints.
empty();
818 auto p_geom = this->
Create(0, rThisPoints);
824 p_geom->SetIdSelfAssigned(
id);
827 p_geom->SetIdNotGeneratedFromString(
id);
830 p_geom->SetIdWithoutCheck(
id);
846 return Pointer(
new Geometry( NewGeometryId, rThisPoints, mpGeometryData));
856 const std::string& rNewGeometryName,
860 auto p_geom = this->
Create(0, rThisPoints);
861 p_geom->SetId(rNewGeometryName);
875 auto p_geom = this->
Create(0, rGeometry);
881 p_geom->SetIdSelfAssigned(
id);
884 p_geom->SetIdNotGeneratedFromString(
id);
887 p_geom->SetIdWithoutCheck(
id);
903 auto p_geometry = Pointer(
new Geometry( NewGeometryId, rGeometry.
Points(), mpGeometryData));
904 p_geometry->SetData(rGeometry.
GetData());
915 const std::string& rNewGeometryName,
919 auto p_geom = this->
Create(0, rGeometry);
920 p_geom->SetId(rNewGeometryName);
929 *
i =
typename PointType::Pointer(
new PointType( **
i ) );
944 return *mpGeometryData;
955 "Calling SetGeometryShapeFunctionContainer from base geometry class."
989 <<
"Id: " <<
Id <<
" out of range. The Id must me lower than 2^62 = 4.61e+18. "
998 void SetId(
const std::string& rName)
1007 std::hash<std::string> string_hash_generator;
1008 auto id = string_hash_generator(rName);
1011 SetIdGeneratedFromString(
id);
1014 SetIdNotSelfAssigned(
id);
1032 "Calling GetGeometryParent from base geometry class."
1045 "Calling SetGeometryParent from base geometry class."
1086 KRATOS_ERROR <<
"Calling base class 'pGetGeometryPart' method instead of derived function."
1087 <<
" Please check the definition in the derived class. " << *
this << std::endl;
1100 KRATOS_ERROR <<
"Calling base class 'pGetGeometryPart' method instead of derived function."
1101 <<
" Please check the definition in the derived class. " << *
this << std::endl;
1111 GeometryType::Pointer pGeometry
1114 KRATOS_ERROR <<
"Calling base class 'SetGeometryPart' method instead of derived function."
1115 <<
" Please check the definition in the derived class. " << *
this << std::endl;
1124 KRATOS_ERROR <<
"Calling base class 'AddGeometryPart' method instead of derived function."
1125 <<
" Please check the definition in the derived class. " << *
this << std::endl;
1134 KRATOS_ERROR <<
"Calling base class 'RemoveGeometryPart' method instead of derived function."
1135 <<
" Please check the definition in the derived class. " << *
this << std::endl;
1144 KRATOS_ERROR <<
"Calling base class 'RemoveGeometryPart' method instead of derived function."
1145 <<
" Please check the definition in the derived class. " << *
this << std::endl;
1157 KRATOS_ERROR <<
"Calling base class 'HasGeometryPart' method instead of derived function."
1158 <<
" Please check the definition in the derived class. " << *
this << std::endl;
1190 if (rResult.size() != number_of_nodes)
1191 rResult.
resize(number_of_nodes,
false);
1200 Vector detJ_vector(r_integrations_points.size());
1205 for (
IndexType point_number = 0; point_number < r_integrations_points.size(); ++point_number ) {
1206 const double integration_weight = r_integrations_points[point_number].Weight() * detJ_vector[point_number];
1207 const Vector& rN =
row(r_Ncontainer,point_number);
1213 rResult[
i] += rN[
i] * integration_weight;
1223 int j =
std::min(
static_cast<int>(integration_method) + 1, 4);
1229 Vector detJ_vector(r_integrations_points.size());
1233 for (
IndexType point_number = 0; point_number < r_integrations_points.size(); ++point_number ) {
1234 const double detJ = detJ_vector[point_number];
1235 const double integration_weight = r_integrations_points[point_number].Weight() * detJ;
1236 const Vector& rN =
row(r_Ncontainer,point_number);
1239 rResult[
i] += std::pow(rN[
i], 2) * integration_weight;
1244 double total_value = 0.0;
1246 total_value += rResult[
i];
1249 rResult[
i] /= total_value;
1256 Matrix local_coordinates(number_of_nodes, local_space_dimension);
1263 const double weight = r_integrations_points[0].Weight()/
static_cast<double>(number_of_nodes);
1264 for (
IndexType point_number = 0; point_number < number_of_nodes; ++point_number ) {
1266 r_local_coordinates[
dim] = local_coordinates(point_number,
dim);
1269 rResult[point_number] = weight * detJ/
domain_size;
1312 KRATOS_ERROR <<
"Trying to access PolynomialDegree from geometry base class." << std::endl;
1333 KRATOS_ERROR <<
"Calling base class 'Length' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1346 KRATOS_ERROR <<
"Calling base class 'Area' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1359 KRATOS_ERROR <<
"Calling base class 'Volume' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1373 if (local_dimension == 1) {
1375 }
else if (local_dimension == 2) {
1376 return this->
Area();
1392 KRATOS_ERROR <<
"Calling base class 'MinEdgeLength' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1405 KRATOS_ERROR <<
"Calling base class 'MaxEdgeLength' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1418 KRATOS_ERROR <<
"Calling base class 'AverageEdgeLength' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1430 KRATOS_ERROR <<
"Calling base class 'Circumradius' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1442 KRATOS_ERROR <<
"Calling base class 'Inradius' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1454 KRATOS_ERROR <<
"Calling base class 'HasIntersection' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1468 KRATOS_ERROR <<
"Calling base class 'HasIntersection' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1485 TPointType& rLowPoint,
1486 TPointType& rHighPoint
1494 const auto& r_point = this->
GetPoint( point );
1496 rHighPoint[
i] = ( rHighPoint[
i] < r_point[
i] ) ? r_point[
i] : rHighPoint[
i];
1497 rLowPoint[
i] = ( rLowPoint[
i] > r_point[
i] ) ? r_point[
i] : rLowPoint[
i];
1518 if ( points_number == 0 )
1520 KRATOS_ERROR <<
"can not compute the ceneter of a geometry of zero points" << std::endl;
1524 Point result = ( *this )[0];
1531 const double temp = 1.0 /
double( points_number );
1555 this->
Jacobian( j_node, rPointLocalCoordinates);
1559 tangent_eta[2] = 1.0;
1560 for (
unsigned int i_dim = 0; i_dim <
dimension; i_dim++) {
1561 tangent_xi[i_dim] = j_node(i_dim, 0);
1564 for (
unsigned int i_dim = 0; i_dim <
dimension; i_dim++) {
1565 tangent_xi[i_dim] = j_node(i_dim, 0);
1566 tangent_eta[i_dim] = j_node(i_dim, 1);
1604 <<
"Remember the normal can be computed just in geometries with a local dimension: "
1613 this->
Jacobian(j_node, IntegrationPointIndex, ThisMethod);
1617 tangent_eta[2] = 1.0;
1619 tangent_xi[i_dim] = j_node(i_dim, 0);
1624 tangent_xi[i_dim] = j_node(i_dim, 0);
1625 tangent_eta[i_dim] = j_node(i_dim, 1);
1643 const double norm_normal =
norm_2(normal);
1644 if (norm_normal > std::numeric_limits<double>::epsilon()) normal /= norm_normal;
1645 else KRATOS_ERROR <<
"ERROR: The normal norm is zero or almost zero. Norm. normal: " << norm_normal << std::endl;
1676 const double norm_normal =
norm_2(normal_vector);
1677 if (norm_normal > std::numeric_limits<double>::epsilon())
1678 normal_vector /= norm_normal;
1681 <<
"ERROR: The normal norm is zero or almost zero: "
1682 << norm_normal << std::endl;
1683 return normal_vector;
1705 double quality = 0.0f;
1745 KRATOS_ERROR <<
"Called the virtual function for ComputeDihedralAngles " << *
this << std::endl;
1755 KRATOS_ERROR <<
"Called the virtual function for ComputeDihedralAngles " << *
this << std::endl;
1793 return mPoints(
Index );
1806 return mPoints(
Index );
1819 return mPoints[
Index];
1833 return mPoints[
Index];
1844 KRATOS_ERROR <<
"Calling base class 'PointsLocalCoordinates' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
1869 static constexpr
double MaxNormPointLocalCoordinates = 30.0;
1870 static constexpr std::size_t MaxIteratioNumberPointLocalCoordinates = 1000;
1871 static constexpr
double MaxTolerancePointLocalCoordinates = 1.0e-8;
1874 for(std::size_t
k = 0;
k < MaxIteratioNumberPointLocalCoordinates;
k++) {
1875 CurrentGlobalCoords.
clear();
1879 noalias( CurrentGlobalCoords ) = rPoint - CurrentGlobalCoords;
1883 DeltaXi[
i] +=
J(
i,
j)*CurrentGlobalCoords[
j];
1885 rResult[
i] += DeltaXi[
i];
1888 const double norm2DXi =
norm_2(DeltaXi);
1890 if(norm2DXi > MaxNormPointLocalCoordinates) {
1891 KRATOS_WARNING(
"Geometry") <<
"Computation of local coordinates failed at iteration " <<
k << std::endl;
1895 if(norm2DXi < MaxTolerancePointLocalCoordinates) {
1921 const double Tolerance = std::numeric_limits<double>::epsilon()
1926 rPointGlobalCoordinates);
1948 const double Tolerance = std::numeric_limits<double>::epsilon()
1951 KRATOS_ERROR <<
"Calling IsInsideLocalSpace from base class."
1952 <<
" Please check the definition of derived class. "
1953 << *
this << std::endl;
1973 std::vector<double>& rSpans,
1974 IndexType LocalDirectionIndex = 0)
const
1977 "Calling SpansLocalSpace of geometry base class. Please check derived definitions. "
1978 << *
this << std::endl;
2043 if (dimension == 3) {
2045 }
else if (dimension == 2) {
2066 const auto& p_points = this->
Points();
2067 for (IndexType i_point = 0; i_point < p_points.size(); ++i_point) {
2069 point_array.
push_back(p_points(i_point));
2070 auto p_point_geometry = Kratos::make_shared<Geometry<TPointType>>(point_array);
2094 KRATOS_ERROR <<
"Calling base class EdgesNumber method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
2121 KRATOS_ERROR <<
"Calling base class Edges method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
2154 KRATOS_ERROR <<
"Calling base class FacesNumber method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
2169 if (dimension == 3) {
2186 KRATOS_ERROR <<
"Calling base class GenerateFaces method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
2192 KRATOS_ERROR <<
"Calling base class NumberNodesInFaces method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
2197 KRATOS_ERROR <<
"Calling base class NodesInFaces method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
2312 <<
"Default creation of integration points only valid if integration method is not varying per direction." << std::endl;
2333 IndexType NumberOfShapeFunctionDerivatives,
2337 KRATOS_ERROR <<
"Calling CreateQuadraturePointGeometries from geometry base class."
2338 <<
" Please check the definition of derived class. "
2339 << *
this << std::endl;
2354 IndexType NumberOfShapeFunctionDerivatives,
2362 NumberOfShapeFunctionDerivatives,
2425 noalias(rResult) +=
N(IntegrationPointIndex,
i) * (*this)[
i];
2443 if (DeltaPosition.size2() != 3)
2450 noalias( rResult ) +=
N[
i] * ((*this)[
i] +
row(DeltaPosition,
i));
2474 std::vector<CoordinatesArrayType>& rGlobalSpaceDerivatives,
2476 const SizeType DerivativeOrder)
const
2478 if (DerivativeOrder == 0)
2480 if (rGlobalSpaceDerivatives.size() != 1)
2481 rGlobalSpaceDerivatives.resize(1);
2484 rGlobalSpaceDerivatives[0],
2487 else if (DerivativeOrder == 1)
2492 if (rGlobalSpaceDerivatives.size() != 1 + local_space_dimension)
2493 rGlobalSpaceDerivatives.resize(1 + local_space_dimension);
2496 rGlobalSpaceDerivatives[0],
2499 Matrix shape_functions_gradients(points_number, local_space_dimension);
2505 const double value = r_coordinates[
k];
2506 for (
IndexType m = 0;
m < local_space_dimension; ++
m) {
2507 rGlobalSpaceDerivatives[
m + 1][
k] += value * shape_functions_gradients(
i,
m);
2516 KRATOS_ERROR <<
"Calling GlobalDerivatives within geometry.h."
2517 <<
" Please check the definition within derived class. "
2518 << *
this << std::endl;
2534 std::vector<CoordinatesArrayType>& rGlobalSpaceDerivatives,
2536 const SizeType DerivativeOrder)
const
2538 if (DerivativeOrder == 0)
2540 if (rGlobalSpaceDerivatives.size() != 1)
2541 rGlobalSpaceDerivatives.resize(1);
2544 rGlobalSpaceDerivatives[0],
2545 IntegrationPointIndex);
2547 else if (DerivativeOrder == 1)
2552 if (rGlobalSpaceDerivatives.size() != 1 + local_space_dimension)
2553 rGlobalSpaceDerivatives.resize(1 + local_space_dimension);
2556 rGlobalSpaceDerivatives[0],
2557 IntegrationPointIndex);
2569 const double value = r_coordinates[
k];
2570 for (
IndexType m = 0;
m < local_space_dimension; ++
m) {
2571 rGlobalSpaceDerivatives[
m + 1][
k] += value * r_shape_functions_gradient_in_integration_point(
i,
m);
2578 KRATOS_ERROR <<
"Calling GlobalDerivatives within geometry.h."
2579 <<
" Please check the definition within derived class. "
2580 << *
this << std::endl;
2617 KRATOS_DEPRECATED_MESSAGE(
"This method is deprecated. Use either \'ProjectionPointLocalToLocalSpace\' or \'ProjectionPointGlobalToLocalSpace\' instead.")
2622 const double Tolerance =
std::numeric_limits<
double>::epsilon()
2625 KRATOS_ERROR <<
"Calling ProjectionPoint within geometry base class."
2626 <<
" Please check the definition within derived class. "
2627 << *
this << std::endl;
2649 const double Tolerance = std::numeric_limits<double>::epsilon()
2652 KRATOS_ERROR <<
"Calling ProjectionPointLocalToLocalSpace within geometry base class."
2653 <<
" Please check the definition within derived class. "
2654 << *
this << std::endl;
2676 const double Tolerance = std::numeric_limits<double>::epsilon()
2679 KRATOS_ERROR <<
"Calling ProjectionPointGlobalToLocalSpace within geometry base class."
2680 <<
" Please check the definition within derived class. "
2681 << *
this << std::endl;
2703 KRATOS_DEPRECATED_MESSAGE(
"This method is deprecated. Use either \'ClosestPointLocalToLocalSpace\' or \'ClosestPointGlobalToLocalSpace\' instead. Please note that \'rClosestPointGlobalCoordinates\' returns unmodified original value.")
2708 const double Tolerance =
std::numeric_limits<
double>::epsilon()
2734 KRATOS_DEPRECATED_MESSAGE(
"This method is deprecated. Use either \'ClosestPointLocalToLocalSpace\' or \'ClosestPointGlobalToLocalSpace\' instead.")
2738 const double Tolerance =
std::numeric_limits<
double>::epsilon()
2771 KRATOS_DEPRECATED_MESSAGE(
"This method is deprecated. Use either \'ClosestPointLocalToLocalSpace\' or \'ClosestPointGlobalToLocalSpace\' instead.")
2775 const double Tolerance =
std::numeric_limits<
double>::epsilon()
2795 const double Tolerance = std::numeric_limits<double>::epsilon()
2800 rPointLocalCoordinates,
2801 rClosestPointLocalCoordinates,
2804 if (projection_result == 1) {
2810 rClosestPointLocalCoordinates,
2832 const double Tolerance = std::numeric_limits<double>::epsilon()
2837 rPointGlobalCoordinates,
2838 rClosestPointLocalCoordinates,
2841 if (projection_result == 1) {
2847 rClosestPointLocalCoordinates,
2869 const double Tolerance = std::numeric_limits<double>::epsilon()
2883 return norm_2(rPointGlobalCoordinates - global_coordinates);
2924 if( rResult.size() != this->IntegrationPointsNumber( ThisMethod ) )
2928 this->
Jacobian( rResult[pnt], pnt, ThisMethod);
2953 if( rResult.size() != this->IntegrationPointsNumber( ThisMethod ) )
2957 this->
Jacobian( rResult[pnt], pnt, ThisMethod, DeltaPosition);
3003 if(rResult.size1() != working_space_dimension || rResult.size2() != local_space_dimension)
3004 rResult.
resize( working_space_dimension, local_space_dimension,
false );
3010 for (IndexType
i = 0;
i < points_number; ++
i ) {
3012 for(
IndexType k = 0;
k< working_space_dimension; ++
k) {
3013 const double value = r_coordinates[
k];
3015 rResult(
k,
m) += value * r_shape_functions_gradient_in_integration_point(
i,
m);
3047 if(rResult.size1() != working_space_dimension || rResult.size2() != local_space_dimension)
3048 rResult.
resize( working_space_dimension, local_space_dimension,
false );
3054 for (IndexType
i = 0;
i < points_number; ++
i ) {
3056 for(
IndexType k = 0;
k< working_space_dimension; ++
k) {
3057 const double value = r_coordinates[
k] - rDeltaPosition(
i,
k);
3059 rResult(
k,
m) += value * r_shape_functions_gradient_in_integration_point(
i,
m);
3083 if(rResult.size1() != working_space_dimension || rResult.size2() != local_space_dimension)
3084 rResult.
resize( working_space_dimension, local_space_dimension,
false );
3086 Matrix shape_functions_gradients(points_number, local_space_dimension);
3092 for(
IndexType k = 0;
k< working_space_dimension; ++
k) {
3093 const double value = r_coordinates[
k];
3095 rResult(
k,
m) += value * shape_functions_gradients(
i,
m);
3123 if(rResult.size1() != working_space_dimension || rResult.size2() != local_space_dimension)
3124 rResult.
resize( working_space_dimension, local_space_dimension,
false );
3126 Matrix shape_functions_gradients(points_number, local_space_dimension);
3132 for(
IndexType k = 0;
k< working_space_dimension; ++
k) {
3133 const double value = r_coordinates[
k] - rDeltaPosition(
i,
k);
3135 rResult(
k,
m) += value * shape_functions_gradients(
i,
m);
3173 if( rResult.size() != this->IntegrationPointsNumber( ThisMethod ) )
3178 this->
Jacobian( J, pnt, ThisMethod);
3226 this->
Jacobian( J, IntegrationPointIndex, ThisMethod);
3334 Jacobian(rResult,IntegrationPointIndex, ThisMethod);
3414 KRATOS_ERROR <<
"Calling base class ShapeFunctionsValues method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3467 return mpGeometryData->
ShapeFunctionValue( IntegrationPointIndex, ShapeFunctionIndex );
3494 return mpGeometryData->
ShapeFunctionValue( IntegrationPointIndex, ShapeFunctionIndex, ThisMethod );
3514 KRATOS_ERROR <<
"Calling base class ShapeFunctionValue method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3644 KRATOS_ERROR <<
"Calling base class ShapeFunctionsLocalGradients method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3662 DerivativeOrderIndex, IntegrationPointIndex, ThisMethod);
3690 KRATOS_ERROR <<
"Calling base class ShapeFunctionsSecondDerivatives method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3703 KRATOS_ERROR <<
"Calling base class ShapeFunctionsThirdDerivatives method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3719 <<
"\'ShapeFunctionsIntegrationPointsGradients\' is not defined for current geometry type as gradients are only defined in the local space." << std::endl;
3723 if ( integration_points_number == 0 )
3724 KRATOS_ERROR <<
"This integration method is not supported" << *
this << std::endl;
3726 if ( rResult.size() != integration_points_number )
3734 for (
unsigned int pnt = 0; pnt < integration_points_number; pnt++ ) {
3735 if (rResult[pnt].size1() != (*this).size() || rResult[pnt].size2() != this->LocalSpaceDimension())
3736 rResult[pnt].
resize( (*this).size(), this->LocalSpaceDimension(),
false );
3744 Vector& rDeterminantsOfJacobian,
3749 <<
"\'ShapeFunctionsIntegrationPointsGradients\' is not defined for current geometry type as gradients are only defined in the local space." << std::endl;
3753 if ( integration_points_number == 0 )
3754 KRATOS_ERROR <<
"This integration method is not supported " << *
this << std::endl;
3756 if ( rResult.size() != integration_points_number )
3758 if (rDeterminantsOfJacobian.size() != integration_points_number)
3768 for (
unsigned int pnt = 0; pnt < integration_points_number; pnt++ ) {
3769 if (rResult[pnt].size1() != (*this).size() || rResult[pnt].size2() != this->LocalSpaceDimension())
3770 rResult[pnt].
resize( (*this).size(), this->LocalSpaceDimension(),
false );
3774 rDeterminantsOfJacobian[pnt] = DetJ;
3778 KRATOS_DEPRECATED_MESSAGE(
"This is signature of \'ShapeFunctionsIntegrationPointsGradients\' is legacy (use any of the alternatives without shape functions calculation).")
3781 Vector& rDeterminantsOfJacobian,
3783 Matrix& ShapeFunctionsIntegrationPointsValues)
const
3806 std::stringstream buffer;
3807 buffer <<
"Geometry # "
3808 << std::to_string(mId) <<
": "
3812 return buffer.str();
3817 std::string geometryName =
"BaseGeometry";
3818 KRATOS_ERROR <<
"Base geometry does not have a name." << std::endl;
3819 return geometryName;
3830 rOstream <<
Name() << std::endl;
3836 if (mpGeometryData) {
3840 rOStream << std::endl;
3841 rOStream << std::endl;
3843 for (
unsigned int i = 0;
i < this->
size(); ++
i) {
3844 rOStream <<
"\tPoint " <<
i + 1 <<
"\t : ";
3845 if (mPoints(
i) !=
nullptr) {
3848 rOStream <<
"point is empty (nullptr)." << std::endl;
3850 rOStream << std::endl;
3854 rOStream <<
"\tCenter\t : ";
3858 rOStream << std::endl;
3859 rOStream << std::endl;
3880 mpGeometryData = pGeometryData;
3900 KRATOS_ERROR <<
"Calling base class 'InradiusToCircumradiusQuality' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3915 KRATOS_ERROR <<
"Calling base class 'AreaToEdgeLengthRatio' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3930 KRATOS_ERROR <<
"Calling base class 'ShortestAltitudeToEdgeLengthRatio' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3945 KRATOS_ERROR <<
"Calling base class 'InradiusToLongestEdgeQuality' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3960 KRATOS_ERROR <<
"Calling base class 'ShortestToLongestEdgeQuality' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3976 KRATOS_ERROR <<
"Calling base class 'RegularityQuality' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
3992 KRATOS_ERROR <<
"Calling base class 'VolumeToSurfaceAreaQuality' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
4008 KRATOS_ERROR <<
"Calling base class 'VolumeToEdgeLengthQuality' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
4024 KRATOS_ERROR <<
"Calling base class 'VolumeToAverageEdgeLength' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
4041 KRATOS_ERROR <<
"Calling base class 'VolumeToRMSEdgeLength' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
4052 KRATOS_ERROR <<
"Calling base class 'MinDihedralAngle' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
4063 KRATOS_ERROR <<
"Calling base class 'MaxDihedralAngle' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
4074 KRATOS_ERROR <<
"Calling base class 'MinSolidAngle' method instead of derived class one. Please check the definition of derived class. " << *
this << std::endl;
4095 return std::none_of(mPoints.
ptr_begin(), mPoints.
ptr_end(), [](
const auto& pPoint){return pPoint == nullptr;});
4127 IndexType GenerateSelfAssignedId()
const
4133 SetIdSelfAssigned(
id);
4136 SetIdNotGeneratedFromString(
id);
4148 static inline void SetIdGeneratedFromString(
IndexType&
Id)
4154 static inline void SetIdNotGeneratedFromString(
IndexType&
Id)
4166 static inline void SetIdSelfAssigned(
IndexType&
Id)
4172 static inline void SetIdNotSelfAssigned(
IndexType&
Id)
4183 virtual void save(
Serializer& rSerializer )
const
4185 rSerializer.
save(
"Id", mId);
4186 rSerializer.
save(
"Points", mPoints);
4187 rSerializer.
save(
"Data", mData);
4192 rSerializer.
load(
"Id", mId);
4193 rSerializer.
load(
"Points", mPoints );
4194 rSerializer.
load(
"Data", mData);
4207 static const GeometryData& GeometryDataInstance()
4212 static GeometryData s_geometry_data(
4216 shape_functions_values,
4217 shape_functions_local_gradients);
4219 return s_geometry_data;
4260 template<
class TPo
intType>
4265 template<
class TPo
intType>
4270 rOStream << std::endl;
4278 template<
class TPo
intType>
Container for storing data values associated with variables.
Definition: data_value_container.h:63
bool Has(const Variable< TDataType > &rThisVariable) const
Checks if the data container has a value associated with a given variable.
Definition: data_value_container.h:382
void SetValue(const Variable< TDataType > &rThisVariable, TDataType const &rValue)
Sets the value for a given variable.
Definition: data_value_container.h:320
TDataType & GetValue(const Variable< TDataType > &rThisVariable)
Gets the value associated with a given variable.
Definition: data_value_container.h:268
Definition: geometry_data.h:60
GeometryShapeFunctionContainer< IntegrationMethod >::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: geometry_data.h:202
const ShapeFunctionsGradientsType & ShapeFunctionsLocalGradients() const
Definition: geometry_data.h:607
double ShapeFunctionValue(IndexType IntegrationPointIndex, IndexType ShapeFunctionIndex) const
Definition: geometry_data.h:550
const Matrix & ShapeFunctionLocalGradient(IndexType IntegrationPointIndex) const
Definition: geometry_data.h:660
KratosGeometryType
Definition: geometry_data.h:110
SizeType LocalSpaceDimension() const
Definition: geometry_data.h:387
SizeType IntegrationPointsNumber() const
Definition: geometry_data.h:430
IntegrationMethod
Definition: geometry_data.h:76
@ NumberOfIntegrationMethods
bool HasIntegrationMethod(IntegrationMethod ThisMethod) const
Definition: geometry_data.h:407
SizeType WorkingSpaceDimension() const
Definition: geometry_data.h:374
const Matrix & ShapeFunctionsValues() const
Definition: geometry_data.h:497
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: geometry_data.h:731
const IntegrationPointsArrayType & IntegrationPoints() const
Definition: geometry_data.h:457
KratosGeometryFamily
Definition: geometry_data.h:91
const Matrix & ShapeFunctionDerivatives(IndexType DerivativeOrderIndex, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
Definition: geometry_data.h:705
IntegrationMethod DefaultIntegrationMethod() const
Definition: geometry_data.h:425
Definition: geometry_dimension.h:42
Geometry base class.
Definition: geometry.h:71
virtual GeometriesArrayType GenerateEdges() const
This method gives you all edges of this geometry.
Definition: geometry.h:2119
virtual GeometriesArrayType GenerateFaces() const
Returns all faces of the current geometry.
Definition: geometry.h:2184
virtual int ProjectionPoint(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rProjectedPointGlobalCoordinates, CoordinatesArrayType &rProjectedPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Projects a certain point on the geometry, or finds the closest point, depending on the provided initi...
Definition: geometry.h:2618
TPointType & operator[](const SizeType &i)
Definition: geometry.h:441
virtual Vector & ShapeFunctionsValues(Vector &rResult, const CoordinatesArrayType &rCoordinates) const
Definition: geometry.h:3412
virtual void Calculate(const Variable< int > &rVariable, int &rOutput) const
Calculate with int.
Definition: geometry.h:698
virtual void Assign(const Variable< bool > &rVariable, const bool Input)
Assign with bool.
Definition: geometry.h:649
virtual int ClosestPointGlobalToLocalSpace(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rClosestPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Calculates the closes point projection This method calculates the closest point projection of a point...
Definition: geometry.h:2829
SizeType PointsNumber() const
Definition: geometry.h:528
PointPointerType & operator()(const SizeType &i)
Definition: geometry.h:451
virtual double InradiusToCircumradiusQuality() const
Quality functions.
Definition: geometry.h:3899
PointsArrayType::ptr_const_iterator ptr_const_iterator
Definition: geometry.h:217
void SetValue(const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
Definition: geometry.h:617
virtual int IsInsideLocalSpace(const CoordinatesArrayType &rPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Checks if given point in local space coordinates of this geometry is inside the geometry boundaries.
Definition: geometry.h:1946
const PointPointerType ConstPointPointerType
Definition: geometry.h:207
PointerVector< GeometryType > GeometriesArrayType
Definition: geometry.h:127
void push_back(PointPointerType x)
Definition: geometry.h:548
virtual void SetGeometryShapeFunctionContainer(const GeometryShapeFunctionContainer< GeometryData::IntegrationMethod > &rGeometryShapeFunctionContainer)
Definition: geometry.h:951
virtual bool HasGeometryPart(const IndexType Index) const
Use to check if certain Indexed object is within the geometry parts of this geometry.
Definition: geometry.h:1155
TPointType PointType
Definition: geometry.h:131
static bool HasSameGeometryType(const GeometryType &rLHS, const GeometryType &rRHS)
Checks if two GeometryType have the same geometry type.
Definition: geometry.h:762
void GlobalCoordinates(CoordinatesArrayType &rResult, IndexType IntegrationPointIndex) const
Definition: geometry.h:2399
virtual Matrix & Jacobian(Matrix &rResult, const CoordinatesArrayType &rCoordinates, Matrix &rDeltaPosition) const
Definition: geometry.h:3118
virtual void Calculate(const Variable< Matrix > &rVariable, Matrix &rOutput) const
Calculate with Matrix.
Definition: geometry.h:728
void SetId(const IndexType Id)
Sets Id of this Geometry.
Definition: geometry.h:982
virtual double MinSolidAngle() const
Definition: geometry.h:4073
virtual void BoundingBox(TPointType &rLowPoint, TPointType &rHighPoint) const
Calculates the boundingbox of the geometry.
Definition: geometry.h:1484
virtual void Assign(const Variable< Vector > &rVariable, const Vector &rInput)
Assign with Vector.
Definition: geometry.h:679
virtual Matrix & ShapeFunctionsLocalGradients(Matrix &rResult, const CoordinatesArrayType &rPoint) const
Definition: geometry.h:3642
virtual bool IsSymmetric() const
Definition: geometry.h:2023
virtual Matrix & InverseOfJacobian(Matrix &rResult, const CoordinatesArrayType &rCoordinates) const
Definition: geometry.h:3356
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: geometry.h:3834
Pointer Create(const std::string &rNewGeometryName, PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:855
SizeType size() const
Definition: geometry.h:518
Geometry & operator=(const Geometry &rOther)
Definition: geometry.h:400
virtual double MaxEdgeLength() const
Definition: geometry.h:1404
static IndexType GenerateId(const std::string &rName)
Gets the corresponding hash-Id to a string name.
Definition: geometry.h:1004
virtual ShapeFunctionsThirdDerivativesType & ShapeFunctionsThirdDerivatives(ShapeFunctionsThirdDerivativesType &rResult, const CoordinatesArrayType &rPoint) const
Definition: geometry.h:3701
friend class Geometry
Definition: geometry.h:4237
bool IsIdSelfAssigned()
Returns if id was generated by itself.
Definition: geometry.h:976
virtual int ProjectionPointLocalToLocalSpace(const CoordinatesArrayType &rPointLocalCoordinates, CoordinatesArrayType &rProjectionPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Projects a point onto the geometry Projects a certain point on the geometry, or finds the closest poi...
Definition: geometry.h:2646
virtual double Length() const
Definition: geometry.h:1332
GeometryData::ShapeFunctionsSecondDerivativesType ShapeFunctionsSecondDerivativesType
Definition: geometry.h:195
virtual CoordinatesArrayType & GlobalCoordinates(CoordinatesArrayType &rResult, CoordinatesArrayType const &LocalCoordinates) const
Definition: geometry.h:2377
virtual void ShapeFunctionsIntegrationPointsGradients(ShapeFunctionsGradientsType &rResult, IntegrationMethod ThisMethod) const
Definition: geometry.h:3713
DenseVector< double > NormalType
Definition: geometry.h:203
virtual double InradiusToLongestEdgeQuality() const
Definition: geometry.h:3944
virtual Pointer Create(const IndexType NewGeometryId, PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:841
void swap(GeometryType &rOther)
Definition: geometry.h:543
virtual void GlobalSpaceDerivatives(std::vector< CoordinatesArrayType > &rGlobalSpaceDerivatives, IndexType IntegrationPointIndex, const SizeType DerivativeOrder) const
This method maps from dimension space to working space and computes the number of derivatives at the ...
Definition: geometry.h:2533
PointsArrayType::iterator iterator
PointsArrayType typedefs.
Definition: geometry.h:213
virtual void Assign(const Variable< array_1d< double, 6 >> &rVariable, const array_1d< double, 6 > &rInput)
Assign with array_1d<double, 6>
Definition: geometry.h:674
const_iterator end() const
Definition: geometry.h:477
virtual double ShapeFunctionValue(IndexType ShapeFunctionIndex, const CoordinatesArrayType &rCoordinates) const
Definition: geometry.h:3512
virtual int Check() const
Definition: geometry.h:3790
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
virtual double Inradius() const
Definition: geometry.h:1441
virtual GeometriesArrayType GenerateBoundariesEntities() const
This method gives you all boundaries entities of this geometry.
Definition: geometry.h:2040
DataValueContainer & GetData()
Definition: geometry.h:591
virtual array_1d< double, 3 > Normal(const CoordinatesArrayType &rPointLocalCoordinates) const
It returns a vector that is normal to its corresponding geometry in the given local point.
Definition: geometry.h:1543
ConstPointReferenceType front() const
Definition: geometry.h:502
virtual GeometryType & GetGeometryParent(IndexType Index) const
Some geometries require relations to other geometries. This is the case for e.g. quadrature points....
Definition: geometry.h:1029
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
SizeType IntegrationPointsNumber(IntegrationMethod ThisMethod) const
Definition: geometry.h:2270
Geometry(IndexType GeometryId, const PointsArrayType &ThisPoints, GeometryData const *pThisGeometryData=&GeometryDataInstance())
Definition: geometry.h:314
virtual double MinEdgeLength() const
Definition: geometry.h:1391
void clear()
Definition: geometry.h:553
static bool IsSame(const GeometryType &rLHS, const GeometryType &rRHS)
Checks if two GeometryType are the same.
Definition: geometry.h:781
const ShapeFunctionsGradientsType & ShapeFunctionsLocalGradients(IntegrationMethod ThisMethod) const
Definition: geometry.h:3565
virtual void PrintName(std::ostream &rOstream) const
Print name.
Definition: geometry.h:3829
virtual JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod) const
Definition: geometry.h:2921
virtual void Assign(const Variable< array_1d< double, 2 >> &rVariable, const array_1d< double, 2 > &rInput)
Assign with array_1d<double, 2>
Definition: geometry.h:664
virtual double CalculateDistance(const CoordinatesArrayType &rPointGlobalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Computes the distance between an point in global coordinates and the closest point of this geometry....
Definition: geometry.h:2867
void SetGeometryData(GeometryData const *pGeometryData)
updates the pointer to GeometryData of the respective geometry.
Definition: geometry.h:3878
SizeType LocalSpaceDimension() const
Definition: geometry.h:1300
PointPointerContainerType & GetContainer()
** Gives a reference to underly normal container. */
Definition: geometry.h:573
virtual double MinDihedralAngle() const
Definition: geometry.h:4051
double ShapeFunctionValue(IndexType IntegrationPointIndex, IndexType ShapeFunctionIndex, IntegrationMethod ThisMethod) const
Definition: geometry.h:3492
virtual bool HasIntersection(const GeometryType &ThisGeometry) const
Definition: geometry.h:1453
TPointType & PointReferenceType
Definition: geometry.h:208
virtual void Calculate(const Variable< bool > &rVariable, bool &rOutput) const
Calculate with bool.
Definition: geometry.h:693
virtual double MaxDihedralAngle() const
Definition: geometry.h:4062
Geometry(const PointsArrayType &ThisPoints, GeometryData const *pThisGeometryData=&GeometryDataInstance())
Definition: geometry.h:305
const Matrix & ShapeFunctionsValues() const
Definition: geometry.h:3393
const_iterator begin() const
Definition: geometry.h:469
Geometry(const std::string &GeometryName, const PointsArrayType &ThisPoints, GeometryData const *pThisGeometryData=&GeometryDataInstance())
Definition: geometry.h:324
virtual void RemoveGeometryPart(const IndexType Index)
Removes a geometry part.
Definition: geometry.h:1142
virtual void Assign(const Variable< double > &rVariable, const double Input)
Assign with double.
Definition: geometry.h:659
virtual Pointer Create(const GeometryType &rGeometry) const
Creates a new geometry pointer.
Definition: geometry.h:870
virtual SizeType NumberOfGeometryParts() const
Definition: geometry.h:1164
virtual double AreaToEdgeLengthRatio() const
Definition: geometry.h:3914
std::size_t SizeType
Definition: geometry.h:144
virtual void RemoveGeometryPart(GeometryType::Pointer pGeometry)
Removes a geometry part.
Definition: geometry.h:1132
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
virtual void ComputeDihedralAngles(Vector &rDihedralAngles) const
Definition: geometry.h:1743
std::size_t IndexType
Definition: geometry.h:137
std::array< Matrix, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> ShapeFunctionsValuesContainerType
Definition: geometry.h:172
virtual double VolumeToEdgeLengthQuality() const
Definition: geometry.h:4007
virtual JacobiansType & InverseOfJacobian(JacobiansType &rResult, IntegrationMethod ThisMethod) const
Definition: geometry.h:3282
virtual const GeometryType::Pointer pGetGeometryPart(const IndexType Index) const
Used for composite geometries. It returns the const pointer of a geometry part, corresponding to the ...
Definition: geometry.h:1098
ConstPointReferenceType back() const
Definition: geometry.h:512
bool HasIntegrationMethod(IntegrationMethod ThisMethod) const
Definition: geometry.h:1995
Geometry< TPointType > GeometryType
This Geometry type.
Definition: geometry.h:78
virtual JacobiansType & Jacobian(JacobiansType &rResult, IntegrationMethod ThisMethod, Matrix &DeltaPosition) const
Definition: geometry.h:2951
double DeterminantOfJacobian(IndexType IntegrationPointIndex) const
Definition: geometry.h:3200
virtual GeometryType & GetGeometryPart(const IndexType Index)
Used for composite geometries. It returns the the geometry part, corresponding to the Index.
Definition: geometry.h:1060
virtual int ClosestPointLocalToLocalSpace(const CoordinatesArrayType &rPointLocalCoordinates, CoordinatesArrayType &rClosestPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Calculates the closes point projection This method calculates the closest point projection of a point...
Definition: geometry.h:2792
IndexType const & Id() const
Id of this Geometry.
Definition: geometry.h:964
ptr_const_iterator ptr_begin() const
Definition: geometry.h:485
virtual Pointer Create(const IndexType NewGeometryId, const GeometryType &rGeometry) const
Creates a new geometry pointer.
Definition: geometry.h:898
virtual std::string Info() const
Return geometry information as a string.
Definition: geometry.h:3804
Vector & DeterminantOfJacobian(Vector &rResult) const
Definition: geometry.h:3154
double ShapeFunctionValue(IndexType IntegrationPointIndex, IndexType ShapeFunctionIndex) const
Definition: geometry.h:3465
bool empty() const
Definition: geometry.h:799
bool IsIdGeneratedFromString()
Returns if id was generated from a geometry name.
Definition: geometry.h:970
static bool HasSameType(const GeometryType &rLHS, const GeometryType &rRHS)
Checks if two GeometryType have the same type.
Definition: geometry.h:740
Geometry(const Geometry &rOther)
Copy constructor.
Definition: geometry.h:343
JacobiansType & InverseOfJacobian(JacobiansType &rResult) const
Definition: geometry.h:3262
virtual void SetGeometryPart(const IndexType Index, GeometryType::Pointer pGeometry)
Allows to exchange certain geometries.
Definition: geometry.h:1109
virtual void Calculate(const Variable< array_1d< double, 2 >> &rVariable, array_1d< double, 2 > &rOutput) const
Calculate with array_1d<double, 2>
Definition: geometry.h:708
virtual double RegularityQuality() const
Definition: geometry.h:3975
virtual int ClosestPoint(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rClosestPointGlobalCoordinates, CoordinatesArrayType &rClosestPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Returns all coordinates of the closest point on the geometry given to an arbitrary point in global co...
Definition: geometry.h:2704
static bool HasSameGeometryType(const GeometryType *rLHS, const GeometryType *rRHS)
Checks if two GeometryType have the same geometry type (pointer version)
Definition: geometry.h:770
PointsArrayType::const_iterator const_iterator
Definition: geometry.h:214
virtual SizeType PolynomialDegree(IndexType LocalDirectionIndex) const
Return polynomial degree of the geometry in a certain direction.
Definition: geometry.h:1310
virtual double ShortestAltitudeToEdgeLengthRatio() const
Definition: geometry.h:3929
virtual void SetGeometryParent(GeometryType *pGeometryParent)
Some geometries require relations to other geometries. This is the case for e.g. quadrature points....
Definition: geometry.h:1042
virtual void CreateQuadraturePointGeometries(GeometriesArrayType &rResultGeometries, IndexType NumberOfShapeFunctionDerivatives, const IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo)
Definition: geometry.h:2331
const Matrix & ShapeFunctionLocalGradient(IndexType IntegrationPointIndex, IndexType ShapeFunctionIndex, IntegrationMethod ThisMethod) const
Definition: geometry.h:3625
ptr_const_iterator ptr_end() const
Definition: geometry.h:493
virtual ~Geometry()
Destructor. Do nothing!!!
Definition: geometry.h:374
virtual Matrix & Jacobian(Matrix &rResult, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod, const Matrix &rDeltaPosition) const
Definition: geometry.h:3043
virtual GeometryType::Pointer pGetGeometryPart(const IndexType Index)
Used for composite geometries. It returns the pointer of a geometry part, corresponding to the Index.
Definition: geometry.h:1084
virtual void NodesInFaces(DenseMatrix< unsigned int > &rNodesInFaces) const
Definition: geometry.h:2195
static bool IsSame(const GeometryType *rLHS, const GeometryType *rRHS)
Checks if two GeometryType are the same (pointer version)
Definition: geometry.h:792
virtual double ShortestToLongestEdgeQuality() const
Definition: geometry.h:3959
ConstPointPointerType & operator()(const SizeType &i) const
Definition: geometry.h:456
virtual double AverageEdgeLength() const
Definition: geometry.h:1417
virtual int ClosestPointLocalCoordinates(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rClosestPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Returns local coordinates of the closest point on the geometry given to an arbitrary point in global ...
Definition: geometry.h:2772
const PointPointerContainerType & GetContainer() const
Definition: geometry.h:579
virtual void SpansLocalSpace(std::vector< double > &rSpans, IndexType LocalDirectionIndex=0) const
Definition: geometry.h:1972
virtual double VolumeToRMSEdgeLength() const
Definition: geometry.h:4040
virtual void PrintInfo(std::ostream &rOStream) const
Print information about this object.
Definition: geometry.h:3823
TPointType const & operator[](const SizeType &i) const
Definition: geometry.h:446
GeometryData const & GetGeometryData() const
GeometryData contains all information about dimensions and has a set of precomputed values for integr...
Definition: geometry.h:942
virtual bool IsInside(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rResult, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Checks if given point in global space coordinates is inside the geometry boundaries....
Definition: geometry.h:1918
virtual double Volume() const
This method calculate and return volume of this geometry.
Definition: geometry.h:1358
virtual void Calculate(const Variable< Vector > &rVariable, Vector &rOutput) const
Calculate with Vector.
Definition: geometry.h:723
KRATOS_DEPRECATED_MESSAGE("This is legacy version (use GenerateFaces instead)") virtual GeometriesArrayType Faces(void)
Returns all faces of the current geometry.
Definition: geometry.h:2166
Geometry(const std::string &GeometryName)
Standard Constructor with a Name.
Definition: geometry.h:241
const TPointType & ConstPointReferenceType
Definition: geometry.h:209
void reserve(int dim)
Definition: geometry.h:558
virtual CoordinatesArrayType & PointLocalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rPoint) const
Returns the local coordinates of a given arbitrary point.
Definition: geometry.h:1854
iterator begin()
Definition: geometry.h:465
PointerVector< TPointType > PointsArrayType
Definition: geometry.h:118
TPointType & GetPoint(const int Index)
Definition: geometry.h:1830
virtual void CreateQuadraturePointGeometries(GeometriesArrayType &rResultGeometries, IndexType NumberOfShapeFunctionDerivatives, IntegrationInfo &rIntegrationInfo)
Definition: geometry.h:2352
virtual Matrix & InverseOfJacobian(Matrix &rResult, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
Definition: geometry.h:3332
virtual array_1d< double, 3 > UnitNormal(IndexType IntegrationPointIndex) const
It returns the normalized normal vector in the given integration point.
Definition: geometry.h:1657
virtual int ProjectionPointGlobalToLocalSpace(const CoordinatesArrayType &rPointGlobalCoordinates, CoordinatesArrayType &rProjectionPointLocalCoordinates, const double Tolerance=std::numeric_limits< double >::epsilon()) const
Projects a point onto the geometry Projects a certain point on the geometry, or finds the closest poi...
Definition: geometry.h:2673
DenseVector< Matrix > JacobiansType
Definition: geometry.h:183
virtual double DeterminantOfJacobian(const CoordinatesArrayType &rPoint) const
Definition: geometry.h:3243
SizeType max_size() const
Definition: geometry.h:538
virtual GeometriesArrayType GeneratePoints() const
This method gives you all points of this geometry.
Definition: geometry.h:2062
const Matrix & ShapeFunctionDerivatives(IndexType DerivativeOrderIndex, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
Definition: geometry.h:3656
const PointsArrayType & Points() const
Definition: geometry.h:1768
virtual array_1d< double, 3 > Normal(IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
It returns the vector, which is normal to its corresponding geometry in the given integration point.
Definition: geometry.h:1596
PointsArrayType::difference_type difference_type
Definition: geometry.h:218
Geometry()
Standard Constructor. Generates self assigned id.
Definition: geometry.h:227
virtual void NumberNodesInFaces(DenseVector< unsigned int > &rNumberNodesInFaces) const
Definition: geometry.h:2190
static constexpr IndexType BACKGROUND_GEOMETRY_INDEX
Definition: geometry.h:220
QualityCriteria
Definition: geometry.h:86
@ INRADIUS_TO_LONGEST_EDGE
@ SHORTEST_ALTITUDE_TO_LENGTH
@ VOLUME_TO_RMS_EDGE_LENGTH
@ SHORTEST_TO_LONGEST_EDGE
@ VOLUME_TO_AVERAGE_EDGE_LENGTH
@ INRADIUS_TO_CIRCUMRADIUS
double Quality(const QualityCriteria qualityCriteria) const
Definition: geometry.h:1704
IntegrationMethod GetDefaultIntegrationMethod() const
Definition: geometry.h:2004
KRATOS_CLASS_POINTER_DEFINITION(Geometry)
Pointer definition of Geometry.
virtual void ComputeSolidAngles(Vector &rSolidAngles) const
Definition: geometry.h:1753
PointsArrayType & Points()
Definition: geometry.h:1779
virtual SizeType PointsNumberInDirection(IndexType LocalDirectionIndex) const
Returns number of points per direction.
Definition: geometry.h:533
virtual double VolumeToSurfaceAreaQuality() const
Definition: geometry.h:3991
void SetData(DataValueContainer const &rThisData)
Definition: geometry.h:601
virtual const GeometryType & GetGeometryPart(const IndexType Index) const
Used for composite geometries. It returns the the geometry part, corresponding to the Index.
Definition: geometry.h:1072
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
Geometry(IndexType GeomertyId)
Standard Constructor with a geometry Id.
Definition: geometry.h:234
std::array< IntegrationPointsArrayType, static_cast< int >GeometryData::IntegrationMethod::NumberOfIntegrationMethods)> IntegrationPointsContainerType
Definition: geometry.h:167
ptr_iterator ptr_begin()
Definition: geometry.h:481
void GlobalCoordinates(CoordinatesArrayType &rResult, IndexType IntegrationPointIndex, const IntegrationMethod ThisMethod) const
This method provides the global coordinates to the corresponding integration point.
Definition: geometry.h:2414
virtual Matrix & PointsLocalCoordinates(Matrix &rResult) const
Definition: geometry.h:1842
iterator end()
Definition: geometry.h:473
std::vector< PointPointerType > PointPointerContainerType
Definition: geometry.h:210
LumpingMethods
This defines the different methods to compute the lumping methods.
Definition: geometry.h:109
void ClonePoints()
Definition: geometry.h:926
Geometry & operator=(Geometry< TOtherPointType > const &rOther)
Definition: geometry.h:420
int capacity()
Definition: geometry.h:563
const Matrix & ShapeFunctionLocalGradient(IndexType IntegrationPointIndex) const
Definition: geometry.h:3592
Matrix & InverseOfJacobian(Matrix &rResult, IndexType IntegrationPointIndex) const
Definition: geometry.h:3309
virtual SizeType EdgesNumber() const
This method gives you number of all edges of this geometry.
Definition: geometry.h:2092
void SetId(const std::string &rName)
Sets Id with the use of the name of this geometry.
Definition: geometry.h:998
GeometryData::ShapeFunctionsThirdDerivativesType ShapeFunctionsThirdDerivativesType
Definition: geometry.h:199
void ShapeFunctionsIntegrationPointsGradients(ShapeFunctionsGradientsType &rResult) const
Definition: geometry.h:3708
virtual array_1d< double, 3 > UnitNormal(IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
It returns the normalized normal vector in the given integration point.
Definition: geometry.h:1671
virtual void Assign(const Variable< array_1d< double, 3 >> &rVariable, const array_1d< double, 3 > &rInput)
Assign with array_1d<double, 3>
Definition: geometry.h:669
virtual double Circumradius() const
Definition: geometry.h:1429
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometry.h:627
virtual Vector & DeterminantOfJacobian(Vector &rResult, IntegrationMethod ThisMethod) const
Definition: geometry.h:3171
const IntegrationPointsArrayType & IntegrationPoints() const
Definition: geometry.h:2284
virtual SizeType FacesNumber() const
Returns the number of faces of the current geometry.
Definition: geometry.h:2152
TVariableType::Type const & GetValue(const TVariableType &rThisVariable) const
Definition: geometry.h:633
PointReferenceType front()
Definition: geometry.h:497
static bool HasSameType(const GeometryType *rLHS, const GeometryType *rRHS)
Checks if two GeometryType have the same type (pointer version)
Definition: geometry.h:751
Geometry(Geometry< TOtherPointType > const &rOther)
Copy constructor with TOtherPointType.
Definition: geometry.h:365
virtual void CreateIntegrationPoints(IntegrationPointsArrayType &rIntegrationPoints, IntegrationInfo &rIntegrationInfo) const
Definition: geometry.h:2305
virtual double VolumeToAverageEdgeLength() const
Definition: geometry.h:4023
GeometryData::ShapeFunctionsGradientsType ShapeFunctionsGradientsType
Definition: geometry.h:189
virtual void ShapeFunctionsIntegrationPointsGradients(ShapeFunctionsGradientsType &rResult, Vector &rDeterminantsOfJacobian, IntegrationMethod ThisMethod) const
Definition: geometry.h:3742
const ShapeFunctionsGradientsType & ShapeFunctionsLocalGradients() const
Definition: geometry.h:3539
ptr_iterator ptr_end()
Definition: geometry.h:489
virtual Matrix & Jacobian(Matrix &rResult, IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
Definition: geometry.h:2999
virtual IndexType AddGeometryPart(GeometryType::Pointer pGeometry)
Allows to enhance the coupling geometry, with another geometry.
Definition: geometry.h:1122
virtual void Assign(const Variable< Matrix > &rVariable, const Matrix &rInput)
Assign with Matrix.
Definition: geometry.h:684
const Matrix & ShapeFunctionsValues(IntegrationMethod ThisMethod) const
Definition: geometry.h:3438
virtual GeometryData::KratosGeometryType GetGeometryType() const
Definition: geometry.h:381
virtual Pointer Create(PointsArrayType const &rThisPoints) const
Creates a new geometry pointer.
Definition: geometry.h:813
virtual Point Center() const
Definition: geometry.h:1514
PointsArrayType::ptr_iterator ptr_iterator
Definition: geometry.h:216
PointType::Pointer PointPointerType
data type stores in this container.
Definition: geometry.h:206
JacobiansType & Jacobian(JacobiansType &rResult) const
Definition: geometry.h:2901
PointType::CoordinatesArrayType CoordinatesArrayType
Definition: geometry.h:147
virtual Matrix & Jacobian(Matrix &rResult, const CoordinatesArrayType &rCoordinates) const
Definition: geometry.h:3078
virtual std::string Name() const
Returns name.
Definition: geometry.h:3816
IntegrationPoint< 3 > IntegrationPointType
Definition: geometry.h:154
PointReferenceType back()
Definition: geometry.h:507
virtual void Assign(const Variable< int > &rVariable, const int Input)
Assign with int.
Definition: geometry.h:654
virtual void Calculate(const Variable< array_1d< double, 3 >> &rVariable, array_1d< double, 3 > &rOutput) const
Calculate with array_1d<double, 3>
Definition: geometry.h:713
virtual bool HasIntersection(const Point &rLowPoint, const Point &rHighPoint) const
Definition: geometry.h:1467
virtual GeometryData::KratosGeometryFamily GetGeometryFamily() const
Definition: geometry.h:376
const Matrix & ShapeFunctionDerivatives(IndexType DerivativeOrderIndex, IndexType IntegrationPointIndex) const
Definition: geometry.h:3673
virtual IntegrationInfo GetDefaultIntegrationInfo() const
Provides the default integration per geometry.
Definition: geometry.h:2010
SizeType WorkingSpaceDimension() const
Definition: geometry.h:1287
virtual double DomainSize() const
This method calculate and return length, area or volume of this geometry depending to it's dimension.
Definition: geometry.h:1371
TPointType const & GetPoint(const int Index) const
Definition: geometry.h:1816
GeometryData::ShapeFunctionsLocalGradientsContainerType ShapeFunctionsLocalGradientsContainerType
Definition: geometry.h:177
bool Has(const Variable< TDataType > &rThisVariable) const
Definition: geometry.h:609
const Matrix & ShapeFunctionLocalGradient(IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
Definition: geometry.h:3620
virtual double DeterminantOfJacobian(IndexType IntegrationPointIndex, IntegrationMethod ThisMethod) const
Definition: geometry.h:3223
virtual array_1d< double, 3 > Normal(IndexType IntegrationPointIndex) const
It returns the vector, which is normal to its corresponding geometry in the given integration point f...
Definition: geometry.h:1582
const IntegrationPointsArrayType & IntegrationPoints(IntegrationMethod ThisMethod) const
Definition: geometry.h:2297
virtual void Calculate(const Variable< double > &rVariable, double &rOutput) const
Calculate with double.
Definition: geometry.h:703
Matrix & Jacobian(Matrix &rResult, IndexType IntegrationPointIndex) const
Definition: geometry.h:2976
SizeType IntegrationPointsNumber() const
Definition: geometry.h:2257
GeometryData::IntegrationMethod IntegrationMethod
Definition: geometry.h:122
Pointer Create(const std::string &rNewGeometryName, const GeometryType &rGeometry) const
Creates a new geometry pointer.
Definition: geometry.h:914
virtual CoordinatesArrayType & GlobalCoordinates(CoordinatesArrayType &rResult, CoordinatesArrayType const &LocalCoordinates, Matrix &DeltaPosition) const
Definition: geometry.h:2435
virtual ShapeFunctionsSecondDerivativesType & ShapeFunctionsSecondDerivatives(ShapeFunctionsSecondDerivativesType &rResult, const CoordinatesArrayType &rPoint) const
Definition: geometry.h:3688
TPointType::Pointer pGetPoint(const int Index)
Definition: geometry.h:1803
virtual double Area() const
This method calculate and return area or surface area of this geometry depending to it's dimension.
Definition: geometry.h:1345
virtual void Calculate(const Variable< array_1d< double, 6 >> &rVariable, array_1d< double, 6 > &rOutput) const
Calculate with array_1d<double, 6>
Definition: geometry.h:718
DataValueContainer const & GetData() const
Definition: geometry.h:596
virtual void GlobalSpaceDerivatives(std::vector< CoordinatesArrayType > &rGlobalSpaceDerivatives, const CoordinatesArrayType &rLocalCoordinates, const SizeType DerivativeOrder) const
This method maps from dimension space to working space and computes the number of derivatives at the ...
Definition: geometry.h:2473
virtual Vector & LumpingFactors(Vector &rResult, const LumpingMethods LumpingMethod=LumpingMethods::ROW_SUM) const
Lumping factors for the calculation of the lumped mass matrix.
Definition: geometry.h:1181
Definition: geometry_shape_function_container.h:60
Integration information for the creation of integration points.
Definition: integration_info.h:35
IntegrationMethod GetIntegrationMethod(IndexType DimensionIndex) const
Definition: integration_info.cpp:140
Short class definition.
Definition: integration_point.h:52
Definition: amatrix_interface.h:41
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
void clear()
Definition: amatrix_interface.h:284
static void GeneralizedInvertMatrix(const TMatrix1 &rInputMatrix, TMatrix2 &rInvertedMatrix, double &rInputMatrixDet, const double Tolerance=ZeroTolerance)
It inverts non square matrices (https://en.wikipedia.org/wiki/Inverse_element#Matrices)
Definition: math_utils.h:274
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
static double GeneralizedDet(const TMatrixType &rA)
Calculates the determinant of any matrix (no check performed on matrix size)
Definition: math_utils.h:634
Point class.
Definition: point.h:59
CoordinatesArrayType const & Coordinates() const
Definition: point.h:215
virtual void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: point.h:242
void clear()
Definition: pointer_vector.h:309
TContainerType::const_iterator ptr_const_iterator
Definition: pointer_vector.h:96
void swap(PointerVector &rOther)
Definition: pointer_vector.h:265
size_type size() const
Definition: pointer_vector.h:255
int capacity()
Definition: pointer_vector.h:324
ptr_iterator ptr_end()
Definition: pointer_vector.h:209
iterator end()
Definition: pointer_vector.h:177
size_type max_size() const
Definition: pointer_vector.h:260
void reserve(size_type dim)
Definition: pointer_vector.h:319
boost::indirect_iterator< typename TContainerType::const_iterator > const_iterator
Definition: pointer_vector.h:90
reference front()
Definition: pointer_vector.h:234
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector.h:89
reference back()
Definition: pointer_vector.h:244
TContainerType::iterator ptr_iterator
Definition: pointer_vector.h:95
void PrintData(std::ostream &rOStream) const
Print object's data.
Definition: pointer_vector.h:374
TContainerType::difference_type difference_type
Definition: pointer_vector.h:99
iterator begin()
Definition: pointer_vector.h:169
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
TContainerType & GetContainer()
Definition: pointer_vector.h:334
bool empty() const
Definition: pointer_vector.h:349
ptr_iterator ptr_begin()
Definition: pointer_vector.h:201
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
Short class definition.
Definition: array_1d.h:61
BOOST_UBLAS_INLINE void clear()
Definition: array_1d.h:325
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
#define KRATOS_ERROR
Definition: exception.h:161
#define KRATOS_ERROR_IF_NOT(conditional)
Definition: exception.h:163
#define KRATOS_ERROR_IF(conditional)
Definition: exception.h:162
#define KRATOS_DEBUG_ERROR_IF(conditional)
Definition: exception.h:171
#define KRATOS_WARNING(label)
Definition: logger.h:265
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
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::MatrixRow< const TExpressionType > row(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression, std::size_t RowIndex)
Definition: amatrix_interface.h:649
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
int domain_size
Definition: face_heat.py:4
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
def load(f)
Definition: ode_solve.py:307
tuple const
Definition: ode_solve.py:403
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
float temp
Definition: rotating_cone.py:85
int m
Definition: run_marine_rain_substepping.py:8
J
Definition: sensitivityMatrix.py:58
N
Definition: sensitivityMatrix.py:29
x
Definition: sensitivityMatrix.py:49
int dim
Definition: sensitivityMatrix.py:25
namespace
Definition: array_1d.h:793
integer i
Definition: TensorModule.f:17