17 #if !defined(KRATOS_CALCULATE_DISTANCE_CONDITION_PROCESS_H_INCLUDED )
18 #define KRATOS_CALCULATE_DISTANCE_CONDITION_PROCESS_H_INCLUDED
39 #include "utilities/geometry_utilities.h"
55 double mCoordinates[3];
59 double&
X() {
return mCoordinates[0];}
60 double&
Y() {
return mCoordinates[1];}
61 double&
Z() {
return mCoordinates[2];}
63 std::size_t&
Id(){
return mId;}
81 GeometricalObject::Pointer,
83 std::less<typename IndexedObject::result_type>,
84 std::equal_to<typename IndexedObject::result_type>,
86 std::vector< Kratos::shared_ptr<typename GeometricalObject::Pointer> >
91 GeometricalObject::Pointer,
93 std::less<typename IndexedObject::result_type>,
94 std::equal_to<typename IndexedObject::result_type>,
96 std::vector< Kratos::shared_ptr<typename GeometricalObject::Pointer> >
138 *destination = *source;
149 rHighPoint = rObject->GetGeometry().GetPoint(0);
150 rLowPoint = rObject->GetGeometry().GetPoint(0);
151 for (
unsigned int point = 0; point<rObject->GetGeometry().PointsNumber(); point++)
153 for(std::size_t
i = 0;
i<3;
i++)
155 rLowPoint[
i] = (rLowPoint[
i] > rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rLowPoint[
i];
156 rHighPoint[
i] = (rHighPoint[
i] < rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rHighPoint[
i];
167 for(std::size_t
i = 0;
i<3;
i++)
169 rLowPoint[
i] = rObject->GetGeometry().GetPoint(0)[
i];
170 rHighPoint[
i] = rObject->GetGeometry().GetPoint(0)[
i];
173 for (
unsigned int point = 0; point<rObject->GetGeometry().PointsNumber(); point++)
175 for(std::size_t
i = 0;
i<3;
i++)
177 rLowPoint[
i] = (rLowPoint[
i] > rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rLowPoint[
i];
178 rHighPoint[
i] = (rHighPoint[
i] < rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rHighPoint[
i];
200 return rObject->GetGeometry().HasIntersection(rLowPoint, rHighPoint);
207 static inline bool IsIntersected(
const Element::Pointer rObject,
double Tolerance,
const double* rLowPoint,
const double* rHighPoint)
209 Point low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance);
210 Point high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance);
232 virtual std::string
Info()
const
234 return " Spatial Containers Configure";
313 : mrSkinModelPart(rThisModelPartStruc), mrBodyModelPart(rThisModelPartStruc), mrFluidModelPart(rThisModelPartFluid)
420 i_fluidElement->GetValue(EMBEDDED_VELOCITY)=
ZeroVector(3);
441 int nodesSize = nodes.size();
442 for(
int i = 0 ;
i < nodesSize ;
i++)
448 const double initial_distance = 1.0;
449 ElementalDistances[0] = initial_distance;
450 ElementalDistances[1] = initial_distance;
451 ElementalDistances[2] = initial_distance;
452 ElementalDistances[3] = initial_distance;
455 for(
unsigned int i = 0 ;
i < fluid_elements.size() ;
i++)
457 fluid_elements[
i]->SetValue(ELEMENTAL_DISTANCES,ElementalDistances);
458 fluid_elements[
i]->GetValue(SPLIT_ELEMENT) =
false;
468 TetEdgeIndexTable(0,0) = 0;
469 TetEdgeIndexTable(0,1) = 1;
470 TetEdgeIndexTable(1,0) = 0;
471 TetEdgeIndexTable(1,1) = 2;
472 TetEdgeIndexTable(2,0) = 0;
473 TetEdgeIndexTable(2,1) = 3;
474 TetEdgeIndexTable(3,0) = 1;
475 TetEdgeIndexTable(3,1) = 2;
476 TetEdgeIndexTable(4,0) = 1;
477 TetEdgeIndexTable(4,1) = 3;
478 TetEdgeIndexTable(5,0) = 2;
479 TetEdgeIndexTable(5,1) = 3;
488 std::vector<OctreeType::cell_type*> leaves;
489 std::vector<TetEdgeStruct> IntersectedTetEdges;
490 unsigned int NumberIntersectionsOnTetCorner = 0;
495 int intersection_counter=0;
498 for(
unsigned int i_tetEdge = 0; i_tetEdge < 6; i_tetEdge++)
501 NumberIntersectionsOnTetCorner , TetEdgeIndexTable, intersection_counter );
503 if (intersection_counter!=0)
504 i_fluidElement->GetValue(EMBEDDED_VELOCITY)/=3.0*intersection_counter;
514 if(IntersectedTetEdges.size() > 0)
522 unsigned int i_tetEdge,
523 std::vector<OctreeType::cell_type*>& leaves,
524 std::vector<TetEdgeStruct>& IntersectedTetEdges,
525 unsigned int& NumberIntersectionsOnTetCorner,
527 int& intersection_counter)
531 std::vector<unsigned int> IntersectingStructCondID;
535 unsigned int EdgeStartIndex = TetEdgeIndexTable(i_tetEdge,0);
536 unsigned int EdgeEndIndex = TetEdgeIndexTable(i_tetEdge,1);
538 PointType& P1 = i_fluidElement->GetGeometry()[EdgeStartIndex];
539 PointType& P2 = i_fluidElement->GetGeometry()[EdgeEndIndex];
541 double EdgeNode1[3] = {P1.
X() , P1.
Y() , P1.
Z()};
542 double EdgeNode2[3] = {P2.
X() , P2.
Y() , P2.
Z()};
546 for(
unsigned int i_cell = 0 ; i_cell < leaves.size() ; i_cell++)
553 for(object_container_type::iterator i_StructCondition = struct_cond->begin(); i_StructCondition != struct_cond->end(); i_StructCondition++)
561 double IntersectionPoint[3] = {0.0 , 0.0 , 0.0};
562 int TetEdgeHasIntersections =
IntersectionTriangleSegment( (*i_StructCondition)->GetGeometry() , EdgeNode1 , EdgeNode2 , IntersectionPoint );
564 if( TetEdgeHasIntersections == 1 )
569 NewIntersectionNode.
Coordinates[0] = IntersectionPoint[0];
570 NewIntersectionNode.
Coordinates[1] = IntersectionPoint[1];
571 NewIntersectionNode.
Coordinates[2] = IntersectionPoint[2];
583 NewTetEdge.
IntNodes.push_back(NewIntersectionNode);
598 NumberIntersectionsOnTetCorner++;
605 array_1d<double,3> emb_vel=(*i_StructCondition)->GetGeometry()[0].FastGetSolutionStepValue(VELOCITY);
606 emb_vel+=(*i_StructCondition)->GetGeometry()[1].FastGetSolutionStepValue(VELOCITY);
607 emb_vel+=(*i_StructCondition)->GetGeometry()[2].FastGetSolutionStepValue(VELOCITY);
611 i_fluidElement->GetValue(EMBEDDED_VELOCITY)+=emb_vel;
612 intersection_counter++;
629 if( NewTetEdge.
IntNodes.size() > 0 )
630 IntersectedTetEdges.push_back(NewTetEdge);
637 std::vector<unsigned int>& IntersectingStructCondID )
640 for(
unsigned int k = 0 ;
k < IntersectingStructCondID.size() ;
k++)
642 if( IDCurrentStructCond == IntersectingStructCondID[
k] )
648 IntersectingStructCondID.push_back( IDCurrentStructCond );
662 ConnectVectTetNodeIntNode1[0] = IntersectionPoint[0] - EdgeNode1[0];
663 ConnectVectTetNodeIntNode1[1] = IntersectionPoint[1] - EdgeNode1[1];
664 ConnectVectTetNodeIntNode1[2] = IntersectionPoint[2] - EdgeNode1[2];
666 ConnectVectTetNodeIntNode2[0] = IntersectionPoint[0] - EdgeNode2[0];
667 ConnectVectTetNodeIntNode2[1] = IntersectionPoint[1] - EdgeNode2[1];
668 ConnectVectTetNodeIntNode2[2] = IntersectionPoint[2] - EdgeNode2[2];
670 double LengthConnectVect1 =
norm_2( ConnectVectTetNodeIntNode1 );
671 double LengthConnectVect2 =
norm_2( ConnectVectTetNodeIntNode2 );
673 EdgeVector[0] = EdgeNode2[0] - EdgeNode1[0];
674 EdgeVector[1] = EdgeNode2[1] - EdgeNode1[1];
675 EdgeVector[2] = EdgeNode2[2] - EdgeNode1[2];
677 double MaxEdgeLength =
norm_2( EdgeVector );
682 if( (LengthConnectVect1 <= (MaxEdgeLength)) && (LengthConnectVect2 <= (MaxEdgeLength)) )
692 std::vector<TetEdgeStruct> IntersectedTetEdges )
695 double NormDiffVector;
696 unsigned int NumberIntNodes;
698 for(
unsigned int i_TetEdge = 0 ; i_TetEdge < IntersectedTetEdges.size() ; i_TetEdge++ )
700 NumberIntNodes = IntersectedTetEdges[i_TetEdge].IntNodes.
size();
701 for(
unsigned int i_IntNode = 0 ; i_IntNode < NumberIntNodes ; i_IntNode++ )
703 DiffVector[0] = NewIntersectionNode.
Coordinates[0] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[0];
704 DiffVector[1] = NewIntersectionNode.
Coordinates[1] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[1];
705 DiffVector[2] = NewIntersectionNode.
Coordinates[2] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[2];
706 NormDiffVector =
norm_2(DiffVector);
708 if( NormDiffVector < epsilon )
725 double NormDiffVector;
727 DiffVector[0] = EdgeNode1[0] - NewIntersectionNode.
Coordinates[0];
728 DiffVector[1] = EdgeNode1[1] - NewIntersectionNode.
Coordinates[1];
729 DiffVector[2] = EdgeNode1[2] - NewIntersectionNode.
Coordinates[2];
730 NormDiffVector =
norm_2(DiffVector);
732 if( NormDiffVector < epsilon )
735 DiffVector[0] = EdgeNode2[0] - NewIntersectionNode.
Coordinates[0];
736 DiffVector[1] = EdgeNode2[1] - NewIntersectionNode.
Coordinates[1];
737 DiffVector[2] = EdgeNode2[2] - NewIntersectionNode.
Coordinates[2];
738 NormDiffVector =
norm_2(DiffVector);
740 if( NormDiffVector < epsilon )
755 v1[0] = rGeometry[1].X() - rGeometry[0].X();
756 v1[1] = rGeometry[1].Y() - rGeometry[0].Y();
757 v1[2] = rGeometry[1].Z() - rGeometry[0].Z();
759 v2[0] = rGeometry[2].X() - rGeometry[0].X();
760 v2[1] = rGeometry[2].Y() - rGeometry[0].Y();
761 v2[2] = rGeometry[2].Z() - rGeometry[0].Z();
764 rResultNormal *= 0.5;
771 ModelPart::ElementsContainerType::iterator& i_fluid_element,
772 unsigned int NumberIntersectionsOnTetCorner)
774 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure;
781 if( NodesOfApproximatedStructure.size() == 1 && NumberIntersectionsOnTetCorner == 1 )
784 i_fluid_element->GetValue(SPLIT_ELEMENT) =
true;
788 if( NodesOfApproximatedStructure.size() == 2 && NumberIntersectionsOnTetCorner == 2 )
791 i_fluid_element->GetValue(SPLIT_ELEMENT) =
true;
795 if( NodesOfApproximatedStructure.size() == 3 )
798 i_fluid_element->GetValue(SPLIT_ELEMENT) =
true;
802 if( NodesOfApproximatedStructure.size() == 4 )
805 i_fluid_element->GetValue(SPLIT_ELEMENT) =
true;
809 if( i_fluid_element->GetValue(SPLIT_ELEMENT) ==
true )
817 std::vector<IntersectionNodeStruct>& NodesOfApproximatedStructure)
819 unsigned int NumberIntNodes;
825 for(
unsigned int i_TetEdge = 0 ; i_TetEdge < IntersectedTetEdges.size() ; i_TetEdge++)
827 NumberIntNodes = IntersectedTetEdges[i_TetEdge].IntNodes.size();
832 for(
unsigned int i_IntNode = 0 ; i_IntNode < NumberIntNodes ; i_IntNode++ )
834 sum_X += IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[0];
835 sum_Y += IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[1];
836 sum_Z += IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[2];
840 NewApproximationNode.
Coordinates[0] = sum_X / NumberIntNodes;
841 NewApproximationNode.
Coordinates[1] = sum_Y / NumberIntNodes;
842 NewApproximationNode.
Coordinates[2] = sum_Z / NumberIntNodes;
844 if(IntersectedTetEdges.size() <= 2)
845 NewApproximationNode.
StructElemNormal = IntersectedTetEdges[i_TetEdge].IntNodes[0].StructElemNormal;
847 NodesOfApproximatedStructure.push_back(NewApproximationNode);
855 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
858 const array_1d<double,3>& IntersectionNodeCoord = NodesOfApproximatedStructure[0].Coordinates;
862 double NormDistTetNode;
867 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
870 TetNode = rFluidGeom[i_TetNode].Coordinates();
873 DistVecTetNode[0] = TetNode[0] - IntersectionNodeCoord[0];
874 DistVecTetNode[1] = TetNode[1] - IntersectionNodeCoord[1];
875 DistVecTetNode[2] = TetNode[2] - IntersectionNodeCoord[2];
876 NormDistTetNode =
norm_2( DistVecTetNode );
879 NormalAtIntersectionNode = NodesOfApproximatedStructure[0].StructElemNormal;
880 InnerProduct =
inner_prod(DistVecTetNode,NormalAtIntersectionNode);
883 if(InnerProduct>epsilon)
884 ElementalDistances[i_TetNode] = NormDistTetNode;
885 else if(InnerProduct>-epsilon)
886 ElementalDistances[i_TetNode] = 0;
888 ElementalDistances[i_TetNode] = -NormDistTetNode;
896 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
899 const array_1d<double,3>& IntersectionNode1Coord = NodesOfApproximatedStructure[0].Coordinates;
900 const array_1d<double,3>& IntersectionNode2Coord = NodesOfApproximatedStructure[1].Coordinates;
907 double NormDistTetNode;
909 const Point LinePoint1 =
Point(IntersectionNode1Coord[0] , IntersectionNode1Coord[1] , IntersectionNode1Coord[2]);
910 const Point LinePoint2 =
Point(IntersectionNode2Coord[0] , IntersectionNode2Coord[1] , IntersectionNode2Coord[2]);
914 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
917 TetNode = rFluidGeom(i_TetNode)->Coordinates();
923 DistVecTetNode[0] = TetNode[0] - IntersectionNode1Coord[0];
924 DistVecTetNode[1] = TetNode[1] - IntersectionNode1Coord[1];
925 DistVecTetNode[2] = TetNode[2] - IntersectionNode1Coord[2];
928 NormalAtIntersectionNode1 = NodesOfApproximatedStructure[0].StructElemNormal;
929 NormalAtIntersectionNode2 = NodesOfApproximatedStructure[1].StructElemNormal;
932 ResNormal[0] = 0.5*(NormalAtIntersectionNode1[0] + NormalAtIntersectionNode2[0]);
933 ResNormal[1] = 0.5*(NormalAtIntersectionNode1[1] + NormalAtIntersectionNode2[1]);
934 ResNormal[2] = 0.5*(NormalAtIntersectionNode1[2] + NormalAtIntersectionNode2[2]);
935 InnerProduct =
inner_prod(DistVecTetNode,ResNormal);
938 if(InnerProduct>epsilon)
939 ElementalDistances[i_TetNode] = NormDistTetNode;
940 else if(InnerProduct>-epsilon)
941 ElementalDistances[i_TetNode] = 0;
943 ElementalDistances[i_TetNode] = -NormDistTetNode;
951 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
952 std::vector<TetEdgeStruct> IntersectedTetEdges,
969 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
970 std::vector<TetEdgeStruct> IntersectedTetEdges,
985 IndexNodes_T1[0] = 0;
986 IndexNodes_T1[1] = 1;
987 IndexNodes_T1[2] = 2;
993 ElementalDistances_T1 , IndexNodes_T1 );
996 ElementalDistances_T2 , IndexNodes_T2 );
999 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1001 dist_T1 = ElementalDistances_T1[i_TetNode];
1002 dist_T2 = ElementalDistances_T2[i_TetNode];
1003 if(fabs(dist_T1) < fabs(dist_T2))
1004 ElementalDistances[i_TetNode] = dist_T1;
1006 ElementalDistances[i_TetNode] = dist_T2;
1017 unsigned int indexExcludedNode = 1000000;
1022 RemainingPoint = NodesOfApproximatedStructure[3].Coordinates;
1026 for(
unsigned int i_TriangleNode = 0 ; i_TriangleNode < 3 ; i_TriangleNode++)
1028 TrianglePoint = NodesOfApproximatedStructure[i_TriangleNode].Coordinates;
1029 DistVecNode[0] = RemainingPoint[0] - TrianglePoint[0];
1030 DistVecNode[1] = RemainingPoint[1] - TrianglePoint[1];
1031 DistVecNode[2] = RemainingPoint[2] - TrianglePoint[2];
1032 if(
norm_2(DistVecNode) > maxDist)
1034 maxDist =
norm_2(DistVecNode);
1035 indexExcludedNode = i_TriangleNode;
1040 unsigned int indexCursor = 0;
1041 for(
unsigned int k = 0 ;
k < 3 ;
k++)
1043 if(indexExcludedNode !=
k)
1045 IndexNodes_T2[indexCursor] =
k;
1050 IndexNodes_T2[2] = 3;
1057 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
1058 std::vector<TetEdgeStruct> IntersectedTetEdges,
1064 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1070 Point ApproxTrianglePoint1;
1071 Point ApproxTrianglePoint2;
1072 Point ApproxTrianglePoint3;
1073 double UnsignedDistance;
1074 double InnerProduct;
1075 unsigned int IndexNode1;
1076 unsigned int IndexNode2;
1077 unsigned int IndexNode3;
1080 TetNode = rFluidGeom(i_TetNode)->Coordinates();
1082 IndexNode1 = IndexNodes[0];
1083 IndexNode2 = IndexNodes[1];
1084 IndexNode3 = IndexNodes[2];
1086 IntersectionNode1Coord = NodesOfApproximatedStructure[IndexNode1].Coordinates;
1087 IntersectionNode2Coord = NodesOfApproximatedStructure[IndexNode2].Coordinates;
1088 IntersectionNode3Coord = NodesOfApproximatedStructure[IndexNode3].Coordinates;
1090 ApproxTrianglePoint1 =
Point(IntersectionNode1Coord[0] , IntersectionNode1Coord[1] , IntersectionNode1Coord[2]);
1091 ApproxTrianglePoint2 =
Point(IntersectionNode2Coord[0] , IntersectionNode2Coord[1] , IntersectionNode2Coord[2]);
1092 ApproxTrianglePoint3 =
Point(IntersectionNode3Coord[0] , IntersectionNode3Coord[1] , IntersectionNode3Coord[2]);
1097 bool TetNodeIsInsideStructure =
true;
1098 bool TetNodeIsOnStructure =
true;
1102 for(
unsigned int i_TetEdge = 0 ; i_TetEdge < IntersectedTetEdges.size() ; i_TetEdge++ )
1104 for(
unsigned int i_IntNode = 0 ; i_IntNode < IntersectedTetEdges[i_TetEdge].IntNodes.size() ; i_IntNode++ )
1106 DistVec[0] = TetNode[0] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[0];
1107 DistVec[1] = TetNode[1] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[1];
1108 DistVec[2] = TetNode[2] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[2];
1110 NormalAtIntersectionNode = IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].StructElemNormal;
1112 InnerProduct =
inner_prod(DistVec,NormalAtIntersectionNode);
1114 if(InnerProduct > epsilon)
1116 TetNodeIsInsideStructure =
false;
1117 TetNodeIsOnStructure =
false;
1119 else if (InnerProduct < -epsilon)
1120 TetNodeIsOnStructure =
false;
1125 if( TetNodeIsInsideStructure ==
true )
1126 ElementalDistances[i_TetNode] = -UnsignedDistance;
1127 else if( TetNodeIsOnStructure ==
true )
1128 ElementalDistances[i_TetNode] = 0;
1130 ElementalDistances[i_TetNode] = +UnsignedDistance;
1144 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1147 if( fabs(ElementalDistances[i_TetNode]) < fabs(i_fluid_element->GetValue(ELEMENTAL_DISTANCES)[i_TetNode]) )
1148 MinElementalDistances[i_TetNode] = ElementalDistances[i_TetNode];
1150 MinElementalDistances[i_TetNode] = i_fluid_element->GetValue(ELEMENTAL_DISTANCES)[i_TetNode];
1153 if( fabs(ElementalDistances[i_TetNode]) < fabs(rFluidGeom[i_TetNode].
GetSolutionStepValue(DISTANCE)) )
1154 rFluidGeom[i_TetNode].GetSolutionStepValue(DISTANCE) = ElementalDistances[i_TetNode];
1157 i_fluid_element->SetValue(ELEMENTAL_DISTANCES,MinElementalDistances);
1233 for (
int i = 0 ;
i < 3;
i++)
1235 low[
i] = high[
i] = mrFluidModelPart.
NodesBegin()->Coordinates()[
i];
1240 i_node != mrFluidModelPart.
NodesEnd();
1244 for (
int i = 0 ;
i < 3;
i++)
1246 low[
i] = r_coordinates[
i] < low[
i] ? r_coordinates[
i] : low[
i];
1247 high[
i] = r_coordinates[
i] > high[
i] ? r_coordinates[
i] : high[
i];
1263 i_node != mrSkinModelPart.
NodesEnd();
1266 double temp_point[3];
1267 temp_point[0] = i_node->X();
1268 temp_point[1] = i_node->Y();
1269 temp_point[2] = i_node->Z();
1270 mOctree.
Insert(temp_point);
1283 mOctree.
Insert(*(i_cond).base());
1310 std::vector<OctreeType::cell_type*> all_leaves;
1319 for (std::size_t
i = 0;
i < all_leaves.size();
i++)
1332 for (
int i_pos=0; i_pos < 8; i_pos++)
1339 (*(pCell->
pGetData()))[i_pos]->
Id() = LastId++;
1342 mOctreeNodes.push_back((*(pCell->
pGetData()))[i_pos]);
1353 pCell->
GetKey(Position, point_key);
1355 for (std::size_t i_direction = 0; i_direction < 8; i_direction++) {
1359 if (!neighbour_cell || (neighbour_cell == pCell))
1363 if((*neighbour_cell->
pGetData())[position])
1365 std::cout <<
"ERROR!! Bad Position calculated!!!!!!!!!!! position :" << position << std::endl;
1369 (*neighbour_cell->
pGetData())[position] = pNode;
1379 int nodes_size = nodes.size();
1385 std::vector<CellType*> leaves;
1450 int nodes_size = nodes.size();
1454 nodes[
Index]->Distance() = 1.00;
1457 std::vector<CellType*> leaves;
1460 int leaves_size = leaves.size();
1462 for(
int i = 0 ;
i < leaves_size ;
i++)
1465 for(
int i_direction = 0 ; i_direction < 1 ; i_direction++)
1469 for(
int i = 0 ;
i < nodes_size ;
i++)
1471 if(nodes[
i]->
X() < 1.00 && nodes[
i]->
Y() < 1.00 && nodes[
i]->
Z() < 1.00)
1482 double coords[3] = {rNode.
X(), rNode.
Y(), rNode.
Z()};
1489 typedef std::vector<std::pair<double, triangle_type*> > intersections_container_type;
1491 intersections_container_type intersections;
1495 const double epsilon = 1
e-12;
1497 double distance = 1.0;
1500 double ray[3] = {coords[0], coords[1], coords[2]};
1501 ray[i_direction] = 0;
1506 for (std::size_t i_node = 0; i_node < nodes_array.size() ; i_node++)
1508 double coord = (*nodes_array[i_node])[i_direction];
1512 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
1513 while (i_intersection != intersections.end()) {
1514 double d = coord - i_intersection->first;
1517 ray_color = -ray_color;
1519 }
else if (
d > -epsilon) {
1531 distance *= ray_color;
1533 double& node_distance = nodes_array[i_node]->Distance();
1534 if(fabs(distance) < fabs(node_distance))
1535 node_distance = distance;
1536 else if (distance*node_distance < 0.00)
1537 node_distance = -node_distance;
1551 if (objects->empty())
1555 for (
int i_pos=0; i_pos < 8; i_pos++)
1557 double distance = 1.00;
1559 for(object_container_type::iterator i_object = objects->begin(); i_object != objects->end(); i_object++)
1564 double cell_point[3];
1573 double& node_distance = (*(pCell->
pGetData()))[i_pos]->Distance();
1574 if(distance < node_distance)
1575 node_distance = distance;
1584 double coord[3] = {rNode.
X(), rNode.
Y(), rNode.
Z()};
1589 if(fabs(node_distance) > fabs(distance))
1590 node_distance = distance;
1591 else if (distance*node_distance < 0.00)
1592 node_distance = -node_distance;
1624 typedef std::vector<std::pair<double, triangle_type*> > intersections_container_type;
1626 intersections_container_type intersections;
1629 const double epsilon = 1
e-12;
1631 double distances[3] = {1.0, 1.0, 1.0};
1633 for (
int i_direction = 0; i_direction <
dimension; i_direction++)
1636 double ray[3] = {coords[0], coords[1], coords[2]};
1638 ray[i_direction] = 0;
1648 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
1649 while (i_intersection != intersections.end()) {
1650 double d = coords[i_direction] - i_intersection->first;
1653 ray_color = -ray_color;
1654 distances[i_direction] =
d;
1662 }
else if (
d > -epsilon) {
1663 distances[i_direction] = 0.00;
1666 if(distances[i_direction] > -
d)
1667 distances[i_direction] = -
d;
1674 distances[i_direction] *= ray_color;
1680 double distance = (fabs(distances[0]) > fabs(distances[1])) ? distances[1] : distances[0];
1681 distance = (fabs(distance) > fabs(distances[2])) ? distances[2] : distance;
1694 const double epsilon = 1.00e-12;
1697 intersections.clear();
1705 ray_key[direction] = 0;
1709 std::size_t position = cell->GetLocalPosition(ray_key);
1711 cell->GetKey(position, node_key);
1712 if((node_key[0] == ray_key[0]) && (node_key[1] == ray_key[1]) && (node_key[2] == ray_key[2]))
1714 if(cell->pGetData())
1716 if(cell->pGetData()->size() > position)
1722 rNodesArray.push_back(p_node);
1764 if (cell->GetNeighbourKey(1 + direction * 2, cell_key)) {
1765 ray_key[direction] = cell_key[direction];
1767 ray_key[direction] -= 1 ;
1777 if (!intersections.empty()) {
1779 std::sort(intersections.begin(), intersections.end());
1781 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_begin = intersections.begin();
1782 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
1783 while (++i_begin != intersections.end()) {
1785 if (fabs(i_begin->first - i_intersection->first) > epsilon)
1786 *(++i_intersection) = *i_begin;
1788 intersections.resize((++i_intersection) - intersections.begin());
1793 void GetIntersections(
double* ray,
int direction, std::vector<std::pair<double,Element::GeometryType*> >& intersections)
1799 const double epsilon = 1.00e-12;
1802 intersections.clear();
1816 if (cell->GetNeighbourKey(1 + direction * 2, cell_key)) {
1817 ray_key[direction] = cell_key[direction];
1819 ray_key[direction] -= 1 ;
1827 if (!intersections.empty()) {
1829 std::sort(intersections.begin(), intersections.end());
1831 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_begin = intersections.begin();
1832 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
1833 while (++i_begin != intersections.end()) {
1835 if (fabs(i_begin->first - i_intersection->first) > epsilon)
1836 *(++i_intersection) = *i_begin;
1838 intersections.resize((++i_intersection) - intersections.begin());
1845 std::vector<std::pair<double, Element::GeometryType*> >& intersections) {
1856 if (objects->empty())
1861 double ray_point1[3] = {ray[0], ray[1], ray[2]};
1862 double ray_point2[3] = {ray[0], ray[1], ray[2]};
1863 double normalized_coordinate;
1865 ray_point1[direction] = normalized_coordinate;
1871 for (object_container_type::iterator i_object = objects->begin(); i_object != objects->end(); i_object++) {
1872 double intersection[3]={0.00,0.00,0.00};
1876 if (is_intersected == 1)
1877 intersections.push_back(std::pair<double, Element::GeometryType*>(intersection[direction], &((*i_object)->GetGeometry())));
1889 const double epsilon = 1.00e-12;
1897 u = rGeometry[1] - rGeometry[0];
1898 v = rGeometry[2] - rGeometry[0];
1905 for(
int i = 0 ;
i < 3 ;
i++)
1907 dir[
i] = RayPoint2[
i] - RayPoint1[
i];
1908 w0[
i] = RayPoint1[
i] - rGeometry[0][
i];
1914 if (fabs(
b) < epsilon) {
1926 for(
int i = 0 ;
i < 3 ;
i++)
1927 IntersectionPoint[
i] = RayPoint1[
i] + r *
dir[
i];
1930 double uu, uv, vv, wu, wv, D;
1936 for(
int i = 0 ;
i < 3 ;
i++)
1937 w[
i] = IntersectionPoint[
i] - rGeometry[0][
i];
1942 D = uv * uv - uu * vv;
1946 s = (uv * wv - vv * wu) / D;
1947 if (s < 0.0 - epsilon || s > 1.0 + epsilon)
1949 t = (uv * wu - uu * wv) / D;
1950 if (
t < 0.0 - epsilon || (s +
t) > 1.0 + epsilon)
1976 return "CalculateSignedDistanceTo3DConditionSkinProcess";
1982 rOStream <<
"CalculateSignedDistanceTo3DConditionSkinProcess";
1991 std::vector<CellType*> leaves;
1995 std::cout <<
"writing " << leaves.size() <<
" leaves" << std::endl;
1996 rOStream <<
"MESH \"leaves\" dimension 3 ElemType Hexahedra Nnode 8" << std::endl;
1997 rOStream <<
"# color 96 96 96" << std::endl;
1998 rOStream <<
"Coordinates" << std::endl;
1999 rOStream <<
"# node number coordinate_x coordinate_y coordinate_z " << std::endl;
2001 for(ConfigurationType::data_type::const_iterator i_node = mOctreeNodes.begin() ; i_node != mOctreeNodes.end() ; i_node++)
2003 rOStream << (*i_node)->Id() <<
" " << (*i_node)->X() <<
" " << (*i_node)->Y() <<
" " << (*i_node)->Z() << std::endl;
2006 std::cout <<
"Nodes written..." << std::endl;
2007 rOStream <<
"end coordinates" << std::endl;
2008 rOStream <<
"Elements" << std::endl;
2009 rOStream <<
"# element node_1 node_2 node_3 material_number" << std::endl;
2011 for (std::size_t
i = 0;
i < leaves.size();
i++) {
2012 if ((leaves[
i]->pGetData()))
2017 for(
int j = 0 ;
j < 8 ;
j++)
2018 rOStream <<
" " << nodes[
j]->Id();
2019 rOStream << std::endl;
2022 rOStream <<
"end elements" << std::endl;
2027 std::vector<CellType*> leaves;
2031 rOStream <<
"GiD Post Results File 1.0" << std::endl << std::endl;
2033 rOStream <<
"Result \"Distance\" \"Kratos\" 1 Scalar OnNodes" << std::endl;
2035 rOStream <<
"Values" << std::endl;
2037 for(ConfigurationType::data_type::const_iterator i_node = mOctreeNodes.begin() ; i_node != mOctreeNodes.end() ; i_node++)
2039 rOStream << (*i_node)->Id() <<
" " << (*i_node)->Distance() << std::endl;
2041 rOStream <<
"End Values" << std::endl;
2105 static const double epsilon;
2162 rOStream << std::endl;
2169 const double CalculateSignedDistanceTo3DConditionSkinProcess::epsilon = 1
e-12;
Short class definition.
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:284
int IntersectionTriangleSegment(Element::GeometryType &rGeometry, double *RayPoint1, double *RayPoint2, double *IntersectionPoint)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1884
double DistancePositionInSpace(double *coords)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1618
void DistanceFluidStructure()
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:406
void CalculateDistance2()
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1375
ConfigurationType::cell_node_data_type CellNodeDataType
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:295
void CalculateNormal3D(Element::GeometryType &rGeometry, array_1d< double, 3 > &rResultNormal)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:749
void CalcNodalDistanceTo3DSkin(std::vector< TetEdgeStruct > &IntersectedTetEdges, ModelPart::ElementsContainerType::iterator &i_fluid_element, unsigned int NumberIntersectionsOnTetCorner)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:770
bool IsIntersectionNodeOnTetEdge(double *IntersectionPoint, double *EdgeNode1, double *EdgeNode2)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:655
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1980
OctreeBinary< CellType > OctreeType
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:294
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:340
void SetNodeInNeighbours(CellType *pCell, int Position, CellNodeDataType *pNode)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1350
DistanceSpatialContainersConditionConfigure ConfigurationType
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:292
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1986
void GetIntersections(double *ray, int direction, std::vector< std::pair< double, Element::GeometryType * > > &intersections)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1793
void CalculateNotEmptyLeavesDistance(CellType *pCell)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1543
void GenerateCellNode(CellType *pCell, std::size_t &LastId)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1330
void operator()()
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:327
CalculateSignedDistanceTo3DConditionSkinProcess(ModelPart &rThisModelPartStruc, ModelPart &rThisModelPartFluid)
Constructor.
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:312
void AssignDistancesToElements(ModelPart::ElementsContainerType::iterator &i_fluid_element, array_1d< double, 4 > ElementalDistances)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1137
void CalcNodalDistancesOfTetNodes(ModelPart::ElementsContainerType::iterator &i_fluidElement, BoundedMatrix< unsigned int, 6, 2 > TetEdgeIndexTable)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:485
std::string Info() const override
Turn back information as a string.
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1974
OctreeType::cell_type::object_container_type object_container_type
always the point 3D
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:297
void InitializeDistances()
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:436
void CalcSignedDistancesToThreeIntNodes(ModelPart::ElementsContainerType::iterator &i_fluid_element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, std::vector< TetEdgeStruct > IntersectedTetEdges, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:950
OctreeBinaryCell< ConfigurationType > CellType
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:293
void ComputeApproximationNodes(std::vector< TetEdgeStruct > IntersectedTetEdges, std::vector< IntersectionNodeStruct > &NodesOfApproximatedStructure)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:816
void GenerateOctree()
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1225
void PrintGiDMesh(std::ostream &rOStream) const
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1990
Point PointType
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:296
void GenerateNodes()
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1307
void CalcSignedDistancesToApproxTriangle(ModelPart::ElementsContainerType::iterator &i_fluid_element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, std::vector< TetEdgeStruct > IntersectedTetEdges, array_1d< double, 4 > &ElementalDistances, array_1d< unsigned int, 3 > IndexNodes)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1056
void SetIndexTable(BoundedMatrix< unsigned int, 6, 2 > &TetEdgeIndexTable)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:465
void CalculateDistance(CellNodeDataType &rNode, int i_direction)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1480
void CalcSignedDistancesToFourIntNodes(ModelPart::ElementsContainerType::iterator &i_fluid_element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, std::vector< TetEdgeStruct > IntersectedTetEdges, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:968
void CalculateNodeDistance(Node &rNode)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1582
void CalcSignedDistancesToTwoIntNodes(ModelPart::ElementsContainerType::iterator &i_fluid_element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:895
bool IsNewIntersectionNode(IntersectionNodeStruct &NewIntersectionNode, std::vector< TetEdgeStruct > IntersectedTetEdges)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:691
KRATOS_CLASS_POINTER_DEFINITION(CalculateSignedDistanceTo3DConditionSkinProcess)
Pointer definition of CalculateSignedDistanceTo3DConditionSkinProcess.
void CalculateDistance()
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1446
void GetIntersectionsAndNodes(double *ray, int direction, std::vector< std::pair< double, Element::GeometryType * > > &intersections, ConfigurationType::data_type &rNodesArray)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1688
void PrintGiDResults(std::ostream &rOStream) const
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:2026
bool IsIntersectionOnCorner(IntersectionNodeStruct &NewIntersectionNode, double *EdgeNode1, double *EdgeNode2)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:720
void CalcSignedDistancesToOneIntNode(ModelPart::ElementsContainerType::iterator &i_fluid_element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:854
int GetCellIntersections(OctreeType::cell_type *cell, double *ray, OctreeType::key_type *ray_key, int direction, std::vector< std::pair< double, Element::GeometryType * > > &intersections)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1843
~CalculateSignedDistanceTo3DConditionSkinProcess() override
Destructor.
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:318
void IdentifyIntersectionNodes(ModelPart::ElementsContainerType::iterator &i_fluidElement, unsigned int i_tetEdge, std::vector< OctreeType::cell_type * > &leaves, std::vector< TetEdgeStruct > &IntersectedTetEdges, unsigned int &NumberIntersectionsOnTetCorner, BoundedMatrix< unsigned int, 6, 2 > TetEdgeIndexTable, int &intersection_counter)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:521
bool StructuralElementNotYetConsidered(unsigned int IDCurrentStructCond, std::vector< unsigned int > &IntersectingStructCondID)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:636
void FindIndexNodesOfTriangle2(std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, array_1d< unsigned int, 3 > &IndexNodes_T2)
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:1013
Geometry base class.
Definition: geometry.h:71
virtual bool HasIntersection(const GeometryType &ThisGeometry) const
Definition: geometry.h:1453
static double PointDistanceToLineSegment3D(const Point &rLinePoint1, const Point &rLinePoint2, const Point &rToPoint)
This function calculates the distance of a 3D point to a 3D line segment.
Definition: geometry_utilities.cpp:129
static double PointDistanceToTriangle3D(const Point &rTrianglePoint1, const Point &rTrianglePoint2, const Point &rTrianglePoint3, const Point &rPoint)
This function calculates the distance of a 3D point to a 3D triangle.
Definition: geometry_utilities.cpp:172
This class is useful for index iteration over containers.
Definition: parallel_utilities.h:451
void for_each(TUnaryFunction &&f)
Definition: parallel_utilities.h:514
This object defines an indexed object.
Definition: indexed_object.h:54
Definition: amatrix_interface.h:41
static T CrossProduct(const T &a, const T &b)
Performs the vector product of the two input vectors a,b.
Definition: math_utils.h:762
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
ElementIterator ElementsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1169
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
NodesContainerType::ContainerType & NodesArray(IndexType ThisIndex=0)
Definition: model_part.h:527
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
MeshType::ElementIterator ElementIterator
Definition: model_part.h:174
SizeType NumberOfNodes(IndexType ThisIndex=0) const
Definition: model_part.h:341
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
MeshType::ConditionIterator ConditionIterator
Definition: model_part.h:189
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
ElementsContainerType::ContainerType & ElementsArray(IndexType ThisIndex=0)
Definition: model_part.h:1209
This class defines the node.
Definition: node.h:65
TVariableType::Type & GetSolutionStepValue(const TVariableType &rThisVariable)
Definition: node.h:406
This class represents a cell in an octree to be used with Octree class.
Definition: octree_binary_cell.h:70
std::size_t GetLocalPosition(key_type *keys)
Definition: octree_binary_cell.h:327
const std::vector< pointer_type > * pGetObjects() const
Definition: octree_binary_cell.h:451
std::size_t key_type
Definition: octree_binary_cell.h:86
data_type * pGetData() const
Definition: octree_binary_cell.h:441
int GetKey(std::size_t position, key_type *keys) const
Definition: octree_binary_cell.h:241
int GetNeighbourKey(std::size_t direction, key_type *keys) const
Definition: octree_binary_cell.h:265
CellType cell_type
Definition: octree_binary.h:68
void SetBoundingBox(const coordinate_type *Low, const coordinate_type *High)
Definition: octree_binary.h:122
cell_type::key_type key_type
Definition: octree_binary.h:70
void ScaleBackToOriginalCoordinate(coordinate_type *ThisCoordinates) const
Definition: octree_binary.h:175
void NormalizeCoordinates(coordinate_type *Coordinates) const
Definition: octree_binary.h:141
int GetAllLeavesVector(std::vector< cell_type * > &all_leaves) const
Definition: octree_binary.h:404
key_type CalcKeyNormalized(coordinate_type coordinate) const
Definition: octree_binary.h:199
void CalculateCoordinateNormalized(const key_type key, coordinate_type &NormalizedCoordinate) const
Definition: octree_binary.h:158
void CalculateCoordinates(key_type *keys, coordinate_type *ResultCoordinates) const
Definition: octree_binary.h:169
void GetIntersectedLeaves(typename cell_type::pointer_type pObject, std::vector< cell_type * > &rLeaves, const double ToleranceCoefficient=0.001)
This method fills the intersected leaves.
Definition: octree_binary.h:808
void Insert(coordinate_type *point)
Definition: octree_binary.h:220
double CalcSizeNormalized(const cell_type *cell) const
Definition: octree_binary.h:130
cell_type * pGetCell(key_type *keys) const
Definition: octree_binary.h:429
Point class.
Definition: point.h:59
double Y() const
Definition: point.h:187
double Z() const
Definition: point.h:193
double X() const
Definition: point.h:181
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.h:72
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
TDataType value_type
Definition: pointer_vector_set.h:85
The base class for all processes in Kratos.
Definition: process.h:49
static void Start(std::string const &rIntervalName)
This method starts the timer meassures.
Definition: timer.cpp:109
static void Stop(std::string const &rIntervalName)
This method stops the timer meassures.
Definition: timer.cpp:125
BOOST_UBLAS_INLINE size_type size() const
Definition: array_1d.h:370
#define KRATOS_THROW_ERROR(ExceptionType, ErrorMessage, MoreInfo)
Definition: define.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_WATCH(variable)
Definition: define.h:806
#define KRATOS_TRY
Definition: define.h:109
pybind11::list keys(Parameters const &self)
Definition: add_kratos_parameters_to_python.cpp:32
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
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
def GetSolutionStepValue(entity, variable, solution_step_index)
Definition: coupling_interface_data.py:253
v
Definition: generate_convection_diffusion_explicit_element.py:114
w
Definition: generate_convection_diffusion_explicit_element.py:108
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
u
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:30
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
data
Definition: mesh_to_mdpa_converter.py:59
int t
Definition: ode_solve.py:392
int d
Definition: ode_solve.py:397
int n
manufactured solution and derivatives (u=0 at z=0 dudz=0 at z=domain_height)
Definition: ode_solve.py:402
int k
Definition: quadrature.py:595
int j
Definition: quadrature.py:648
dir
Definition: radii_error_plotter.py:10
integer i
Definition: TensorModule.f:17
e
Definition: run_cpp_mpi_tests.py:31
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:298
array_1d< double, 3 > StructElemNormal
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:300
array_1d< double, 3 > Coordinates
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:299
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:302
std::vector< IntersectionNodeStruct > IntNodes
Definition: calculate_signed_distance_to_3d_condition_skin_process.h:303
Configure::ContainerType ContainerType
Definition: transfer_utility.h:247