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.
parametric_wall_contact_search_process.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosContactMechanicsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: July 2016 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined(KRATOS_PARAMETRIC_WALL_CONTACT_SEARCH_PROCESS_H_INCLUDED )
11 #define KRATOS_PARAMETRIC_WALL_CONTACT_SEARCH_PROCESS_H_INCLUDED
12 
13 
14 // External includes
15 
16 // System includes
17 #ifdef _OPENMP
18 #include <omp.h>
19 #endif
20 
21 // Project includes
22 #include "includes/model_part.h"
23 #include "utilities/openmp_utils.h"
24 #include "geometries/point_2d.h"
25 #include "geometries/point_3d.h"
26 
27 // Contact Point Conditions
30 
35 
36 
37 // #include "custom_conditions/rigid_contact/axisym_point_rigid_contact_penalty_water_2D_condition.hpp"
38 // #include "custom_conditions/beam_contact/beam_point_rigid_contact_penalty_3D_condition.hpp"
39 // #include "custom_conditions/beam_contact/beam_point_rigid_contact_LM_3D_condition.hpp"
40 // #include "custom_conditions/rigid_contact/rigid_body_point_rigid_contact_condition.hpp"
41 
42 //#include "custom_friction/friction_law.hpp"
43 
45 
46 
47 namespace Kratos
48 {
51 
55 
59 
63 
64 
67 
69 
77  : public Process
78  {
79  public:
82 
85 
92  typedef FrictionLaw::Pointer FrictionLawType;
93 
97 
99  ParametricWallContactSearchProcess(ModelPart& rMainModelPart): mrMainModelPart(rMainModelPart) {}
100 
101 
103  std::string rSubModelPartName,
104  SpatialBoundingBox::Pointer pParametricWall,
105  Parameters CustomParameters)
106  : mrMainModelPart(rMainModelPart)
107  {
108  KRATOS_TRY
109 
110  mEchoLevel = 1;
111 
112  mpParametricWall = pParametricWall;
113 
114  Parameters DefaultParameters( R"(
115  {
116  "contact_condition_type": "PointContactCondition2D1N",
117  "hydraulic_condition_type": "HydraulicPointContactCondition2D1N",
118  "kratos_module": "KratosMultiphysics.ContactMechanicsApplication",
119  "friction_law_type": "FrictionLaw",
120  "variables_of_properties":{
121  "FRICTION_ACTIVE": false,
122  "MU_STATIC": 0.3,
123  "MU_DYNAMIC": 0.2,
124  "PENALTY_PARAMETER": 1000,
125  "TANGENTIAL_PENALTY_RATIO": 0.1,
126  "TAU_STAB": 1
127  }
128 
129  } )" );
130 
131 
132  //validate against defaults -- this also ensures no type mismatch
133  CustomParameters.ValidateAndAssignDefaults(DefaultParameters);
134 
135  //create condition prototype:
136  mpConditionType = CreateConditionPrototype( CustomParameters );
137 
138  //std::cout<<" ConditionPointer "<<*mpConditionType<<std::endl;
139 
140  if(mpConditionType.get() == nullptr)
141  std::cout<<" ERROR:: PROTOTYPE CONTACT WALL CONDITION NOT DEFINED PROPERLY "<<std::endl;
142 
143  //contact model part
144  mContactModelPartName = rSubModelPartName;
145 
146  KRATOS_CATCH(" ")
147 
148  }
149 
152 
153 
157 
159  void operator()()
160  {
161  Execute();
162  }
163 
164 
168 
169 
171  void Execute() override
172  {
173  KRATOS_TRY
174 
175  if( mEchoLevel > 1 )
176  std::cout<<" [PARAMETRIC_CONTACT_SEARCH]:: -START- "<<std::endl;
177 
178  //update parametric wall position
179  const ProcessInfo& rCurrentProcessInfo= mrMainModelPart.GetProcessInfo();
180  const double Time = rCurrentProcessInfo[TIME];
181 
182  mpParametricWall->UpdateBoxPosition( Time );
183 
184  //reset CONTACT flag to all modelpart nodes
185  ClearContactFlags();
186 
187  //search contact conditions
188  SearchContactConditions();
189 
190  //create contact conditions
191  this->CreateContactConditions();
192 
193  if( mEchoLevel > 1 )
194  std::cout<<" [PARAMETRIC_CONTACT_SEARCH]:: -END- "<<std::endl;
195 
196  KRATOS_CATCH( "" )
197  }
198 
201  void ExecuteInitialize() override
202  {
203  KRATOS_TRY
204 
205  // set BOUNDARY flag to nodes from structural elements
206  for(ModelPart::ElementsContainerType::iterator ie = mrMainModelPart.ElementsBegin(); ie!=mrMainModelPart.ElementsEnd(); ie++)
207  {
208 
209  if( ie->GetGeometry().size() == 2 ){
210  for( unsigned int i=0; i<ie->GetGeometry().size(); i++ )
211  {
212  ie->GetGeometry()[i].Set(BOUNDARY,true);
213  }
214  }
215 
216  }
217 
218  // set BOUNDARY flag to nodes from RIGID sub model parts
219  // for(ModelPart::SubModelPartIterator i_mp= mrMainModelPart.SubModelPartsBegin() ; i_mp!=mrMainModelPart.SubModelPartsEnd(); i_mp++)
220  // {
221  // if( i_mp->Is(RIGID) ){
222 
223  // for(ModelPart::ElementsContainerType::iterator ie = i_mp->ElementsBegin(); ie!=i_mp->ElementsEnd(); ie++)
224  // {
225 
226  // for( unsigned int i=0; i<ie->GetGeometry().size(); i++ )
227  // {
228  // ie->GetGeometry()[i].Set(BOUNDARY,true);
229  // }
230  // }
231  // for(ModelPart::ConditionsContainerType::iterator ic = i_mp->ConditionsBegin(); ic!=i_mp->ConditionsEnd(); ic++)
232  // {
233 
234  // for( unsigned int i=0; i<ic->GetGeometry().size(); i++ )
235  // {
236  // ic->GetGeometry()[i].Set(BOUNDARY,true);
237  // }
238  // }
239  // }
240 
241  // }
242 
243  KRATOS_CATCH( "" )
244  }
245 
249  {
250  }
251 
252 
255  {
256  }
257 
258 
261  {
262  }
263 
264 
266  void ExecuteBeforeOutputStep() override
267  {
268  }
269 
270 
272  void ExecuteAfterOutputStep() override
273  {
274  }
275 
276 
279  void ExecuteFinalize() override
280  {
281  }
282 
283 
287 
288 
292 
293 
297 
299  std::string Info() const override
300  {
301  return "ParametricWallContactSearchProcess";
302  }
303 
305  void PrintInfo(std::ostream& rOStream) const override
306  {
307  rOStream << "ParametricWallContactSearchProcess";
308  }
309 
311  void PrintData(std::ostream& rOStream) const override
312  {
313  }
314 
315 
319 
320 
322 
323  protected:
326 
327 
331 
333 
334  SpatialBoundingBox::Pointer mpParametricWall;
335 
336  ConditionType::Pointer mpConditionType;
337 
338  PropertiesType::Pointer mpProperties;
339 
341 
343 
347 
348  virtual void CreateContactConditions()
349  {
350  KRATOS_TRY
351 
352  ProcessInfo& rCurrentProcessInfo= mrMainModelPart.GetProcessInfo();
353  double Dimension = rCurrentProcessInfo[SPACE_DIMENSION];
354 
355  ModelPart::ConditionsContainerType ContactConditions;
356 
358 
359  if( mEchoLevel > 1 ){
360  std::cout<<" ["<<rContactModelPart.Name()<<" :: CONDITIONS [OLD:"<<rContactModelPart.NumberOfConditions();
361  }
362 
363  unsigned int id = mrMainModelPart.Conditions().back().Id() + 1;
364 
366 
367  // create contact condition for rigid and deformable bodies
368  for(ModelPart::NodesContainerType::ptr_iterator nd = rNodes.ptr_begin(); nd != rNodes.ptr_end(); ++nd)
369  {
370  if( (*nd)->Is(BOUNDARY) && (*nd)->Is(CONTACT) ){
371 
372  ConditionType::Pointer pCondition;
373 
374 
375  if( (*nd)->Is(RIGID) ){ //rigid wall contacting with a rigid body
376 
377  GeometryType::Pointer pGeometry;
378  if( Dimension == 2 )
379  pGeometry = Kratos::make_shared<Point2DType>(*nd);
380  else if( Dimension == 3 )
381  pGeometry = Kratos::make_shared<Point3DType>(*nd);
382 
383  //pCondition= Kratos::make_intrusive<RigidBodyPointRigidContactCondition>(id, pGeometry, mpProperties, mpParametricWall);
384 
385  ContactConditions.push_back(pCondition);
386 
387  }
388  else{ //rigid wall contacting with a deformable body
389 
390  Condition::NodesArrayType pConditionNode;
391  pConditionNode.push_back( (*nd) );
392 
393  ConditionType::Pointer pConditionType = FindPointCondition(rContactModelPart, (*nd) );
394 
395  pCondition = pConditionType->Clone(id, pConditionNode);
396 
397  pCondition->Set(CONTACT);
398 
399  ContactConditions.push_back(pCondition);
400 
401  }
402 
403  id +=1;
404  }
405 
406  }
407 
408 
409  rContactModelPart.Conditions().swap(ContactConditions);
410 
411 
412  if( mEchoLevel > 1 ){
413  std::cout<<" / NEW:"<<rContactModelPart.NumberOfConditions()<<"] "<<std::endl;
414  }
415 
416  std::string ModelPartName;
417 
418  //Add contact conditions to computing domain
420  {
421  if(i_mp->Is(SOLID) && i_mp->Is(ACTIVE))
422  ModelPartName = i_mp->Name();
423  }
424 
425  AddContactConditions(rContactModelPart, mrMainModelPart.GetSubModelPart(ModelPartName));
426 
427  //Add contact conditions to main domain( with AddCondition are already added )
428  //AddContactConditions(rContactModelPart, mrMainModelPart);
429 
430  if( mEchoLevel >= 1 )
431  std::cout<<" [CONTACT CANDIDATES : "<<rContactModelPart.NumberOfConditions()<<"] ("<<mContactModelPartName<<") "<<std::endl;
432 
433  KRATOS_CATCH( "" )
434 
435  }
436 
437 
438  //**************************************************************************
439  //**************************************************************************
440 
441  void AddContactConditions(ModelPart& rOriginModelPart, ModelPart& rDestinationModelPart)
442  {
443 
444  KRATOS_TRY
445 
446  //*******************************************************************
447  //adding contact conditions
448  //
449 
450  if( mEchoLevel > 1 ){
451  std::cout<<" ["<<rDestinationModelPart.Name()<<" :: CONDITIONS [OLD:"<<rDestinationModelPart.NumberOfConditions();
452  }
453 
454  for(ModelPart::ConditionsContainerType::iterator ic = rOriginModelPart.ConditionsBegin(); ic!= rOriginModelPart.ConditionsEnd(); ic++)
455  {
456 
457  if(ic->Is(CONTACT))
458  rDestinationModelPart.AddCondition(*(ic.base()));
459 
460  }
461 
462  if( mEchoLevel > 1 ){
463  std::cout<<" / NEW:"<<rDestinationModelPart.NumberOfConditions()<<"] "<<std::endl;
464  }
465 
466  KRATOS_CATCH( "" )
467 
468  }
469 
473 
474 
478 
479 
483 
484 
488 
489 
491 
492  private:
495 
499 
500 
504 
505  //**************************************************************************
506  //**************************************************************************
507  ConditionType::Pointer CreateConditionPrototype( Parameters& CustomParameters )
508  {
509  KRATOS_TRY
510 
511  ProcessInfo& rCurrentProcessInfo= mrMainModelPart.GetProcessInfo();
512  double Dimension = rCurrentProcessInfo[SPACE_DIMENSION];
513 
514  //create properties prototype for the contact conditions
515  unsigned int NumberOfProperties = mrMainModelPart.NumberOfProperties();
516 
517  mpProperties = Kratos::make_shared<PropertiesType>(NumberOfProperties);
518 
519  // Friction Law is not a Kratos Component
520  // std::string FrictionLawName = CustomParameters["friction_law_type"].GetString();
521  // const FrictionLawType pCloneFrictionLaw = KratosComponents<FrictionLawType>::Get(FrictionLawName);
522  // mpProperties->SetValue(FRICTION_LAW, pCloneFrictionLaw->Clone() );
523 
524  Parameters CustomProperties = CustomParameters["variables_of_properties"];
525 
526  mpProperties->SetValue(FRICTION_ACTIVE, CustomProperties["FRICTION_ACTIVE"].GetBool());
527  mpProperties->SetValue(MU_STATIC, CustomProperties["MU_STATIC"].GetDouble());
528  mpProperties->SetValue(MU_DYNAMIC, CustomProperties["MU_DYNAMIC"].GetDouble());
529  mpProperties->SetValue(PENALTY_PARAMETER, CustomProperties["PENALTY_PARAMETER"].GetDouble());
530  mpProperties->SetValue(TANGENTIAL_PENALTY_RATIO, CustomProperties["TANGENTIAL_PENALTY_RATIO"].GetDouble());
531  mpProperties->SetValue(TAU_STAB, CustomProperties["TAU_STAB"].GetDouble());
532  mpProperties->SetValue(THICKNESS, 1.0);
533  mpProperties->SetValue(CONTACT_FRICTION_ANGLE, 0.0);
534 
536 
537  // create geometry prototype for the contact conditions
538  GeometryType::Pointer pGeometry;
539  if( Dimension == 2 )
540  pGeometry = Kratos::make_shared<Point2DType>(*((mrMainModelPart.Nodes().begin()).base()));
541  else if( Dimension == 3 )
542  pGeometry = Kratos::make_shared<Point3DType>(*((mrMainModelPart.Nodes().begin()).base()));
543 
544 
545  // create condition prototype
546  std::string ConditionName = CustomParameters["contact_condition_type"].GetString();
547 
548  unsigned int LastConditionId = 1;
550  LastConditionId = mrMainModelPart.Conditions().back().Id() + 1;
551 
552 
553  if( ConditionName == "PointContactPenaltyCondition2D1N" ){
554  return Kratos::make_intrusive<PointRigidContactPenalty2DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
555  }
556  else if( ConditionName == "PointContactPenaltyCondition3D1N" ){
557  return Kratos::make_intrusive<PointRigidContactPenalty3DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
558  }
559  else if( ConditionName == "AxisymPointContactPenaltyCondition2D1N" ){
560  return Kratos::make_intrusive<AxisymPointRigidContactPenalty2DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
561  }
562  else if( ConditionName == "EPPointContactPenaltyCondition3D1N" ) {
563  return Kratos::make_intrusive<EPPointRigidContactPenalty3DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
564  }
565  else if( ConditionName == "EPPointContactPenaltyCondition2D1N" ) {
566  return Kratos::make_intrusive<EPPointRigidContactPenalty2DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
567  }
568  else if( ConditionName == "EPPointContactPenaltywPCondition3D1N" ) {
569  return Kratos::make_intrusive<EPPointRigidContactPenaltywP3DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
570  }
571  else if( ConditionName == "EPAxisymPointContactPenaltyCondition2D1N" ) {
572  return Kratos::make_intrusive<EPAxisymPointRigidContactPenalty2DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
573  } else {
574  std::cout << ConditionName << std::endl;
575  KRATOS_ERROR << "the specified contact condition does not exist " << std::endl;
576  }
577  // else if( ConditionName == "AxisymPointWaterContactPenaltyCondition2D1N" ){
578  // return Kratos::make_intrusive<AxisymPointRigidContactPenaltyWater2DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
579  // }
580  // else if( ConditionName == "BeamPointRigidContactPenalty3DCondition" ){
581  // return Kratos::make_intrusive<BeamPointRigidContactPenalty3DCondition>(LastConditionId, pGeometry, mpProperties, mpParametricWall);
582  // }
583 
584 
585  //------------------//
586 
587  // When conditions are registered....
588  // Condition::NodesArrayType ConditionNodes;
589  // ConditionNodes.push_back( *((mrMainModelPart.Nodes().begin()).base()) );
590  // ConditionType const& rCloneCondition = KratosComponents<ConditionType>::Get(ConditionName);
591  // mpConditionType = rCloneCondition.Create(LastConditionId, ElementNodes, mpProperties);
592 
593  return NULL;
594 
595  KRATOS_CATCH( "" )
596  }
597 
598  //**************************************************************************
599  //**************************************************************************
600 
601  void SearchContactConditions()
602  {
603  KRATOS_TRY
604 
605  //Create Rigid Contact Conditions
606 
607  //update parametric wall position
608  ProcessInfo& rCurrentProcessInfo= mrMainModelPart.GetProcessInfo();
609  double Time = rCurrentProcessInfo[TIME];
610 
611 
612 #ifdef _OPENMP
613  int number_of_threads = omp_get_max_threads();
614 #else
615  int number_of_threads = 1;
616 #endif
617 
619 
620  vector<unsigned int> nodes_partition;
621  OpenMPUtils::CreatePartition(number_of_threads, rNodes.size(), nodes_partition);
622 
623 
624 #pragma omp parallel
625 {
626 
627  int k = OpenMPUtils::ThisThread();
628  ModelPart::NodesContainerType::iterator NodesBegin = rNodes.begin() + nodes_partition[k];
629  ModelPart::NodesContainerType::iterator NodesEnd = rNodes.begin() + nodes_partition[k + 1];
630 
631  for(ModelPart::NodesContainerType::const_iterator nd = NodesBegin; nd != NodesEnd; nd++)
632  {
633  if( nd->Is(BOUNDARY) ){
634 
635  if( nd->IsNot(RIGID) )
636  {
637  //to perform contact with a tube radius must be set
638  double Radius = 0;
639 
640  if( nd->IsNot(SLAVE) ){
641  //Radius = nd->GetValue(MEAN_RADIUS);
642  }
643  else{
644  Radius = 0;
645  }
646 
647  Vector Point(3);
648  Point[0] = nd->X();
649  Point[1] = nd->Y();
650  Point[2] = nd->Z();
651 
652  if( mpParametricWall->IsInside(Point,Time,Radius) ){
653  nd->Set(CONTACT);
654  }
655  }
656 
657  }
658 
659  }
660 
661 
662 
663 }
664 
665  // **************** Serial version of the same search: **************** //
666 
667  // ModelPart::NodesContainerType& rNodes = mrMainModelPart.Nodes();
668 
669  // for(ModelPart::NodesContainerType::const_iterator nd = rNodes.begin(); nd != rNodes.end(); nd++)
670  // {
671  // if( nd->Is(BOUNDARY) ){
672 
673  // if( nd->IsNot(RIGID) )
674  // {
675  // //to perform contact with a tube radius must be set
676  // double Radius = 0;
677 
678  // if( nd->IsNot(SLAVE) ){
679  // //Radius = nd->GetValue(MEAN_RADIUS);
680  // }
681  // else{
682  // Radius = 0;
683  // }
684 
685  // Vector Point(3);
686  // Point[0] = nd->X();
687  // Point[1] = nd->Y();
688  // Point[2] = nd->Z();
689 
690  // if( mpParametricWall->IsInside(Point,Time,Radius) ){
691  // nd->Set(CONTACT);
692  // }
693  // }
694 
695  // }
696 
697  // }
698 
699  // **************** Serial version of the same search: **************** //
700 
701 
702 
703  KRATOS_CATCH( "" )
704 
705  }
706 
707 
708  //**************************************************************************
709  //**************************************************************************
710 
711  Condition::Pointer FindPointCondition(ModelPart& rModelPart, Node::Pointer pPoint)
712  {
713 
714  KRATOS_TRY
715  const ProcessInfo& rCurrentProcessInfo= mrMainModelPart.GetProcessInfo();
716  if ( rCurrentProcessInfo.Has(IS_RESTARTED) && rCurrentProcessInfo.Has(LOAD_RESTART) ) {
717  if ( rCurrentProcessInfo[IS_RESTARTED] == true) {
718  if ( rCurrentProcessInfo[STEP] == rCurrentProcessInfo[LOAD_RESTART] ) {
719 std::cout << " doing my.... ";
720  return mpConditionType;
721 
722  }
723  }
724  }
725 
726  for(ModelPart::ConditionsContainerType::iterator i_cond =rModelPart.ConditionsBegin(); i_cond!= rModelPart.ConditionsEnd(); i_cond++)
727  {
728  if( i_cond->Is(CONTACT) && i_cond->GetGeometry().size() == 1 ){
729  if( i_cond->GetGeometry()[0].Id() == pPoint->Id() ){
730  return ( *(i_cond.base()) );
731  }
732  }
733  }
734 
735  return mpConditionType;
736 
737  KRATOS_CATCH( "" )
738 
739  }
740 
741  //**************************************************************************
742  //**************************************************************************
743 
744  void ClearContactFlags ( )
745  {
746  KRATOS_TRY
747 
748  for(ModelPart::NodesContainerType::iterator i_node = mrMainModelPart.NodesBegin(); i_node!= mrMainModelPart.NodesEnd(); i_node++)
749  {
750  if( i_node->Is(CONTACT) ){
751  i_node->Set(CONTACT,false);
752  }
753  }
754 
755  KRATOS_CATCH( "" )
756  }
757 
758  //**************************************************************************
759  //**************************************************************************
760 
761  void RestoreContactFlags ( )
762  {
763  KRATOS_TRY
764 
765  for(ModelPart::ConditionsContainerType::iterator i_cond = mrMainModelPart.ConditionsBegin(); i_cond!= mrMainModelPart.ConditionsEnd(); i_cond++)
766  {
767  if( i_cond->Is(CONTACT) ){
768  for(unsigned int i=0; i<i_cond->GetGeometry().size(); i++)
769  {
770  i_cond->GetGeometry()[i].Set(CONTACT,true);
771  }
772  }
773  }
774 
775  KRATOS_CATCH( "" )
776  }
777 
781 
782 
786 
787 
791 
792 
796 
799 
801  //Process(Process const& rOther);
802 
803 
805 
806  }; // Class Process
807 
809 
812 
813 
817 
818 
820  inline std::istream& operator >> (std::istream& rIStream,
822 
824  inline std::ostream& operator << (std::ostream& rOStream,
826  {
827  rThis.PrintInfo(rOStream);
828  rOStream << std::endl;
829  rThis.PrintData(rOStream);
830 
831  return rOStream;
832  }
834 
835 
836 } // namespace Kratos.
837 
838 #endif // KRATOS_PARAMETRIC_WALL_CONTACT_SEARCH_PROCESS_H_INCLUDED defined
Base class for all Conditions.
Definition: condition.h:59
Geometry base class.
Definition: geometry.h:71
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
MeshType::ConditionsContainerType ConditionsContainerType
Condintions container. A vector set of Conditions with their Id's as key.
Definition: model_part.h:183
SubModelPartIterator SubModelPartsEnd()
Definition: model_part.h:1708
ConditionIterator ConditionsBegin(IndexType ThisIndex=0)
Definition: model_part.h:1361
SubModelPartIterator SubModelPartsBegin()
Definition: model_part.h:1698
SizeType NumberOfProperties(IndexType ThisIndex=0) const
Returns the number of properties of the mesh.
Definition: model_part.cpp:575
std::string & Name()
Definition: model_part.h:1811
NodeIterator NodesBegin(IndexType ThisIndex=0)
Definition: model_part.h:487
SubModelPartsContainerType::iterator SubModelPartIterator
Iterator over the sub model parts of this model part.
Definition: model_part.h:258
ConditionsContainerType & Conditions(IndexType ThisIndex=0)
Definition: model_part.h:1381
void AddProperties(PropertiesType::Pointer pNewProperties, IndexType ThisIndex=0)
Inserts a properties in the current mesh.
Definition: model_part.cpp:582
ProcessInfo & GetProcessInfo()
Definition: model_part.h:1746
MeshType::NodesContainerType NodesContainerType
Nodes container. Which is a vector set of nodes with their Id's as key.
Definition: model_part.h:128
void AddCondition(ConditionType::Pointer pNewCondition, IndexType ThisIndex=0)
Definition: model_part.cpp:1436
SizeType NumberOfConditions(IndexType ThisIndex=0) const
Definition: model_part.h:1218
ElementIterator ElementsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1179
ModelPart & GetSubModelPart(std::string const &SubModelPartName)
Definition: model_part.cpp:2029
NodeIterator NodesEnd(IndexType ThisIndex=0)
Definition: model_part.h:497
NodesContainerType & Nodes(IndexType ThisIndex=0)
Definition: model_part.h:507
ConditionIterator ConditionsEnd(IndexType ThisIndex=0)
Definition: model_part.h:1371
This class defines the node.
Definition: node.h:65
static int ThisThread()
Wrapper for omp_get_thread_num().
Definition: openmp_utils.h:108
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
void ValidateAndAssignDefaults(const Parameters &rDefaultParameters)
This function is designed to verify that the parameters under testing match the form prescribed by th...
Definition: kratos_parameters.cpp:1306
std::string GetString() const
This method returns the string contained in the current Parameter.
Definition: kratos_parameters.cpp:684
The base class for all processes in Kratos.
Definition: parametric_wall_contact_search_process.hpp:78
ConditionType::Pointer mpConditionType
Definition: parametric_wall_contact_search_process.hpp:336
ParametricWallContactSearchProcess(ModelPart &rMainModelPart)
Default constructor.
Definition: parametric_wall_contact_search_process.hpp:99
ModelPart::ConditionType ConditionType
Definition: parametric_wall_contact_search_process.hpp:87
void ExecuteBeforeSolutionLoop() override
Definition: parametric_wall_contact_search_process.hpp:248
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: parametric_wall_contact_search_process.hpp:305
PropertiesType::Pointer mpProperties
Definition: parametric_wall_contact_search_process.hpp:338
FrictionLaw::Pointer FrictionLawType
Definition: parametric_wall_contact_search_process.hpp:92
ConditionType::GeometryType GeometryType
Definition: parametric_wall_contact_search_process.hpp:89
SpatialBoundingBox::Pointer mpParametricWall
Definition: parametric_wall_contact_search_process.hpp:334
int mEchoLevel
Definition: parametric_wall_contact_search_process.hpp:342
ParametricWallContactSearchProcess(ModelPart &rMainModelPart, std::string rSubModelPartName, SpatialBoundingBox::Pointer pParametricWall, Parameters CustomParameters)
Definition: parametric_wall_contact_search_process.hpp:102
Point2D< ModelPart::NodeType > Point2DType
Definition: parametric_wall_contact_search_process.hpp:90
void AddContactConditions(ModelPart &rOriginModelPart, ModelPart &rDestinationModelPart)
Definition: parametric_wall_contact_search_process.hpp:441
virtual ~ParametricWallContactSearchProcess()
Destructor.
Definition: parametric_wall_contact_search_process.hpp:151
void operator()()
This operator is provided to call the process as a function and simply calls the Execute method.
Definition: parametric_wall_contact_search_process.hpp:159
void ExecuteBeforeOutputStep() override
this function will be executed at every time step BEFORE writing the output
Definition: parametric_wall_contact_search_process.hpp:266
std::string mContactModelPartName
Definition: parametric_wall_contact_search_process.hpp:340
void ExecuteFinalize() override
Definition: parametric_wall_contact_search_process.hpp:279
ModelPart::PropertiesType PropertiesType
Definition: parametric_wall_contact_search_process.hpp:88
Point3D< ModelPart::NodeType > Point3DType
Definition: parametric_wall_contact_search_process.hpp:91
void Execute() override
Execute method is used to execute the Process algorithms.
Definition: parametric_wall_contact_search_process.hpp:171
std::string Info() const override
Turn back information as a string.
Definition: parametric_wall_contact_search_process.hpp:299
void ExecuteFinalizeSolutionStep() override
this function will be executed at every time step AFTER performing the solve phase
Definition: parametric_wall_contact_search_process.hpp:260
void ExecuteInitialize() override
Definition: parametric_wall_contact_search_process.hpp:201
void ExecuteAfterOutputStep() override
this function will be executed at every time step AFTER writing the output
Definition: parametric_wall_contact_search_process.hpp:272
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: parametric_wall_contact_search_process.hpp:311
virtual void CreateContactConditions()
Definition: parametric_wall_contact_search_process.hpp:348
ModelPart & mrMainModelPart
Definition: parametric_wall_contact_search_process.hpp:332
KRATOS_CLASS_POINTER_DEFINITION(ParametricWallContactSearchProcess)
Pointer definition of Process.
ModelPart::NodeType NodeType
Definition: parametric_wall_contact_search_process.hpp:86
void ExecuteInitializeSolutionStep() override
this function will be executed at every time step BEFORE performing the solve phase
Definition: parametric_wall_contact_search_process.hpp:254
Definition: point_2d.h:53
Definition: point_3d.h:53
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
void push_back(const TPointerType &x)
Definition: pointer_vector.h:270
The base class for all processes in Kratos.
Definition: process.h:49
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
#define KRATOS_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_ERROR
Definition: exception.h:161
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::istream & operator>>(std::istream &rIStream, LinearMasterSlaveConstraint &rThis)
input stream function
std::ostream & operator<<(std::ostream &rOStream, const LinearMasterSlaveConstraint &rThis)
output stream function
Definition: linear_master_slave_constraint.h:432
ProcessInfo
Definition: edgebased_PureConvection.py:116
int k
Definition: quadrature.py:595
integer i
Definition: TensorModule.f:17