KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
refine_conditions_mesher_process.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosDelaunayMeshingApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2018 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_REFINE_CONDITIONS_MESHER_PROCESS_H_INCLUDED )
11 #define KRATOS_REFINE_CONDITIONS_MESHER_PROCESS_H_INCLUDED
12 
13 
14 // External includes
15 
16 // System includes
17 
18 // Project includes
19 #include "includes/model_part.h"
22 
24 //StepData: NODAL_H, NORMAL, CONTACT_FORCE, DISPLACEMENT
25 //Flags: (checked) BOUNDARY,
26 // (set) BOUNDARY(nodes), TO_ERASE(conditions), NEW_ENTITY(conditions,nodes)(set),
27 // (modified)
28 // (reset)
29 //(set):=(set in this process)
30 
31 namespace Kratos
32 {
33 
36 
38 
49  : public MesherProcess
50  {
51 public:
54 
57 
63 
67 
71 
74  MesherUtilities::MeshingParameters& rRemeshingParameters,
75  int EchoLevel)
76  : mrModelPart(rModelPart),
77  mrRemesh(rRemeshingParameters)
78  {
80  }
81 
84 
85 
89 
91  void operator()()
92  {
93  Execute();
94  }
95 
96 
100 
101 
103  void Execute() override
104  {
105 
106  KRATOS_TRY
107 
108  if( this->mEchoLevel > 0 ){
109  std::cout<<" [ REFINE BOUNDARY : "<<std::endl;
110  //std::cout<<" Nodes and Conditions : "<<mrModelPart.Nodes().size()<<", "<<mrModelPart.Conditions().size()<<std::endl;
111  }
112 
113 
115  std::cout<<" ModelPart Supplied do not corresponds to the Meshing Domain: ("<<mrModelPart.Name()<<" != "<<mrRemesh.SubModelPartName<<")"<<std::endl;
116 
117 
118  mrRemesh.Info->InsertedBoundaryConditions = mrModelPart.NumberOfConditions();
119  mrRemesh.Info->InsertedBoundaryNodes = mrModelPart.NumberOfNodes();
120 
121 
122  //if the insert switches are activated, we check if the boundaries got too coarse
123  if( (mrRemesh.Refine->RefiningOptions.Is(MesherUtilities::REFINE_INSERT_NODES) || mrRemesh.Refine->RefiningOptions.Is(MesherUtilities::REFINE_ADD_NODES)) && mrRemesh.Refine->RefiningOptions.Is(MesherUtilities::REFINE_BOUNDARY) )
124  {
125 
126  std::vector<NodeType::Pointer> list_of_nodes;
127  std::vector<ConditionType::Pointer> list_of_conditions;
128 
129  unsigned int conditions_size = mrModelPart.NumberOfConditions();
130 
131  list_of_nodes.reserve(conditions_size);
132  list_of_conditions.reserve(conditions_size);
133 
134  this->SelectBoundaryToRefine(mrModelPart); //conditions (TO_REFINE)
135 
136  this->GenerateNewNodes(mrModelPart, list_of_nodes, list_of_conditions); //points (NEW_ENTITY)
137 
138  this->GenerateNewConditions(mrModelPart, list_of_nodes, list_of_conditions);// new conditions(NEW_ENTITY) //old conditions (TO_ERASE)
139 
140  this->SetNodesToModelPart(mrModelPart, list_of_nodes);
141 
142  this->SetConditionsToModelPart(mrModelPart, list_of_conditions);
143 
144  //new conditions are added to model part and later added to condition model parts via (NEW_ENTITY) and (MODEL_PART_NAME)
145 
146 
147  } // REFINE END;
148 
149 
150  mrRemesh.Info->InsertedBoundaryNodes = mrModelPart.NumberOfNodes()-mrRemesh.Info->InsertedBoundaryNodes;
151 
152  if( this->mEchoLevel > 0 ){
153  std::cout<<" [ CONDITIONS ( total : "<<mrModelPart.NumberOfConditions()<<" ) ]"<<std::endl;
154  std::cout<<" [ NODES ( inserted : "<<mrRemesh.Info->InsertedBoundaryNodes<<" total: "<<mrModelPart.NumberOfNodes()<<" ) ]"<<std::endl;
155 
156  if( this->mEchoLevel >=1 ){
157  mrRemesh.Refine->Info.BoundaryConditionsRefined.EchoStats();
158  }
159 
160  std::cout<<" REFINE BOUNDARY ]; "<<std::endl;
161  }
162 
163  KRATOS_CATCH(" ")
164 
165  }
166 
167 
171 
172 
176 
177 
181 
183  std::string Info() const override
184  {
185  return "RefineConditionsMesherProcess";
186  }
187 
189  void PrintInfo(std::ostream& rOStream) const override
190  {
191  rOStream << "RefineConditionsMesherProcess";
192  }
193 
195  void PrintData(std::ostream& rOStream) const override
196  {
197  }
198 
199 
203 
205 
206  protected:
207 
210 
211 
215 
217 
219 
221 
223 
227 
228  bool RefineOnThreshold(ConditionType::Pointer& pCondition, ProcessInfo& rCurrentProcessInfo, double& critical_size)
229  {
230  KRATOS_TRY
231 
232  if( pCondition->GetValue(MASTER_ELEMENTS).size() > 0 ){
233 
234  Element::ElementType& MasterElement = pCondition->GetValue(MASTER_ELEMENTS).back();
235 
236  std::vector<double> Value;
237 
238  MasterElement.CalculateOnIntegrationPoints(mrRemesh.Refine->GetThresholdVariable(),Value,rCurrentProcessInfo);
239 
240  //calculate threshold value (plastic power)
241  double threshold_value = 0;
242 
243  for(std::vector<double>::iterator v = Value.begin(); v!=Value.end(); ++v)
244  threshold_value += *v;
245 
246  threshold_value /= double(Value.size());
247  threshold_value *= MasterElement.GetGeometry().DomainSize();
248 
249  //calculate condition length
250  double face_size = mMesherUtilities.CalculateBoundarySize(pCondition->GetGeometry());
251 
252  if( threshold_value > mrRemesh.Refine->ReferenceThreshold && face_size > critical_size )
253  return true;
254  }
255 
256  return false;
257 
258  KRATOS_CATCH( "" )
259  }
260 
261  //*******************************************************************************************
262  //*******************************************************************************************
263 
264 
265  bool RefineOnDistance(ConditionType::Pointer& pCondition, double& critical_size)
266  {
267  KRATOS_TRY
268 
269  //calculate condition length
270  double face_size = mMesherUtilities.CalculateBoundarySize(pCondition->GetGeometry());
271 
272  if( face_size > critical_size )
273  return true;
274 
275  return false;
276 
277  KRATOS_CATCH( "" )
278  }
279 
280  //*******************************************************************************************
281  //*******************************************************************************************
282 
283  bool RefineBoundaryCondition(ConditionType::Pointer& pCondition, ProcessInfo& rCurrentProcessInfo)
284  {
285  KRATOS_TRY
286 
287  bool refine_condition = false;
288 
289  //THRESHOLD VALUE INSERT
290  double size_for_threshold_face = 2.50 * mrRemesh.Refine->CriticalSide;
291 
292  if ( mrRemesh.Refine->RefiningOptions.Is(MesherUtilities::REFINE_BOUNDARY_ON_THRESHOLD) )
293  refine_condition = this->RefineOnThreshold(pCondition, rCurrentProcessInfo, size_for_threshold_face);
294 
295  if( refine_condition ){
296 
297  //check a the critical distance to not refine without limits
298  double size_for_boundary_threshold = mrRemesh.Refine->CriticalSide;
299  refine_condition = this->RefineOnDistance(pCondition, size_for_boundary_threshold);
300 
301  if( refine_condition ){
302  mrRemesh.Refine->Info.BoundaryConditionsRefined.on_threshold++;
303  return true;
304  }
305 
306  }
307 
308  refine_condition = false;
309 
310  //DISTANCE VALUE INSERT
311  double size_for_boundary_face = 3.50 * mrRemesh.Refine->CriticalSide;
312 
313  if ( mrRemesh.Refine->RefiningOptions.Is(MesherUtilities::REFINE_BOUNDARY_ON_DISTANCE) )
314  refine_condition = this->RefineOnDistance(pCondition, size_for_boundary_face);
315 
316  if( refine_condition ){
317  mrRemesh.Refine->Info.BoundaryConditionsRefined.on_distance++;
318  return true;
319  }
320 
321  return false;
322 
323  KRATOS_CATCH( "" )
324  }
325 
326 
327  //*******************************************************************************************
328  //*******************************************************************************************
329 
330  bool RefineContactCondition(ConditionType::Pointer& pCondition, ProcessInfo& rCurrentProcessInfo)
331  {
332  KRATOS_TRY
333 
334  if ( mrRemesh.Refine->RefiningOptions.Is(MesherUtilities::REFINE_BOUNDARY_ON_DISTANCE)
335  || ( mrRemesh.Refine->RefiningOptions.Is(MesherUtilities::REFINE_BOUNDARY_ON_THRESHOLD) ) ){
336 
337  bool refine_condition = false;
338  bool curved_contact = false;
339  bool contact_semi_active = false;
340  std::vector<bool> semi_active_nodes;
341 
342  bool contact_active = mMesherUtilities.CheckContactActive(pCondition->GetGeometry(), contact_semi_active, semi_active_nodes);
343 
344  double factor = 3.50;
345 
346  if( contact_semi_active ){
347 
348  std::vector<array_1d<double,3> > contact_normals;
349 
350  curved_contact = mMesherUtilities.CheckContactCurvature(pCondition->GetGeometry(), contact_normals);
351 
352  //FACTOR VALUE INSERT plane contact transition
353  factor = 2.0;
354 
355  //FACTOR VALUE INSERT curved contact transition
356  if( curved_contact )
357  factor = 0.75;
358 
359 
360  if( contact_active ){
361 
362  //FACTOR VALUE INSERT plane contact
363  factor = 1.5;
364 
365  //FACTOR VALUE INSERT curved contact
366  if( curved_contact )
367  factor = 0.5;
368 
369  }
370 
371  }
372 
373  if( contact_active || contact_semi_active ){
374 
375  double size_for_boundary_contact_face = factor * mrRemesh.Refine->CriticalSide;
376  refine_condition = this->RefineOnDistance(pCondition, size_for_boundary_contact_face);
377 
378  if( refine_condition ){
379 
380  mrRemesh.Refine->Info.BoundaryConditionsRefined.on_distance++;
381  if(contact_active || contact_semi_active){
382  mrRemesh.Refine->Info.BoundaryConditionsRefined.in_contact++;
383  if(curved_contact)
384  mrRemesh.Refine->Info.BoundaryConditionsRefined.in_concave_boundary++;
385  }
386  return true;
387  }
388 
389  }
390 
391  }
392 
393  return false;
394 
395  KRATOS_CATCH( "" )
396  }
397 
398 
399  //*******************************************************************************************
400  //*******************************************************************************************
401 
402  void SetNodalPosition(ConditionType::Pointer& pCondition, ProcessInfo& rCurrentProcessInfo, double& xc, double& yc, double& zc)
403  {
404  KRATOS_TRY
405 
406  bool contact_semi_active = false;
407  std::vector<bool> semi_active_nodes;
408 
409  bool contact_active = mMesherUtilities.CheckContactActive(pCondition->GetGeometry(), contact_semi_active, semi_active_nodes);
410 
411  if( contact_semi_active || contact_active ){ // if contact is semi_ative or active
412 
413  array_1d<double,3> position_correction;
414  position_correction.clear();
415 
416  if( pCondition->GetGeometry().size() == 2 && pCondition->GetGeometry().WorkingSpaceDimension() == 2 ){ //line
417 
418  //circle interpolation
419  //this->CircleInterpolation(pCondition, position_correction);
420 
421  //hermite interpolation
422  this->HermiteInterpolation(pCondition, position_correction);
423  }
424 
425 
426  if( pCondition->GetGeometry().size() == 3 && pCondition->GetGeometry().WorkingSpaceDimension() == 3 ){ //triangle
427 
428  //hermite interpolation
429  this->HermiteTriangleInterpolation(pCondition, position_correction);
430 
431  }
432 
433  //correct only if not self contact
434  MesherUtilities MesherUtils;
435  if( !MesherUtils.CheckSubdomain(pCondition->GetGeometry()) )
436  {
437  xc += position_correction[0];
438  yc += position_correction[1];
439  zc += position_correction[2];
440  }
441 
442  }
443 
444  KRATOS_CATCH( "" )
445  }
446 
447 
448  //*******************************************************************************************
449  //*******************************************************************************************
450 
451  void CircleInterpolation(ConditionType::Pointer& pCondition, array_1d<double,3 >& rVector)
452  {
453  KRATOS_TRY
454 
455  bool is_curved = false;
456  std::vector<array_1d<double, 3> > normals;
457 
458  is_curved = mMesherUtilities.CheckContactCurvature(pCondition->GetGeometry(), normals);
459 
460  array_1d<double,3> normal_direction;
461  normal_direction.clear();
462 
463  array_1d<double,3> tangent_direction;
464  tangent_direction.clear();
465 
466  if( is_curved ){
467 
468  //compute the saggita
469  double projection = 0.0;
470  for( unsigned int i = 0; i<3; i++ )
471  projection += normals[0][i] * normals[1][i];
472 
473  projection = std::sqrt(projection);
474 
475  double angle = std::acos(projection);
476 
477  double face_size = mMesherUtilities.CalculateBoundarySize(pCondition->GetGeometry());
478 
479  double sagitta = 0.5 * face_size * std::tan(0.25*angle);
480 
481  //correction vector according to contact curvature
482  normal_direction = normals[0] + normals[1];
483 
484  double modulus = norm_2(normal_direction);
485  if( modulus )
486  normal_direction /= modulus;
487 
488  normal_direction *= sagitta;
489 
490  //check correct curvature convexity
491  tangent_direction = pCondition->GetGeometry()[0]-pCondition->GetGeometry()[1];
492  modulus = norm_2(tangent_direction);
493  if( modulus )
494  tangent_direction /= modulus;
495 
496  //note: two possible directions depending on the NORMAL_CONTACT definition
497  if( inner_prod( normals[0], tangent_direction) > 0 )
498  normal_direction *= (-1.0);
499  }
500 
501  rVector = normal_direction;
502 
503  KRATOS_CATCH( "" )
504  }
505 
506 
507  //*******************************************************************************************
508  //*******************************************************************************************
509 
510  void HermiteInterpolation(ConditionType::Pointer& pCondition, array_1d<double,3 >& rVector)
511  {
512  KRATOS_TRY
513 
514  bool is_curved = false;
515  std::vector<array_1d<double, 3> > normals;
516 
517  is_curved = mMesherUtilities.CheckContactCurvature(pCondition->GetGeometry(), normals);
518 
519  if( is_curved ){
520 
521  this->HermiteInterpolation( pCondition->GetGeometry()[0], pCondition->GetGeometry()[1], normals[0], normals[1], rVector, 0.5);
522  }
523 
524 
525 
526  KRATOS_CATCH( "" )
527  }
528 
529 
530 
531  //*******************************************************************************************
532  //*******************************************************************************************
533 
534  void HermiteTriangleInterpolation(ConditionType::Pointer& pCondition, array_1d<double,3 >& rVector)
535  {
536  KRATOS_TRY
537 
538  bool is_curved = false;
539  std::vector<array_1d<double, 3> > normals;
540 
541  is_curved = mMesherUtilities.CheckContactCurvature(pCondition->GetGeometry(), normals);
542 
543  double baricenter = 2.0/3.0;
544  array_1d<double, 3> MidPoint;
545  MidPoint.clear();
546 
547  array_1d<double, 3> Normal;
548  Normal.clear();
549 
550  array_1d<double, 3> Curve;
551  Curve.clear();
552 
553  if( is_curved ){
554 
555  //first curve (node to face midpoint)
556  MidPoint = 0.5 * (pCondition->GetGeometry()[2] - pCondition->GetGeometry()[1]);
557  Normal = 0.5 * (normals[2] + normals[1]);
558 
559  this->HermiteInterpolation( pCondition->GetGeometry()[0], MidPoint, normals[0], Normal, Curve, baricenter);
560 
561  rVector = Curve;
562 
563  //second curve (node to face midpoint)
564  MidPoint = 0.5 * (pCondition->GetGeometry()[2] - pCondition->GetGeometry()[0]);
565  Normal = 0.5 * (normals[2] + normals[0]);
566 
567  Curve.clear();
568  this->HermiteInterpolation( pCondition->GetGeometry()[1], MidPoint, normals[1], Normal, Curve, baricenter);
569 
570  rVector += Curve;
571 
572  //first curve (node to face midpoint)
573  MidPoint = 0.5 * (pCondition->GetGeometry()[1] - pCondition->GetGeometry()[0]);
574  Normal = 0.5 * (normals[1] + normals[0]);
575 
576  this->HermiteInterpolation( pCondition->GetGeometry()[2], MidPoint, normals[2], Normal, Curve, baricenter);
577 
578  rVector += Curve;
579 
580  rVector *= 1.0/3.0;
581  }
582 
583 
584  KRATOS_CATCH( "" )
585  }
586 
587 
588  //*******************************************************************************************
589  //*******************************************************************************************
590 
592  {
593 
594  KRATOS_TRY
595 
596  //compute points distance 1-2
597  array_1d<double, 3> T1 = rP2 - rP1;
598 
599  //compute tangents
600  double projection = 0.0;
601  for( unsigned int i = 0; i<3; i++ )
602  projection += T1[i] * rN1[i];
603 
604  T1 -= ( projection * rN1 );
605 
606  double modulus = norm_2(T1);
607  if( modulus )
608  T1 /= modulus;
609 
610  //compute points distance 2-1
611  array_1d<double, 3> T2 = rP1 - rP2;
612 
613  //compute tangents
614  projection = 0.0;
615  for( unsigned int i = 0; i<3; i++ )
616  projection += T2[i] * rN2[i];
617 
618  T2 -= ( projection * rN2 );
619 
620  modulus = norm_2(T2);
621  if( modulus )
622  T2 /= modulus;
623 
624  T2 *= (-1);
625 
626  //compute normalized s-point position s in [0,1]
627  array_1d<double, 3> M = s * rP2 - s * rP1;
628 
629  modulus = norm_2(rP2-rP1);
630  if( modulus )
631  projection = norm_2(M)/modulus;
632 
633  //hermite basis functions
634  double h00 = 2.0 * projection * projection * projection - 3.0 * projection * projection + 1.0;
635  double h10 = projection * projection * projection - 2.0 * projection * projection + projection;
636  double h01 = -2.0 * projection * projection * projection + 3.0 * projection * projection;
637  double h11 = projection * projection * projection - projection * projection;
638 
639  //hermite interpolation polinomial
640  rD = h00 * rP1;
641  rD += h10 * modulus * T1;
642  rD += h01 * rP2;
643  rD += h11 * modulus * T2;
644 
645  //increment of position
646  M = (s * rP2 + (1-s) * rP1);
647 
648  rD -= M;
649 
650  //check correct curvature convexity
651  T1 = rP2 - rP1;
652  modulus = norm_2(T1);
653  if( modulus )
654  T1 /= modulus;
655 
656  //note: two possible directions depending on the NORMAL_CONTACT definition
657  double d1 = inner_prod( rN1, T1);
658  double d2 = inner_prod( rN2, -T1);
659  if( d1 * d2 > 0 ){
660  if( d1 > 0 )
661  rD *= (-1.0);
662  }
663  else{
664  rD *= 0.0;
665  }
666 
667  KRATOS_CATCH( "" )
668 
669  }
670 
671  //*******************************************************************************************
672  //*******************************************************************************************
673 
675  {
676 
677  KRATOS_TRY
678 
679  ProcessInfo& rCurrentProcessInfo = rModelPart.GetProcessInfo();
680  bool refine_condition = false;
681 
682 
683  mrRemesh.Refine->Info.BoundaryConditionsRefined.Initialize();
684 
685  //LOOP TO CONSIDER ALL SUBDOMAIN CONDITIONS
686 
687  bool refine_candidate = false;
688  for(ModelPart::ConditionsContainerType::iterator i_cond = rModelPart.ConditionsBegin(); i_cond!= rModelPart.ConditionsEnd(); ++i_cond)
689  {
690 
691  refine_candidate = false;
692  i_cond->Set(TO_REFINE, false);
693 
694  if( mrRemesh.Options.Is(MesherUtilities::CONSTRAINED) ){
695  if( i_cond->Is(BOUNDARY) ) //ONLY SET TO THE BOUNDARY SKIN CONDITIONS (CompositeCondition)
696  refine_candidate = true;
697  else
698  refine_candidate = false;
699  }
700  else{
701  refine_candidate = true;
702  }
703 
704 
705  if( refine_candidate ){
706  if (mrRemesh.Refine->RefiningBoxSetFlag == true ){
707  refine_candidate = mMesherUtilities.CheckConditionInBox(*(i_cond.base()), *(mrRemesh.Refine->RefiningBox), rCurrentProcessInfo);
708  }
709  }
710 
711 
712  if( refine_candidate ){
713 
714  //double condition_radius = 0;
715  if( i_cond->IsNot(TO_ERASE) ){
716 
717  refine_condition = this->RefineBoundaryCondition(*(i_cond.base()), rCurrentProcessInfo);
718 
719  if( refine_condition ){
720  i_cond->Set(TO_REFINE);
721  }
722  else{
723  refine_condition = this->RefineContactCondition(*(i_cond.base()), rCurrentProcessInfo);
724 
725  if( refine_condition )
726  i_cond->Set(TO_REFINE);
727  }
728 
729  }
730  else{
731  if( this->mEchoLevel > 0 )
732  std::cout<<" Condition "<<i_cond->Id()<<" TO_ERASE "<<std::endl;
733  }
734 
735  }
736  }
737 
738 
739  KRATOS_CATCH( "" )
740  }
741 
742  //*******************************************************************************************
743  //*******************************************************************************************
744 
745  void GenerateNewNodes(ModelPart& rModelPart, std::vector<NodeType::Pointer>& list_of_nodes, std::vector<ConditionType::Pointer>& list_of_conditions)
746  {
747  KRATOS_TRY
748 
749  ProcessInfo& rCurrentProcessInfo = rModelPart.GetProcessInfo();
750 
751  MeshDataTransferUtilities DataTransferUtilities;
752 
753  NodeType::Pointer pNode;
754 
755  //center
756  double xc = 0;
757  double yc = 0;
758  double zc = 0;
759 
760  //radius
761  double radius = 0;
762 
763  //assign data to dofs
764  NodeType::DofsContainerType& ReferenceDofs = rModelPart.Nodes().front().GetDofs();
765 
767 
768 
769  std::vector<double> ShapeFunctionsN;
770 
771  unsigned int id = MesherUtilities::GetMaxNodeId(rModelPart) + 1;
772 
773  unsigned int size = 0;
774  unsigned int count = 0;
775 
776  for(ModelPart::ConditionsContainerType::iterator i_cond = rModelPart.ConditionsBegin(); i_cond!= rModelPart.ConditionsEnd(); ++i_cond)
777  {
778  if( i_cond->Is(TO_REFINE) )
779  {
780 
781  Geometry< Node >& rGeometry = i_cond->GetGeometry();
782 
783  size = rGeometry.size();
784 
785  ShapeFunctionsN.resize(size);
786 
787 
788  if( size == 2 )
789  DataTransferUtilities.CalculateCenterAndSearchRadius( rGeometry[0].X(), rGeometry[0].Y(),
790  rGeometry[1].X(), rGeometry[1].Y(),
791  xc,yc,radius);
792 
793 
794  if( size == 3 )
795  DataTransferUtilities.CalculateCenterAndSearchRadius( rGeometry[0].X(), rGeometry[0].Y(), rGeometry[0].Z(),
796  rGeometry[1].X(), rGeometry[1].Y(), rGeometry[1].Z(),
797  rGeometry[2].X(), rGeometry[2].Y(), rGeometry[2].Z(),
798  xc,yc,zc,radius);
799 
800 
801  this->SetNodalPosition(*(i_cond.base()), rCurrentProcessInfo, xc, yc, zc);
802 
803  //create a new node
804  pNode = Kratos::make_intrusive<Node>( id, xc, yc, zc );
805 
806  //giving model part variables list to the node
807  pNode->SetSolutionStepVariablesList(&VariablesList);
808 
809  //set buffer size
810  pNode->SetBufferSize(rModelPart.GetBufferSize());
811 
812  //generating the dofs
813  for(Node::DofsContainerType::iterator i_dof = ReferenceDofs.begin(); i_dof != ReferenceDofs.end(); ++i_dof)
814  {
815  NodeType::DofType& rDof = **i_dof;
816  NodeType::DofType::Pointer pNewDof = pNode->pAddDof( rDof );
817 
818  count = 0;
819  for( unsigned int i = 0; i<size; i++ )
820  {
821  if(rGeometry[i].IsFixed(rDof.GetVariable()))
822  count++;
823  }
824 
825  if( count == size )
826  (pNewDof)->FixDof();
827  else
828  (pNewDof)->FreeDof();
829  }
830 
831  std::fill(ShapeFunctionsN.begin(), ShapeFunctionsN.end(), 1.0/double(size));
832 
833  double alpha = 1;
834  DataTransferUtilities.Interpolate( rGeometry, ShapeFunctionsN, VariablesList, pNode, alpha );
835 
836  //set flags
837  pNode->Set(NEW_ENTITY);
838  pNode->Set(BOUNDARY);
839 
840  //set boundary model part names from one of the condition nodes
841  pNode->SetValue(MODEL_PART_NAMES, rGeometry[0].GetValue(MODEL_PART_NAMES));
842 
843  //set variables
844  this->SetNewNodeVariables(rModelPart, *(i_cond.base()), pNode);
845 
846  list_of_nodes.push_back(pNode);
847  list_of_conditions.push_back(*(i_cond.base()));
848 
849  id++;
850 
851  }
852 
853  }
854 
855  KRATOS_CATCH( "" )
856  }
857 
858 
859  //*******************************************************************************************
860  //*******************************************************************************************
861 
862  virtual void SetNewNodeVariables(ModelPart& rModelPart, ConditionType::Pointer& pCondition, NodeType::Pointer& pNode)
863  {
864  KRATOS_TRY
865 
866  //set variables:
867  Geometry< Node >& rGeometry = pCondition->GetGeometry();
868 
869 
870  //set model part
871  pNode->SetValue(MODEL_PART_NAME,rModelPart.Name());
872 
873  //set nodal_h
874  //pNode->FastGetSolutionStepValue(NODAL_H) = mrRemesh.Refine->CriticalSide; //too small problems
875  pNode->FastGetSolutionStepValue(NODAL_H) = rGeometry.DomainSize();
876 
877  //set normal
878  noalias(pNode->FastGetSolutionStepValue(NORMAL)) = pCondition->GetValue(NORMAL);
879 
880  //set original position
881  const array_1d<double,3>& Displacement = pNode->FastGetSolutionStepValue(DISPLACEMENT);
882  pNode->X0() = pNode->X() - Displacement[0];
883  pNode->Y0() = pNode->Y() - Displacement[1];
884  pNode->Z0() = pNode->Z() - Displacement[2];
885 
886  //set contact force
887  unsigned int count = 0;
888  for( unsigned int i = 0; i<rGeometry.size(); i++ )
889  {
890  if ( rGeometry[i].SolutionStepsDataHas(CONTACT_FORCE) ) {
891  if( norm_2(rGeometry[i].FastGetSolutionStepValue(CONTACT_FORCE)) == 0 )
892  count++;
893  }
894  }
895 
896  if( count )
897  pNode->FastGetSolutionStepValue(CONTACT_FORCE).clear();
898 
899 
900  KRATOS_CATCH( "" )
901  }
902 
903 
904  //*******************************************************************************************
905  //*******************************************************************************************
906 
907  void GenerateNewConditions(ModelPart& rModelPart, std::vector<NodeType::Pointer >& list_of_nodes, std::vector<ConditionType::Pointer>& list_of_conditions)
908  {
909  KRATOS_TRY
910 
911  std::vector<ConditionType::Pointer> list_of_new_conditions;
912 
913  unsigned int id = MesherUtilities::GetMaxConditionId(rModelPart) + 1;
914 
915  ConditionType::Pointer pCondition;
916 
917  int size = 0;
918 
919  unsigned int counter = 0;
920 
921  for(std::vector<ConditionType::Pointer>::iterator i_cond = list_of_conditions.begin(); i_cond!= list_of_conditions.end(); ++i_cond)
922  {
923  Geometry< Node >& rGeometry = (*i_cond)->GetGeometry();
924 
925  size = rGeometry.size();
926 
927  PointsArrayType Nodes(size);
928 
929  if( size == 2 ){
930 
931  //new condition 1
932  Nodes(0) = rGeometry(0);
933  Nodes(1) = list_of_nodes[counter];
934 
935  pCondition = (*i_cond)->Clone(id, Nodes);
936 
937  //set flags
938  pCondition->Set(NEW_ENTITY);
939 
940  SetNewConditionVariables((*i_cond), pCondition);
941 
942  id++;
943 
944  list_of_new_conditions.push_back(pCondition);
945 
946  //new condition 2
947  Nodes(0) = list_of_nodes[counter];
948  Nodes(1) = rGeometry(1);
949 
950  pCondition = (*i_cond)->Clone(id, Nodes);
951 
952  //set flags
953  pCondition->Set(NEW_ENTITY);
954 
955  //set variables
956  this->SetNewConditionVariables((*i_cond), pCondition);
957 
958  id++;
959 
960  list_of_new_conditions.push_back(pCondition);
961  }
962 
963  if( size == 3 ){
964 
965  //new condition 1
966  Nodes(0) = rGeometry(0);
967  Nodes(1) = rGeometry(1);
968  Nodes(2) = list_of_nodes[counter];
969 
970  pCondition = (*i_cond)->Clone(id, Nodes);
971 
972  //set flags
973  pCondition->Set(NEW_ENTITY);
974 
975  SetNewConditionVariables((*i_cond), pCondition);
976 
977  id++;
978 
979  list_of_new_conditions.push_back(pCondition);
980 
981  //new condition 2
982  Nodes(0) = rGeometry(1);
983  Nodes(1) = rGeometry(2);
984  Nodes(2) = list_of_nodes[counter];
985 
986 
987  pCondition = (*i_cond)->Clone(id, Nodes);
988 
989  //set flags
990  pCondition->Set(NEW_ENTITY);
991 
992  //set variables
993  SetNewConditionVariables((*i_cond), pCondition);
994 
995  id++;
996 
997  list_of_new_conditions.push_back(pCondition);
998 
999 
1000  //new condition 3
1001  Nodes(0) = rGeometry(2);
1002  Nodes(1) = rGeometry(0);
1003  Nodes(2) = list_of_nodes[counter];
1004 
1005 
1006  pCondition = (*i_cond)->Clone(id, Nodes);
1007 
1008  //set flags
1009  pCondition->Set(NEW_ENTITY);
1010 
1011  //set variables
1012  SetNewConditionVariables((*i_cond), pCondition);
1013 
1014  id++;
1015 
1016  list_of_new_conditions.push_back(pCondition);
1017 
1018 
1019  }
1020 
1021  // once the condition is refined set to erase
1022  (*i_cond)->Set(TO_ERASE);
1023  (*i_cond)->Set(TO_REFINE, false);
1024 
1025  ConditionsContainerType& ChildrenConditions = (*i_cond)->GetValue(CHILDREN_CONDITIONS);
1026 
1027  for (ConditionConstantIterator cn = ChildrenConditions.begin() ; cn != ChildrenConditions.end(); ++cn)
1028  {
1029  cn->Set(TO_ERASE);
1030  }
1031 
1032 
1033  counter++;
1034 
1035  }
1036 
1037  //update the list of old conditions with the list of new conditions
1038  list_of_conditions = list_of_new_conditions;
1039 
1040  KRATOS_CATCH( "" )
1041  }
1042 
1043 
1044 
1045  //*******************************************************************************************
1046  //*******************************************************************************************
1047 
1048  virtual void SetNewConditionVariables(ConditionType::Pointer& pOldCondition, ConditionType::Pointer& pNewCondition)
1049  {
1050  KRATOS_TRY
1051 
1052  //set variables
1053  pNewCondition->SetValue( MASTER_NODES , pOldCondition->GetValue(MASTER_NODES) );
1054  pNewCondition->SetValue( NORMAL , pOldCondition->GetValue(NORMAL) );
1055  pNewCondition->SetValue( CAUCHY_STRESS_VECTOR , pOldCondition->GetValue(CAUCHY_STRESS_VECTOR) );
1056  pNewCondition->SetValue( DEFORMATION_GRADIENT , pOldCondition->GetValue(DEFORMATION_GRADIENT) );
1057 
1058  KRATOS_CATCH( "" )
1059  }
1060 
1061 
1062  //*******************************************************************************************
1063  //*******************************************************************************************
1064 
1065  void SetNodesToModelPart(ModelPart& rModelPart, std::vector<NodeType::Pointer>& list_of_nodes)
1066  {
1067  KRATOS_TRY
1068 
1069  if(list_of_nodes.size()){
1070 
1071  //add new conditions: ( SOLID body model part )
1072  for(std::vector<NodeType::Pointer>::iterator i_node = list_of_nodes.begin(); i_node!= list_of_nodes.end(); ++i_node)
1073  {
1074  rModelPart.Nodes().push_back(*(i_node));
1075  }
1076 
1077  }
1078 
1079  KRATOS_CATCH( "" )
1080  }
1081  //*******************************************************************************************
1082  //*******************************************************************************************
1083 
1084  void SetConditionsToModelPart(ModelPart& rModelPart, std::vector<ConditionType::Pointer>& list_of_conditions)
1085  {
1086  KRATOS_TRY
1087 
1088  if(list_of_conditions.size()){
1089 
1090  //clear erased conditions: ( SOLID body model part )
1091  this->CleanModelPartConditions(rModelPart);
1092 
1093  //add new conditions: ( SOLID body model part )
1094  for(std::vector<ConditionType::Pointer>::iterator i_cond = list_of_conditions.begin(); i_cond!= list_of_conditions.end(); ++i_cond)
1095  {
1096  rModelPart.Conditions().push_back(*(i_cond));
1097  }
1098 
1099  }
1100 
1101  if( this->mEchoLevel > 0 )
1102  std::cout<<" [ CONDITIONS ( inserted : "<<list_of_conditions.size()<<" ) ]"<<std::endl;
1103 
1104  mrRemesh.Info->InsertedBoundaryConditions = list_of_conditions.size();
1105 
1106  //renumerate conditions
1107  // unsigned int id=1;
1108  // for(ModelPart::ConditionsContainerType::iterator i_cond = rModelPart.ConditionsBegin(); i_cond!= rModelPart.ConditionsEnd(); ++i_cond)
1109  // {
1110  // i_cond->SetId(id);
1111  // id++;
1112  // }
1113 
1114 
1115  KRATOS_CATCH( "" )
1116  }
1117 
1118 
1119  //*******************************************************************************************
1120  //*******************************************************************************************
1121 
1123  {
1124  KRATOS_TRY
1125 
1126 
1127  //clean old conditions (TO_ERASE) and add new conditions (NEW_ENTITY)
1128  ModelPart::ConditionsContainerType PreservedConditions;
1129  PreservedConditions.reserve(rModelPart.Conditions().size());
1130  PreservedConditions.swap(rModelPart.Conditions());
1131 
1132  for(ModelPart::ConditionsContainerType::iterator i_cond = PreservedConditions.begin(); i_cond!= PreservedConditions.end(); ++i_cond)
1133  {
1134  if(i_cond->IsNot(TO_ERASE))
1135  rModelPart.Conditions().push_back(*(i_cond.base()));
1136  }
1137 
1138  if( this->mEchoLevel > 0 )
1139  std::cout<<" [ CONDITIONS ( erased : "<<PreservedConditions.size()-rModelPart.Conditions().size()<<" ) ]"<<std::endl;
1140 
1141 
1142  KRATOS_CATCH( "" )
1143  }
1144 
1148 
1149 
1153 
1154 
1158 
1159 
1163 
1164 
1166 
1167 private:
1168 
1171 
1175 
1179 
1183 
1187 
1191 
1195 
1196 
1199 
1200 
1202 
1203 
1205  //Process(Process const& rOther);
1206 
1207 
1209 
1210 }; // Class Process
1211 
1213 
1216 
1217 
1221 
1222 
1224 inline std::istream& operator >> (std::istream& rIStream,
1226 
1228 inline std::ostream& operator << (std::ostream& rOStream,
1229  const RefineConditionsMesherProcess& rThis)
1230 {
1231  rThis.PrintInfo(rOStream);
1232  rOStream << std::endl;
1233  rThis.PrintData(rOStream);
1234 
1235  return rOStream;
1236 }
1238 
1239 
1240 } // namespace Kratos.
1241 
1242 #endif // KRATOS_REFINE_CONDITIONS_MESHER_PROCESS_H_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
Dof represents a degree of freedom (DoF).
Definition: dof.h:86
const VariableData & GetVariable() const
Definition: dof.h:303
Dof * Pointer
Pointer definition of Dof.
Definition: dof.h:93
Base class for all Elements.
Definition: element.h:60
virtual void CalculateOnIntegrationPoints(const Variable< bool > &rVariable, std::vector< bool > &rOutput, const ProcessInfo &rCurrentProcessInfo)
Definition: element.h:719
bool Is(Flags const &rOther) const
Definition: flags.h:274
TVariableType::Type & GetValue(const TVariableType &rThisVariable)
Definition: geometrical_object.h:248
GeometryType & GetGeometry()
Returns the reference of the geometry.
Definition: geometrical_object.h:158
Geometry base class.
Definition: geometry.h:71
void SetValue(const TVariableType &rThisVariable, typename TVariableType::Type const &rValue)
Definition: geometry.h:617
SizeType size() const
Definition: geometry.h:518
virtual double DomainSize() const
This method calculate and return length, area or volume of this geometry depending to it's dimension.
Definition: geometry.h:1371
Short class definition.
Definition: mesh_data_transfer_utilities.hpp:46
void CalculateCenterAndSearchRadius(const std::vector< std::vector< double > > &rPointCoordinates, std::vector< double > &rCenter, double &rRadius)
Definition: mesh_data_transfer_utilities.hpp:334
void Interpolate(Geometry< Node > &geom, const std::vector< double > &N, VariablesList &rVariablesList, Node::Pointer pnode, double alpha=1.0)
Definition: mesh_data_transfer_utilities.cpp:1435
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 GetMaxConditionId(ModelPart &rModelPart)
Definition: mesher_utilities.hpp:1461
bool CheckContactActive(GeometryType &rConditionGeometry, bool &rSemiActiveContact, std::vector< bool > &rSemiActiveNodes)
Definition: mesher_utilities.cpp:1847
bool CheckConditionInBox(Condition::Pointer &pCondition, SpatialBoundingBox &rRefiningBox, ProcessInfo &rCurrentProcessInfo)
Definition: mesher_utilities.cpp:1559
static unsigned int GetMaxNodeId(ModelPart &rModelPart)
Definition: mesher_utilities.hpp:1408
static double CalculateBoundarySize(Geometry< Node > &rGeometry)
Definition: mesher_utilities.hpp:1078
bool CheckSubdomain(Geometry< Node > &rGeometry)
Definition: mesher_utilities.cpp:198
bool CheckContactCurvature(GeometryType &rConditionGeometry, std::vector< array_1d< double, 3 >> &rContactNormals)
Definition: mesher_utilities.cpp:1889
This class aims to manage meshes for multi-physics simulations.
Definition: model_part.h:77
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
std::string & Name()
Definition: model_part.h:1811
IndexType GetBufferSize() const
This method gets the suffer size of the model part database.
Definition: model_part.h:1876
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
SizeType NumberOfConditions(IndexType ThisIndex=0) const
Definition: model_part.h:1218
SizeType NumberOfNodes(IndexType ThisIndex=0) const
Definition: model_part.h:341
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
VariablesList & GetNodalSolutionStepVariablesList()
Definition: model_part.h:549
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
This class defines the node.
Definition: node.h:65
std::vector< std::unique_ptr< Dof< double > >> DofsContainerType
The DoF container type definition.
Definition: node.h:92
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
boost::indirect_iterator< typename TContainerType::iterator > iterator
Definition: pointer_vector_set.h:95
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
iterator begin()
Returns an iterator pointing to the beginning of the container.
Definition: pointer_vector_set.h:278
boost::indirect_iterator< typename TContainerType::const_iterator > const_iterator
Definition: pointer_vector_set.h:96
iterator end()
Returns an iterator pointing to the end of the container.
Definition: pointer_vector_set.h:314
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
Refine Mesh Boundary Process.
Definition: refine_conditions_mesher_process.hpp:50
bool RefineContactCondition(ConditionType::Pointer &pCondition, ProcessInfo &rCurrentProcessInfo)
Definition: refine_conditions_mesher_process.hpp:330
std::string Info() const override
Turn back information as a string.
Definition: refine_conditions_mesher_process.hpp:183
int mEchoLevel
Definition: refine_conditions_mesher_process.hpp:222
void CircleInterpolation(ConditionType::Pointer &pCondition, array_1d< double, 3 > &rVector)
Definition: refine_conditions_mesher_process.hpp:451
RefineConditionsMesherProcess(ModelPart &rModelPart, MesherUtilities::MeshingParameters &rRemeshingParameters, int EchoLevel)
Default constructor.
Definition: refine_conditions_mesher_process.hpp:73
void SelectBoundaryToRefine(ModelPart &rModelPart)
Definition: refine_conditions_mesher_process.hpp:674
virtual void SetNewConditionVariables(ConditionType::Pointer &pOldCondition, ConditionType::Pointer &pNewCondition)
Definition: refine_conditions_mesher_process.hpp:1048
void HermiteInterpolation(ConditionType::Pointer &pCondition, array_1d< double, 3 > &rVector)
Definition: refine_conditions_mesher_process.hpp:510
MesherUtilities mMesherUtilities
Definition: refine_conditions_mesher_process.hpp:220
void GenerateNewConditions(ModelPart &rModelPart, std::vector< NodeType::Pointer > &list_of_nodes, std::vector< ConditionType::Pointer > &list_of_conditions)
Definition: refine_conditions_mesher_process.hpp:907
void HermiteTriangleInterpolation(ConditionType::Pointer &pCondition, array_1d< double, 3 > &rVector)
Definition: refine_conditions_mesher_process.hpp:534
bool RefineOnDistance(ConditionType::Pointer &pCondition, double &critical_size)
Definition: refine_conditions_mesher_process.hpp:265
void SetNodalPosition(ConditionType::Pointer &pCondition, ProcessInfo &rCurrentProcessInfo, double &xc, double &yc, double &zc)
Definition: refine_conditions_mesher_process.hpp:402
PointerVectorSet< ConditionType, IndexedObject > ConditionsContainerType
Definition: refine_conditions_mesher_process.hpp:64
ConditionType::GeometryType GeometryType
Definition: refine_conditions_mesher_process.hpp:61
ConditionsContainerType::const_iterator ConditionConstantIterator
Definition: refine_conditions_mesher_process.hpp:66
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: refine_conditions_mesher_process.hpp:91
bool RefineOnThreshold(ConditionType::Pointer &pCondition, ProcessInfo &rCurrentProcessInfo, double &critical_size)
Definition: refine_conditions_mesher_process.hpp:228
void SetConditionsToModelPart(ModelPart &rModelPart, std::vector< ConditionType::Pointer > &list_of_conditions)
Definition: refine_conditions_mesher_process.hpp:1084
void SetNodesToModelPart(ModelPart &rModelPart, std::vector< NodeType::Pointer > &list_of_nodes)
Definition: refine_conditions_mesher_process.hpp:1065
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: refine_conditions_mesher_process.hpp:189
ConditionsContainerType::iterator ConditionIterator
Definition: refine_conditions_mesher_process.hpp:65
ModelPart::PropertiesType PropertiesType
Definition: refine_conditions_mesher_process.hpp:60
void GenerateNewNodes(ModelPart &rModelPart, std::vector< NodeType::Pointer > &list_of_nodes, std::vector< ConditionType::Pointer > &list_of_conditions)
Definition: refine_conditions_mesher_process.hpp:745
MesherUtilities::MeshingParameters & mrRemesh
Definition: refine_conditions_mesher_process.hpp:218
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: refine_conditions_mesher_process.hpp:195
bool RefineBoundaryCondition(ConditionType::Pointer &pCondition, ProcessInfo &rCurrentProcessInfo)
Definition: refine_conditions_mesher_process.hpp:283
ModelPart::NodeType NodeType
Definition: refine_conditions_mesher_process.hpp:58
void CleanModelPartConditions(ModelPart &rModelPart)
Definition: refine_conditions_mesher_process.hpp:1122
virtual void SetNewNodeVariables(ModelPart &rModelPart, ConditionType::Pointer &pCondition, NodeType::Pointer &pNode)
Definition: refine_conditions_mesher_process.hpp:862
ModelPart & mrModelPart
Definition: refine_conditions_mesher_process.hpp:216
ModelPart::ConditionType ConditionType
Definition: refine_conditions_mesher_process.hpp:59
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: refine_conditions_mesher_process.hpp:103
KRATOS_CLASS_POINTER_DEFINITION(RefineConditionsMesherProcess)
Pointer definition of Process.
virtual ~RefineConditionsMesherProcess()
Destructor.
Definition: refine_conditions_mesher_process.hpp:83
void HermiteInterpolation(const array_1d< double, 3 > &rP1, const array_1d< double, 3 > &rP2, const array_1d< double, 3 > &rN1, const array_1d< double, 3 > &rN2, array_1d< double, 3 > &rD, double s)
Definition: refine_conditions_mesher_process.hpp:591
PointerVector< NodeType > PointsArrayType
Definition: refine_conditions_mesher_process.hpp:62
Holds a list of variables and their position in VariablesListDataValueContainer.
Definition: variables_list.h:50
BOOST_UBLAS_INLINE void clear()
Definition: array_1d.h:325
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
static int EchoLevel
Definition: co_sim_EMPIRE_API.h:42
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
TExpressionType::data_type norm_2(AMatrix::MatrixExpression< TExpressionType, TCategory > const &TheExpression)
Definition: amatrix_interface.h:625
TExpression1Type::data_type inner_prod(AMatrix::MatrixExpression< TExpression1Type, TCategory1 > const &First, AMatrix::MatrixExpression< TExpression2Type, TCategory2 > const &Second)
Definition: amatrix_interface.h:592
std::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
TABLE_NUMBER_ANGULAR_VELOCITY TABLE_NUMBER_MOMENT I33 BEAM_INERTIA_ROT_UNIT_LENGHT_Y KRATOS_DEFINE_APPLICATION_VARIABLE(DEM_APPLICATION, double, BEAM_INERTIA_ROT_UNIT_LENGHT_Z) typedef std double
Definition: DEM_application_variables.h:182
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
v
Definition: generate_convection_diffusion_explicit_element.py:114
alpha
Definition: generate_convection_diffusion_explicit_element.py:113
int count
Definition: generate_frictional_mortar_condition.py:212
float radius
Definition: mesh_to_mdpa_converter.py:18
float xc
Definition: rotating_cone.py:77
float yc
Definition: rotating_cone.py:78
int counter
Definition: script_THERMAL_CORRECT.py:218
integer i
Definition: TensorModule.f:17
subroutine d1(DSTRAN, D, dtime, NDI, NSHR, NTENS)
Definition: TensorModule.f:594
float factor
for node in (self.combined_model_part).Nodes: pold = node.GetSolutionStepValue(PRESSURE,...
Definition: ulf_PGLASS.py:254
Definition: mesher_utilities.hpp:631
MeshingInfoParameters::Pointer Info
Definition: mesher_utilities.hpp:681
Flags Options
Definition: mesher_utilities.hpp:645
RefiningParameters::Pointer Refine
Definition: mesher_utilities.hpp:684
std::string SubModelPartName
Definition: mesher_utilities.hpp:642