15 #if !defined(KRATOS_CALCULATE_DISTANCE_PROCESS_H_INCLUDED )
16 #define KRATOS_CALCULATE_DISTANCE_PROCESS_H_INCLUDED
38 #include "utilities/geometry_utilities.h"
51 using namespace boost::numeric::ublas;
63 double mCoordinates[3];
67 double&
X() {
return mCoordinates[0];}
68 double&
Y() {
return mCoordinates[1];}
69 double&
Z() {
return mCoordinates[2];}
71 std::size_t&
Id(){
return mId;}
132 *destination = *source;
141 rHighPoint = rObject->GetGeometry().GetPoint(0);
142 rLowPoint = rObject->GetGeometry().GetPoint(0);
144 for (
unsigned int point = 0; point<rObject->GetGeometry().PointsNumber(); point++)
146 for(std::size_t
i = 0;
i<3;
i++)
148 rLowPoint[
i] = (rLowPoint[
i] > rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rLowPoint[
i];
149 rHighPoint[
i] = (rHighPoint[
i] < rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rHighPoint[
i];
157 for(std::size_t
i = 0;
i<3;
i++)
159 rLowPoint[
i] = rObject->GetGeometry().GetPoint(0)[
i];
160 rHighPoint[
i] = rObject->GetGeometry().GetPoint(0)[
i];
163 for (
unsigned int point = 0; point<rObject->GetGeometry().PointsNumber(); point++)
165 for(std::size_t
i = 0;
i<3;
i++)
167 rLowPoint[
i] = (rLowPoint[
i] > rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rLowPoint[
i];
168 rHighPoint[
i] = (rHighPoint[
i] < rObject->GetGeometry().GetPoint(point)[
i] ) ? rObject->GetGeometry().GetPoint(point)[
i] : rHighPoint[
i];
184 return rObject->GetGeometry().HasIntersection(rLowPoint, rHighPoint);
188 static inline bool IsIntersected(
const Element::Pointer rObject,
double Tolerance,
const double* rLowPoint,
const double* rHighPoint)
190 Point low_point(rLowPoint[0] - Tolerance, rLowPoint[1] - Tolerance, rLowPoint[2] - Tolerance);
191 Point high_point(rHighPoint[0] + Tolerance, rHighPoint[1] + Tolerance, rHighPoint[2] + Tolerance);
213 virtual std::string
Info()
const
215 return " Spatial Containers Configure";
296 : mrSkinModelPart(rThisModelPartStruc), mrBodyModelPart(rThisModelPartStruc), mrFluidModelPart(rThisModelPartFluid)
336 CalculateDistance2();
363 const int max_results = 10000;
365 const int n_structure_nodes = mrSkinModelPart.Nodes().size();
367 #pragma omp parallel for firstprivate(results,N)
369 for (
int i = 0;
i < n_structure_nodes;
i++)
372 Node ::Pointer p_structure_node = *(iparticle.base());
373 p_structure_node->Set(VISITED,
false);
375 for (
int i = 0;
i < n_structure_nodes;
i++)
378 Node ::Pointer p_structure_node = *(iparticle.base());
380 Element::Pointer pElement;
382 bool is_found = node_locator.FindPointOnMesh(p_structure_node->Coordinates(),
N, pElement, result_begin, max_results);
384 if (is_found ==
true)
387 const Vector& ElementalDistances = pElement->GetValue(ELEMENTAL_DISTANCES);
391 for(
unsigned int j=0;
j<geom.
size();
j++)
393 nodalPressures[
j] = geom[
j].FastGetSolutionStepValue(PRESSURE);
396 if(pElement->GetValue(SPLIT_ELEMENT)==
true)
401 ComputeDiscontinuousInterpolation((*p_structure_node),pElement->GetGeometry(),ElementalDistances,Npos,Nneg);
404 double p_positive_structure =
inner_prod(nodalPressures,Npos);
405 double p_negative_structure =
inner_prod(nodalPressures,Nneg);
408 p_structure_node->FastGetSolutionStepValue(POSITIVE_FACE_PRESSURE) = p_positive_structure;
409 p_structure_node->FastGetSolutionStepValue(NEGATIVE_FACE_PRESSURE) = p_negative_structure;
410 p_structure_node->Set(VISITED);
415 p_structure_node->FastGetSolutionStepValue(POSITIVE_FACE_PRESSURE) =
p;
416 p_structure_node->FastGetSolutionStepValue(NEGATIVE_FACE_PRESSURE) =
p;
417 p_structure_node->Set(VISITED);
424 for (
int i = 0;
i < n_structure_nodes;
i++)
427 Node ::Pointer p_structure_node = *(iparticle.base());
428 if (p_structure_node->IsNot(VISITED))
433 while (n_bad_nodes >= 1.0) {
434 int n_bad_nodes_backup = n_bad_nodes;
436 for (
int i = 0;
i < n_structure_nodes;
i++) {
438 Node ::Pointer p_structure_node = *(iparticle.base());
441 if (p_structure_node->IsNot(VISITED)) {
442 int n_good_neighbors = 0;
443 double pos_pres = 0.0;
444 double neg_pres = 0.0;
448 if (
j->Is(VISITED)) {
450 pos_pres +=
j->FastGetSolutionStepValue(POSITIVE_FACE_PRESSURE);
451 neg_pres +=
j->FastGetSolutionStepValue(NEGATIVE_FACE_PRESSURE);
455 if (n_good_neighbors != 0) {
456 pos_pres /= n_good_neighbors;
457 neg_pres /= n_good_neighbors;
458 p_structure_node->FastGetSolutionStepValue(POSITIVE_FACE_PRESSURE) = pos_pres;
459 p_structure_node->FastGetSolutionStepValue(NEGATIVE_FACE_PRESSURE) = neg_pres;
460 p_structure_node->Set(VISITED);
468 if(n_bad_nodes == n_bad_nodes_backup)
break;
484 for (
int i = 0;
i < n_structure_nodes;
i++)
487 Node ::Pointer p_structure_node = *(iparticle.base());
489 double pos_pressure=p_structure_node->FastGetSolutionStepValue(POSITIVE_FACE_PRESSURE);
490 double neg_pressure=p_structure_node->FastGetSolutionStepValue(NEGATIVE_FACE_PRESSURE);
494 if (neighours.
size()>=1.0)
496 double av_pos_pres=0.0;
497 double av_neg_pres=0.0;
499 j != neighours.
end();
j++)
502 av_pos_pres+=
j->FastGetSolutionStepValue(POSITIVE_FACE_PRESSURE);
503 av_neg_pres+=
j->FastGetSolutionStepValue(NEGATIVE_FACE_PRESSURE);
506 av_pos_pres/=neighours.
size();
507 av_neg_pres/=neighours.
size();
510 if (fabs(pos_pressure)>3.0*fabs(av_pos_pres))
512 p_structure_node->FastGetSolutionStepValue(POSITIVE_FACE_PRESSURE) = av_pos_pres;
515 if (fabs(neg_pressure)>3.0*fabs(av_neg_pres))
517 p_structure_node->FastGetSolutionStepValue(NEGATIVE_FACE_PRESSURE) = av_neg_pres;
539 for(
unsigned int i=0;
i<distances.
size();
i++)
540 if(distances[
i]>0) n_positives++;
544 std::vector< Point > edge_points;
545 edge_points.reserve(4);
550 for(
unsigned int i=0;
i<3;
i++)
552 for(
unsigned int j=
i+1;
j<4;
j++)
554 double di = distances[
i];
555 double dj = distances[
j];
560 double Ni = fabs(dj) / ( fabs(di) + fabs(dj) );
561 double Nj = 1.0 - Ni;
562 Point edge_point(Ni * geom[
i] + Nj * geom[
j]);
563 edge_points.push_back(edge_point);
568 positive_fathers[
k++] =
i;
569 negative_fathers[
l++] =
j;
573 positive_fathers[
k++] =
j;
574 negative_fathers[
l++] =
i;
580 if(edge_points.size() == 3)
587 Point::Pointer(
new Point(edge_points[1])),
588 Point::Pointer(
new Point(edge_points[2]))
594 for(
unsigned int i=0;
i<3;
i++)
599 for(
unsigned int i=0;
i<3;
i++)
601 Npos[ positive_fathers[
i] ] += Nlocal[
i];
602 Nneg[ negative_fathers[
i] ] += Nlocal[
i];
606 if(edge_points.size() == 4)
635 double max_angle = 0.0;
636 double min_angle = 0.0;
637 unsigned int min_pos = 1;
638 unsigned int max_pos = 1;
639 for(
unsigned int i=1;
i<3;
i++)
641 if(angles[
i] < min_angle)
644 min_angle = angles[
i];
646 else if(angles[
i] > max_angle)
649 max_angle = angles[
i];
654 unsigned int center_pos = 0;
655 for(
unsigned int i=1;
i<4;
i++)
657 if((
i!= min_pos) && (
i!=max_pos))
663 Point::Pointer(
new Point(edge_points[0])),
664 Point::Pointer(
new Point(edge_points[min_pos])),
665 Point::Pointer(
new Point(edge_points[center_pos])),
666 Point::Pointer(
new Point(edge_points[max_pos]))
674 indices[1] = min_pos;
675 indices[2] = center_pos;
676 indices[3] = max_pos;
678 for(
unsigned int i=0;
i<4;
i++)
683 for(
unsigned int i=0;
i<4;
i++)
685 Npos[ positive_fathers[
i] ] += Nlocal[indices[
i]];
686 Nneg[ negative_fathers[
i] ] += Nlocal[indices[
i]];
699 const int max_results = 10000;
702 Element::Pointer pElement;
704 bool is_found = node_locator.FindPointOnMesh(
node.Coordinates(),
N, pElement, result_begin, max_results);
706 if (is_found ==
true)
709 const Vector& ElementalDistances = pElement->GetValue(ELEMENTAL_DISTANCES);
712 for(
unsigned int i=0;
i<4;
i++)
715 if(pElement->GetValue(SPLIT_ELEMENT)==
true)
718 double positiveAverage = 0;
719 double negativeAverage = 0;
720 unsigned int nPos = 0;
721 unsigned int nNeg = 0;
723 for(
unsigned int i=0 ;
i<4 ;
i++)
725 if(ElementalDistances[
i]>=0)
727 positiveAverage += nodalPressures[
i];
732 negativeAverage += nodalPressures[
i];
737 positiveAverage /= nPos;
738 negativeAverage /= nNeg;
741 node.GetSolutionStepValue(POSITIVE_FACE_PRESSURE,0) = positiveAverage;
742 node.GetSolutionStepValue(NEGATIVE_FACE_PRESSURE,0) = negativeAverage;
750 for(
unsigned int i = 0 ;
i<4 ;
i++)
756 node.GetSolutionStepValue(POSITIVE_FACE_PRESSURE,0) =
Average;
757 node.GetSolutionStepValue(NEGATIVE_FACE_PRESSURE,0) =
Average;
774 SetIndexTable(TetEdgeIndexTable);
779 int number_of_threads = omp_get_max_threads();
781 int number_of_threads = 1;
787 CreatePartition(number_of_threads, pElements.
size(), Element_partition);
789 #pragma omp parallel for
790 for (
int k = 0;
k < number_of_threads;
k++)
798 CalcElementDistances( it , TetEdgeIndexTable );
805 AssignMinimalNodalDistance();
815 const double initial_distance = 1.0;
820 int nodesSize = nodes.size();
822 #pragma omp parallel for firstprivate(nodesSize)
823 for(
int i = 0 ;
i < nodesSize ;
i++)
829 ElementalDistances[0] = initial_distance;
830 ElementalDistances[1] = initial_distance;
831 ElementalDistances[2] = initial_distance;
832 ElementalDistances[3] = initial_distance;
836 int ElementsSize = fluid_Elements.
size();
838 #pragma omp parallel for firstprivate(ElementsSize)
839 for(
int i = 0 ;
i < ElementsSize ;
i++)
841 fluid_Elements[
i]->GetValue(ELEMENTAL_DISTANCES) = ElementalDistances;
842 fluid_Elements[
i]->GetValue(SPLIT_ELEMENT) =
false;
843 fluid_Elements[
i]->GetValue(EMBEDDED_VELOCITY)=
ZeroVector(3);
854 TetEdgeIndexTable(0,0) = 0;
855 TetEdgeIndexTable(0,1) = 1;
856 TetEdgeIndexTable(1,0) = 0;
857 TetEdgeIndexTable(1,1) = 2;
858 TetEdgeIndexTable(2,0) = 0;
859 TetEdgeIndexTable(2,1) = 3;
860 TetEdgeIndexTable(3,0) = 1;
861 TetEdgeIndexTable(3,1) = 2;
862 TetEdgeIndexTable(4,0) = 1;
863 TetEdgeIndexTable(4,1) = 3;
864 TetEdgeIndexTable(5,0) = 2;
865 TetEdgeIndexTable(5,1) = 3;
874 std::vector<OctreeType::cell_type*> leaves;
875 std::vector<TetEdgeStruct> IntersectedTetEdges;
876 unsigned int NumberIntersectionsOnTetCorner = 0;
879 mpOctree->GetIntersectedLeaves(*(i_fluidElement).base(),leaves);
881 int intersection_counter = 0;
884 for(
unsigned int i_tetEdge = 0;
888 IdentifyIntersectionNodes( i_fluidElement, i_tetEdge, leaves, IntersectedTetEdges, NumberIntersectionsOnTetCorner, TetEdgeIndexTable, intersection_counter );
891 if (intersection_counter!=0)
893 i_fluidElement->GetValue(EMBEDDED_VELOCITY) /= intersection_counter;
896 if(IntersectedTetEdges.size() > 0)
897 CalcDistanceTo3DSkin( IntersectedTetEdges , i_fluidElement , NumberIntersectionsOnTetCorner );
904 unsigned int i_tetEdge,
905 std::vector<OctreeType::cell_type*>& leaves,
906 std::vector<TetEdgeStruct>& IntersectedTetEdges,
907 unsigned int& NumberIntersectionsOnTetCorner,
909 int& intersection_counter )
911 std::vector<unsigned int> IntersectingStructElemID;
913 unsigned int NumberIntersectionsOnTetCornerCurrentEdge = 0;
916 unsigned int EdgeStartIndex = TetEdgeIndexTable(i_tetEdge,0);
917 unsigned int EdgeEndIndex = TetEdgeIndexTable(i_tetEdge,1);
919 PointType& P1 = i_fluidElement->GetGeometry()[EdgeStartIndex];
920 PointType& P2 = i_fluidElement->GetGeometry()[EdgeEndIndex];
922 double EdgeNode1[3] = {P1.
X() , P1.
Y() , P1.
Z()};
923 double EdgeNode2[3] = {P2.
X() , P2.
Y() , P2.
Z()};
926 for(
unsigned int i_cell = 0 ; i_cell < leaves.size() ; i_cell++)
932 for(object_container_type::iterator i_StructElement = struct_elem->begin(); i_StructElement != struct_elem->end(); i_StructElement++)
935 if( StructuralElementNotYetConsidered( (*i_StructElement)->Id() , IntersectingStructElemID ) )
939 double IntersectionPoint[3] = {0.0 , 0.0 , 0.0};
940 int TetEdgeHasIntersections = IntersectionTriangleSegment( (*i_StructElement)->GetGeometry() , EdgeNode1 , EdgeNode2 , IntersectionPoint );
942 if( TetEdgeHasIntersections == 1 )
947 NewIntersectionNode.
Coordinates[0] = IntersectionPoint[0];
948 NewIntersectionNode.
Coordinates[1] = IntersectionPoint[1];
949 NewIntersectionNode.
Coordinates[2] = IntersectionPoint[2];
951 if( IsIntersectionNodeOnTetEdge( IntersectionPoint , EdgeNode1 , EdgeNode2 ) )
953 if ( IsNewIntersectionNode( NewIntersectionNode , IntersectedTetEdges ) )
956 CalculateNormal3D((*i_StructElement)->GetGeometry()[0],
957 (*i_StructElement)->GetGeometry()[1],
958 (*i_StructElement)->GetGeometry()[2],
962 if ( IsIntersectionOnCorner( NewIntersectionNode , EdgeNode1 , EdgeNode2) )
964 NumberIntersectionsOnTetCornerCurrentEdge++;
967 if(NumberIntersectionsOnTetCornerCurrentEdge < 2)
970 NewIntersectionNode.
EdgeNode1 = EdgeStartIndex;
971 NewIntersectionNode.
EdgeNode2 = EdgeEndIndex;
972 NewTetEdge.
IntNodes.push_back(NewIntersectionNode);
976 if( NewTetEdge.
IntNodes.size() == 1 )
977 IntersectedTetEdges.push_back(NewTetEdge);
981 if(NumberIntersectionsOnTetCornerCurrentEdge==1)
983 NumberIntersectionsOnTetCorner++;
989 NewIntersectionNode.
EdgeNode1 = EdgeStartIndex;
990 NewIntersectionNode.
EdgeNode2 = EdgeEndIndex;
991 NewTetEdge.
IntNodes.push_back(NewIntersectionNode);
994 array_1d<double,3> emb_vel = (*i_StructElement)->GetGeometry()[0].GetSolutionStepValue(VELOCITY);
995 emb_vel += (*i_StructElement)->GetGeometry()[1].GetSolutionStepValue(VELOCITY);
996 emb_vel += (*i_StructElement)->GetGeometry()[2].GetSolutionStepValue(VELOCITY);
998 i_fluidElement->GetValue(EMBEDDED_VELOCITY) += emb_vel/3;
999 intersection_counter++;
1009 if( NewTetEdge.
IntNodes.size() > 0 )
1011 if(NumberIntersectionsOnTetCornerCurrentEdge == 0)
1012 IntersectedTetEdges.push_back(NewTetEdge);
1020 std::vector<unsigned int>& IntersectingStructElemID )
1023 for(
unsigned int k = 0 ;
k < IntersectingStructElemID.size() ;
k++)
1025 if( IDCurrentStructElem == IntersectingStructElemID[
k] )
1031 IntersectingStructElemID.push_back( IDCurrentStructElem );
1047 ConnectVectTetNodeIntNode1[0] = IntersectionPoint[0] - EdgeNode1[0];
1048 ConnectVectTetNodeIntNode1[1] = IntersectionPoint[1] - EdgeNode1[1];
1049 ConnectVectTetNodeIntNode1[2] = IntersectionPoint[2] - EdgeNode1[2];
1051 ConnectVectTetNodeIntNode2[0] = IntersectionPoint[0] - EdgeNode2[0];
1052 ConnectVectTetNodeIntNode2[1] = IntersectionPoint[1] - EdgeNode2[1];
1053 ConnectVectTetNodeIntNode2[2] = IntersectionPoint[2] - EdgeNode2[2];
1055 double LengthConnectVect1 =
norm_2( ConnectVectTetNodeIntNode1 );
1056 double LengthConnectVect2 =
norm_2( ConnectVectTetNodeIntNode2 );
1058 EdgeVector[0] = EdgeNode2[0] - EdgeNode1[0];
1059 EdgeVector[1] = EdgeNode2[1] - EdgeNode1[1];
1060 EdgeVector[2] = EdgeNode2[2] - EdgeNode1[2];
1062 double MaxEdgeLength =
norm_2( EdgeVector );
1067 if( (LengthConnectVect1 <= (MaxEdgeLength)) && (LengthConnectVect2 <= (MaxEdgeLength)) )
1077 std::vector<TetEdgeStruct>& IntersectedTetEdges )
1080 double NormDiffVector = 0;
1081 unsigned int NumberIntNodes = 0;
1083 for(
unsigned int i_TetEdge = 0 ; i_TetEdge < IntersectedTetEdges.size() ; i_TetEdge++ )
1085 NumberIntNodes = IntersectedTetEdges[i_TetEdge].IntNodes.
size();
1086 for(
unsigned int i_IntNode = 0 ; i_IntNode < NumberIntNodes ; i_IntNode++ )
1088 DiffVector[0] = NewIntersectionNode.
Coordinates[0] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[0];
1089 DiffVector[1] = NewIntersectionNode.
Coordinates[1] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[1];
1090 DiffVector[2] = NewIntersectionNode.
Coordinates[2] - IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode].Coordinates[2];
1092 NormDiffVector =
norm_2(DiffVector);
1094 if( NormDiffVector < epsilon )
1111 double NormDiffVector;
1113 DiffVector[0] = EdgeNode1[0] - NewIntersectionNode.
Coordinates[0];
1114 DiffVector[1] = EdgeNode1[1] - NewIntersectionNode.
Coordinates[1];
1115 DiffVector[2] = EdgeNode1[2] - NewIntersectionNode.
Coordinates[2];
1116 NormDiffVector =
norm_2(DiffVector);
1118 if( NormDiffVector < epsilon )
1121 DiffVector[0] = EdgeNode2[0] - NewIntersectionNode.
Coordinates[0];
1122 DiffVector[1] = EdgeNode2[1] - NewIntersectionNode.
Coordinates[1];
1123 DiffVector[2] = EdgeNode2[2] - NewIntersectionNode.
Coordinates[2];
1124 NormDiffVector =
norm_2(DiffVector);
1126 if( NormDiffVector < epsilon )
1144 rResultNormal *= 0.5;
1152 unsigned int NumberIntersectionsOnTetCorner )
1154 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure;
1157 FillIntNodesContainer(IntersectedTetEdges,NodesOfApproximatedStructure);
1160 if( NodesOfApproximatedStructure.size() == 1 && NumberIntersectionsOnTetCorner == 1 )
1162 CalcSignedDistancesToOneIntNode(i_fluid_Element,NodesOfApproximatedStructure,ElementalDistances);
1163 i_fluid_Element->GetValue(SPLIT_ELEMENT) =
true;
1167 if( NodesOfApproximatedStructure.size() == 2 && NumberIntersectionsOnTetCorner == 2 )
1169 CalcSignedDistancesToTwoIntNodes(i_fluid_Element,NodesOfApproximatedStructure,ElementalDistances);
1170 i_fluid_Element->GetValue(SPLIT_ELEMENT) =
true;
1174 if( NodesOfApproximatedStructure.size() == 3 )
1176 CalcSignedDistancesToThreeIntNodes(i_fluid_Element,NodesOfApproximatedStructure,ElementalDistances);
1177 i_fluid_Element->GetValue(SPLIT_ELEMENT) =
true;
1181 if( NodesOfApproximatedStructure.size() > 3 )
1183 CalcSignedDistancesToMoreThanThreeIntNodes(i_fluid_Element,NodesOfApproximatedStructure,ElementalDistances,IntersectedTetEdges);
1184 i_fluid_Element->GetValue(SPLIT_ELEMENT) =
true;
1188 if( i_fluid_Element->GetValue(SPLIT_ELEMENT) ==
true )
1189 AvoidZeroDistances(i_fluid_Element, ElementalDistances);
1192 if( i_fluid_Element->GetValue(SPLIT_ELEMENT) ==
true )
1193 i_fluid_Element->GetValue(ELEMENTAL_DISTANCES) = ElementalDistances;
1200 std::vector<IntersectionNodeStruct>& NodesOfApproximatedStructure )
1202 const unsigned int NumberCutEdges = IntersectedTetEdges.size();
1204 for(
unsigned int i_TetEdge = 0 ; i_TetEdge < NumberCutEdges ; i_TetEdge++)
1206 unsigned int NumberIntNodes = IntersectedTetEdges[i_TetEdge].IntNodes.size();
1208 for(
unsigned int i_IntNode = 0 ; i_IntNode < NumberIntNodes ; i_IntNode++ )
1210 NodesOfApproximatedStructure.push_back(IntersectedTetEdges[i_TetEdge].IntNodes[i_IntNode]);
1219 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
1225 P1.
Coordinates() = NodesOfApproximatedStructure[0].Coordinates;
1230 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1232 ElementalDistances[i_TetNode] = PointDistanceToPlane(P1, Normal, rFluidGeom[i_TetNode]);
1240 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
1246 P1.
Coordinates() = NodesOfApproximatedStructure[0].Coordinates;
1249 array_1d<double,3> NormalAtIntersectionNode1 = NodesOfApproximatedStructure[0].StructElemNormal;
1250 array_1d<double,3> NormalAtIntersectionNode2 = NodesOfApproximatedStructure[1].StructElemNormal;
1254 Normal[0] = 0.5*(NormalAtIntersectionNode1[0] + NormalAtIntersectionNode2[0]);
1255 Normal[1] = 0.5*(NormalAtIntersectionNode1[1] + NormalAtIntersectionNode2[1]);
1256 Normal[2] = 0.5*(NormalAtIntersectionNode1[2] + NormalAtIntersectionNode2[2]);
1260 const array_1d<double,3> NormalAtOneIntersectionNode = NodesOfApproximatedStructure[0].StructElemNormal;
1262 bool NormalWrongOriented =
false;
1263 if(
inner_prod(NormalAtOneIntersectionNode,Normal)<0)
1264 NormalWrongOriented =
true;
1267 if(NormalWrongOriented)
1271 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1273 ElementalDistances[i_TetNode] = PointDistanceToPlane(P1, Normal, rFluidGeom[i_TetNode]);
1281 std::vector<IntersectionNodeStruct>& NodesOfApproximatedStructure,
1290 P1.
Coordinates() = NodesOfApproximatedStructure[0].Coordinates;
1291 P2.
Coordinates() = NodesOfApproximatedStructure[1].Coordinates;
1292 P3.
Coordinates() = NodesOfApproximatedStructure[2].Coordinates;
1295 CalculateNormal3D(P1,P2,P3,Normal);
1299 const array_1d<double,3> NormalAtOneIntersectionNode = NodesOfApproximatedStructure[0].StructElemNormal;
1301 bool NormalWrongOriented =
false;
1302 if(
inner_prod(NormalAtOneIntersectionNode,Normal)<0)
1303 NormalWrongOriented =
true;
1306 if(NormalWrongOriented)
1310 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1312 ElementalDistances[i_TetNode] = PointDistanceToPlane(P1, Normal, rFluidGeom[i_TetNode] );
1320 std::vector<IntersectionNodeStruct> NodesOfApproximatedStructure,
1322 std::vector<TetEdgeStruct>& IntersectedTetEdges )
1324 unsigned int numberCutEdges = NodesOfApproximatedStructure.size();
1328 for(
unsigned int k=0;
k<numberCutEdges;
k++)
1329 for(
unsigned int i=0;
i<3;
i++)
1330 P_mean.
Coordinates()[
i] += NodesOfApproximatedStructure[
k].Coordinates[
i];
1332 for(
unsigned int i=0;
i<3;
i++)
1338 Matrix coordinates(numberCutEdges,3);
1339 for(
unsigned int i=0;
i<numberCutEdges;
i++)
1340 for(
unsigned int j=0;
j<3;
j++)
1341 coordinates(
i,
j) = NodesOfApproximatedStructure[
i].Coordinates[
j] - P_mean[
j];
1348 EigenVectors(
A,
V, lambda);
1351 unsigned int min_pos = 0;
1352 double min_lambda = lambda[min_pos];
1353 for(
unsigned int i=1;
i<3;
i++)
1354 if(min_lambda > lambda[
i])
1356 min_lambda = lambda[
i];
1361 for(
unsigned int i=0;
i<3;
i++) N_mean[
i] =
V(min_pos,
i);
1362 N_mean /=
norm_2(N_mean);
1367 NormalAtOneIntersectionNode = NodesOfApproximatedStructure[0].StructElemNormal;
1369 bool NormalWrongOriented =
false;
1370 if(
inner_prod(NormalAtOneIntersectionNode,N_mean)<0)
1371 NormalWrongOriented =
true;
1374 if(NormalWrongOriented)
1378 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1380 ElementalDistances[i_TetNode] = PointDistanceToPlane(P_mean, N_mean, i_fluid_Element->GetGeometry()[i_TetNode] );
1384 unsigned int numberDoubleCutEdges = 0;
1385 unsigned int indexDoubleCutEdge = 0;
1388 for(
unsigned int i_TetEdge = 0 ; i_TetEdge < IntersectedTetEdges.size() ; i_TetEdge++)
1390 unsigned int NumberIntNodes = IntersectedTetEdges[i_TetEdge].IntNodes.size();
1391 if(NumberIntNodes == 2)
1393 numberDoubleCutEdges++;
1394 indexDoubleCutEdge = i_TetEdge;
1398 if((numberDoubleCutEdges >= 1))
1400 array_1d<double,3> normal_1 = IntersectedTetEdges[indexDoubleCutEdge].IntNodes[0].StructElemNormal;
1401 array_1d<double,3> normal_2 = IntersectedTetEdges[indexDoubleCutEdge].IntNodes[1].StructElemNormal;
1404 normal_1 /=
norm_2(normal_1);
1405 normal_2 /=
norm_2(normal_2);
1407 const double pi = 3.1415926;
1410 double angle_n1n2 = acos(
inner_prod(normal_1,normal_2) );
1412 angle_n1n2 *= 180 /
pi;
1415 if( (angle_n1n2 > -60) && (angle_n1n2 < 120) )
1418 N_mean = 0.5 * (normal_1 + normal_2);
1422 N_mean = 0.5 * (normal_1 - normal_2);
1426 for(
unsigned int i_TetNode = 0 ; i_TetNode < 4 ; i_TetNode++)
1428 ElementalDistances[i_TetNode] = PointDistanceToPlane(P_mean, N_mean, i_fluid_Element->GetGeometry()[i_TetNode] );
1451 const double sn =
inner_prod(planeToPointVec,planeNormal);
1453 double DistanceToPlane = sn / sqrt(
sd);
1455 if( fabs(DistanceToPlane) < epsilon )
1456 DistanceToPlane = 0;
1458 return DistanceToPlane;
1468 i_fluid_Element != mrFluidModelPart.ElementsEnd();
1472 const Vector& ElementalDistances = i_fluid_Element->GetValue(ELEMENTAL_DISTANCES);
1475 for(
unsigned int i_TetNode = 0; i_TetNode < 4; i_TetNode++ )
1477 double currentNodeDist = geom[i_TetNode].GetSolutionStepValue(DISTANCE);
1478 double nodeInElemDist = ElementalDistances[i_TetNode];
1480 if( fabs( nodeInElemDist ) < fabs( currentNodeDist ) )
1481 geom[i_TetNode].GetSolutionStepValue(DISTANCE) = nodeInElemDist;
1500 double dist_limit = 1
e-5;
1520 for(
unsigned int i_node = 0; i_node < 4; i_node++)
1522 double & di = ElementalDistances[i_node];
1523 if(fabs(di) < dist_limit)
1525 if(di >= 0) di = dist_limit;
1526 else di = -dist_limit;
1540 unsigned int id_node = mrFluidModelPart.NumberOfNodes() + 1;
1541 unsigned int id_condition = mrFluidModelPart.NumberOfConditions() + 1;
1543 mrNewSkinModelPart.
Nodes().
reserve(mrFluidModelPart.Nodes().size());
1547 i_fluid_element != mrFluidModelPart.ElementsEnd();
1550 bool is_split = i_fluid_element->Is(TO_SPLIT);
1551 if(is_split ==
true)
1553 const Vector& distances = i_fluid_element->GetValue(ELEMENTAL_DISTANCES);
1557 std::vector< Point > edge_points;
1561 for(
unsigned int i=0;
i<3;
i++)
1563 for(
unsigned int j=
i+1;
j<4;
j++)
1565 double di = distances[
i];
1566 double dj = distances[
j];
1571 double Ni = fabs(dj) / ( fabs(di) + fabs(dj) );
1572 double Nj = 1.0 - Ni;
1573 Point edge_point(Ni * geom[
i] + Nj * geom[
j]);
1574 edge_points.push_back(edge_point);
1580 if(edge_points.size() == 3)
1583 Node::Pointer pnode1 = mrNewSkinModelPart.
CreateNewNode(id_node++,edge_points[0].
X(),edge_points[0].
Y(),edge_points[0].
Z());
1584 Node::Pointer pnode2 = mrNewSkinModelPart.
CreateNewNode(id_node++,edge_points[1].
X(),edge_points[1].
Y(),edge_points[1].
Z());
1585 Node::Pointer pnode3 = mrNewSkinModelPart.
CreateNewNode(id_node++,edge_points[2].
X(),edge_points[2].
Y(),edge_points[2].
Z());
1592 Properties::Pointer properties = mrNewSkinModelPart.
rProperties()(0);
1593 Condition::Pointer p_condition = rReferenceCondition.
Create(id_condition++, triangle, properties);
1599 if(edge_points.size() == 4)
1625 double max_angle = 0.0;
1626 double min_angle = 0.0;
1627 unsigned int min_pos = 1;
1628 unsigned int max_pos = 1;
1629 for(
unsigned int i=1;
i<3;
i++)
1631 if(angles[
i] < min_angle)
1634 min_angle = angles[
i];
1636 else if(angles[
i] > max_angle)
1639 max_angle = angles[
i];
1644 unsigned int center_pos = 0;
1645 for(
unsigned int i=1;
i<4;
i++)
1647 if((
i!= min_pos) && (
i!=max_pos))
1652 Node::Pointer pnode1 = mrNewSkinModelPart.
CreateNewNode(id_node++,edge_points[0].
X(),edge_points[0].
Y(),edge_points[0].
Z());
1653 Node::Pointer pnode2 = mrNewSkinModelPart.
CreateNewNode(id_node++,edge_points[min_pos].
X(),edge_points[min_pos].
Y(),edge_points[min_pos].
Z());
1654 Node::Pointer pnode3 = mrNewSkinModelPart.
CreateNewNode(id_node++,edge_points[center_pos].
X(),edge_points[center_pos].
Y(),edge_points[center_pos].
Z());
1655 Node::Pointer pnode4 = mrNewSkinModelPart.
CreateNewNode(id_node++,edge_points[max_pos].
X(),edge_points[max_pos].
Y(),edge_points[max_pos].
Z());
1664 Properties::Pointer properties = mrNewSkinModelPart.
rProperties()(0);
1666 Condition::Pointer p_condition1 = rReferenceCondition.
Create(id_condition++, triangle1, properties);
1667 Condition::Pointer p_condition2 = rReferenceCondition.
Create(id_condition++, triangle2, properties);
1684 Timer::Start(
"Generating Octree");
1686 auto temp_octree = Kratos::make_shared<OctreeType>();
1688 mpOctree.swap(temp_octree);
1693 for (
int i = 0 ;
i < 3;
i++)
1695 low[
i] = high[
i] = mrFluidModelPart.NodesBegin()->Coordinates()[
i];
1700 i_node != mrFluidModelPart.NodesEnd();
1704 for (
int i = 0 ;
i < 3;
i++)
1706 low[
i] = r_coordinates[
i] < low[
i] ? r_coordinates[
i] : low[
i];
1707 high[
i] = r_coordinates[
i] > high[
i] ? r_coordinates[
i] : high[
i];
1713 i_node != mrSkinModelPart.NodesEnd();
1717 for (
int i = 0 ;
i < 3;
i++)
1719 low[
i] = r_coordinates[
i] < low[
i] ? r_coordinates[
i] : low[
i];
1720 high[
i] = r_coordinates[
i] > high[
i] ? r_coordinates[
i] : high[
i];
1724 mpOctree->SetBoundingBox(low,high);
1730 i_node != mrSkinModelPart.NodesEnd();
1733 double temp_point[3];
1734 temp_point[0] = i_node->X();
1735 temp_point[1] = i_node->Y();
1736 temp_point[2] = i_node->Z();
1737 mpOctree->Insert(temp_point);
1744 i_element != mrSkinModelPart.ElementsEnd();
1747 mpOctree->Insert(*(i_element).base());
1750 Timer::Stop(
"Generating Octree");
1768 Timer::Start(
"Generating Nodes");
1769 std::vector<OctreeType::cell_type*> all_leaves;
1770 mpOctree->GetAllLeavesVector(all_leaves);
1772 int leaves_size = all_leaves.size();
1774 #pragma omp parallel for
1775 for (
int i = 0;
i < leaves_size;
i++)
1777 *(all_leaves[
i]->pGetDataPointer()) = ConfigurationType::AllocateData();
1781 std::size_t last_id = mrBodyModelPart.NumberOfNodes() + 1;
1783 for (std::size_t
i = 0;
i < all_leaves.size();
i++)
1786 GenerateCellNode(cell, last_id);
1789 Timer::Stop(
"Generating Nodes");
1798 for (
int i_pos=0; i_pos < 8; i_pos++)
1805 (*(pCell->
pGetData()))[i_pos]->
Id() = LastId++;
1807 mOctreeNodes.push_back((*(pCell->
pGetData()))[i_pos]);
1809 SetNodeInNeighbours(pCell,i_pos,(*(pCell->
pGetData()))[i_pos]);
1821 pCell->
GetKey(Position, point_key);
1823 for (std::size_t i_direction = 0; i_direction < 8; i_direction++) {
1826 CellType* neighbour_cell = mpOctree->pGetCell(neighbour_key);
1827 if (!neighbour_cell || (neighbour_cell == pCell))
1831 if((*neighbour_cell->
pGetData())[position])
1833 std::cout <<
"ERROR!! Bad Position calculated!!!!!!!!!!! position :" << position << std::endl;
1837 (*neighbour_cell->
pGetData())[position] = pNode;
1847 Timer::Start(
"Calculate Distances2");
1849 int nodes_size = nodes.size();
1855 std::vector<CellType*> leaves;
1857 mpOctree->GetAllLeavesVector(leaves);
1863 #pragma omp parallel for firstprivate(nodes_size)
1864 for(
int i = 0 ;
i < nodes_size ;
i++)
1866 CalculateNodeDistance(*(nodes[
i]));
1868 Timer::Stop(
"Calculate Distances2");
1922 Timer::Start(
"Calculate Distances");
1924 int nodes_size = nodes.size();
1926 #pragma omp parallel for firstprivate(nodes_size)
1927 for(
int i = 0 ;
i < nodes_size ;
i++)
1928 nodes[
i]->Distance() = 1.00;
1931 std::vector<CellType*> leaves;
1933 mpOctree->GetAllLeavesVector(leaves);
1934 int leaves_size = leaves.size();
1936 for(
int i = 0 ;
i < leaves_size ;
i++)
1937 CalculateNotEmptyLeavesDistance(leaves[
i]);
1939 for(
int i_direction = 0 ; i_direction < 1 ; i_direction++)
1943 for(
int i = 0 ;
i < nodes_size ;
i++)
1945 if(nodes[
i]->
X() < 1.00 && nodes[
i]->
Y() < 1.00 && nodes[
i]->
Z() < 1.00)
1947 CalculateDistance(*(nodes[
i]), i_direction);
1950 Timer::Stop(
"Calculate Distances");
1956 double coords[3] = {rNode.
X(), rNode.
Y(), rNode.
Z()};
1963 typedef std::vector<std::pair<double, triangle_type*> > intersections_container_type;
1965 intersections_container_type intersections;
1969 const double epsilon = 1
e-12;
1971 double distance = 1.0;
1974 double ray[3] = {coords[0], coords[1], coords[2]};
1976 mpOctree->NormalizeCoordinates(ray);
1977 ray[i_direction] = 0;
1980 GetIntersectionsAndNodes(ray, i_direction, intersections, nodes_array);
1982 for (std::size_t i_node = 0; i_node < nodes_array.size() ; i_node++)
1984 double coord = (*nodes_array[i_node])[i_direction];
1988 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
1989 while (i_intersection != intersections.end()) {
1990 double d = coord - i_intersection->first;
1993 ray_color = -ray_color;
1995 }
else if (
d > -epsilon) {
2007 distance *= ray_color;
2009 double& node_distance = nodes_array[i_node]->Distance();
2010 if(fabs(distance) < fabs(node_distance))
2011 node_distance = distance;
2012 else if (distance*node_distance < 0.00)
2013 node_distance = -node_distance;
2027 if (objects->empty())
2031 for (
int i_pos=0; i_pos < 8; i_pos++)
2033 double distance = 1.00;
2035 for(object_container_type::iterator i_object = objects->begin(); i_object != objects->end(); i_object++)
2040 double cell_point[3];
2041 mpOctree->CalculateCoordinates(
keys,cell_point);
2043 double d = GeometryUtils::PointDistanceToTriangle3D((*i_object)->GetGeometry()[0], (*i_object)->GetGeometry()[1], (*i_object)->GetGeometry()[2],
Point(cell_point[0], cell_point[1], cell_point[2]));
2049 double& node_distance = (*(pCell->
pGetData()))[i_pos]->Distance();
2050 if(distance < node_distance)
2051 node_distance = distance;
2059 double coord[3] = {rNode.
X(), rNode.
Y(), rNode.
Z()};
2060 double distance = DistancePositionInSpace(coord);
2066 if (distance*node_distance < 0.00)
2067 node_distance = -node_distance;
2099 typedef std::vector<std::pair<double, triangle_type*> > intersections_container_type;
2101 intersections_container_type intersections;
2104 const double epsilon = 1
e-12;
2106 double distances[3] = {1.0, 1.0, 1.0};
2108 for (
int i_direction = 0; i_direction <
dimension; i_direction++)
2111 double ray[3] = {coords[0], coords[1], coords[2]};
2113 mpOctree->NormalizeCoordinates(ray);
2114 ray[i_direction] = 0;
2116 GetIntersections(ray, i_direction, intersections);
2124 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
2125 while (i_intersection != intersections.end()) {
2126 double d = coords[i_direction] - i_intersection->first;
2129 ray_color = -ray_color;
2130 distances[i_direction] =
d;
2138 }
else if (
d > -epsilon) {
2139 distances[i_direction] = 0.00;
2142 if(distances[i_direction] > -
d)
2143 distances[i_direction] = -
d;
2150 distances[i_direction] *= ray_color;
2159 double distance = (fabs(distances[0]) > fabs(distances[1])) ? distances[1] : distances[0];
2160 distance = (fabs(distance) > fabs(distances[2])) ? distances[2] : distance;
2172 const double epsilon = 1.00e-12;
2175 intersections.clear();
2184 ray_key[direction] = 0;
2188 std::size_t position = cell->GetLocalPosition(ray_key);
2190 cell->GetKey(position, node_key);
2191 if((node_key[0] == ray_key[0]) && (node_key[1] == ray_key[1]) && (node_key[2] == ray_key[2]))
2193 if(cell->pGetData())
2195 if(cell->pGetData()->size() > position)
2201 rNodesArray.push_back(p_node);
2211 GetCellIntersections(cell, ray, ray_key, direction, intersections);
2243 if (cell->GetNeighbourKey(1 + direction * 2, cell_key)) {
2244 ray_key[direction] = cell_key[direction];
2246 ray_key[direction] -= 1 ;
2263 if (!intersections.empty()) {
2265 std::sort(intersections.begin(), intersections.end());
2267 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_begin = intersections.begin();
2268 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
2269 while (++i_begin != intersections.end()) {
2271 if (fabs(i_begin->first - i_intersection->first) > epsilon)
2272 *(++i_intersection) = *i_begin;
2274 intersections.resize((++i_intersection) - intersections.begin());
2279 void GetIntersections(
double* ray,
int direction, std::vector<std::pair<double,Element::GeometryType*> >& intersections)
2285 const double epsilon = 1.00e-12;
2288 intersections.clear();
2301 GetCellIntersections(cell, ray, ray_key, direction, intersections);
2303 if (cell->GetNeighbourKey(1 + direction * 2, cell_key)) {
2304 ray_key[direction] = cell_key[direction];
2306 ray_key[direction] -= 1 ;
2321 if (!intersections.empty()) {
2323 std::sort(intersections.begin(), intersections.end());
2325 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_begin = intersections.begin();
2326 std::vector<std::pair<double, Element::GeometryType*> >::iterator i_intersection = intersections.begin();
2327 while (++i_begin != intersections.end()) {
2329 if (fabs(i_begin->first - i_intersection->first) > epsilon)
2330 *(++i_intersection) = *i_begin;
2332 intersections.resize((++i_intersection) - intersections.begin());
2339 std::vector<std::pair<double, Element::GeometryType*> >& intersections) {
2350 if (objects->empty())
2355 double ray_point1[3] = {ray[0], ray[1], ray[2]};
2356 double ray_point2[3] = {ray[0], ray[1], ray[2]};
2357 double normalized_coordinate;
2358 mpOctree->CalculateCoordinateNormalized(ray_key[direction], normalized_coordinate);
2359 ray_point1[direction] = normalized_coordinate;
2360 ray_point2[direction] = ray_point1[direction] + mpOctree->CalcSizeNormalized(cell);
2362 mpOctree->ScaleBackToOriginalCoordinate(ray_point1);
2363 mpOctree->ScaleBackToOriginalCoordinate(ray_point2);
2365 for (object_container_type::iterator i_object = objects->begin(); i_object != objects->end(); i_object++) {
2366 double intersection[3]={0.00,0.00,0.00};
2368 int is_intersected = IntersectionTriangleSegment((*i_object)->GetGeometry(), ray_point1, ray_point2, intersection);
2370 if (is_intersected == 1)
2371 intersections.push_back(std::pair<double, Element::GeometryType*>(intersection[direction], &((*i_object)->GetGeometry())));
2383 const double epsilon = 1.00e-12;
2391 u = rGeometry[1] - rGeometry[0];
2392 v = rGeometry[2] - rGeometry[0];
2399 double triangle_origin_distance = -
inner_prod(
n, rGeometry[0]);
2400 Point ray_point_1, ray_point_2;
2402 for(
int i = 0 ;
i < 3 ;
i++)
2404 dir[
i] = RayPoint2[
i] - RayPoint1[
i];
2405 w0[
i] = RayPoint1[
i] - rGeometry[0][
i];
2406 ray_point_1[
i] = RayPoint1[
i];
2407 ray_point_2[
i] = RayPoint2[
i];
2410 double sign_distance_1 =
inner_prod(
n, ray_point_1) + triangle_origin_distance;
2411 double sign_distance_2 =
inner_prod(
n, ray_point_2) + triangle_origin_distance;
2413 if (sign_distance_1*sign_distance_2 > epsilon)
2418 if (fabs(
b) < epsilon) {
2430 for(
int i = 0 ;
i < 3 ;
i++)
2431 IntersectionPoint[
i] = RayPoint1[
i] + r *
dir[
i];
2434 double uu, uv, vv, wu, wv, D;
2440 for(
int i = 0 ;
i < 3 ;
i++)
2441 w[
i] = IntersectionPoint[
i] - rGeometry[0][
i];
2446 D = uv * uv - uu * vv;
2450 s = (uv * wv - vv * wu) / D;
2451 if (s < 0.0 - epsilon || s > 1.0 + epsilon)
2453 t = (uv * wu - uu * wv) / D;
2454 if (
t < 0.0 - epsilon || (s +
t) > 1.0 + epsilon)
2478 return "CalculateSignedDistanceTo3DSkinProcess";
2484 rOStream <<
"CalculateSignedDistanceTo3DSkinProcess";
2493 std::vector<CellType*> leaves;
2495 mpOctree->GetAllLeavesVector(leaves);
2497 std::cout <<
"writing " << leaves.size() <<
" leaves" << std::endl;
2498 rOStream <<
"MESH \"leaves\" dimension 3 ElemType Hexahedra Nnode 8" << std::endl;
2499 rOStream <<
"# color 96 96 96" << std::endl;
2500 rOStream <<
"Coordinates" << std::endl;
2501 rOStream <<
"# node number coordinate_x coordinate_y coordinate_z " << std::endl;
2503 for(DistanceSpatialContainersConfigure::data_type::const_iterator i_node = mOctreeNodes.begin() ; i_node != mOctreeNodes.end() ; i_node++)
2505 rOStream << (*i_node)->Id() <<
" " << (*i_node)->X() <<
" " << (*i_node)->Y() <<
" " << (*i_node)->Z() << std::endl;
2508 std::cout <<
"Nodes written..." << std::endl;
2509 rOStream <<
"end coordinates" << std::endl;
2510 rOStream <<
"Elements" << std::endl;
2511 rOStream <<
"# Element node_1 node_2 node_3 material_number" << std::endl;
2513 for (std::size_t
i = 0;
i < leaves.size();
i++) {
2514 if ((leaves[
i]->pGetData()))
2519 for(
int j = 0 ;
j < 8 ;
j++)
2520 rOStream <<
" " << nodes[
j]->Id();
2521 rOStream << std::endl;
2524 rOStream <<
"end Elements" << std::endl;
2529 std::vector<CellType*> leaves;
2531 mpOctree->GetAllLeavesVector(leaves);
2533 rOStream <<
"GiD Post Results File 1.0" << std::endl << std::endl;
2535 rOStream <<
"Result \"Distance\" \"Kratos\" 1 Scalar OnNodes" << std::endl;
2537 rOStream <<
"Values" << std::endl;
2539 for(DistanceSpatialContainersConfigure::data_type::const_iterator i_node = mOctreeNodes.begin() ; i_node != mOctreeNodes.end() ; i_node++)
2541 rOStream << (*i_node)->Id() <<
" " << (*i_node)->Distance() << std::endl;
2543 rOStream <<
"End Values" << std::endl;
2607 static const double epsilon;
2626 for(
int i=0;
i<3;
i++)
2627 for(
int j=0;
j<3;
j++)
2628 Help(
i,
j)= Help(
i,
j);
2631 vectors.
resize(Help.size1(),Help.size2(),
false);
2633 lambda.
resize(Help.size1(),
false);
2635 Matrix HelpDummy(Help.size1(),Help.size2());
2637 bool is_converged =
false;
2641 for(
unsigned int i=0;
i< Help.size1();
i++)
2646 Matrix VDummy(Help.size1(),Help.size2());
2648 Matrix Rotation(Help.size1(),Help.size2());
2658 unsigned int index1= 0;
2660 unsigned int index2= 1;
2662 for(
unsigned int i=0;
i< Help.size1();
i++)
2664 for(
unsigned int j=(
i+1);
j< Help.size2();
j++)
2666 if((fabs(Help(
i,
j)) >
a ) && (fabs(Help(
i,
j)) > zero_tolerance))
2673 is_converged=
false;
2685 double gamma= (Help(index2,index2)-Help(index1,index1))/(2*Help(index1,index2));
2689 if(fabs(
gamma) > zero_tolerance && fabs(
gamma)< (1/zero_tolerance))
2695 if (fabs(
gamma)>= (1.0/zero_tolerance))
2699 double c= 1.0/(sqrt(1.0+
u*
u));
2703 double teta= s/(1.0+
c);
2708 HelpDummy(index2,index2)= Help(index2,index2)+
u*Help(index1,index2);
2709 HelpDummy(index1,index1)= Help(index1,index1)-
u*Help(index1,index2);
2710 HelpDummy(index1,index2)= 0.0;
2711 HelpDummy(index2,index1)= 0.0;
2713 for(
unsigned int i=0;
i<Help.size1();
i++)
2715 if((
i!= index1) && (
i!= index2))
2717 HelpDummy(index2,
i)=Help(index2,
i)+s*(Help(index1,
i)- teta*Help(index2,
i));
2718 HelpDummy(
i,index2)=Help(index2,
i)+s*(Help(index1,
i)- teta*Help(index2,
i));
2720 HelpDummy(index1,
i)=Help(index1,
i)-s*(Help(index2,
i)+ teta*Help(index1,
i));
2721 HelpDummy(
i,index1)=Help(index1,
i)-s*(Help(index2,
i)+ teta*Help(index1,
i));
2730 Rotation(index2,index1)=-s;
2731 Rotation(index1,index2)=s;
2732 Rotation(index1,index1)=
c;
2733 Rotation(index2,index2)=
c;
2737 VDummy =
ZeroMatrix(Help.size1(), Help.size2());
2739 for(
unsigned int i=0;
i< Help.size1();
i++)
2741 for(
unsigned int j=0;
j< Help.size1();
j++)
2743 for(
unsigned int k=0;
k< Help.size1();
k++)
2745 VDummy(
i,
j) +=
V(
i,
k)*Rotation(
k,
j);
2754 std::cout<<
"########################################################"<<std::endl;
2755 std::cout<<
"Max_Iterations exceed in Jacobi-Seidel-Iteration (eigenvectors)"<<std::endl;
2756 std::cout<<
"########################################################"<<std::endl;
2759 for(
unsigned int i=0;
i< Help.size1();
i++)
2761 for(
unsigned int j=0;
j< Help.size1();
j++)
2763 vectors(
i,
j)=
V(
j,
i);
2767 for(
unsigned int i=0;
i<Help.size1();
i++)
2768 lambda(
i)= Help(
i,
i);
2774 inline void CreatePartition(
unsigned int number_of_threads,
const int number_of_rows, DenseVector<unsigned int>& partitions)
2776 partitions.resize(number_of_threads + 1);
2777 int partition_size = number_of_rows / number_of_threads;
2779 partitions[number_of_threads] = number_of_rows;
2780 for (
unsigned int i = 1;
i < number_of_threads;
i++)
2781 partitions[
i] = partitions[
i - 1] + partition_size;
2809 CalculateSignedDistanceTo3DSkinProcess&
operator=(CalculateSignedDistanceTo3DSkinProcess
const& rOther);
2839 rOStream << std::endl;
2846 const double CalculateSignedDistanceTo3DSkinProcess::epsilon = 1
e-18;
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
This class is designed to allow the fast location of MANY points on the top of a 3D mesh.
Definition: binbased_fast_point_locator.h:68
ConfigureType::ResultIteratorType ResultIteratorType
Definition: binbased_fast_point_locator.h:82
ConfigureType::ResultContainerType ResultContainerType
Definition: binbased_fast_point_locator.h:81
void Execute() override
Executes the CalculateDiscontinuousDistanceToSkinProcess This method automatically does all the calls...
Definition: calculate_discontinuous_distance_to_skin_process.cpp:195
Calculates the nodal distances using elemental discontinuous distances.
Definition: calculate_distance_to_skin_process.h:40
Short class definition.
Definition: calculate_signed_distance_to_3d_skin_process.h:265
void GetIntersections(double *ray, int direction, std::vector< std::pair< double, Element::GeometryType * > > &intersections)
Definition: calculate_signed_distance_to_3d_skin_process.h:2279
DistanceSpatialContainersConfigure ConfigurationType
Definition: calculate_signed_distance_to_3d_skin_process.h:273
~CalculateSignedDistanceTo3DSkinProcess() override
Destructor.
Definition: calculate_signed_distance_to_3d_skin_process.h:301
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_skin_process.h:2337
void CalcElementDistances(ModelPart::ElementsContainerType::iterator &i_fluidElement, BoundedMatrix< unsigned int, 6, 2 > TetEdgeIndexTable)
Definition: calculate_signed_distance_to_3d_skin_process.h:871
void AveragePressureToNode(BinBasedFastPointLocator< 3 > &node_locator, Node &node)
Definition: calculate_signed_distance_to_3d_skin_process.h:694
Point PointType
Definition: calculate_signed_distance_to_3d_skin_process.h:277
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: calculate_signed_distance_to_3d_skin_process.h:2488
double PointDistanceToPlane(Point &planeBasePoint, array_1d< double, 3 > &planeNormal, Point &ToPoint)
Definition: calculate_signed_distance_to_3d_skin_process.h:1443
void Initialize()
Definition: calculate_signed_distance_to_3d_skin_process.h:813
void CalcSignedDistancesToMoreThanThreeIntNodes(ModelPart::ElementsContainerType::iterator &i_fluid_Element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, array_1d< double, 4 > &ElementalDistances, std::vector< TetEdgeStruct > &IntersectedTetEdges)
Definition: calculate_signed_distance_to_3d_skin_process.h:1319
CalculateSignedDistanceTo3DSkinProcess(ModelPart &rThisModelPartStruc, ModelPart &rThisModelPartFluid)
Constructor.
Definition: calculate_signed_distance_to_3d_skin_process.h:295
void CalcSignedDistancesToThreeIntNodes(ModelPart::ElementsContainerType::iterator &i_fluid_Element, std::vector< IntersectionNodeStruct > &NodesOfApproximatedStructure, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_skin_process.h:1280
ConfigurationType::cell_node_data_type CellNodeDataType
Definition: calculate_signed_distance_to_3d_skin_process.h:276
void SetNodeInNeighbours(CellType *pCell, int Position, CellNodeDataType *pNode)
Definition: calculate_signed_distance_to_3d_skin_process.h:1818
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_skin_process.h:903
void CalcDistanceTo3DSkin(std::vector< TetEdgeStruct > &IntersectedTetEdges, ModelPart::ElementsContainerType::iterator &i_fluid_Element, unsigned int NumberIntersectionsOnTetCorner)
Definition: calculate_signed_distance_to_3d_skin_process.h:1150
void CalcSignedDistancesToOneIntNode(ModelPart::ElementsContainerType::iterator &i_fluid_Element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_skin_process.h:1218
void GenerateOctree()
Definition: calculate_signed_distance_to_3d_skin_process.h:1682
void MappingPressureToStructure(BinBasedFastPointLocator< 3 > &node_locator)
Definition: calculate_signed_distance_to_3d_skin_process.h:359
int IntersectionTriangleSegment(Element::GeometryType &rGeometry, double *RayPoint1, double *RayPoint2, double *IntersectionPoint)
Definition: calculate_signed_distance_to_3d_skin_process.h:2378
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: calculate_signed_distance_to_3d_skin_process.h:323
KRATOS_CLASS_POINTER_DEFINITION(CalculateSignedDistanceTo3DSkinProcess)
Pointer definition of CalculateSignedDistanceTo3DSkinProcess.
bool StructuralElementNotYetConsidered(unsigned int IDCurrentStructElem, std::vector< unsigned int > &IntersectingStructElemID)
Definition: calculate_signed_distance_to_3d_skin_process.h:1019
void GenerateCellNode(CellType *pCell, std::size_t &LastId)
Definition: calculate_signed_distance_to_3d_skin_process.h:1796
OctreeBinary< CellType > OctreeType
Definition: calculate_signed_distance_to_3d_skin_process.h:275
bool IsNewIntersectionNode(IntersectionNodeStruct &NewIntersectionNode, std::vector< TetEdgeStruct > &IntersectedTetEdges)
Definition: calculate_signed_distance_to_3d_skin_process.h:1076
void CalculateNodeDistance(Node &rNode)
Definition: calculate_signed_distance_to_3d_skin_process.h:2057
void PrintGiDResults(std::ostream &rOStream) const
Definition: calculate_signed_distance_to_3d_skin_process.h:2528
std::string Info() const override
Turn back information as a string.
Definition: calculate_signed_distance_to_3d_skin_process.h:2476
void AssignMinimalNodalDistance()
Definition: calculate_signed_distance_to_3d_skin_process.h:1464
void CalculateNormal3D(Point &Point1, Point &Point2, Point &Point3, array_1d< double, 3 > &rResultNormal)
Definition: calculate_signed_distance_to_3d_skin_process.h:1135
bool IsIntersectionNodeOnTetEdge(double *IntersectionPoint, double *EdgeNode1, double *EdgeNode2)
Definition: calculate_signed_distance_to_3d_skin_process.h:1038
void operator()()
Definition: calculate_signed_distance_to_3d_skin_process.h:310
void DistanceFluidStructure()
Definition: calculate_signed_distance_to_3d_skin_process.h:765
void CalculateDistance(CellNodeDataType &rNode, int i_direction)
Definition: calculate_signed_distance_to_3d_skin_process.h:1954
void GetIntersectionsAndNodes(double *ray, int direction, std::vector< std::pair< double, Element::GeometryType * > > &intersections, DistanceSpatialContainersConfigure::data_type &rNodesArray)
Definition: calculate_signed_distance_to_3d_skin_process.h:2166
void CalculateDistance()
Definition: calculate_signed_distance_to_3d_skin_process.h:1920
void ComputeDiscontinuousInterpolation(const Node &pNode, Geometry< Node > &geom, const array_1d< double, 4 > &distances, array_1d< double, 4 > &Npos, array_1d< double, 4 > &Nneg)
Definition: calculate_signed_distance_to_3d_skin_process.h:531
OctreeType::cell_type::object_container_type object_container_type
always the point 3D
Definition: calculate_signed_distance_to_3d_skin_process.h:278
void AvoidZeroDistances(ModelPart::ElementsContainerType::iterator &Element, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_skin_process.h:1496
void SetIndexTable(BoundedMatrix< unsigned int, 6, 2 > &TetEdgeIndexTable)
Definition: calculate_signed_distance_to_3d_skin_process.h:851
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: calculate_signed_distance_to_3d_skin_process.h:2482
double DistancePositionInSpace(double *coords)
Definition: calculate_signed_distance_to_3d_skin_process.h:2093
void CalculateNotEmptyLeavesDistance(CellType *pCell)
Definition: calculate_signed_distance_to_3d_skin_process.h:2019
void PrintGiDMesh(std::ostream &rOStream) const
Definition: calculate_signed_distance_to_3d_skin_process.h:2492
void GenerateSkinModelPart(ModelPart &mrNewSkinModelPart)
Definition: calculate_signed_distance_to_3d_skin_process.h:1538
bool IsIntersectionOnCorner(IntersectionNodeStruct &NewIntersectionNode, double *EdgeNode1, double *EdgeNode2)
Definition: calculate_signed_distance_to_3d_skin_process.h:1106
void FillIntNodesContainer(std::vector< TetEdgeStruct > &IntersectedTetEdges, std::vector< IntersectionNodeStruct > &NodesOfApproximatedStructure)
Definition: calculate_signed_distance_to_3d_skin_process.h:1199
void GenerateNodes()
Definition: calculate_signed_distance_to_3d_skin_process.h:1766
OctreeBinaryCell< ConfigurationType > CellType
Definition: calculate_signed_distance_to_3d_skin_process.h:274
void CalculateDistance2()
Definition: calculate_signed_distance_to_3d_skin_process.h:1845
void CalcSignedDistancesToTwoIntNodes(ModelPart::ElementsContainerType::iterator &i_fluid_Element, std::vector< IntersectionNodeStruct > NodesOfApproximatedStructure, array_1d< double, 4 > &ElementalDistances)
Definition: calculate_signed_distance_to_3d_skin_process.h:1239
Base class for all Conditions.
Definition: condition.h:59
virtual Pointer Create(IndexType NewId, NodesArrayType const &ThisNodes, PropertiesType::Pointer pProperties) const
It creates a new condition pointer.
Definition: condition.h:205
Base class for all Elements.
Definition: element.h:60
Geometry base class.
Definition: geometry.h:71
SizeType size() const
Definition: geometry.h:518
virtual bool HasIntersection(const GeometryType &ThisGeometry) const
Definition: geometry.h:1453
void reserve(int dim)
Definition: geometry.h:558
This class is a vector which stores global pointers.
Definition: global_pointers_vector.h:61
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: global_pointers_vector.h:79
iterator begin()
Definition: global_pointers_vector.h:221
size_type size() const
Definition: global_pointers_vector.h:307
iterator end()
Definition: global_pointers_vector.h:229
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
KratosComponents class encapsulates a lookup table for a family of classes in a generic way.
Definition: kratos_components.h:49
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
NodeType::Pointer CreateNewNode(int Id, double x, double y, double z, VariablesList::Pointer pNewVariablesList, IndexType ThisIndex=0)
Definition: model_part.cpp:270
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
MeshType::NodeIterator NodeIterator
Definition: model_part.h:134
PropertiesContainerType & rProperties(IndexType ThisIndex=0)
Definition: model_part.h:1003
MeshType::ElementIterator ElementIterator
Definition: model_part.h:174
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
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
cell_type::key_type key_type
Definition: octree_binary.h:70
key_type CalcKeyNormalized(coordinate_type coordinate) const
Definition: octree_binary.h:199
cell_type * pGetCell(key_type *keys) const
Definition: octree_binary.h:429
Point class.
Definition: point.h:59
CoordinatesArrayType const & Coordinates() const
Definition: point.h:215
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
ptr_iterator ptr_begin()
Returns an iterator pointing to the beginning of the underlying data container.
Definition: pointer_vector_set.h:386
size_type size() const
Returns the number of elements in the container.
Definition: pointer_vector_set.h:502
void push_back(TPointerType x)
Adds a pointer to the end of the set.
Definition: pointer_vector_set.h:544
TContainerType ContainerType
Definition: pointer_vector_set.h:90
void reserve(int reservedsize)
Reserves memory for a specified number of elements.
Definition: pointer_vector_set.h:733
The base class for all processes in Kratos.
Definition: process.h:49
A four node 3D quadrilateral geometry with bi-linear shape functions.
Definition: quadrilateral_3d_4.h:76
double ShapeFunctionValue(IndexType ShapeFunctionIndex, const CoordinatesArrayType &rPoint) const override
Definition: quadrilateral_3d_4.h:1068
CoordinatesArrayType & PointLocalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rPoint) const override
Returns the local coordinates of a given arbitrary point.
Definition: quadrilateral_3d_4.h:522
A three node 3D triangle geometry with linear shape functions.
Definition: triangle_3d_3.h:77
double ShapeFunctionValue(IndexType ShapeFunctionIndex, const CoordinatesArrayType &rPoint) const override
Definition: triangle_3d_3.h:1348
CoordinatesArrayType & PointLocalCoordinates(CoordinatesArrayType &rResult, const CoordinatesArrayType &rPoint) const override
Returns the local coordinates of a given arbitrary point.
Definition: triangle_3d_3.h:917
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
std::ostream & operator<<(std::ostream &rOStream, const CalculateSignedDistanceTo3DSkinProcess &rThis)
output stream function
Definition: calculate_signed_distance_to_3d_skin_process.h:2835
std::istream & operator>>(std::istream &rIStream, CalculateSignedDistanceTo3DSkinProcess &rThis)
input stream function
sd
Definition: GenerateWind.py:148
pybind11::list keys(Parameters const &self)
Definition: add_kratos_parameters_to_python.cpp:32
void CalculateGeometryData(const GeometryType &rGeometry, const GeometryData::IntegrationMethod &rIntegrationMethod, Vector &rGaussWeights, Matrix &rNContainer, GeometryType::ShapeFunctionsGradientsType &rDN_DX)
Definition: rans_calculation_utilities.cpp:31
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
std::shared_ptr< T > shared_ptr
Definition: smart_pointers.h:27
AMatrix::MatrixProductExpression< TExpression1Type, TExpression2Type > prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:568
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
AMatrix::TransposeMatrix< const T > trans(const T &TheMatrix)
Definition: amatrix_interface.h:486
int max_iterations
Definition: ProjectParameters.py:53
def GetSolutionStepValue(entity, variable, solution_step_index)
Definition: coupling_interface_data.py:253
def CrossProduct(A, B)
Definition: define_wake_process_3d.py:13
v
Definition: generate_convection_diffusion_explicit_element.py:114
w
Definition: generate_convection_diffusion_explicit_element.py:108
V
Definition: generate_droplet_dynamics.py:256
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
float gamma
Definition: generate_two_fluid_navier_stokes.py:131
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
def Average(vector_container, current_values, k_calc, pp)
Definition: initial_time_bounds.py:102
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
A
Definition: sensitivityMatrix.py:70
p
Definition: sensitivityMatrix.py:52
N
Definition: sensitivityMatrix.py:29
integer i
Definition: TensorModule.f:17
integer l
Definition: TensorModule.f:17
double precision, public pi
Definition: TensorModule.f:16
e
Definition: run_cpp_mpi_tests.py:31
Definition: calculate_signed_distance_to_3d_skin_process.h:279
unsigned int EdgeNode1
Definition: calculate_signed_distance_to_3d_skin_process.h:282
array_1d< double, 3 > Coordinates
Definition: calculate_signed_distance_to_3d_skin_process.h:280
unsigned int EdgeNode2
Definition: calculate_signed_distance_to_3d_skin_process.h:283
array_1d< double, 3 > StructElemNormal
Definition: calculate_signed_distance_to_3d_skin_process.h:281
Definition: calculate_signed_distance_to_3d_skin_process.h:285
std::vector< IntersectionNodeStruct > IntNodes
Definition: calculate_signed_distance_to_3d_skin_process.h:286
Definition: mesh_converter.cpp:38