10 #if !defined(KRATOS_GENERATE_NEW_NODES_BEFORE_MESHING_PROCESS_H_INCLUDED)
11 #define KRATOS_GENERATE_NEW_NODES_BEFORE_MESHING_PROCESS_H_INCLUDED
69 : mrModelPart(rModelPart),
70 mrRemesh(rRemeshingParameters)
98 std::cout <<
" [ GENERATE NEW NODES for homomgeneous mesh: " << std::endl;
101 std::cout <<
" ModelPart Supplied do not corresponds to the Meshing Domain: (" << mrModelPart.
Name() <<
" != " << mrRemesh.
SubModelPartName <<
")" << std::endl;
104 double currentTime = rCurrentProcessInfo[TIME];
105 double timeInterval = rCurrentProcessInfo[DELTA_TIME];
108 bool refiningBox =
false;
117 if (currentTime < 2 * timeInterval)
119 mrRemesh.
Info->RemovedNodes = 0;
120 mrRemesh.
Info->BalancePrincipalSecondaryPartsNodes = 0;
123 std::cout <<
" First meshes: I repare the mesh without adding new nodes" << std::endl;
124 mrRemesh.
Info->InitialNumberOfNodes = mrRemesh.
Info->NumberOfNodes;
127 int ElementsToRefine = mrRemesh.
Info->RemovedNodes;
128 SizeType eulerianInletNodes = mrRemesh.
Info->NumberOfEulerianInletNodes;
130 int initialNumberOfNodes = mrRemesh.
Info->InitialNumberOfNodes;
131 int numberOfNodes = mrRemesh.
Info->NumberOfNodes;
132 int extraNodes = initialNumberOfNodes - numberOfNodes;
133 int toleredExtraNodes =
int(0.05 * mrRemesh.
Info->InitialNumberOfNodes);
137 if ((ElementsToRefine - extraNodes) > toleredExtraNodes && refiningBox ==
false)
139 ElementsToRefine = toleredExtraNodes + extraNodes;
140 if (ElementsToRefine < 0)
142 ElementsToRefine = 0;
147 if (ElementsToRefine > 0 && mEchoLevel > 1)
148 std::cout <<
" I will look for " << ElementsToRefine <<
" new nodes" << std::endl;
150 if (refiningBox ==
false)
153 if (ElementsToRefine > 0 || eulerianInletNodes > 0)
155 std::vector<array_1d<double, 3>> new_positions;
156 std::vector<double> biggest_volumes;
157 std::vector<array_1d<SizeType, 4>> nodes_id_to_interpolate;
161 new_positions.resize(ElementsToRefine);
162 biggest_volumes.resize(ElementsToRefine,
false);
163 nodes_id_to_interpolate.resize(ElementsToRefine);
165 for (
int nn = 0; nn < ElementsToRefine; nn++)
167 biggest_volumes[nn] = -1.0;
181 SizeType addedNodesAtEulerianInlet = 0;
182 ModelPart::ElementsContainerType::iterator element_begin = mrModelPart.
ElementsBegin();
183 for (ModelPart::ElementsContainerType::const_iterator ie = element_begin; ie != mrModelPart.
ElementsEnd(); ie++)
189 SelectEdgeToRefine2D(ie->GetGeometry(), new_positions, biggest_volumes, nodes_id_to_interpolate, CountNodes, ElementsToRefine, addedNodesAtEulerianInlet);
193 SelectEdgeToRefine3D(ie->GetGeometry(), new_positions, biggest_volumes, nodes_id_to_interpolate, CountNodes, ElementsToRefine, addedNodesAtEulerianInlet);
197 ElementsToRefine += addedNodesAtEulerianInlet;
199 mrRemesh.
Info->RemovedNodes -= ElementsToRefine;
200 if (CountNodes < ElementsToRefine)
202 mrRemesh.
Info->RemovedNodes += ElementsToRefine - CountNodes;
203 new_positions.resize(CountNodes);
204 biggest_volumes.resize(CountNodes,
false);
205 nodes_id_to_interpolate.resize(CountNodes);
208 CreateAndAddNewNodes(new_positions, nodes_id_to_interpolate, ElementsToRefine, maxId);
225 std::vector<array_1d<double, 3>> new_positions;
226 std::vector<array_1d<SizeType, 4>> nodes_id_to_interpolate;
230 new_positions.resize(0);
231 nodes_id_to_interpolate.resize(0);
233 ModelPart::ElementsContainerType::iterator element_begin = mrModelPart.
ElementsBegin();
234 int nodesInTransitionZone = 0;
235 for (ModelPart::ElementsContainerType::const_iterator ie = element_begin; ie != mrModelPart.
ElementsEnd(); ie++)
241 SelectEdgeToRefine2DWithRefinement(ie->GetGeometry(), new_positions, nodes_id_to_interpolate, CountNodes, ElementsToRefine, nodesInTransitionZone);
245 SelectEdgeToRefine3DWithRefinement(ie->GetGeometry(), new_positions, nodes_id_to_interpolate, CountNodes, ElementsToRefine, nodesInTransitionZone);
250 mrRemesh.
Info->RemovedNodes -= CountNodes;
251 if (CountNodes < ElementsToRefine)
253 mrRemesh.
Info->RemovedNodes += ElementsToRefine - CountNodes;
254 new_positions.resize(CountNodes);
255 nodes_id_to_interpolate.resize(CountNodes);
258 CreateAndAddNewNodes(new_positions, nodes_id_to_interpolate, CountNodes, maxId);
264 std::cout <<
" GENERATE NEW NODES ]; " << std::endl;
282 std::string
Info()
const override
284 return "GenerateNewNodesBeforeMeshingProcess";
290 rOStream <<
"GenerateNewNodesBeforeMeshingProcess";
329 for (
auto &p_dof : From)
336 std::vector<array_1d<double, 3>> &new_positions,
337 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
338 std::vector<Node::DofsContainerType> &NewDofs,
350 if (Element[
pn].
Is(RIGID))
354 if (Element[
pn].
Is(FREE_SURFACE))
359 double cosTolerance = 0.01;
361 if (rigidNodes == 2 && freesurfaceNodes == 0)
363 array_1d<double, 2> NormalA(2, 0.0);
364 array_1d<double, 2> NormalB(2, 0.0);
367 if ((Element[0].
Is(RIGID) && Element[1].
Is(RIGID)) || (Element[0].
Is(INLET) && Element[1].
Is(INLET)))
369 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
370 NormalB =
Element[1].FastGetSolutionStepValue(NORMAL);
371 cosAngle = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1];
372 if (cosAngle < cosTolerance && cosAngle > -cosTolerance)
374 array_1d<double, 3> new_position = (
Element[0].Coordinates() +
Element[1].Coordinates()) * 0.5;
375 nodes_id_to_interpolate[CountNodes][0] =
Element[0].GetId();
376 nodes_id_to_interpolate[CountNodes][1] =
Element[1].GetId();
377 if (Element[2].
IsNot(TO_ERASE))
379 nodes_id_to_interpolate[CountNodes][2] =
Element[2].GetId();
383 nodes_id_to_interpolate[CountNodes][2] =
Element[0].GetId();
385 CopyDofs(Element[2].GetDofs(), NewDofs[CountNodes]);
386 new_positions[CountNodes] = new_position;
390 else if (Element[0].
Is(RIGID) && Element[2].
Is(RIGID))
392 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
393 NormalB =
Element[2].FastGetSolutionStepValue(NORMAL);
394 cosAngle = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1];
395 if (cosAngle < cosTolerance && cosAngle > -cosTolerance)
397 array_1d<double, 3> new_position = (
Element[0].Coordinates() +
Element[1].Coordinates()) * 0.5;
398 nodes_id_to_interpolate[CountNodes][0] =
Element[0].GetId();
399 nodes_id_to_interpolate[CountNodes][1] =
Element[2].GetId();
400 if (Element[1].
IsNot(TO_ERASE))
402 nodes_id_to_interpolate[CountNodes][2] =
Element[1].GetId();
406 nodes_id_to_interpolate[CountNodes][2] =
Element[0].GetId();
408 CopyDofs(Element[1].GetDofs(), NewDofs[CountNodes]);
409 new_positions[CountNodes] = new_position;
413 else if (Element[1].
Is(RIGID) && Element[2].
Is(RIGID))
415 NormalA =
Element[1].FastGetSolutionStepValue(NORMAL);
416 NormalB =
Element[2].FastGetSolutionStepValue(NORMAL);
417 cosAngle = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1];
418 if (cosAngle < cosTolerance && cosAngle > -cosTolerance)
420 array_1d<double, 3> new_position = (
Element[2].Coordinates() +
Element[1].Coordinates()) * 0.5;
421 nodes_id_to_interpolate[CountNodes][0] =
Element[2].GetId();
422 nodes_id_to_interpolate[CountNodes][1] =
Element[1].GetId();
423 if (Element[0].
IsNot(TO_ERASE))
425 nodes_id_to_interpolate[CountNodes][2] =
Element[0].GetId();
429 nodes_id_to_interpolate[CountNodes][2] =
Element[2].GetId();
431 CopyDofs(Element[0].GetDofs(), NewDofs[CountNodes]);
432 new_positions[CountNodes] = new_position;
442 std::vector<array_1d<double, 3>> &new_positions,
443 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
444 std::vector<Node::DofsContainerType> &NewDofs,
457 if (Element[
pn].
Is(RIGID))
461 if (Element[
pn].
Is(FREE_SURFACE))
465 if (Element[
pn].
Is(TO_ERASE))
471 if (rigidNodes == 3 && freesurfaceNodes == 0 && toEraseNodes == 0)
473 array_1d<double, 3> NormalA(3, 0.0);
474 array_1d<double, 3> NormalB(3, 0.0);
475 double normNormalA = 0;
476 double normNormalB = 0;
479 array_1d<SizeType, 2> idsWallNodes(2, 0);
481 double cosTolerance = 0.1;
482 if (Element[0].
IsNot(RIGID))
484 NormalA =
Element[1].FastGetSolutionStepValue(NORMAL);
485 NormalB =
Element[2].FastGetSolutionStepValue(NORMAL);
486 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
487 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
488 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
489 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
497 NormalA =
Element[1].FastGetSolutionStepValue(NORMAL);
498 NormalB =
Element[3].FastGetSolutionStepValue(NORMAL);
499 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
500 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
501 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
502 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
510 NormalA =
Element[2].FastGetSolutionStepValue(NORMAL);
511 NormalB =
Element[3].FastGetSolutionStepValue(NORMAL);
512 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
513 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
514 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
515 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
523 else if (Element[1].
IsNot(RIGID))
525 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
526 NormalB =
Element[2].FastGetSolutionStepValue(NORMAL);
527 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
528 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
529 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
530 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
538 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
539 NormalB =
Element[3].FastGetSolutionStepValue(NORMAL);
540 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
541 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
542 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
543 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
551 NormalA =
Element[2].FastGetSolutionStepValue(NORMAL);
552 NormalB =
Element[3].FastGetSolutionStepValue(NORMAL);
553 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
554 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
555 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
556 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
564 else if (Element[2].
IsNot(RIGID))
567 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
568 NormalB =
Element[1].FastGetSolutionStepValue(NORMAL);
569 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
570 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
571 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
572 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
580 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
581 NormalB =
Element[3].FastGetSolutionStepValue(NORMAL);
582 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
583 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
584 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
585 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
593 NormalA =
Element[1].FastGetSolutionStepValue(NORMAL);
594 NormalB =
Element[3].FastGetSolutionStepValue(NORMAL);
595 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
596 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
597 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
598 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
606 else if (Element[3].
IsNot(RIGID))
609 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
610 NormalB =
Element[1].FastGetSolutionStepValue(NORMAL);
611 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
612 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
613 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
614 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
622 NormalA =
Element[0].FastGetSolutionStepValue(NORMAL);
623 NormalB =
Element[2].FastGetSolutionStepValue(NORMAL);
624 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
625 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
626 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
627 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
635 NormalA =
Element[1].FastGetSolutionStepValue(NORMAL);
636 NormalB =
Element[2].FastGetSolutionStepValue(NORMAL);
637 normNormalA = NormalA[0] * NormalA[0] + NormalA[1] * NormalA[1] + NormalA[2] * NormalA[2];
638 normNormalB = NormalB[0] * NormalB[0] + NormalB[1] * NormalB[1] + NormalB[2] * NormalB[2];
639 cos = NormalA[0] * NormalB[0] + NormalA[1] * NormalB[1] + NormalA[2] * NormalB[2];
640 if (cos < minCos && (cos < cosTolerance && cos > -cosTolerance) && (normNormalA > 0.99 && normNormalA < 1.01) && (normNormalB > 0.99 && normNormalB < 1.01))
649 if (minCos < cosTolerance && minCos > -cosTolerance)
652 bool alreadyAddedNode =
false;
655 double minimumDistanceToInstert = 1.3 * mrRemesh.
Refine->CriticalRadius;
656 array_1d<double, 3> CoorDifference =
Element[idsWallNodes[0]].Coordinates() -
Element[idsWallNodes[1]].Coordinates();
657 double SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1];
658 double separation = std::sqrt(SquaredLength);
660 if (separation > minimumDistanceToInstert)
663 for (
SizeType i = 0;
i < unsigned(CountNodes);
i++)
665 if (idA == nodes_id_to_interpolate[
i][0] || idA == nodes_id_to_interpolate[
i][1] || idB == nodes_id_to_interpolate[
i][0] || idB == nodes_id_to_interpolate[
i][1])
667 alreadyAddedNode =
true;
671 if (alreadyAddedNode ==
false)
673 array_1d<double, 3> new_position = (
Element[idsWallNodes[0]].Coordinates() +
Element[idsWallNodes[1]].Coordinates()) * 0.5;
674 nodes_id_to_interpolate[CountNodes][0] = idA;
675 nodes_id_to_interpolate[CountNodes][1] = idB;
676 if (Element[idFreeNode].
IsNot(TO_ERASE))
678 nodes_id_to_interpolate[CountNodes][2] = idC;
682 nodes_id_to_interpolate[CountNodes][2] = idA;
684 CopyDofs(Element[idFreeNode].GetDofs(), NewDofs[CountNodes]);
685 new_positions[CountNodes] = new_position;
696 std::vector<array_1d<double, 3>> &new_positions,
697 std::vector<double> &biggest_volumes,
698 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
700 int &ElementsToRefine,
701 SizeType &addedNodesAtEulerianInlet)
706 double meanMeshSize = mrRemesh.
Refine->CriticalRadius;
713 bool toEraseNodeFound =
false;
714 double rigidNodeLocalMeshSize = 0;
715 double rigidNodeMeshCounter = 0;
716 bool suitableElementForSecondAdd =
true;
720 if (Element[
pn].
Is(RIGID))
723 rigidNodeLocalMeshSize +=
Element[
pn].FastGetSolutionStepValue(NODAL_H_WALL);
724 rigidNodeMeshCounter += 1.0;
726 if (Element[
pn].
Is(BOUNDARY))
730 if (Element[
pn].
Is(TO_ERASE))
732 toEraseNodeFound =
true;
734 if (Element[
pn].
Is(FREE_SURFACE))
738 if (Element[
pn].
Is(PFEMFlags::LAGRANGIAN_INLET))
740 lagrangianInletNodes++;
742 if (Element[
pn].
Is(PFEMFlags::EULERIAN_INLET))
744 eulerianInletNodes++;
748 if (rigidNodeMeshCounter > 0)
750 const double rigidWallMeshSize = rigidNodeLocalMeshSize / rigidNodeMeshCounter;
751 const double ratio = rigidWallMeshSize / meanMeshSize;
752 const double tolerance = 1.8;
753 if (ratio > tolerance)
756 meanMeshSize += 0.5 * rigidWallMeshSize;
760 const double limitEdgeLength = 1.4 * meanMeshSize;
761 const double safetyCoefficient2D = 1.5;
762 double penalization = 1.0;
766 if (lagrangianInletNodes > 0)
771 else if (rigidNodes > 0 && freesurfaceNodes > 0 && eulerianInletNodes == 0)
775 else if (freesurfaceNodes > 0)
777 penalization = 0.875;
780 double ElementalVolume =
Element.Area();
782 array_1d<double, 3> Edges(3, 0.0);
783 array_1d<SizeType, 3> FirstEdgeNode(3, 0);
784 array_1d<SizeType, 3> SecondEdgeNode(3, 0);
785 double WallCharacteristicDistance = 0;
786 array_1d<double, 3> CoorDifference =
Element[1].Coordinates() -
Element[0].Coordinates();
787 double SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1];
788 Edges[0] = std::sqrt(SquaredLength);
789 FirstEdgeNode[0] = 0;
790 SecondEdgeNode[0] = 1;
791 if ((Element[0].
Is(RIGID) && Element[1].
Is(RIGID)) || (Element[0].
Is(INLET) && Element[1].
Is(INLET)))
793 WallCharacteristicDistance = Edges[0];
801 SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1];
803 Edges[Counter] = std::sqrt(SquaredLength);
804 FirstEdgeNode[Counter] =
j;
805 SecondEdgeNode[Counter] =
i;
806 if (((Element[
i].
Is(RIGID) && Element[
j].
Is(RIGID)) || (Element[
i].
Is(INLET) && Element[
j].
Is(INLET))) && Edges[Counter] > WallCharacteristicDistance)
808 WallCharacteristicDistance = Edges[Counter];
813 bool dangerousElement =
false;
819 if ((Edges[
i] < WallCharacteristicDistance * safetyCoefficient2D && (Element[FirstEdgeNode[
i]].
Is(RIGID) || Element[SecondEdgeNode[
i]].
Is(RIGID))) ||
820 ((Element[FirstEdgeNode[
i]].
Is(RIGID) && Element[SecondEdgeNode[
i]].
Is(RIGID)) || (Element[FirstEdgeNode[
i]].
Is(INLET) && Element[SecondEdgeNode[
i]].
Is(INLET))))
824 if ((Element[FirstEdgeNode[
i]].
Is(FREE_SURFACE) || Element[FirstEdgeNode[
i]].
Is(RIGID)) &&
825 (Element[SecondEdgeNode[
i]].
Is(FREE_SURFACE) || Element[SecondEdgeNode[
i]].
Is(RIGID)) &&
826 (Element[FirstEdgeNode[
i]].
IsNot(PFEMFlags::EULERIAN_INLET) && Element[SecondEdgeNode[
i]].
IsNot(PFEMFlags::EULERIAN_INLET)))
831 else if (rigidNodes == 0)
833 SizeType propertyIdFirstNode =
Element[FirstEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
834 SizeType propertyIdSecondNode =
Element[SecondEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
835 if (propertyIdFirstNode != propertyIdSecondNode)
841 if ((Edges[0] == 0 && Edges[1] == 0 && Edges[2] == 0) || rigidNodes == 3)
843 dangerousElement =
true;
846 if (dangerousElement ==
false && toEraseNodeFound ==
false)
849 double LargestEdge = 0;
853 if (Edges[
i] > LargestEdge)
856 LargestEdge = Edges[
i];
860 if (CountNodes < ElementsToRefine && LargestEdge > limitEdgeLength && eulerianInletNodes == 0)
863 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
865 bool suitableElement =
true;
866 for (
int j = 0;
j < CountNodes;
j++)
868 const double diffX = std::abs(new_positions[
j][0] - new_position[0]) - meanMeshSize * 0.5;
869 const double diffY = std::abs(new_positions[
j][1] - new_position[1]) - meanMeshSize * 0.5;
870 if (diffX < 0 && diffY < 0)
872 suitableElement =
false;
878 nodes_id_to_interpolate[CountNodes][0] =
Element[FirstEdgeNode[maxCount]].GetId();
879 nodes_id_to_interpolate[CountNodes][1] =
Element[SecondEdgeNode[maxCount]].GetId();
880 biggest_volumes[CountNodes] = ElementalVolume;
881 new_positions[CountNodes] = new_position;
885 else if (freesurfaceNodes < 3 && rigidNodes < 3 && eulerianInletNodes == 0)
887 ElementalVolume *= penalization;
888 for (
int nn = 0; nn < ElementsToRefine; nn++)
890 if (ElementalVolume > biggest_volumes[nn])
893 if (maxCount < 3 && LargestEdge > limitEdgeLength)
895 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
896 if (ElementsToRefine > 1 && CountNodes > 0)
898 for (
int j = 0;
j < ElementsToRefine;
j++)
900 const double diffX = std::abs(new_positions[
j][0] - new_position[0]) - meanMeshSize * 0.5;
901 const double diffY = std::abs(new_positions[
j][1] - new_position[1]) - meanMeshSize * 0.5;
902 if (diffX < 0 && diffY < 0)
904 suitableElementForSecondAdd =
false;
909 if (suitableElementForSecondAdd)
911 nodes_id_to_interpolate[nn][0] =
Element[FirstEdgeNode[maxCount]].GetId();
912 nodes_id_to_interpolate[nn][1] =
Element[SecondEdgeNode[maxCount]].GetId();
913 biggest_volumes[nn] = ElementalVolume;
914 new_positions[nn] = new_position;
923 if (eulerianInletNodes > 0 && LargestEdge > (2.0 * meanMeshSize))
926 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
928 bool suitableElement =
true;
929 for (
int j = 0;
j < CountNodes;
j++)
931 const double diffX = std::abs(new_positions[
j][0] - new_position[0]) - meanMeshSize * 0.5;
932 const double diffY = std::abs(new_positions[
j][1] - new_position[1]) - meanMeshSize * 0.5;
934 if ((diffX < 0 && diffY < 0) || (Element[FirstEdgeNode[maxCount]].
IsNot(INLET) && Element[SecondEdgeNode[maxCount]].
IsNot(INLET)))
937 suitableElement =
false;
943 if (CountNodes >= ElementsToRefine)
945 new_positions.resize(CountNodes + 1);
946 biggest_volumes.resize(CountNodes + 1,
false);
947 nodes_id_to_interpolate.resize(CountNodes + 1);
948 addedNodesAtEulerianInlet++;
950 nodes_id_to_interpolate[CountNodes][0] =
Element[FirstEdgeNode[maxCount]].GetId();
951 nodes_id_to_interpolate[CountNodes][1] =
Element[SecondEdgeNode[maxCount]].GetId();
952 biggest_volumes[CountNodes] = ElementalVolume;
953 new_positions[CountNodes] = new_position;
963 std::vector<array_1d<double, 3>> &new_positions,
964 std::vector<double> &biggest_volumes,
965 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
967 int &ElementsToRefine,
968 SizeType &addedNodesAtEulerianInlet)
973 double meanMeshSize = mrRemesh.
Refine->CriticalRadius;
979 bool toEraseNodeFound =
false;
980 double rigidNodeLocalMeshSize = 0;
981 double rigidNodeMeshCounter = 0;
982 bool suitableElementForSecondAdd =
true;
986 if (Element[
pn].
Is(RIGID))
989 rigidNodeLocalMeshSize +=
Element[
pn].FastGetSolutionStepValue(NODAL_H_WALL);
990 rigidNodeMeshCounter += 1.0;
992 if (Element[
pn].
Is(TO_ERASE))
994 toEraseNodeFound =
true;
996 if (Element[
pn].
Is(FREE_SURFACE))
1000 if (Element[
pn].
Is(PFEMFlags::LAGRANGIAN_INLET))
1002 lagrangianInletNodes++;
1004 if (Element[
pn].
Is(PFEMFlags::EULERIAN_INLET))
1006 eulerianInletNodes++;
1010 if (rigidNodeMeshCounter > 0)
1012 const double rigidWallMeshSize = rigidNodeLocalMeshSize / rigidNodeMeshCounter;
1013 const double ratio = rigidWallMeshSize / meanMeshSize;
1014 const double tolerance = 1.8;
1015 if (ratio > tolerance)
1017 meanMeshSize *= 0.5;
1018 meanMeshSize += 0.5 * rigidWallMeshSize;
1022 const double limitEdgeLength = 1.25 * meanMeshSize;
1023 const double safetyCoefficient3D = 1.6;
1024 double penalization = 1.0;
1028 if (lagrangianInletNodes > 0)
1033 else if (rigidNodes > 0 && freesurfaceNodes > 0 && eulerianInletNodes == 0)
1037 else if (freesurfaceNodes > 0)
1039 penalization = 0.95;
1042 double ElementalVolume =
Element.Volume();
1044 array_1d<double, 6> Edges(6, 0.0);
1045 array_1d<SizeType, 6> FirstEdgeNode(6, 0);
1046 array_1d<SizeType, 6> SecondEdgeNode(6, 0);
1047 double WallCharacteristicDistance = 0;
1048 array_1d<double, 3> CoorDifference =
Element[1].Coordinates() -
Element[0].Coordinates();
1049 double SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1] + CoorDifference[2] * CoorDifference[2];
1050 Edges[0] = std::sqrt(SquaredLength);
1051 FirstEdgeNode[0] = 0;
1052 SecondEdgeNode[0] = 1;
1053 if ((Element[0].
Is(RIGID) && Element[1].
Is(RIGID)) || (Element[0].
Is(INLET) && Element[1].
Is(INLET)))
1055 WallCharacteristicDistance = Edges[0];
1063 SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1] + CoorDifference[2] * CoorDifference[2];
1065 Edges[Counter] = std::sqrt(SquaredLength);
1066 FirstEdgeNode[Counter] =
j;
1067 SecondEdgeNode[Counter] =
i;
1068 if (((Element[
i].
Is(RIGID) && Element[
j].
Is(RIGID)) || (Element[
i].
Is(INLET) && Element[
j].
Is(INLET))) && Edges[Counter] > WallCharacteristicDistance)
1070 WallCharacteristicDistance = Edges[Counter];
1075 bool dangerousElement =
false;
1081 if ((Edges[
i] < WallCharacteristicDistance * safetyCoefficient3D && (Element[FirstEdgeNode[
i]].
Is(RIGID) || Element[SecondEdgeNode[
i]].
Is(RIGID))) ||
1082 ((Element[FirstEdgeNode[
i]].
Is(RIGID) && Element[SecondEdgeNode[
i]].
Is(RIGID)) || (Element[FirstEdgeNode[
i]].
Is(INLET) && Element[SecondEdgeNode[
i]].
Is(INLET))))
1086 if ((Element[FirstEdgeNode[
i]].
Is(FREE_SURFACE) || Element[FirstEdgeNode[
i]].
Is(RIGID)) &&
1087 (Element[SecondEdgeNode[
i]].
Is(FREE_SURFACE) || Element[SecondEdgeNode[
i]].
Is(RIGID)) &&
1088 (Element[FirstEdgeNode[
i]].
IsNot(PFEMFlags::EULERIAN_INLET) && Element[SecondEdgeNode[
i]].
IsNot(PFEMFlags::EULERIAN_INLET)))
1093 else if (rigidNodes == 0)
1095 SizeType propertyIdFirstNode =
Element[FirstEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
1096 SizeType propertyIdSecondNode =
Element[SecondEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
1097 if (propertyIdFirstNode != propertyIdSecondNode)
1103 if (rigidNodes == 1)
1105 if (Element[0].
Is(RIGID))
1111 if (Element[1].
Is(RIGID))
1117 if (Element[2].
Is(RIGID))
1123 if (Element[3].
Is(RIGID))
1131 if ((Edges[0] == 0 && Edges[1] == 0 && Edges[2] == 0 && Edges[3] == 0 && Edges[4] == 0 && Edges[5] == 0) || rigidNodes > 2)
1133 dangerousElement =
true;
1137 if (dangerousElement ==
false && toEraseNodeFound ==
false)
1140 double LargestEdge = 0;
1144 if (Edges[
i] > LargestEdge)
1147 LargestEdge = Edges[
i];
1150 if ((CountNodes < ElementsToRefine && LargestEdge > limitEdgeLength && eulerianInletNodes == 0))
1153 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
1155 bool suitableElement =
true;
1156 for (
int j = 0;
j < CountNodes;
j++)
1158 const double diffX = std::abs(new_positions[
j][0] - new_position[0]) - meanMeshSize * 0.5;
1159 const double diffY = std::abs(new_positions[
j][1] - new_position[1]) - meanMeshSize * 0.5;
1160 const double diffZ = std::abs(new_positions[
j][2] - new_position[2]) - meanMeshSize * 0.5;
1161 if (diffX < 0 && diffY < 0 && diffZ < 0)
1163 suitableElement =
false;
1167 if (suitableElement)
1169 nodes_id_to_interpolate[CountNodes][0] =
Element[FirstEdgeNode[maxCount]].GetId();
1170 nodes_id_to_interpolate[CountNodes][1] =
Element[SecondEdgeNode[maxCount]].GetId();
1171 biggest_volumes[CountNodes] = ElementalVolume;
1172 new_positions[CountNodes] = new_position;
1176 else if (freesurfaceNodes < 4 && rigidNodes < 4 && eulerianInletNodes == 0)
1179 ElementalVolume *= penalization;
1180 for (
int nn = 0; nn < ElementsToRefine; nn++)
1182 if (ElementalVolume > biggest_volumes[nn])
1184 if (maxCount < 6 && LargestEdge > limitEdgeLength)
1186 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
1188 if (ElementsToRefine > 1 && CountNodes > 0)
1190 for (
int j = 0;
j < ElementsToRefine;
j++)
1192 const double diffX = std::abs(new_positions[
j][0] - new_position[0]) - meanMeshSize * 0.5;
1193 const double diffY = std::abs(new_positions[
j][1] - new_position[1]) - meanMeshSize * 0.5;
1194 const double diffZ = std::abs(new_positions[
j][2] - new_position[2]) - meanMeshSize * 0.5;
1195 if (diffX < 0 && diffY < 0 && diffZ < 0)
1197 suitableElementForSecondAdd =
false;
1202 if (suitableElementForSecondAdd)
1204 nodes_id_to_interpolate[nn][0] =
Element[FirstEdgeNode[maxCount]].GetId();
1205 nodes_id_to_interpolate[nn][1] =
Element[SecondEdgeNode[maxCount]].GetId();
1206 biggest_volumes[nn] = ElementalVolume;
1207 new_positions[nn] = new_position;
1216 if (eulerianInletNodes > 0 && LargestEdge > (1.7 * meanMeshSize))
1219 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
1221 bool suitableElement =
true;
1222 for (
int j = 0;
j < CountNodes;
j++)
1224 const double diffX = std::abs(new_positions[
j][0] - new_position[0]) - meanMeshSize * 0.5;
1225 const double diffY = std::abs(new_positions[
j][1] - new_position[1]) - meanMeshSize * 0.5;
1226 const double diffZ = std::abs(new_positions[
j][2] - new_position[2]) - meanMeshSize * 0.5;
1227 if ((diffX < 0 && diffY < 0 && diffZ < 0) || (Element[FirstEdgeNode[maxCount]].
IsNot(INLET) && Element[SecondEdgeNode[maxCount]].
IsNot(INLET)))
1229 suitableElement =
false;
1233 if (suitableElement)
1235 if (CountNodes >= ElementsToRefine)
1237 new_positions.resize(CountNodes + 1);
1238 biggest_volumes.resize(CountNodes + 1,
false);
1239 nodes_id_to_interpolate.resize(CountNodes + 1);
1240 addedNodesAtEulerianInlet++;
1242 nodes_id_to_interpolate[CountNodes][0] =
Element[FirstEdgeNode[maxCount]].GetId();
1243 nodes_id_to_interpolate[CountNodes][1] =
Element[SecondEdgeNode[maxCount]].GetId();
1244 biggest_volumes[CountNodes] = ElementalVolume;
1245 new_positions[CountNodes] = new_position;
1255 std::vector<array_1d<double, 3>> &new_positions,
1256 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
1258 const int ElementsToRefine,
1259 int &nodesInTransitionZone)
1267 bool toEraseNodeFound =
false;
1268 double rigidNodeLocalMeshSize = 0;
1269 double rigidNodeMeshCounter = 0;
1270 double meanMeshSize = mrRemesh.
Refine->CriticalRadius;
1271 const ProcessInfo &rCurrentProcessInfo = mrModelPart.GetProcessInfo();
1272 const double currentTime = rCurrentProcessInfo[TIME];
1273 bool insideTransitionZone =
false;
1281 if (Element[
pn].
Is(RIGID))
1284 rigidNodeLocalMeshSize +=
Element[
pn].FastGetSolutionStepValue(NODAL_H_WALL);
1285 rigidNodeMeshCounter += 1.0;
1287 if (Element[
pn].
Is(TO_ERASE))
1289 toEraseNodeFound =
true;
1291 if (Element[
pn].
Is(FREE_SURFACE))
1297 if (rigidNodeMeshCounter > 0)
1299 const double rigidWallMeshSize = rigidNodeLocalMeshSize / rigidNodeMeshCounter;
1300 const double ratio = rigidWallMeshSize / meanMeshSize;
1301 const double tolerance = 1.8;
1302 if (ratio > tolerance)
1304 meanMeshSize *= 0.5;
1305 meanMeshSize += 0.5 * rigidWallMeshSize;
1308 double penalization = 1.0;
1310 if (freesurfaceNodes > 0)
1314 const double safetyCoefficient2D = 1.5;
1315 array_1d<double, 3> Edges(3, 0.0);
1316 array_1d<SizeType, 3> FirstEdgeNode(3, 0);
1317 array_1d<SizeType, 3> SecondEdgeNode(3, 0);
1318 double WallCharacteristicDistance = 0;
1319 array_1d<double, 3> CoorDifference =
Element[1].Coordinates() -
Element[0].Coordinates();
1320 double SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1];
1321 Edges[0] = std::sqrt(SquaredLength);
1322 FirstEdgeNode[0] = 0;
1323 SecondEdgeNode[0] = 1;
1324 if ((Element[0].
Is(RIGID) && Element[1].
Is(RIGID)) || (Element[0].
Is(INLET) && Element[1].
Is(INLET)))
1326 WallCharacteristicDistance = Edges[0];
1334 SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1];
1336 Edges[Counter] = std::sqrt(SquaredLength);
1337 FirstEdgeNode[Counter] =
j;
1338 SecondEdgeNode[Counter] =
i;
1339 if (Element[
i].
Is(RIGID) && Element[
j].
Is(RIGID) && Edges[Counter] > WallCharacteristicDistance)
1341 WallCharacteristicDistance = Edges[Counter];
1346 bool dangerousElement =
false;
1352 if ((Edges[
i] < WallCharacteristicDistance * safetyCoefficient2D && (Element[FirstEdgeNode[
i]].
Is(RIGID) || Element[SecondEdgeNode[
i]].
Is(RIGID))) ||
1353 (Element[FirstEdgeNode[
i]].
Is(RIGID) && Element[SecondEdgeNode[
i]].
Is(RIGID)))
1357 if ((Element[FirstEdgeNode[
i]].
Is(FREE_SURFACE) || Element[FirstEdgeNode[
i]].
Is(RIGID)) &&
1358 (Element[SecondEdgeNode[
i]].
Is(FREE_SURFACE) || Element[SecondEdgeNode[
i]].
Is(RIGID)))
1363 else if (rigidNodes == 0)
1365 SizeType propertyIdFirstNode =
Element[FirstEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
1366 SizeType propertyIdSecondNode =
Element[SecondEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
1367 if (propertyIdFirstNode != propertyIdSecondNode)
1373 if ((Edges[0] == 0 && Edges[1] == 0 && Edges[2] == 0) || rigidNodes == 3)
1375 dangerousElement =
true;
1377 const double limitEdgeLength = 1.9 * meanMeshSize * penalization;
1378 const double extraLimitEdgeLength = 2.5 * meanMeshSize * penalization;
1380 if (dangerousElement ==
false && toEraseNodeFound ==
false)
1383 double LargestEdge = 0;
1387 if (Edges[
i] > LargestEdge)
1390 LargestEdge = Edges[
i];
1394 if (((CountNodes < (ElementsToRefine + nodesInTransitionZone) || insideTransitionZone ==
true) && LargestEdge > limitEdgeLength) || LargestEdge > extraLimitEdgeLength)
1396 bool newNode =
true;
1397 for (
SizeType i = 0;
i < unsigned(CountNodes);
i++)
1399 if ((nodes_id_to_interpolate[
i][0] == Element[FirstEdgeNode[maxCount]].GetId() && nodes_id_to_interpolate[
i][1] == Element[SecondEdgeNode[maxCount]].GetId()) ||
1400 (nodes_id_to_interpolate[
i][1] ==
Element[FirstEdgeNode[maxCount]].GetId() && nodes_id_to_interpolate[
i][0] ==
Element[SecondEdgeNode[maxCount]].GetId()))
1405 if (newNode ==
true)
1407 new_positions.resize(CountNodes + 1);
1408 nodes_id_to_interpolate.resize(CountNodes + 1);
1409 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
1410 nodes_id_to_interpolate[CountNodes][0] =
Element[FirstEdgeNode[maxCount]].GetId();
1411 nodes_id_to_interpolate[CountNodes][1] =
Element[SecondEdgeNode[maxCount]].GetId();
1412 new_positions[CountNodes] = new_position;
1414 if (insideTransitionZone)
1416 nodesInTransitionZone++;
1426 std::vector<array_1d<double, 3>> &new_positions,
1427 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
1429 const int ElementsToRefine,
1430 int &nodesInTransitionZone)
1438 bool toEraseNodeFound =
false;
1440 double meanMeshSize = mrRemesh.
Refine->CriticalRadius;
1441 const ProcessInfo &rCurrentProcessInfo = mrModelPart.GetProcessInfo();
1442 double currentTime = rCurrentProcessInfo[TIME];
1443 bool insideTransitionZone =
false;
1444 double rigidNodeLocalMeshSize = 0;
1445 double rigidNodeMeshCounter = 0;
1453 if (Element[
pn].
Is(RIGID))
1456 rigidNodeLocalMeshSize +=
Element[
pn].FastGetSolutionStepValue(NODAL_H_WALL);
1457 rigidNodeMeshCounter += 1.0;
1459 if (Element[
pn].
Is(TO_ERASE))
1461 toEraseNodeFound =
true;
1463 if (Element[
pn].
Is(FREE_SURFACE))
1469 if (rigidNodeMeshCounter > 0)
1471 const double rigidWallMeshSize = rigidNodeLocalMeshSize / rigidNodeMeshCounter;
1472 const double ratio = rigidWallMeshSize / meanMeshSize;
1473 const double tolerance = 1.8;
1474 if (ratio > tolerance)
1476 meanMeshSize *= 0.5;
1477 meanMeshSize += 0.5 * rigidWallMeshSize;
1481 double penalization = 1.0;
1483 if (freesurfaceNodes > 0)
1488 const double safetyCoefficient3D = 1.6;
1489 array_1d<double, 6> Edges(6, 0.0);
1490 array_1d<SizeType, 6> FirstEdgeNode(6, 0);
1491 array_1d<SizeType, 6> SecondEdgeNode(6, 0);
1492 double WallCharacteristicDistance = 0;
1493 array_1d<double, 3> CoorDifference =
Element[1].Coordinates() -
Element[0].Coordinates();
1494 double SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1] + CoorDifference[2] * CoorDifference[2];
1495 Edges[0] = std::sqrt(SquaredLength);
1496 FirstEdgeNode[0] = 0;
1497 SecondEdgeNode[0] = 1;
1498 if ((Element[0].
Is(RIGID) && Element[1].
Is(RIGID)) || (Element[0].
Is(INLET) && Element[1].
Is(INLET)))
1500 WallCharacteristicDistance = Edges[0];
1508 SquaredLength = CoorDifference[0] * CoorDifference[0] + CoorDifference[1] * CoorDifference[1] + CoorDifference[2] * CoorDifference[2];
1510 Edges[Counter] = std::sqrt(SquaredLength);
1511 FirstEdgeNode[Counter] =
j;
1512 SecondEdgeNode[Counter] =
i;
1513 if (Element[
i].
Is(RIGID) && Element[
j].
Is(RIGID) && Edges[Counter] > WallCharacteristicDistance)
1515 WallCharacteristicDistance = Edges[Counter];
1520 bool dangerousElement =
false;
1525 if ((Edges[
i] < WallCharacteristicDistance * safetyCoefficient3D && (Element[FirstEdgeNode[
i]].
Is(RIGID) || Element[SecondEdgeNode[
i]].
Is(RIGID))) ||
1526 (Element[FirstEdgeNode[
i]].
Is(RIGID) && Element[SecondEdgeNode[
i]].
Is(RIGID)))
1530 if ((Element[FirstEdgeNode[
i]].
Is(FREE_SURFACE) || Element[FirstEdgeNode[
i]].
Is(RIGID)) &&
1531 (Element[SecondEdgeNode[
i]].
Is(FREE_SURFACE) || Element[SecondEdgeNode[
i]].
Is(RIGID)))
1536 else if (rigidNodes == 0)
1538 SizeType propertyIdFirstNode =
Element[FirstEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
1539 SizeType propertyIdSecondNode =
Element[SecondEdgeNode[
i]].FastGetSolutionStepValue(PROPERTY_ID);
1540 if (propertyIdFirstNode != propertyIdSecondNode)
1546 if (rigidNodes == 1)
1548 if (Element[0].
Is(RIGID))
1554 if (Element[1].
Is(RIGID))
1560 if (Element[2].
Is(RIGID))
1566 if (Element[3].
Is(RIGID))
1574 if ((Edges[0] == 0 && Edges[1] == 0 && Edges[2] == 0 && Edges[3] == 0 && Edges[4] == 0 && Edges[5] == 0) || rigidNodes > 2)
1576 dangerousElement =
true;
1578 const double limitEdgeLength = 1.9 * meanMeshSize * penalization;
1579 const double extraLimitEdgeLength = 2.5 * meanMeshSize * penalization;
1582 if (dangerousElement ==
false && toEraseNodeFound ==
false)
1585 double LargestEdge = 0;
1588 if (Edges[
i] > LargestEdge)
1591 LargestEdge = Edges[
i];
1595 if (((CountNodes < (ElementsToRefine + nodesInTransitionZone) || insideTransitionZone ==
true) && LargestEdge > limitEdgeLength) || LargestEdge > extraLimitEdgeLength)
1597 bool newNode =
true;
1598 for (
SizeType i = 0;
i < unsigned(CountNodes);
i++)
1600 if ((nodes_id_to_interpolate[
i][0] == Element[FirstEdgeNode[maxCount]].GetId() && nodes_id_to_interpolate[
i][1] == Element[SecondEdgeNode[maxCount]].GetId()) ||
1601 (nodes_id_to_interpolate[
i][1] ==
Element[FirstEdgeNode[maxCount]].GetId() && nodes_id_to_interpolate[
i][0] ==
Element[SecondEdgeNode[maxCount]].GetId()))
1606 if (newNode ==
true)
1608 new_positions.resize(CountNodes + 1);
1609 nodes_id_to_interpolate.resize(CountNodes + 1);
1610 array_1d<double, 3> new_position = (
Element[FirstEdgeNode[maxCount]].Coordinates() +
Element[SecondEdgeNode[maxCount]].Coordinates()) * 0.5;
1611 nodes_id_to_interpolate[CountNodes][0] =
Element[FirstEdgeNode[maxCount]].GetId();
1612 nodes_id_to_interpolate[CountNodes][1] =
Element[SecondEdgeNode[maxCount]].GetId();
1613 new_positions[CountNodes] = new_position;
1615 if (insideTransitionZone)
1617 nodesInTransitionZone++;
1626 void CreateAndAddNewNodesInCornerWall(std::vector<array_1d<double, 3>> &new_positions,
1627 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
1628 std::vector<Node::DofsContainerType> &NewDofs,
1629 int ElementsToRefine,
1634 const SizeType dimension = mrModelPart.ElementsBegin()->GetGeometry().WorkingSpaceDimension();
1636 std::vector<Node::Pointer> list_of_new_nodes;
1639 VariablesList &VariablesList = mrModelPart.GetNodalSolutionStepVariablesList();
1641 for (
SizeType nn = 0; nn < new_positions.size(); nn++)
1646 double x = new_positions[nn][0];
1647 double y = new_positions[nn][1];
1650 z = new_positions[nn][2];
1652 Node::Pointer pnode = mrModelPart.CreateNewNode(
id,
x,
y,
z);
1653 pnode->Set(NEW_ENTITY);
1654 list_of_new_nodes.push_back(pnode);
1662 pnode->SetSolutionStepVariablesList(&VariablesList);
1665 pnode->SetBufferSize(mrModelPart.GetBufferSize());
1669 for (Node::DofsContainerType::iterator iii = reference_dofs.begin(); iii != reference_dofs.end(); iii++)
1672 pnode->pAddDof(rDof);
1675 auto slave_node_1 = mrModelPart.pGetNode(nodes_id_to_interpolate[nn][0]);
1676 auto slave_node_2 = mrModelPart.pGetNode(nodes_id_to_interpolate[nn][1]);
1677 auto slave_node_3 = mrModelPart.pGetNode(nodes_id_to_interpolate[nn][2]);
1679 InterpolateFromTwoNodes(pnode, slave_node_1, slave_node_2, VariablesList);
1681 TakeMaterialPropertiesFromNotRigidNode(pnode, slave_node_3);
1685 const array_1d<double, 3> ZeroNormal(3, 0.0);
1686 for (std::vector<Node::Pointer>::iterator it = list_of_new_nodes.begin(); it != list_of_new_nodes.end(); it++)
1688 const array_1d<double, 3> &displacement = (*it)->FastGetSolutionStepValue(DISPLACEMENT);
1689 (*it)->X0() = (*it)->X() - displacement[0];
1690 (*it)->Y0() = (*it)->Y() - displacement[1];
1691 (*it)->Z0() = (*it)->Z() - displacement[2];
1695 (*it)->Reset(TO_ERASE);
1701 void CreateAndAddNewNodes(std::vector<array_1d<double, 3>> &new_positions,
1702 std::vector<array_1d<SizeType, 4>> &nodes_id_to_interpolate,
1703 int ElementsToRefine,
1708 const SizeType dimension = mrModelPart.ElementsBegin()->GetGeometry().WorkingSpaceDimension();
1710 std::vector<Node::Pointer> list_of_new_nodes;
1714 SizeType initial_node_size = NodeIdParent + 1 + ElementsToRefine;
1716 NodeType::Pointer pnode;
1719 if (NodeId > NodeIdParent)
1721 initial_node_size = NodeId + 1 + ElementsToRefine;
1722 std::cout <<
"initial_node_size " << initial_node_size << std::endl;
1726 VariablesList &VariablesList = mrModelPart.GetNodalSolutionStepVariablesList();
1728 const ProcessInfo &rCurrentProcessInfo = mrModelPart.GetProcessInfo();
1729 SizeType principalModelPartId = rCurrentProcessInfo[MAIN_MATERIAL_PROPERTY];
1731 for (
SizeType nn = 0; nn < new_positions.size(); nn++)
1734 SizeType id = initial_node_size + nn;
1736 double x = new_positions[nn][0];
1737 double y = new_positions[nn][1];
1740 z = new_positions[nn][2];
1743 pnode = Kratos::make_intrusive<Node>(
id,
x,
y,
z);
1745 pnode->Set(NEW_ENTITY);
1754 pnode->SetSolutionStepVariablesList(&VariablesList);
1757 pnode->SetBufferSize(mrModelPart.GetBufferSize());
1766 for (Node::DofsContainerType::iterator i_dof = ReferenceDofs.begin(); i_dof != ReferenceDofs.end(); ++i_dof)
1771 (pNewDof)->FreeDof();
1774 list_of_new_nodes.push_back(pnode);
1776 auto slave_node_1 = mrModelPart.pGetNode(nodes_id_to_interpolate[nn][0]);
1777 auto slave_node_2 = mrModelPart.pGetNode(nodes_id_to_interpolate[nn][1]);
1778 InterpolateFromTwoNodes(pnode, slave_node_1, slave_node_2, VariablesList);
1779 if (slave_node_1->Is(RIGID) || slave_node_1->Is(SOLID))
1781 TakeMaterialPropertiesFromNotRigidNode(pnode, slave_node_2);
1786 SizeType propertyIdNodeSlave1 = slave_node_1->FastGetSolutionStepValue(PROPERTY_ID);
1787 if ((mrRemesh.
Info->BalancePrincipalSecondaryPartsNodes > 0 && propertyIdNodeSlave1 == principalModelPartId) ||
1788 (mrRemesh.
Info->BalancePrincipalSecondaryPartsNodes < 0 && propertyIdNodeSlave1 != principalModelPartId) ||
1789 (slave_node_2->Is(RIGID) || slave_node_2->Is(SOLID)))
1791 TakeMaterialPropertiesFromNotRigidNode(pnode, slave_node_1);
1795 TakeMaterialPropertiesFromNotRigidNode(pnode, slave_node_2);
1799 SizeType propertyIdNode = pnode->FastGetSolutionStepValue(PROPERTY_ID);
1800 if (propertyIdNode != principalModelPartId)
1802 mrRemesh.
Info->BalancePrincipalSecondaryPartsNodes += 1;
1807 const array_1d<double, 3> ZeroNormal(3, 0.0);
1808 for (std::vector<Node::Pointer>::iterator it = list_of_new_nodes.begin(); it != list_of_new_nodes.end(); it++)
1810 const array_1d<double, 3> &displacement = (*it)->FastGetSolutionStepValue(DISPLACEMENT);
1811 (*it)->X0() = (*it)->X() - displacement[0];
1812 (*it)->Y0() = (*it)->Y() - displacement[1];
1813 (*it)->Z0() = (*it)->Z() - displacement[2];
1817 (*it)->Reset(TO_ERASE);
1819 mrModelPart.Nodes().push_back(*(it));
1825 void InterpolateFromTwoNodes(Node::Pointer master_node, Node::Pointer slave_node_1, Node::Pointer slave_node_2, VariablesList &rVariablesList)
1830 SizeType buffer_size = master_node->GetBufferSize();
1834 std::string variable_name = i_variable->Name();
1835 if (KratosComponents<Variable<double>>::
Has(variable_name))
1837 const Variable<double> &variable = KratosComponents<Variable<double>>::Get(variable_name);
1841 double &node_data = master_node->FastGetSolutionStepValue(variable,
step);
1843 double node0_data = slave_node_1->FastGetSolutionStepValue(variable,
step);
1844 double node1_data = slave_node_2->FastGetSolutionStepValue(variable,
step);
1846 node_data = (0.5 * node0_data + 0.5 * node1_data);
1849 else if (KratosComponents<Variable<array_1d<double, 3>>>::
Has(variable_name))
1851 const Variable<array_1d<double, 3>> &variable = KratosComponents<Variable<array_1d<double, 3>>>::Get(variable_name);
1855 array_1d<double, 3> &node_data = master_node->FastGetSolutionStepValue(variable,
step);
1857 const array_1d<double, 3> &node0_data = slave_node_1->FastGetSolutionStepValue(variable,
step);
1858 const array_1d<double, 3> &node1_data = slave_node_2->FastGetSolutionStepValue(variable,
step);
1860 noalias(node_data) = (0.5 * node0_data + 0.5 * node1_data);
1864 else if (KratosComponents<Variable<int>>::
Has(variable_name))
1869 else if (KratosComponents<Variable<bool>>::
Has(variable_name))
1874 else if (KratosComponents<Variable<Matrix>>::
Has(variable_name))
1877 const Variable<Matrix> &variable = KratosComponents<Variable<Matrix>>::Get(variable_name);
1881 Matrix &node_data = master_node->FastGetSolutionStepValue(variable,
step);
1883 Matrix &node0_data = slave_node_1->FastGetSolutionStepValue(variable,
step);
1884 Matrix &node1_data = slave_node_2->FastGetSolutionStepValue(variable,
step);
1886 if (node_data.size1() > 0 && node_data.size2())
1888 if (node_data.size1() == node0_data.size1() && node_data.size2() == node0_data.size2() &&
1889 node_data.size1() == node1_data.size1() && node_data.size2() == node1_data.size2())
1892 noalias(node_data) = (0.5 * node0_data + 0.5 * node1_data);
1898 else if (KratosComponents<Variable<Vector>>::
Has(variable_name))
1901 const Variable<Vector> &variable = KratosComponents<Variable<Vector>>::Get(variable_name);
1905 Vector &node_data = master_node->FastGetSolutionStepValue(variable,
step);
1907 Vector &node0_data = slave_node_1->FastGetSolutionStepValue(variable,
step);
1908 Vector &node1_data = slave_node_2->FastGetSolutionStepValue(variable,
step);
1910 if (node_data.size() > 0)
1912 if (node_data.size() == node0_data.size() &&
1913 node_data.size() == node1_data.size())
1916 noalias(node_data) = (0.5 * node0_data + 0.5 * node1_data);
1927 void TakeMaterialPropertiesFromNotRigidNode(Node::Pointer master_node, Node::Pointer SlaveNode)
1931 master_node->FastGetSolutionStepValue(PROPERTY_ID) = SlaveNode->FastGetSolutionStepValue(PROPERTY_ID);
1932 if (master_node->SolutionStepsDataHas(BULK_MODULUS) && SlaveNode->SolutionStepsDataHas(BULK_MODULUS))
1933 master_node->FastGetSolutionStepValue(BULK_MODULUS) = SlaveNode->FastGetSolutionStepValue(BULK_MODULUS);
1934 if (master_node->SolutionStepsDataHas(DENSITY) && SlaveNode->SolutionStepsDataHas(DENSITY))
1935 master_node->FastGetSolutionStepValue(DENSITY) = SlaveNode->FastGetSolutionStepValue(DENSITY);
1936 if (master_node->SolutionStepsDataHas(DYNAMIC_VISCOSITY) && SlaveNode->SolutionStepsDataHas(DYNAMIC_VISCOSITY))
1937 master_node->FastGetSolutionStepValue(DYNAMIC_VISCOSITY) = SlaveNode->FastGetSolutionStepValue(DYNAMIC_VISCOSITY);
1939 if (master_node->SolutionStepsDataHas(YIELD_SHEAR) && SlaveNode->SolutionStepsDataHas(YIELD_SHEAR))
1940 master_node->FastGetSolutionStepValue(YIELD_SHEAR) = SlaveNode->FastGetSolutionStepValue(YIELD_SHEAR);
1942 if (master_node->SolutionStepsDataHas(FLOW_INDEX) && SlaveNode->SolutionStepsDataHas(FLOW_INDEX))
1943 master_node->FastGetSolutionStepValue(FLOW_INDEX) = SlaveNode->FastGetSolutionStepValue(FLOW_INDEX);
1944 if (master_node->SolutionStepsDataHas(ADAPTIVE_EXPONENT) && SlaveNode->SolutionStepsDataHas(ADAPTIVE_EXPONENT))
1945 master_node->FastGetSolutionStepValue(ADAPTIVE_EXPONENT) = SlaveNode->FastGetSolutionStepValue(ADAPTIVE_EXPONENT);
1946 if (master_node->SolutionStepsDataHas(STATIC_FRICTION) && SlaveNode->SolutionStepsDataHas(STATIC_FRICTION))
1947 master_node->FastGetSolutionStepValue(STATIC_FRICTION) = SlaveNode->FastGetSolutionStepValue(STATIC_FRICTION);
1948 if (master_node->SolutionStepsDataHas(DYNAMIC_FRICTION) && SlaveNode->SolutionStepsDataHas(DYNAMIC_FRICTION))
1949 master_node->FastGetSolutionStepValue(DYNAMIC_FRICTION) = SlaveNode->FastGetSolutionStepValue(DYNAMIC_FRICTION);
1950 if (master_node->SolutionStepsDataHas(INERTIAL_NUMBER_ZERO) && SlaveNode->SolutionStepsDataHas(INERTIAL_NUMBER_ZERO))
1951 master_node->FastGetSolutionStepValue(INERTIAL_NUMBER_ZERO) = SlaveNode->FastGetSolutionStepValue(INERTIAL_NUMBER_ZERO);
1952 if (master_node->SolutionStepsDataHas(GRAIN_DIAMETER) && SlaveNode->SolutionStepsDataHas(GRAIN_DIAMETER))
1953 master_node->FastGetSolutionStepValue(GRAIN_DIAMETER) = SlaveNode->FastGetSolutionStepValue(GRAIN_DIAMETER);
1954 if (master_node->SolutionStepsDataHas(GRAIN_DENSITY) && SlaveNode->SolutionStepsDataHas(GRAIN_DENSITY))
1955 master_node->FastGetSolutionStepValue(GRAIN_DENSITY) = SlaveNode->FastGetSolutionStepValue(GRAIN_DENSITY);
1956 if (master_node->SolutionStepsDataHas(REGULARIZATION_COEFFICIENT) && SlaveNode->SolutionStepsDataHas(REGULARIZATION_COEFFICIENT))
1957 master_node->FastGetSolutionStepValue(REGULARIZATION_COEFFICIENT) = SlaveNode->FastGetSolutionStepValue(REGULARIZATION_COEFFICIENT);
1959 if (master_node->SolutionStepsDataHas(INTERNAL_FRICTION_ANGLE) && SlaveNode->SolutionStepsDataHas(INTERNAL_FRICTION_ANGLE))
1960 master_node->FastGetSolutionStepValue(INTERNAL_FRICTION_ANGLE) = SlaveNode->FastGetSolutionStepValue(INTERNAL_FRICTION_ANGLE);
1961 if (master_node->SolutionStepsDataHas(COHESION) && SlaveNode->SolutionStepsDataHas(COHESION))
1962 master_node->FastGetSolutionStepValue(COHESION) = SlaveNode->FastGetSolutionStepValue(COHESION);
1964 if (master_node->SolutionStepsDataHas(DEVIATORIC_COEFFICIENT) && SlaveNode->SolutionStepsDataHas(DEVIATORIC_COEFFICIENT))
1966 master_node->FastGetSolutionStepValue(DEVIATORIC_COEFFICIENT) = SlaveNode->FastGetSolutionStepValue(DEVIATORIC_COEFFICIENT);
1967 master_node->FastGetSolutionStepValue(VOLUMETRIC_COEFFICIENT) = SlaveNode->FastGetSolutionStepValue(VOLUMETRIC_COEFFICIENT);
1970 if (master_node->SolutionStepsDataHas(YOUNG_MODULUS) && SlaveNode->SolutionStepsDataHas(YOUNG_MODULUS))
1972 master_node->FastGetSolutionStepValue(YOUNG_MODULUS) = 0;
1973 master_node->FastGetSolutionStepValue(POISSON_RATIO) = 0;
1975 if (master_node->SolutionStepsDataHas(SOLID_DENSITY) && SlaveNode->SolutionStepsDataHas(SOLID_DENSITY))
1977 master_node->FastGetSolutionStepValue(SOLID_DENSITY) = 0;
1978 master_node->Reset(SOLID);
1979 master_node->FastGetSolutionStepValue(INTERFACE_NODE) =
false;
2027 rOStream << std::endl;
Base class for all Conditions.
Definition: condition.h:59
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
Dof * Pointer
Pointer definition of Dof.
Definition: dof.h:93
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: element.h:83
bool Is(Flags const &rOther) const
Definition: flags.h:274
bool IsNot(Flags const &rOther) const
Definition: flags.h:291
Refine Mesh Elements Process 2D and 3D.
Definition: generate_new_nodes_before_meshing_process.hpp:47
ModelPart::PropertiesType PropertiesType
Definition: generate_new_nodes_before_meshing_process.hpp:57
std::string Info() const override
Turn back information as a string.
Definition: generate_new_nodes_before_meshing_process.hpp:282
KRATOS_CLASS_POINTER_DEFINITION(GenerateNewNodesBeforeMeshingProcess)
Pointer definition of Process.
ModelPart::NodeType NodeType
Definition: generate_new_nodes_before_meshing_process.hpp:55
virtual ~GenerateNewNodesBeforeMeshingProcess()
Destructor.
Definition: generate_new_nodes_before_meshing_process.hpp:76
ConditionType::GeometryType GeometryType
Definition: generate_new_nodes_before_meshing_process.hpp:58
ModelPart::ConditionType ConditionType
Definition: generate_new_nodes_before_meshing_process.hpp:56
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: generate_new_nodes_before_meshing_process.hpp:93
GenerateNewNodesBeforeMeshingProcess(ModelPart &rModelPart, MesherUtilities::MeshingParameters &rRemeshingParameters, int EchoLevel)
Default constructor.
Definition: generate_new_nodes_before_meshing_process.hpp:66
void PrintData(std::ostream &rOStream) const override
Print object's data.s.
Definition: generate_new_nodes_before_meshing_process.hpp:294
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: generate_new_nodes_before_meshing_process.hpp:288
std::size_t SizeType
Definition: generate_new_nodes_before_meshing_process.hpp:59
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: generate_new_nodes_before_meshing_process.hpp:83
Geometry base class.
Definition: geometry.h:71
The base class for processes passed to the solution scheme.
Definition: mesher_process.hpp:37
Short class definition.
Definition: mesher_utilities.hpp:49
static unsigned int GetMaxNodeId(ModelPart &rModelPart)
Definition: mesher_utilities.hpp:1408
void DefineMeshSizeInTransitionZones2D(MeshingParameters &rMeshingVariables, double currentTime, array_1d< double, 3 > NodeCoordinates, double &meanMeshSize, bool &insideTransitionZone)
Definition: mesher_utilities.cpp:2153
void DefineMeshSizeInTransitionZones3D(MeshingParameters &rMeshingVariables, double currentTime, array_1d< double, 3 > NodeCoordinates, double &meanMeshSize, bool &insideTransitionZone)
Definition: mesher_utilities.cpp:2311
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
std::string & Name()
Definition: model_part.h:1811
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
This class defines the node.
Definition: node.h:65
Dof< double > DofType
Dof type.
Definition: node.h:83
std::vector< std::unique_ptr< Dof< double > >> DofsContainerType
The DoF container type definition.
Definition: node.h:92
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
boost::indirect_iterator< VariablesContainerType::const_iterator > const_iterator
Definition: variables_list.h:77
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
z
Definition: GenerateWind.py:163
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
std::unique_ptr< T > unique_ptr
Definition: smart_pointers.h:33
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
ProcessInfo
Definition: edgebased_PureConvection.py:116
int step
Definition: face_heat.py:88
y
Other simbols definition.
Definition: generate_axisymmetric_navier_stokes_element.py:54
pn
Definition: generate_droplet_dynamics.py:65
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
int j
Definition: quadrature.py:648
x
Definition: sensitivityMatrix.py:49
integer i
Definition: TensorModule.f:17
Definition: mesher_utilities.hpp:631
MeshingInfoParameters::Pointer Info
Definition: mesher_utilities.hpp:681
RefiningParameters::Pointer Refine
Definition: mesher_utilities.hpp:684
std::vector< double > RefiningBoxFinalTime
Definition: mesher_utilities.hpp:706
std::vector< bool > UseRefiningBox
Definition: mesher_utilities.hpp:704
bool InputInitializedFlag
Definition: mesher_utilities.hpp:661
std::string SubModelPartName
Definition: mesher_utilities.hpp:642
std::vector< int > NodalPreIds
Definition: mesher_utilities.hpp:668
Flags ExecutionOptions
Definition: mesher_utilities.hpp:648
std::vector< double > RefiningBoxInitialTime
Definition: mesher_utilities.hpp:705